zhihao-ui 1.2.1 → 1.2.4
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/es/{BaseInfo-DqxHM6sE.js → BaseInfo-DSoB7lXu.js} +1 -1
- package/dist/es/Button-CSkwolvy.js +32 -0
- package/dist/es/{DatePicker-D8LPaPf6.js → DatePicker-BuM1QvvJ.js} +15 -15
- package/dist/es/{DetailHeader-Bzo3r_rs.js → DetailHeader-DLWS2a6d.js} +3 -3
- package/dist/es/{DetailSubTitle-C5pVYJhX.js → DetailSubTitle-Bohm33lU.js} +2 -2
- package/dist/es/{Dialog-DrsOxk4u.js → Dialog-dbO52Pj0.js} +3 -3
- package/dist/es/{EditInfoPair-CM5piQwT.js → EditInfoPair-sJNaUadM.js} +3 -3
- package/dist/es/{FileWrapper-DN-KKB9p.js → FileWrapper-BQgaAu1K.js} +4 -4
- package/dist/es/{Grid-Ds-Jy0Mn.js → Grid-P-t8UiMv.js} +1 -1
- package/dist/es/{InfoPair-CnBR3fy9.js → InfoPair-BNypeCJn.js} +3 -3
- package/dist/es/{Input-C1s8JqmI.js → Input-DpsLV8LI.js} +3 -3
- package/dist/es/{Loading-DELLXz7f.js → Loading-DXdxoKLU.js} +2 -2
- package/dist/es/Map-BchE1ZDm.js +1183 -0
- package/dist/es/{MessageBox-B5ibisN4.js → MessageBox-DRwBLDiG.js} +6 -6
- package/dist/es/{MoneyInput-Dt_ZE-zv.js → MoneyInput-E6oSL6tO.js} +8 -8
- package/dist/es/{PageHeadPanel-CdohXWA9.js → PageHeadPanel-fhMuGUkI.js} +2 -2
- package/dist/es/{ToolTips-CxyQMewg.js → ToolTips-lv_GNnZo.js} +5 -5
- package/dist/es/index.js +24 -21
- package/dist/es/{utils-DBdiSe6_.js → utils-BMWHW3o7.js} +1 -1
- package/dist/es/vendor-BXx3MaXc.js +42114 -0
- package/dist/index.css +1 -1
- package/dist/types/components/Button/Button.vue.d.ts +8 -13
- package/dist/types/components/Button/index.d.ts +15 -24
- package/dist/types/components/Map/Map.vue.d.ts +36 -0
- package/dist/types/components/Map/components/copyright.vue.d.ts +2 -0
- package/dist/types/components/Map/components/fullscreen.vue.d.ts +14 -0
- package/dist/types/components/Map/components/measure.vue.d.ts +15 -0
- package/dist/types/components/Map/components/scaleLine.vue.d.ts +4 -0
- package/dist/types/components/Map/components/toolPanel.vue.d.ts +21 -0
- package/dist/types/components/Map/components/zoomControl.vue.d.ts +10 -0
- package/dist/types/components/Map/config.d.ts +26 -0
- package/dist/types/components/Map/enum/car.d.ts +5 -0
- package/dist/types/components/Map/enum/device.d.ts +8 -0
- package/dist/types/components/Map/enum/index.d.ts +4 -0
- package/dist/types/components/Map/enum/openLayers.d.ts +10 -0
- package/dist/types/components/Map/index.d.ts +91 -0
- package/dist/types/components/Map/interface/common/BaseEntity.d.ts +29 -0
- package/dist/types/components/Map/interface/common/page.d.ts +34 -0
- package/dist/types/components/Map/interface/entity/dashboard.d.ts +16 -0
- package/dist/types/components/Map/interface/entity/map.d.ts +36 -0
- package/dist/types/components/Map/interface/entity/queryLicenseResponse.d.ts +197 -0
- package/dist/types/components/Map/interface/entity/ship.d.ts +361 -0
- package/dist/types/components/Map/interface/entity/shipInfoVo.d.ts +186 -0
- package/dist/types/components/Map/interface/entity/shipMapData.d.ts +22 -0
- package/dist/types/components/Map/interface/entity/shipMarker.d.ts +8 -0
- package/dist/types/components/Map/interface/entity/shipTrack.d.ts +60 -0
- package/dist/types/components/Map/interface/entity/vehicle.d.ts +174 -0
- package/dist/types/components/Map/interface/index.d.ts +11 -0
- package/dist/types/components/Map/render/canvasRender/canvasRender.d.ts +6 -0
- package/dist/types/components/Map/render/canvasRender/geometry.d.ts +19 -0
- package/dist/types/components/Map/render/canvasRender/renderShipStyle.d.ts +3 -0
- package/dist/types/components/Map/render/canvasRender/renderTrackStyle.d.ts +5 -0
- package/dist/types/components/Map/render/canvasRender/renderTruckStyle.d.ts +3 -0
- package/dist/types/components/Map/render/renderDashboard.d.ts +10 -0
- package/dist/types/components/Map/render/renderShip.d.ts +10 -0
- package/dist/types/components/Map/render/renderTrack.d.ts +13 -0
- package/dist/types/components/Map/render/renderTruck.d.ts +4 -0
- package/dist/types/components/Map/types.d.ts +9 -0
- package/dist/types/components/Map/utils/common.d.ts +24 -0
- package/dist/types/components/Map/utils/format.d.ts +16 -0
- package/dist/types/components/Map/utils/store.d.ts +18 -0
- package/dist/types/components/Map/utils/transform.d.ts +33 -0
- package/dist/types/components/MessageBox/MessageBox.vue.d.ts +6 -6
- package/dist/types/components/MessageBox/index.d.ts +9 -9
- package/dist/types/components/index.d.ts +1 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +625 -22
- package/package.json +1 -1
- package/dist/es/Button-Q7GkKwFF.js +0 -22
- package/dist/es/vendor-mKFy0Hb6.js +0 -12409
package/dist/umd/index.umd.cjs
CHANGED
|
@@ -1,40 +1,643 @@
|
|
|
1
|
-
(function(pe,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(pe=typeof globalThis<"u"?globalThis:pe||self,t(pe.ZhihaoUI={},pe.Vue))})(this,function(pe,t){"use strict";var oi=typeof global=="object"&&global&&global.Object===Object&&global,Hf=typeof self=="object"&&self&&self.Object===Object&&self,_t=oi||Hf||Function("return this")(),ft=_t.Symbol,si=Object.prototype,Uf=si.hasOwnProperty,qf=si.toString,lr=ft?ft.toStringTag:void 0;function Gf(e){var n=Uf.call(e,lr),r=e[lr];try{e[lr]=void 0;var a=!0}catch{}var o=qf.call(e);return a&&(n?e[lr]=r:delete e[lr]),o}var Kf=Object.prototype,Zf=Kf.toString;function Jf(e){return Zf.call(e)}var Xf="[object Null]",Qf="[object Undefined]",ii=ft?ft.toStringTag:void 0;function In(e){return e==null?e===void 0?Qf:Xf:ii&&ii in Object(e)?Gf(e):Jf(e)}function sn(e){return e!=null&&typeof e=="object"}var eu="[object Symbol]";function jr(e){return typeof e=="symbol"||sn(e)&&In(e)==eu}function tu(e,n){for(var r=-1,a=e==null?0:e.length,o=Array(a);++r<a;)o[r]=n(e[r],r,e);return o}var ut=Array.isArray,nu=1/0,li=ft?ft.prototype:void 0,ci=li?li.toString:void 0;function di(e){if(typeof e=="string")return e;if(ut(e))return tu(e,di)+"";if(jr(e))return ci?ci.call(e):"";var n=e+"";return n=="0"&&1/e==-nu?"-0":n}var ru=/\s/;function au(e){for(var n=e.length;n--&&ru.test(e.charAt(n)););return n}var ou=/^\s+/;function su(e){return e&&e.slice(0,au(e)+1).replace(ou,"")}function Nt(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var fi=NaN,iu=/^[-+]0x[0-9a-f]+$/i,lu=/^0b[01]+$/i,cu=/^0o[0-7]+$/i,du=parseInt;function ui(e){if(typeof e=="number")return e;if(jr(e))return fi;if(Nt(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=Nt(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=su(e);var r=lu.test(e);return r||cu.test(e)?du(e.slice(2),r?2:8):iu.test(e)?fi:+e}function pi(e){return e}var fu="[object AsyncFunction]",uu="[object Function]",pu="[object GeneratorFunction]",mu="[object Proxy]";function mi(e){if(!Nt(e))return!1;var n=In(e);return n==uu||n==pu||n==fu||n==mu}var Ja=_t["__core-js_shared__"],hi=function(){var e=/[^.]+$/.exec(Ja&&Ja.keys&&Ja.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function hu(e){return!!hi&&hi in e}var gu=Function.prototype,yu=gu.toString;function wn(e){if(e!=null){try{return yu.call(e)}catch{}try{return e+""}catch{}}return""}var bu=/[\\^$.*+?()[\]{}|]/g,wu=/^\[object .+?Constructor\]$/,_u=Function.prototype,ku=Object.prototype,Su=_u.toString,Cu=ku.hasOwnProperty,vu=RegExp("^"+Su.call(Cu).replace(bu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Eu(e){if(!Nt(e)||hu(e))return!1;var n=mi(e)?vu:wu;return n.test(wn(e))}function Mu(e,n){return e==null?void 0:e[n]}function _n(e,n){var r=Mu(e,n);return Eu(r)?r:void 0}var Xa=_n(_t,"WeakMap"),gi=Object.create,Tu=function(){function e(){}return function(n){if(!Nt(n))return{};if(gi)return gi(n);e.prototype=n;var r=new e;return e.prototype=void 0,r}}();function Du(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}function Ou(e,n){var r=-1,a=e.length;for(n||(n=Array(a));++r<a;)n[r]=e[r];return n}var xu=800,Nu=16,Pu=Date.now;function $u(e){var n=0,r=0;return function(){var a=Pu(),o=Nu-(a-r);if(r=a,o>0){if(++n>=xu)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function Bu(e){return function(){return e}}var Wr=function(){try{var e=_n(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Vu=Wr?function(e,n){return Wr(e,"toString",{configurable:!0,enumerable:!1,value:Bu(n),writable:!0})}:pi,Iu=$u(Vu);function yi(e,n){for(var r=-1,a=e==null?0:e.length;++r<a&&n(e[r],r,e)!==!1;);return e}var Au=9007199254740991,Ru=/^(?:0|[1-9]\d*)$/;function Qa(e,n){var r=typeof e;return n=n??Au,!!n&&(r=="number"||r!="symbol"&&Ru.test(e))&&e>-1&&e%1==0&&e<n}function bi(e,n,r){n=="__proto__"&&Wr?Wr(e,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[n]=r}function eo(e,n){return e===n||e!==e&&n!==n}var Fu=Object.prototype,Lu=Fu.hasOwnProperty;function to(e,n,r){var a=e[n];(!(Lu.call(e,n)&&eo(a,r))||r===void 0&&!(n in e))&&bi(e,n,r)}function Hr(e,n,r,a){var o=!r;r||(r={});for(var s=-1,i=n.length;++s<i;){var l=n[s],c=void 0;c===void 0&&(c=e[l]),o?bi(r,l,c):to(r,l,c)}return r}var wi=Math.max;function Yu(e,n,r){return n=wi(n===void 0?e.length-1:n,0),function(){for(var a=arguments,o=-1,s=wi(a.length-n,0),i=Array(s);++o<s;)i[o]=a[n+o];o=-1;for(var l=Array(n+1);++o<n;)l[o]=a[o];return l[n]=r(i),Du(e,this,l)}}var zu=9007199254740991;function no(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zu}function ro(e){return e!=null&&no(e.length)&&!mi(e)}var ju=Object.prototype;function ao(e){var n=e&&e.constructor,r=typeof n=="function"&&n.prototype||ju;return e===r}function Wu(e,n){for(var r=-1,a=Array(e);++r<e;)a[r]=n(r);return a}var Hu="[object Arguments]";function _i(e){return sn(e)&&In(e)==Hu}var ki=Object.prototype,Uu=ki.hasOwnProperty,qu=ki.propertyIsEnumerable,oo=_i(function(){return arguments}())?_i:function(e){return sn(e)&&Uu.call(e,"callee")&&!qu.call(e,"callee")};function Gu(){return!1}var Si=typeof pe=="object"&&pe&&!pe.nodeType&&pe,Ci=Si&&typeof module=="object"&&module&&!module.nodeType&&module,Ku=Ci&&Ci.exports===Si,vi=Ku?_t.Buffer:void 0,Zu=vi?vi.isBuffer:void 0,Ur=Zu||Gu,Ju="[object Arguments]",Xu="[object Array]",Qu="[object Boolean]",ep="[object Date]",tp="[object Error]",np="[object Function]",rp="[object Map]",ap="[object Number]",op="[object Object]",sp="[object RegExp]",ip="[object Set]",lp="[object String]",cp="[object WeakMap]",dp="[object ArrayBuffer]",fp="[object DataView]",up="[object Float32Array]",pp="[object Float64Array]",mp="[object Int8Array]",hp="[object Int16Array]",gp="[object Int32Array]",yp="[object Uint8Array]",bp="[object Uint8ClampedArray]",wp="[object Uint16Array]",_p="[object Uint32Array]",De={};De[up]=De[pp]=De[mp]=De[hp]=De[gp]=De[yp]=De[bp]=De[wp]=De[_p]=!0,De[Ju]=De[Xu]=De[dp]=De[Qu]=De[fp]=De[ep]=De[tp]=De[np]=De[rp]=De[ap]=De[op]=De[sp]=De[ip]=De[lp]=De[cp]=!1;function kp(e){return sn(e)&&no(e.length)&&!!De[In(e)]}function so(e){return function(n){return e(n)}}var Ei=typeof pe=="object"&&pe&&!pe.nodeType&&pe,cr=Ei&&typeof module=="object"&&module&&!module.nodeType&&module,Sp=cr&&cr.exports===Ei,io=Sp&&oi.process,An=function(){try{var e=cr&&cr.require&&cr.require("util").types;return e||io&&io.binding&&io.binding("util")}catch{}}(),Mi=An&&An.isTypedArray,Ti=Mi?so(Mi):kp,Cp=Object.prototype,vp=Cp.hasOwnProperty;function Di(e,n){var r=ut(e),a=!r&&oo(e),o=!r&&!a&&Ur(e),s=!r&&!a&&!o&&Ti(e),i=r||a||o||s,l=i?Wu(e.length,String):[],c=l.length;for(var d in e)(n||vp.call(e,d))&&!(i&&(d=="length"||o&&(d=="offset"||d=="parent")||s&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Qa(d,c)))&&l.push(d);return l}function Oi(e,n){return function(r){return e(n(r))}}var Ep=Oi(Object.keys,Object),Mp=Object.prototype,Tp=Mp.hasOwnProperty;function Dp(e){if(!ao(e))return Ep(e);var n=[];for(var r in Object(e))Tp.call(e,r)&&r!="constructor"&&n.push(r);return n}function qr(e){return ro(e)?Di(e):Dp(e)}function Op(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}var xp=Object.prototype,Np=xp.hasOwnProperty;function Pp(e){if(!Nt(e))return Op(e);var n=ao(e),r=[];for(var a in e)a=="constructor"&&(n||!Np.call(e,a))||r.push(a);return r}function lo(e){return ro(e)?Di(e,!0):Pp(e)}var $p=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bp=/^\w*$/;function Vp(e,n){if(ut(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||jr(e)?!0:Bp.test(e)||!$p.test(e)||n!=null&&e in Object(n)}var dr=_n(Object,"create");function Ip(){this.__data__=dr?dr(null):{},this.size=0}function Ap(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Rp="__lodash_hash_undefined__",Fp=Object.prototype,Lp=Fp.hasOwnProperty;function Yp(e){var n=this.__data__;if(dr){var r=n[e];return r===Rp?void 0:r}return Lp.call(n,e)?n[e]:void 0}var zp=Object.prototype,jp=zp.hasOwnProperty;function Wp(e){var n=this.__data__;return dr?n[e]!==void 0:jp.call(n,e)}var Hp="__lodash_hash_undefined__";function Up(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=dr&&n===void 0?Hp:n,this}function kn(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}kn.prototype.clear=Ip,kn.prototype.delete=Ap,kn.prototype.get=Yp,kn.prototype.has=Wp,kn.prototype.set=Up;function qp(){this.__data__=[],this.size=0}function Gr(e,n){for(var r=e.length;r--;)if(eo(e[r][0],n))return r;return-1}var Gp=Array.prototype,Kp=Gp.splice;function Zp(e){var n=this.__data__,r=Gr(n,e);if(r<0)return!1;var a=n.length-1;return r==a?n.pop():Kp.call(n,r,1),--this.size,!0}function Jp(e){var n=this.__data__,r=Gr(n,e);return r<0?void 0:n[r][1]}function Xp(e){return Gr(this.__data__,e)>-1}function Qp(e,n){var r=this.__data__,a=Gr(r,e);return a<0?(++this.size,r.push([e,n])):r[a][1]=n,this}function zt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}zt.prototype.clear=qp,zt.prototype.delete=Zp,zt.prototype.get=Jp,zt.prototype.has=Xp,zt.prototype.set=Qp;var fr=_n(_t,"Map");function em(){this.size=0,this.__data__={hash:new kn,map:new(fr||zt),string:new kn}}function tm(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function Kr(e,n){var r=e.__data__;return tm(n)?r[typeof n=="string"?"string":"hash"]:r.map}function nm(e){var n=Kr(this,e).delete(e);return this.size-=n?1:0,n}function rm(e){return Kr(this,e).get(e)}function am(e){return Kr(this,e).has(e)}function om(e,n){var r=Kr(this,e),a=r.size;return r.set(e,n),this.size+=r.size==a?0:1,this}function jt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var a=e[n];this.set(a[0],a[1])}}jt.prototype.clear=em,jt.prototype.delete=nm,jt.prototype.get=rm,jt.prototype.has=am,jt.prototype.set=om;var sm="Expected a function";function co(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(sm);var r=function(){var a=arguments,o=n?n.apply(this,a):a[0],s=r.cache;if(s.has(o))return s.get(o);var i=e.apply(this,a);return r.cache=s.set(o,i)||s,i};return r.cache=new(co.Cache||jt),r}co.Cache=jt;var im=500;function lm(e){var n=co(e,function(a){return r.size===im&&r.clear(),a}),r=n.cache;return n}var cm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dm=/\\(\\)?/g,fm=lm(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(cm,function(r,a,o,s){n.push(o?s.replace(dm,"$1"):a||r)}),n});function um(e){return e==null?"":di(e)}function Zr(e,n){return ut(e)?e:Vp(e,n)?[e]:fm(um(e))}var pm=1/0;function fo(e){if(typeof e=="string"||jr(e))return e;var n=e+"";return n=="0"&&1/e==-pm?"-0":n}function xi(e,n){n=Zr(n,e);for(var r=0,a=n.length;e!=null&&r<a;)e=e[fo(n[r++])];return r&&r==a?e:void 0}function Ni(e,n,r){var a=e==null?void 0:xi(e,n);return a===void 0?r:a}function uo(e,n){for(var r=-1,a=n.length,o=e.length;++r<a;)e[o+r]=n[r];return e}var Pi=ft?ft.isConcatSpreadable:void 0;function mm(e){return ut(e)||oo(e)||!!(Pi&&e&&e[Pi])}function hm(e,n,r,a,o){var s=-1,i=e.length;for(r||(r=mm),o||(o=[]);++s<i;){var l=e[s];r(l)?uo(o,l):o[o.length]=l}return o}function $i(e){var n=e==null?0:e.length;return n?hm(e):[]}function gm(e){return Iu(Yu(e,void 0,$i),e+"")}var Bi=Oi(Object.getPrototypeOf,Object);function po(){if(!arguments.length)return[];var e=arguments[0];return ut(e)?e:[e]}function ym(){this.__data__=new zt,this.size=0}function bm(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}function wm(e){return this.__data__.get(e)}function _m(e){return this.__data__.has(e)}var km=200;function Sm(e,n){var r=this.__data__;if(r instanceof zt){var a=r.__data__;if(!fr||a.length<km-1)return a.push([e,n]),this.size=++r.size,this;r=this.__data__=new jt(a)}return r.set(e,n),this.size=r.size,this}function Wt(e){var n=this.__data__=new zt(e);this.size=n.size}Wt.prototype.clear=ym,Wt.prototype.delete=bm,Wt.prototype.get=wm,Wt.prototype.has=_m,Wt.prototype.set=Sm;function Cm(e,n){return e&&Hr(n,qr(n),e)}function vm(e,n){return e&&Hr(n,lo(n),e)}var Vi=typeof pe=="object"&&pe&&!pe.nodeType&&pe,Ii=Vi&&typeof module=="object"&&module&&!module.nodeType&&module,Em=Ii&&Ii.exports===Vi,Ai=Em?_t.Buffer:void 0,Ri=Ai?Ai.allocUnsafe:void 0;function Mm(e,n){if(n)return e.slice();var r=e.length,a=Ri?Ri(r):new e.constructor(r);return e.copy(a),a}function Tm(e,n){for(var r=-1,a=e==null?0:e.length,o=0,s=[];++r<a;){var i=e[r];n(i,r,e)&&(s[o++]=i)}return s}function Fi(){return[]}var Dm=Object.prototype,Om=Dm.propertyIsEnumerable,Li=Object.getOwnPropertySymbols,mo=Li?function(e){return e==null?[]:(e=Object(e),Tm(Li(e),function(n){return Om.call(e,n)}))}:Fi;function xm(e,n){return Hr(e,mo(e),n)}var Nm=Object.getOwnPropertySymbols,Yi=Nm?function(e){for(var n=[];e;)uo(n,mo(e)),e=Bi(e);return n}:Fi;function Pm(e,n){return Hr(e,Yi(e),n)}function zi(e,n,r){var a=n(e);return ut(e)?a:uo(a,r(e))}function ho(e){return zi(e,qr,mo)}function $m(e){return zi(e,lo,Yi)}var go=_n(_t,"DataView"),yo=_n(_t,"Promise"),bo=_n(_t,"Set"),ji="[object Map]",Bm="[object Object]",Wi="[object Promise]",Hi="[object Set]",Ui="[object WeakMap]",qi="[object DataView]",Vm=wn(go),Im=wn(fr),Am=wn(yo),Rm=wn(bo),Fm=wn(Xa),kt=In;(go&&kt(new go(new ArrayBuffer(1)))!=qi||fr&&kt(new fr)!=ji||yo&&kt(yo.resolve())!=Wi||bo&&kt(new bo)!=Hi||Xa&&kt(new Xa)!=Ui)&&(kt=function(e){var n=In(e),r=n==Bm?e.constructor:void 0,a=r?wn(r):"";if(a)switch(a){case Vm:return qi;case Im:return ji;case Am:return Wi;case Rm:return Hi;case Fm:return Ui}return n});var Lm=Object.prototype,Ym=Lm.hasOwnProperty;function zm(e){var n=e.length,r=new e.constructor(n);return n&&typeof e[0]=="string"&&Ym.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Jr=_t.Uint8Array;function wo(e){var n=new e.constructor(e.byteLength);return new Jr(n).set(new Jr(e)),n}function jm(e,n){var r=n?wo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Wm=/\w*$/;function Hm(e){var n=new e.constructor(e.source,Wm.exec(e));return n.lastIndex=e.lastIndex,n}var Gi=ft?ft.prototype:void 0,Ki=Gi?Gi.valueOf:void 0;function Um(e){return Ki?Object(Ki.call(e)):{}}function qm(e,n){var r=n?wo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Gm="[object Boolean]",Km="[object Date]",Zm="[object Map]",Jm="[object Number]",Xm="[object RegExp]",Qm="[object Set]",eh="[object String]",th="[object Symbol]",nh="[object ArrayBuffer]",rh="[object DataView]",ah="[object Float32Array]",oh="[object Float64Array]",sh="[object Int8Array]",ih="[object Int16Array]",lh="[object Int32Array]",ch="[object Uint8Array]",dh="[object Uint8ClampedArray]",fh="[object Uint16Array]",uh="[object Uint32Array]";function ph(e,n,r){var a=e.constructor;switch(n){case nh:return wo(e);case Gm:case Km:return new a(+e);case rh:return jm(e,r);case ah:case oh:case sh:case ih:case lh:case ch:case dh:case fh:case uh:return qm(e,r);case Zm:return new a;case Jm:case eh:return new a(e);case Xm:return Hm(e);case Qm:return new a;case th:return Um(e)}}function mh(e){return typeof e.constructor=="function"&&!ao(e)?Tu(Bi(e)):{}}var hh="[object Map]";function gh(e){return sn(e)&&kt(e)==hh}var Zi=An&&An.isMap,yh=Zi?so(Zi):gh,bh="[object Set]";function wh(e){return sn(e)&&kt(e)==bh}var Ji=An&&An.isSet,_h=Ji?so(Ji):wh,kh=1,Sh=2,Ch=4,Xi="[object Arguments]",vh="[object Array]",Eh="[object Boolean]",Mh="[object Date]",Th="[object Error]",Qi="[object Function]",Dh="[object GeneratorFunction]",Oh="[object Map]",xh="[object Number]",el="[object Object]",Nh="[object RegExp]",Ph="[object Set]",$h="[object String]",Bh="[object Symbol]",Vh="[object WeakMap]",Ih="[object ArrayBuffer]",Ah="[object DataView]",Rh="[object Float32Array]",Fh="[object Float64Array]",Lh="[object Int8Array]",Yh="[object Int16Array]",zh="[object Int32Array]",jh="[object Uint8Array]",Wh="[object Uint8ClampedArray]",Hh="[object Uint16Array]",Uh="[object Uint32Array]",Te={};Te[Xi]=Te[vh]=Te[Ih]=Te[Ah]=Te[Eh]=Te[Mh]=Te[Rh]=Te[Fh]=Te[Lh]=Te[Yh]=Te[zh]=Te[Oh]=Te[xh]=Te[el]=Te[Nh]=Te[Ph]=Te[$h]=Te[Bh]=Te[jh]=Te[Wh]=Te[Hh]=Te[Uh]=!0,Te[Th]=Te[Qi]=Te[Vh]=!1;function Xr(e,n,r,a,o,s){var i,l=n&kh,c=n&Sh,d=n&Ch;if(i!==void 0)return i;if(!Nt(e))return e;var u=ut(e);if(u){if(i=zm(e),!l)return Ou(e,i)}else{var f=kt(e),p=f==Qi||f==Dh;if(Ur(e))return Mm(e,l);if(f==el||f==Xi||p&&!o){if(i=c||p?{}:mh(e),!l)return c?Pm(e,vm(i,e)):xm(e,Cm(i,e))}else{if(!Te[f])return o?e:{};i=ph(e,f,l)}}s||(s=new Wt);var g=s.get(e);if(g)return g;s.set(e,i),_h(e)?e.forEach(function(w){i.add(Xr(w,n,r,w,e,s))}):yh(e)&&e.forEach(function(w,y){i.set(y,Xr(w,n,r,y,e,s))});var m=d?c?$m:ho:c?lo:qr,h=u?void 0:m(e);return yi(h||e,function(w,y){h&&(y=w,w=e[y]),to(i,y,Xr(w,n,r,y,e,s))}),i}var qh=4;function tl(e){return Xr(e,qh)}var Gh="__lodash_hash_undefined__";function Kh(e){return this.__data__.set(e,Gh),this}function Zh(e){return this.__data__.has(e)}function Qr(e){var n=-1,r=e==null?0:e.length;for(this.__data__=new jt;++n<r;)this.add(e[n])}Qr.prototype.add=Qr.prototype.push=Kh,Qr.prototype.has=Zh;function Jh(e,n){for(var r=-1,a=e==null?0:e.length;++r<a;)if(n(e[r],r,e))return!0;return!1}function Xh(e,n){return e.has(n)}var Qh=1,eg=2;function nl(e,n,r,a,o,s){var i=r&Qh,l=e.length,c=n.length;if(l!=c&&!(i&&c>l))return!1;var d=s.get(e),u=s.get(n);if(d&&u)return d==n&&u==e;var f=-1,p=!0,g=r&eg?new Qr:void 0;for(s.set(e,n),s.set(n,e);++f<l;){var m=e[f],h=n[f];if(a)var w=i?a(h,m,f,n,e,s):a(m,h,f,e,n,s);if(w!==void 0){if(w)continue;p=!1;break}if(g){if(!Jh(n,function(y,k){if(!Xh(g,k)&&(m===y||o(m,y,r,a,s)))return g.push(k)})){p=!1;break}}else if(!(m===h||o(m,h,r,a,s))){p=!1;break}}return s.delete(e),s.delete(n),p}function tg(e){var n=-1,r=Array(e.size);return e.forEach(function(a,o){r[++n]=[o,a]}),r}function ng(e){var n=-1,r=Array(e.size);return e.forEach(function(a){r[++n]=a}),r}var rg=1,ag=2,og="[object Boolean]",sg="[object Date]",ig="[object Error]",lg="[object Map]",cg="[object Number]",dg="[object RegExp]",fg="[object Set]",ug="[object String]",pg="[object Symbol]",mg="[object ArrayBuffer]",hg="[object DataView]",rl=ft?ft.prototype:void 0,_o=rl?rl.valueOf:void 0;function gg(e,n,r,a,o,s,i){switch(r){case hg:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case mg:return!(e.byteLength!=n.byteLength||!s(new Jr(e),new Jr(n)));case og:case sg:case cg:return eo(+e,+n);case ig:return e.name==n.name&&e.message==n.message;case dg:case ug:return e==n+"";case lg:var l=tg;case fg:var c=a&rg;if(l||(l=ng),e.size!=n.size&&!c)return!1;var d=i.get(e);if(d)return d==n;a|=ag,i.set(e,n);var u=nl(l(e),l(n),a,o,s,i);return i.delete(e),u;case pg:if(_o)return _o.call(e)==_o.call(n)}return!1}var yg=1,bg=Object.prototype,wg=bg.hasOwnProperty;function _g(e,n,r,a,o,s){var i=r&yg,l=ho(e),c=l.length,d=ho(n),u=d.length;if(c!=u&&!i)return!1;for(var f=c;f--;){var p=l[f];if(!(i?p in n:wg.call(n,p)))return!1}var g=s.get(e),m=s.get(n);if(g&&m)return g==n&&m==e;var h=!0;s.set(e,n),s.set(n,e);for(var w=i;++f<c;){p=l[f];var y=e[p],k=n[p];if(a)var C=i?a(k,y,p,n,e,s):a(y,k,p,e,n,s);if(!(C===void 0?y===k||o(y,k,r,a,s):C)){h=!1;break}w||(w=p=="constructor")}if(h&&!w){var b=e.constructor,_=n.constructor;b!=_&&"constructor"in e&&"constructor"in n&&!(typeof b=="function"&&b instanceof b&&typeof _=="function"&&_ instanceof _)&&(h=!1)}return s.delete(e),s.delete(n),h}var kg=1,al="[object Arguments]",ol="[object Array]",ea="[object Object]",Sg=Object.prototype,sl=Sg.hasOwnProperty;function Cg(e,n,r,a,o,s){var i=ut(e),l=ut(n),c=i?ol:kt(e),d=l?ol:kt(n);c=c==al?ea:c,d=d==al?ea:d;var u=c==ea,f=d==ea,p=c==d;if(p&&Ur(e)){if(!Ur(n))return!1;i=!0,u=!1}if(p&&!u)return s||(s=new Wt),i||Ti(e)?nl(e,n,r,a,o,s):gg(e,n,c,r,a,o,s);if(!(r&kg)){var g=u&&sl.call(e,"__wrapped__"),m=f&&sl.call(n,"__wrapped__");if(g||m){var h=g?e.value():e,w=m?n.value():n;return s||(s=new Wt),o(h,w,r,a,s)}}return p?(s||(s=new Wt),_g(e,n,r,a,o,s)):!1}function il(e,n,r,a,o){return e===n?!0:e==null||n==null||!sn(e)&&!sn(n)?e!==e&&n!==n:Cg(e,n,r,a,il,o)}function vg(e,n){return e!=null&&n in Object(e)}function Eg(e,n,r){n=Zr(n,e);for(var a=-1,o=n.length,s=!1;++a<o;){var i=fo(n[a]);if(!(s=e!=null&&r(e,i)))break;e=e[i]}return s||++a!=o?s:(o=e==null?0:e.length,!!o&&no(o)&&Qa(i,o)&&(ut(e)||oo(e)))}function Mg(e,n){return e!=null&&Eg(e,n,vg)}function Tg(e){return function(n,r,a){for(var o=-1,s=Object(n),i=a(n),l=i.length;l--;){var c=i[++o];if(r(s[c],c,s)===!1)break}return n}}var Dg=Tg();function Og(e,n){return e&&Dg(e,n,qr)}function xg(e,n){return function(r,a){if(r==null)return r;if(!ro(r))return e(r,a);for(var o=r.length,s=-1,i=Object(r);++s<o&&a(i[s],s,i)!==!1;);return r}}var Ng=xg(Og),ko=function(){return _t.Date.now()},Pg="Expected a function",$g=Math.max,Bg=Math.min;function Vg(e,n,r){var a,o,s,i,l,c,d=0,u=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(Pg);n=ui(n)||0,Nt(r)&&(u=!!r.leading,f="maxWait"in r,s=f?$g(ui(r.maxWait)||0,n):s,p="trailing"in r?!!r.trailing:p);function g(v){var M=a,D=o;return a=o=void 0,d=v,i=e.apply(D,M),i}function m(v){return d=v,l=setTimeout(y,n),u?g(v):i}function h(v){var M=v-c,D=v-d,B=n-M;return f?Bg(B,s-D):B}function w(v){var M=v-c,D=v-d;return c===void 0||M>=n||M<0||f&&D>=s}function y(){var v=ko();if(w(v))return k(v);l=setTimeout(y,h(v))}function k(v){return l=void 0,p&&a?g(v):(a=o=void 0,i)}function C(){l!==void 0&&clearTimeout(l),d=0,a=c=o=l=void 0}function b(){return l===void 0?i:k(ko())}function _(){var v=ko(),M=w(v);if(a=arguments,o=this,c=v,M){if(l===void 0)return m(c);if(f)return clearTimeout(l),l=setTimeout(y,n),g(c)}return l===void 0&&(l=setTimeout(y,n)),i}return _.cancel=C,_.flush=b,_}function Ig(e){return typeof e=="function"?e:pi}function Ag(e,n){var r=ut(e)?yi:Ng;return r(e,Ig(n))}function ta(e){for(var n=-1,r=e==null?0:e.length,a={};++n<r;){var o=e[n];a[o[0]]=o[1]}return a}function Rg(e,n){return il(e,n)}function na(e){return e==null}function ll(e){return e===void 0}function cl(e,n,r,a){if(!Nt(e))return e;n=Zr(n,e);for(var o=-1,s=n.length,i=s-1,l=e;l!=null&&++o<s;){var c=fo(n[o]),d=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(o!=i){var u=l[c];d=void 0,d===void 0&&(d=Nt(u)?u:Qa(n[o+1])?[]:{})}to(l,c,d),l=l[c]}return e}function Fg(e,n,r){for(var a=-1,o=n.length,s={};++a<o;){var i=n[a],l=xi(e,i);r(l,i)&&cl(s,Zr(i,e),l)}return s}function Lg(e,n){return Fg(e,n,function(r,a){return Mg(e,a)})}var Yg=gm(function(e,n){return e==null?{}:Lg(e,n)});function zg(e,n,r){return e==null?e:cl(e,n,r)}function jg(e){return r=>Ag(e,a=>{r.use(a)})}const He=e=>(e.install=n=>{const r=(e==null?void 0:e.name)||"UnnamedComponent";n.component(r,e)},e),Wg={style:{"background-color":"blue",color:"red"}},Hg=t.defineComponent({name:"ZhButton",__name:"Button",props:{type:{},size:{}},setup(e){return t.useSlots(),(n,r)=>(t.openBlock(),t.createElementBlock("button",Wg,"this is a button"))}}),at=(e,n)=>{const r=e.__vccOpts||e;for(const[a,o]of n)r[a]=o;return r},dl=He(at(Hg,[["__scopeId","data-v-e1dcabfd"]])),fl=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},Ht=(e,n,{checkForDefaultPrevented:r=!0}={})=>o=>{const s=e==null?void 0:e(o);if(r===!1||!s)return n==null?void 0:n(o)};var Ug=Object.defineProperty,qg=Object.defineProperties,Gg=Object.getOwnPropertyDescriptors,ul=Object.getOwnPropertySymbols,Kg=Object.prototype.hasOwnProperty,Zg=Object.prototype.propertyIsEnumerable,pl=(e,n,r)=>n in e?Ug(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,Jg=(e,n)=>{for(var r in n||(n={}))Kg.call(n,r)&&pl(e,r,n[r]);if(ul)for(var r of ul(n))Zg.call(n,r)&&pl(e,r,n[r]);return e},Xg=(e,n)=>qg(e,Gg(n));function Qg(e,n){var r;const a=t.shallowRef();return t.watchEffect(()=>{a.value=e()},Xg(Jg({},n),{flush:(r=void 0)!=null?r:"sync"})),t.readonly(a)}var ml;const Fe=typeof window<"u",ey=e=>typeof e=="string",ra=()=>{},ty=Fe&&((ml=window==null?void 0:window.navigator)==null?void 0:ml.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ur(e){return typeof e=="function"?e():t.unref(e)}function ny(e,n){function r(...a){return new Promise((o,s)=>{Promise.resolve(e(()=>n.apply(this,a),{fn:n,thisArg:this,args:a})).then(o).catch(s)})}return r}function ry(e,n={}){let r,a,o=ra;const s=l=>{clearTimeout(l),o(),o=ra};return l=>{const c=ur(e),d=ur(n.maxWait);return r&&s(r),c<=0||d!==void 0&&d<=0?(a&&(s(a),a=null),Promise.resolve(l())):new Promise((u,f)=>{o=n.rejectOnCancel?f:u,d&&!a&&(a=setTimeout(()=>{r&&s(r),a=null,u(l())},d)),r=setTimeout(()=>{a&&s(a),a=null,u(l())},c)})}}function ay(e){return e}function aa(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}function oy(e,n=200,r={}){return ny(ry(n,r),e)}function sy(e,n=200,r={}){const a=t.ref(e.value),o=oy(()=>{a.value=e.value},n,r);return t.watch(e,()=>o()),a}function iy(e,n=!0){t.getCurrentInstance()?t.onMounted(e):n?e():t.nextTick(e)}function hl(e,n,r={}){const{immediate:a=!0}=r,o=t.ref(!1);let s=null;function i(){s&&(clearTimeout(s),s=null)}function l(){o.value=!1,i()}function c(...d){i(),o.value=!0,s=setTimeout(()=>{o.value=!1,s=null,e(...d)},ur(n))}return a&&(o.value=!0,Fe&&c()),aa(l),{isPending:t.readonly(o),start:c,stop:l}}function Ut(e){var n;const r=ur(e);return(n=r==null?void 0:r.$el)!=null?n:r}const So=Fe?window:void 0;function St(...e){let n,r,a,o;if(ey(e[0])||Array.isArray(e[0])?([r,a,o]=e,n=So):[n,r,a,o]=e,!n)return ra;Array.isArray(r)||(r=[r]),Array.isArray(a)||(a=[a]);const s=[],i=()=>{s.forEach(u=>u()),s.length=0},l=(u,f,p,g)=>(u.addEventListener(f,p,g),()=>u.removeEventListener(f,p,g)),c=t.watch(()=>[Ut(n),ur(o)],([u,f])=>{i(),u&&s.push(...r.flatMap(p=>a.map(g=>l(u,p,g,f))))},{immediate:!0,flush:"post"}),d=()=>{c(),i()};return aa(d),d}let gl=!1;function yl(e,n,r={}){const{window:a=So,ignore:o=[],capture:s=!0,detectIframe:i=!1}=r;if(!a)return;ty&&!gl&&(gl=!0,Array.from(a.document.body.children).forEach(p=>p.addEventListener("click",ra)));let l=!0;const c=p=>o.some(g=>{if(typeof g=="string")return Array.from(a.document.querySelectorAll(g)).some(m=>m===p.target||p.composedPath().includes(m));{const m=Ut(g);return m&&(p.target===m||p.composedPath().includes(m))}}),u=[St(a,"click",p=>{const g=Ut(e);if(!(!g||g===p.target||p.composedPath().includes(g))){if(p.detail===0&&(l=!c(p)),!l){l=!0;return}n(p)}},{passive:!0,capture:s}),St(a,"pointerdown",p=>{const g=Ut(e);g&&(l=!p.composedPath().includes(g)&&!c(p))},{passive:!0}),i&&St(a,"blur",p=>{var g;const m=Ut(e);((g=a.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!(m!=null&&m.contains(a.document.activeElement))&&n(p)})].filter(Boolean);return()=>u.forEach(p=>p())}function ly(e,n=!1){const r=t.ref(),a=()=>r.value=!!e();return a(),iy(a,n),r}const bl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},wl="__vueuse_ssr_handlers__";bl[wl]=bl[wl]||{};var _l=Object.getOwnPropertySymbols,cy=Object.prototype.hasOwnProperty,dy=Object.prototype.propertyIsEnumerable,fy=(e,n)=>{var r={};for(var a in e)cy.call(e,a)&&n.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&_l)for(var a of _l(e))n.indexOf(a)<0&&dy.call(e,a)&&(r[a]=e[a]);return r};function Co(e,n,r={}){const a=r,{window:o=So}=a,s=fy(a,["window"]);let i;const l=ly(()=>o&&"ResizeObserver"in o),c=()=>{i&&(i.disconnect(),i=void 0)},d=t.watch(()=>Ut(e),f=>{c(),l.value&&o&&f&&(i=new ResizeObserver(n),i.observe(f,s))},{immediate:!0,flush:"post"}),u=()=>{c(),d()};return aa(u),{isSupported:l,stop:u}}var kl;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(kl||(kl={}));var uy=Object.defineProperty,Sl=Object.getOwnPropertySymbols,py=Object.prototype.hasOwnProperty,my=Object.prototype.propertyIsEnumerable,Cl=(e,n,r)=>n in e?uy(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,hy=(e,n)=>{for(var r in n||(n={}))py.call(n,r)&&Cl(e,r,n[r]);if(Sl)for(var r of Sl(n))my.call(n,r)&&Cl(e,r,n[r]);return e};hy({linear:ay},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const gy=()=>Fe&&/firefox/i.test(window.navigator.userAgent);/**
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.ZhihaoUI={},t.Vue))})(this,function(exports,vue){"use strict";var ir=Object.defineProperty;var sr=(t,e,n)=>e in t?ir(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var On=(t,e,n)=>sr(t,typeof e!="symbol"?e+"":e,n);var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto$e=Object.prototype,hasOwnProperty$c=objectProto$e.hasOwnProperty,nativeObjectToString$1=objectProto$e.toString,symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(t){var e=hasOwnProperty$c.call(t,symToStringTag$1),n=t[symToStringTag$1];try{t[symToStringTag$1]=void 0;var r=!0}catch{}var i=nativeObjectToString$1.call(t);return r&&(e?t[symToStringTag$1]=n:delete t[symToStringTag$1]),i}var objectProto$d=Object.prototype,nativeObjectToString=objectProto$d.toString;function objectToString$1(t){return nativeObjectToString.call(t)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(t){return t==null?t===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(t)?getRawTag(t):objectToString$1(t)}function isObjectLike(t){return t!=null&&typeof t=="object"}var symbolTag$3="[object Symbol]";function isSymbol(t){return typeof t=="symbol"||isObjectLike(t)&&baseGetTag(t)==symbolTag$3}function arrayMap(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var isArray$2=Array.isArray,INFINITY$1=1/0,symbolProto$2=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto$2?symbolProto$2.toString:void 0;function baseToString(t){if(typeof t=="string")return t;if(isArray$2(t))return arrayMap(t,baseToString)+"";if(isSymbol(t))return symbolToString?symbolToString.call(t):"";var e=t+"";return e=="0"&&1/t==-INFINITY$1?"-0":e}var reWhitespace=/\s/;function trimmedEndIndex(t){for(var e=t.length;e--&&reWhitespace.test(t.charAt(e)););return e}var reTrimStart=/^\s+/;function baseTrim(t){return t&&t.slice(0,trimmedEndIndex(t)+1).replace(reTrimStart,"")}function isObject$2(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var NAN=NaN,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber(t){if(typeof t=="number")return t;if(isSymbol(t))return NAN;if(isObject$2(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=isObject$2(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=baseTrim(t);var n=reIsBinary.test(t);return n||reIsOctal.test(t)?freeParseInt(t.slice(2),n?2:8):reIsBadHex.test(t)?NAN:+t}function identity$1(t){return t}var asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$2(t){if(!isObject$2(t))return!1;var e=baseGetTag(t);return e==funcTag$2||e==genTag$1||e==asyncTag||e==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var t=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function isMasked(t){return!!maskSrcKey&&maskSrcKey in t}var funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource(t){if(t!=null){try{return funcToString$1.call(t)}catch{}try{return t+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$c=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$b=objectProto$c.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$b).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(t){if(!isObject$2(t)||isMasked(t))return!1;var e=isFunction$2(t)?reIsNative:reIsHostCtor;return e.test(toSource(t))}function getValue$1(t,e){return t==null?void 0:t[e]}function getNative(t,e){var n=getValue$1(t,e);return baseIsNative(n)?n:void 0}var WeakMap=getNative(root,"WeakMap"),objectCreate=Object.create,baseCreate=function(){function t(){}return function(e){if(!isObject$2(e))return{};if(objectCreate)return objectCreate(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function apply$1(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function copyArray(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(t){var e=0,n=0;return function(){var r=nativeNow(),i=HOT_SPAN-(r-n);if(n=r,i>0){if(++e>=HOT_COUNT)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function constant(t){return function(){return t}}var defineProperty=function(){try{var t=getNative(Object,"defineProperty");return t({},"",{}),t}catch{}}(),baseSetToString=defineProperty?function(t,e){return defineProperty(t,"toString",{configurable:!0,enumerable:!1,value:constant(e),writable:!0})}:identity$1,setToString=shortOut(baseSetToString);function arrayEach(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function baseFindIndex(t,e,n,r){t.length;for(var i=n+1;i--;)if(e(t[i],i,t))return i;return-1}var MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(t,e){var n=typeof t;return e=e??MAX_SAFE_INTEGER$1,!!e&&(n=="number"||n!="symbol"&&reIsUint.test(t))&&t>-1&&t%1==0&&t<e}function baseAssignValue(t,e,n){e=="__proto__"&&defineProperty?defineProperty(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function eq(t,e){return t===e||t!==t&&e!==e}var objectProto$b=Object.prototype,hasOwnProperty$a=objectProto$b.hasOwnProperty;function assignValue(t,e,n){var r=t[e];(!(hasOwnProperty$a.call(t,e)&&eq(r,n))||n===void 0&&!(e in t))&&baseAssignValue(t,e,n)}function copyObject(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=void 0;l===void 0&&(l=t[a]),i?baseAssignValue(n,a,l):assignValue(n,a,l)}return n}var nativeMax$1=Math.max;function overRest(t,e,n){return e=nativeMax$1(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=nativeMax$1(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),apply$1(t,this,a)}}var MAX_SAFE_INTEGER=9007199254740991;function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction$2(t)}var objectProto$a=Object.prototype;function isPrototype(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||objectProto$a;return t===n}function baseTimes(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var argsTag$3="[object Arguments]";function baseIsArguments(t){return isObjectLike(t)&&baseGetTag(t)==argsTag$3}var objectProto$9=Object.prototype,hasOwnProperty$9=objectProto$9.hasOwnProperty,propertyIsEnumerable$1=objectProto$9.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(t){return isObjectLike(t)&&hasOwnProperty$9.call(t,"callee")&&!propertyIsEnumerable$1.call(t,"callee")};function stubFalse(){return!1}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$2=moduleExports$2?root.Buffer:void 0,nativeIsBuffer=Buffer$2?Buffer$2.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse,argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$5="[object Map]",numberTag$3="[object Number]",objectTag$3="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$3="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0,typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$3]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$5]=typedArrayTags[numberTag$3]=typedArrayTags[objectTag$3]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$5]=typedArrayTags[stringTag$3]=typedArrayTags[weakMapTag$2]=!1;function baseIsTypedArray(t){return isObjectLike(t)&&isLength(t.length)&&!!typedArrayTags[baseGetTag(t)]}function baseUnary(t){return function(e){return t(e)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal.process,nodeUtil=function(){try{var t=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;return t||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,objectProto$8=Object.prototype,hasOwnProperty$8=objectProto$8.hasOwnProperty;function arrayLikeKeys(t,e){var n=isArray$2(t),r=!n&&isArguments(t),i=!n&&!r&&isBuffer(t),s=!n&&!r&&!i&&isTypedArray(t),o=n||r||i||s,a=o?baseTimes(t.length,String):[],l=a.length;for(var u in t)(e||hasOwnProperty$8.call(t,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||isIndex(u,l)))&&a.push(u);return a}function overArg(t,e){return function(n){return t(e(n))}}var nativeKeys=overArg(Object.keys,Object),objectProto$7=Object.prototype,hasOwnProperty$7=objectProto$7.hasOwnProperty;function baseKeys(t){if(!isPrototype(t))return nativeKeys(t);var e=[];for(var n in Object(t))hasOwnProperty$7.call(t,n)&&n!="constructor"&&e.push(n);return e}function keys$1(t){return isArrayLike(t)?arrayLikeKeys(t):baseKeys(t)}function nativeKeysIn(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var objectProto$6=Object.prototype,hasOwnProperty$6=objectProto$6.hasOwnProperty;function baseKeysIn(t){if(!isObject$2(t))return nativeKeysIn(t);var e=isPrototype(t),n=[];for(var r in t)r=="constructor"&&(e||!hasOwnProperty$6.call(t,r))||n.push(r);return n}function keysIn(t){return isArrayLike(t)?arrayLikeKeys(t,!0):baseKeysIn(t)}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(t,e){if(isArray$2(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||isSymbol(t)?!0:reIsPlainProp.test(t)||!reIsDeepProp.test(t)||e!=null&&t in Object(e)}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$5=Object.prototype,hasOwnProperty$5=objectProto$5.hasOwnProperty;function hashGet(t){var e=this.__data__;if(nativeCreate){var n=e[t];return n===HASH_UNDEFINED$2?void 0:n}return hasOwnProperty$5.call(e,t)?e[t]:void 0}var objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function hashHas(t){var e=this.__data__;return nativeCreate?e[t]!==void 0:hasOwnProperty$4.call(e,t)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=nativeCreate&&e===void 0?HASH_UNDEFINED$1:e,this}function Hash(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function assocIndexOf(t,e){for(var n=t.length;n--;)if(eq(t[n][0],e))return n;return-1}var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(t){var e=this.__data__,n=assocIndexOf(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():splice.call(e,n,1),--this.size,!0}function listCacheGet(t){var e=this.__data__,n=assocIndexOf(e,t);return n<0?void 0:e[n][1]}function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1}function listCacheSet(t,e){var n=this.__data__,r=assocIndexOf(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ListCache(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$3=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache),string:new Hash}}function isKeyable(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function getMapData(t,e){var n=t.__data__;return isKeyable(e)?n[typeof e=="string"?"string":"hash"]:n.map}function mapCacheDelete(t){var e=getMapData(this,t).delete(t);return this.size-=e?1:0,e}function mapCacheGet(t){return getMapData(this,t).get(t)}function mapCacheHas(t){return getMapData(this,t).has(t)}function mapCacheSet(t,e){var n=getMapData(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function MapCache(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT$1="Expected a function";function memoize(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(FUNC_ERROR_TEXT$1);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(memoize.Cache||MapCache),n}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(t){var e=memoize(t,function(r){return n.size===MAX_MEMOIZE_SIZE&&n.clear(),r}),n=e.cache;return e}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(rePropName,function(n,r,i,s){e.push(i?s.replace(reEscapeChar,"$1"):r||n)}),e});function toString$3(t){return t==null?"":baseToString(t)}function castPath(t,e){return isArray$2(t)?t:isKey(t,e)?[t]:stringToPath(toString$3(t))}var INFINITY=1/0;function toKey(t){if(typeof t=="string"||isSymbol(t))return t;var e=t+"";return e=="0"&&1/t==-INFINITY?"-0":e}function baseGet(t,e){e=castPath(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[toKey(e[n++])];return n&&n==r?t:void 0}function get$5(t,e,n){var r=t==null?void 0:baseGet(t,e);return r===void 0?n:r}function arrayPush(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable(t){return isArray$2(t)||isArguments(t)||!!(spreadableSymbol&&t&&t[spreadableSymbol])}function baseFlatten(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=isFlattenable),i||(i=[]);++s<o;){var a=t[s];n(a)?arrayPush(i,a):i[i.length]=a}return i}function flatten(t){var e=t==null?0:t.length;return e?baseFlatten(t):[]}function flatRest(t){return setToString(overRest(t,void 0,flatten),t+"")}var getPrototype=overArg(Object.getPrototypeOf,Object);function castArray$1(){if(!arguments.length)return[];var t=arguments[0];return isArray$2(t)?t:[t]}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function stackGet(t){return this.__data__.get(t)}function stackHas(t){return this.__data__.has(t)}var LARGE_ARRAY_SIZE=200;function stackSet(t,e){var n=this.__data__;if(n instanceof ListCache){var r=n.__data__;if(!Map$3||r.length<LARGE_ARRAY_SIZE-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new MapCache(r)}return n.set(t,e),this.size=n.size,this}function Stack(t){var e=this.__data__=new ListCache(t);this.size=e.size}Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;function baseAssign(t,e){return t&©Object(e,keys$1(e),t)}function baseAssignIn(t,e){return t&©Object(e,keysIn(e),t)}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer$1=moduleExports?root.Buffer:void 0,allocUnsafe=Buffer$1?Buffer$1.allocUnsafe:void 0;function cloneBuffer(t,e){if(e)return t.slice();var n=t.length,r=allocUnsafe?allocUnsafe(n):new t.constructor(n);return t.copy(r),r}function arrayFilter(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function stubArray(){return[]}var objectProto$3=Object.prototype,propertyIsEnumerable=objectProto$3.propertyIsEnumerable,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols$1?function(t){return t==null?[]:(t=Object(t),arrayFilter(nativeGetSymbols$1(t),function(e){return propertyIsEnumerable.call(t,e)}))}:stubArray;function copySymbols(t,e){return copyObject(t,getSymbols(t),e)}var nativeGetSymbols=Object.getOwnPropertySymbols,getSymbolsIn=nativeGetSymbols?function(t){for(var e=[];t;)arrayPush(e,getSymbols(t)),t=getPrototype(t);return e}:stubArray;function copySymbolsIn(t,e){return copyObject(t,getSymbolsIn(t),e)}function baseGetAllKeys(t,e,n){var r=e(t);return isArray$2(t)?r:arrayPush(r,n(t))}function getAllKeys(t){return baseGetAllKeys(t,keys$1,getSymbols)}function getAllKeysIn(t){return baseGetAllKeys(t,keysIn,getSymbolsIn)}var DataView$1=getNative(root,"DataView"),Promise$1=getNative(root,"Promise"),Set$1=getNative(root,"Set"),mapTag$4="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",setTag$4="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$3="[object DataView]",dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$3),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap),getTag=baseGetTag;(DataView$1&&getTag(new DataView$1(new ArrayBuffer(1)))!=dataViewTag$3||Map$3&&getTag(new Map$3)!=mapTag$4||Promise$1&&getTag(Promise$1.resolve())!=promiseTag||Set$1&&getTag(new Set$1)!=setTag$4||WeakMap&&getTag(new WeakMap)!=weakMapTag$1)&&(getTag=function(t){var e=baseGetTag(t),n=e==objectTag$2?t.constructor:void 0,r=n?toSource(n):"";if(r)switch(r){case dataViewCtorString:return dataViewTag$3;case mapCtorString:return mapTag$4;case promiseCtorString:return promiseTag;case setCtorString:return setTag$4;case weakMapCtorString:return weakMapTag$1}return e});var objectProto$2=Object.prototype,hasOwnProperty$3=objectProto$2.hasOwnProperty;function initCloneArray(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&hasOwnProperty$3.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Uint8Array$1=root.Uint8Array;function cloneArrayBuffer(t){var e=new t.constructor(t.byteLength);return new Uint8Array$1(e).set(new Uint8Array$1(t)),e}function cloneDataView(t,e){var n=e?cloneArrayBuffer(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var reFlags=/\w*$/;function cloneRegExp(t){var e=new t.constructor(t.source,reFlags.exec(t));return e.lastIndex=t.lastIndex,e}var symbolProto$1=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf$1=symbolProto$1?symbolProto$1.valueOf:void 0;function cloneSymbol(t){return symbolValueOf$1?Object(symbolValueOf$1.call(t)):{}}function cloneTypedArray(t,e){var n=e?cloneArrayBuffer(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var boolTag$2="[object Boolean]",dateTag$2="[object Date]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$2="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag(t,e,n){var r=t.constructor;switch(e){case arrayBufferTag$2:return cloneArrayBuffer(t);case boolTag$2:case dateTag$2:return new r(+t);case dataViewTag$2:return cloneDataView(t,n);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(t,n);case mapTag$3:return new r;case numberTag$2:case stringTag$2:return new r(t);case regexpTag$2:return cloneRegExp(t);case setTag$3:return new r;case symbolTag$2:return cloneSymbol(t)}}function initCloneObject(t){return typeof t.constructor=="function"&&!isPrototype(t)?baseCreate(getPrototype(t)):{}}var mapTag$2="[object Map]";function baseIsMap(t){return isObjectLike(t)&&getTag(t)==mapTag$2}var nodeIsMap=nodeUtil&&nodeUtil.isMap,isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap,setTag$2="[object Set]";function baseIsSet(t){return isObjectLike(t)&&getTag(t)==setTag$2}var nodeIsSet=nodeUtil&&nodeUtil.isSet,isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,CLONE_DEEP_FLAG$1=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG$2=4,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag$1="[object Map]",numberTag$1="[object Number]",objectTag$1="[object Object]",regexpTag$1="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag$1]=cloneableTags[arrayTag$1]=cloneableTags[arrayBufferTag$1]=cloneableTags[dataViewTag$1]=cloneableTags[boolTag$1]=cloneableTags[dateTag$1]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag$1]=cloneableTags[numberTag$1]=cloneableTags[objectTag$1]=cloneableTags[regexpTag$1]=cloneableTags[setTag$1]=cloneableTags[stringTag$1]=cloneableTags[symbolTag$1]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag$1]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;function baseClone(t,e,n,r,i,s){var o,a=e&CLONE_DEEP_FLAG$1,l=e&CLONE_FLAT_FLAG,u=e&CLONE_SYMBOLS_FLAG$2;if(o!==void 0)return o;if(!isObject$2(t))return t;var c=isArray$2(t);if(c){if(o=initCloneArray(t),!a)return copyArray(t,o)}else{var d=getTag(t),h=d==funcTag||d==genTag;if(isBuffer(t))return cloneBuffer(t,a);if(d==objectTag$1||d==argsTag$1||h&&!i){if(o=l||h?{}:initCloneObject(t),!a)return l?copySymbolsIn(t,baseAssignIn(o,t)):copySymbols(t,baseAssign(o,t))}else{if(!cloneableTags[d])return i?t:{};o=initCloneByTag(t,d,a)}}s||(s=new Stack);var f=s.get(t);if(f)return f;s.set(t,o),isSet(t)?t.forEach(function(v){o.add(baseClone(v,e,n,v,t,s))}):isMap(t)&&t.forEach(function(v,m){o.set(m,baseClone(v,e,n,m,t,s))});var p=u?l?getAllKeysIn:getAllKeys:l?keysIn:keys$1,g=c?void 0:p(t);return arrayEach(g||t,function(v,m){g&&(m=v,v=t[m]),assignValue(o,m,baseClone(v,e,n,m,t,s))}),o}var CLONE_SYMBOLS_FLAG$1=4;function clone$2(t){return baseClone(t,CLONE_SYMBOLS_FLAG$1)}var CLONE_DEEP_FLAG=1,CLONE_SYMBOLS_FLAG=4;function cloneDeep(t){return baseClone(t,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(t){return this.__data__.set(t,HASH_UNDEFINED),this}function setCacheHas(t){return this.__data__.has(t)}function SetCache(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new MapCache;++e<n;)this.add(t[e])}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;function arraySome(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function cacheHas(t,e){return t.has(e)}var COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays(t,e,n,r,i,s){var o=n&COMPARE_PARTIAL_FLAG$5,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var u=s.get(t),c=s.get(e);if(u&&c)return u==e&&c==t;var d=-1,h=!0,f=n&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var p=t[d],g=e[d];if(r)var v=o?r(g,p,d,e,t,s):r(p,g,d,t,e,s);if(v!==void 0){if(v)continue;h=!1;break}if(f){if(!arraySome(e,function(m,y){if(!cacheHas(f,y)&&(p===m||i(p,m,n,r,s)))return f.push(y)})){h=!1;break}}else if(!(p===g||i(p,g,n,r,s))){h=!1;break}}return s.delete(t),s.delete(e),h}function mapToArray(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function setToArray(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(t,e,n,r,i,s,o){switch(n){case dataViewTag:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case arrayBufferTag:return!(t.byteLength!=e.byteLength||!s(new Uint8Array$1(t),new Uint8Array$1(e)));case boolTag:case dateTag:case numberTag:return eq(+t,+e);case errorTag:return t.name==e.name&&t.message==e.message;case regexpTag:case stringTag:return t==e+"";case mapTag:var a=mapToArray;case setTag:var l=r&COMPARE_PARTIAL_FLAG$4;if(a||(a=setToArray),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;r|=COMPARE_UNORDERED_FLAG$2,o.set(t,e);var c=equalArrays(a(t),a(e),r,i,s,o);return o.delete(t),c;case symbolTag:if(symbolValueOf)return symbolValueOf.call(t)==symbolValueOf.call(e)}return!1}var COMPARE_PARTIAL_FLAG$3=1,objectProto$1=Object.prototype,hasOwnProperty$2=objectProto$1.hasOwnProperty;function equalObjects(t,e,n,r,i,s){var o=n&COMPARE_PARTIAL_FLAG$3,a=getAllKeys(t),l=a.length,u=getAllKeys(e),c=u.length;if(l!=c&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in e:hasOwnProperty$2.call(e,h)))return!1}var f=s.get(t),p=s.get(e);if(f&&p)return f==e&&p==t;var g=!0;s.set(t,e),s.set(e,t);for(var v=o;++d<l;){h=a[d];var m=t[h],y=e[h];if(r)var b=o?r(y,m,h,e,t,s):r(m,y,h,t,e,s);if(!(b===void 0?m===y||i(m,y,n,r,s):b)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var _=t.constructor,T=e.constructor;_!=T&&"constructor"in t&&"constructor"in e&&!(typeof _=="function"&&_ instanceof _&&typeof T=="function"&&T instanceof T)&&(g=!1)}return s.delete(t),s.delete(e),g}var COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto=Object.prototype,hasOwnProperty$1=objectProto.hasOwnProperty;function baseIsEqualDeep(t,e,n,r,i,s){var o=isArray$2(t),a=isArray$2(e),l=o?arrayTag:getTag(t),u=a?arrayTag:getTag(e);l=l==argsTag?objectTag:l,u=u==argsTag?objectTag:u;var c=l==objectTag,d=u==objectTag,h=l==u;if(h&&isBuffer(t)){if(!isBuffer(e))return!1;o=!0,c=!1}if(h&&!c)return s||(s=new Stack),o||isTypedArray(t)?equalArrays(t,e,n,r,i,s):equalByTag(t,e,l,n,r,i,s);if(!(n&COMPARE_PARTIAL_FLAG$2)){var f=c&&hasOwnProperty$1.call(t,"__wrapped__"),p=d&&hasOwnProperty$1.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,v=p?e.value():e;return s||(s=new Stack),i(g,v,n,r,s)}}return h?(s||(s=new Stack),equalObjects(t,e,n,r,i,s)):!1}function baseIsEqual(t,e,n,r,i){return t===e?!0:t==null||e==null||!isObjectLike(t)&&!isObjectLike(e)?t!==t&&e!==e:baseIsEqualDeep(t,e,n,r,baseIsEqual,i)}var COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var a=o[0],l=t[a],u=o[1];if(o[2]){if(l===void 0&&!(a in t))return!1}else{var c=new Stack,d;if(!(d===void 0?baseIsEqual(u,l,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,r,c):d))return!1}}return!0}function isStrictComparable(t){return t===t&&!isObject$2(t)}function getMatchData(t){for(var e=keys$1(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,isStrictComparable(i)]}return e}function matchesStrictComparable(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function baseMatches(t){var e=getMatchData(t);return e.length==1&&e[0][2]?matchesStrictComparable(e[0][0],e[0][1]):function(n){return n===t||baseIsMatch(n,t,e)}}function baseHasIn(t,e){return t!=null&&e in Object(t)}function hasPath(t,e,n){e=castPath(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=toKey(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&isLength(i)&&isIndex(o,i)&&(isArray$2(t)||isArguments(t)))}function hasIn(t,e){return t!=null&&hasPath(t,e,baseHasIn)}var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty(t,e){return isKey(t)&&isStrictComparable(e)?matchesStrictComparable(toKey(t),e):function(n){var r=get$5(n,t);return r===void 0&&r===e?hasIn(n,t):baseIsEqual(e,r,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}function baseProperty(t){return function(e){return e==null?void 0:e[t]}}function basePropertyDeep(t){return function(e){return baseGet(e,t)}}function property(t){return isKey(t)?baseProperty(toKey(t)):basePropertyDeep(t)}function baseIteratee(t){return typeof t=="function"?t:t==null?identity$1:typeof t=="object"?isArray$2(t)?baseMatchesProperty(t[0],t[1]):baseMatches(t):property(t)}function createBaseFor(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return e}}var baseFor=createBaseFor();function baseForOwn(t,e){return t&&baseFor(t,e,keys$1)}function createBaseEach(t,e){return function(n,r){if(n==null)return n;if(!isArrayLike(n))return t(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var baseEach=createBaseEach(baseForOwn),now$1=function(){return root.Date.now()},FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce(t,e,n){var r,i,s,o,a,l,u=0,c=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(FUNC_ERROR_TEXT);e=toNumber(e)||0,isObject$2(n)&&(c=!!n.leading,d="maxWait"in n,s=d?nativeMax(toNumber(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h);function f(x){var k=r,w=i;return r=i=void 0,u=x,o=t.apply(w,k),o}function p(x){return u=x,a=setTimeout(m,e),c?f(x):o}function g(x){var k=x-l,w=x-u,O=e-k;return d?nativeMin(O,s-w):O}function v(x){var k=x-l,w=x-u;return l===void 0||k>=e||k<0||d&&w>=s}function m(){var x=now$1();if(v(x))return y(x);a=setTimeout(m,g(x))}function y(x){return a=void 0,h&&r?f(x):(r=i=void 0,o)}function b(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function _(){return a===void 0?o:y(now$1())}function T(){var x=now$1(),k=v(x);if(r=arguments,i=this,l=x,k){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(m,e),f(l)}return a===void 0&&(a=setTimeout(m,e)),o}return T.cancel=b,T.flush=_,T}function castFunction(t){return typeof t=="function"?t:identity$1}function forEach$1(t,e){var n=isArray$2(t)?arrayEach:baseEach;return n(t,castFunction(e))}function findLastIndex(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=r-1;return baseFindIndex(t,baseIteratee(e),i)}function fromPairs(t){for(var e=-1,n=t==null?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}function isEqual(t,e){return baseIsEqual(t,e)}function isNil(t){return t==null}function isUndefined$2(t){return t===void 0}function baseSet(t,e,n,r){if(!isObject$2(t))return t;e=castPath(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=toKey(e[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=o){var c=a[l];u=void 0,u===void 0&&(u=isObject$2(c)?c:isIndex(e[i+1])?[]:{})}assignValue(a,l,u),a=a[l]}return t}function basePickBy(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=baseGet(t,o);n(a,o)&&baseSet(s,castPath(o,t),a)}return s}function basePick(t,e){return basePickBy(t,e,function(n,r){return hasIn(t,r)})}var pick=flatRest(function(t,e){return t==null?{}:basePick(t,e)});function set$2(t,e,n){return t==null?t:baseSet(t,e,n)}function makeInstaller(t){return n=>forEach$1(t,r=>{n.use(r)})}const withInstall$1=t=>(t.install=e=>{const n=(t==null?void 0:t.name)||"UnnamedComponent";e.component(n,t)},t),isFocusable=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.tabIndex<0||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")return!1;switch(t.nodeName){case"A":return!!t.href&&t.rel!=="ignore";case"INPUT":return!(t.type==="hidden"||t.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},composeEventHandlers=(t,e,{checkForDefaultPrevented:n=!0}={})=>i=>{const s=t==null?void 0:t(i);if(n===!1||!s)return e==null?void 0:e(i)};var __defProp$9=Object.defineProperty,__defProps$6=Object.defineProperties,__getOwnPropDescs$6=Object.getOwnPropertyDescriptors,__getOwnPropSymbols$b=Object.getOwnPropertySymbols,__hasOwnProp$b=Object.prototype.hasOwnProperty,__propIsEnum$b=Object.prototype.propertyIsEnumerable,__defNormalProp$9=(t,e,n)=>e in t?__defProp$9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__spreadValues$9=(t,e)=>{for(var n in e||(e={}))__hasOwnProp$b.call(e,n)&&__defNormalProp$9(t,n,e[n]);if(__getOwnPropSymbols$b)for(var n of __getOwnPropSymbols$b(e))__propIsEnum$b.call(e,n)&&__defNormalProp$9(t,n,e[n]);return t},__spreadProps$6=(t,e)=>__defProps$6(t,__getOwnPropDescs$6(e));function computedEager(t,e){var n;const r=vue.shallowRef();return vue.watchEffect(()=>{r.value=t()},__spreadProps$6(__spreadValues$9({},e),{flush:(n=void 0)!=null?n:"sync"})),vue.readonly(r)}var _a;const isClient=typeof window<"u",isString$2=t=>typeof t=="string",noop=()=>{},isIOS=isClient&&((_a=window==null?void 0:window.navigator)==null?void 0:_a.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function resolveUnref(t){return typeof t=="function"?t():vue.unref(t)}function createFilterWrapper(t,e){function n(...r){return new Promise((i,s)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(s)})}return n}function debounceFilter(t,e={}){let n,r,i=noop;const s=a=>{clearTimeout(a),i(),i=noop};return a=>{const l=resolveUnref(t),u=resolveUnref(e.maxWait);return n&&s(n),l<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(a())):new Promise((c,d)=>{i=e.rejectOnCancel?d:c,u&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,c(a())},u)),n=setTimeout(()=>{r&&s(r),r=null,c(a())},l)})}}function identity(t){return t}function tryOnScopeDispose(t){return vue.getCurrentScope()?(vue.onScopeDispose(t),!0):!1}function useDebounceFn(t,e=200,n={}){return createFilterWrapper(debounceFilter(e,n),t)}function refDebounced(t,e=200,n={}){const r=vue.ref(t.value),i=useDebounceFn(()=>{r.value=t.value},e,n);return vue.watch(t,()=>i()),r}function tryOnMounted(t,e=!0){vue.getCurrentInstance()?vue.onMounted(t):e?t():vue.nextTick(t)}function useTimeoutFn(t,e,n={}){const{immediate:r=!0}=n,i=vue.ref(!1);let s=null;function o(){s&&(clearTimeout(s),s=null)}function a(){i.value=!1,o()}function l(...u){o(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=null,t(...u)},resolveUnref(e))}return r&&(i.value=!0,isClient&&l()),tryOnScopeDispose(a),{isPending:vue.readonly(i),start:l,stop:a}}function unrefElement(t){var e;const n=resolveUnref(t);return(e=n==null?void 0:n.$el)!=null?e:n}const defaultWindow=isClient?window:void 0;function useEventListener(...t){let e,n,r,i;if(isString$2(t[0])||Array.isArray(t[0])?([n,r,i]=t,e=defaultWindow):[e,n,r,i]=t,!e)return noop;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],o=()=>{s.forEach(c=>c()),s.length=0},a=(c,d,h,f)=>(c.addEventListener(d,h,f),()=>c.removeEventListener(d,h,f)),l=vue.watch(()=>[unrefElement(e),resolveUnref(i)],([c,d])=>{o(),c&&s.push(...n.flatMap(h=>r.map(f=>a(c,h,f,d))))},{immediate:!0,flush:"post"}),u=()=>{l(),o()};return tryOnScopeDispose(u),u}let _iOSWorkaround=!1;function onClickOutside(t,e,n={}){const{window:r=defaultWindow,ignore:i=[],capture:s=!0,detectIframe:o=!1}=n;if(!r)return;isIOS&&!_iOSWorkaround&&(_iOSWorkaround=!0,Array.from(r.document.body.children).forEach(h=>h.addEventListener("click",noop)));let a=!0;const l=h=>i.some(f=>{if(typeof f=="string")return Array.from(r.document.querySelectorAll(f)).some(p=>p===h.target||h.composedPath().includes(p));{const p=unrefElement(f);return p&&(h.target===p||h.composedPath().includes(p))}}),c=[useEventListener(r,"click",h=>{const f=unrefElement(t);if(!(!f||f===h.target||h.composedPath().includes(f))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:s}),useEventListener(r,"pointerdown",h=>{const f=unrefElement(t);f&&(a=!h.composedPath().includes(f)&&!l(h))},{passive:!0}),o&&useEventListener(r,"blur",h=>{var f;const p=unrefElement(t);((f=r.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!(p!=null&&p.contains(r.document.activeElement))&&e(h)})].filter(Boolean);return()=>c.forEach(h=>h())}function useSupported(t,e=!1){const n=vue.ref(),r=()=>n.value=!!t();return r(),tryOnMounted(r,e),n}const _global=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},globalKey="__vueuse_ssr_handlers__";_global[globalKey]=_global[globalKey]||{};var __getOwnPropSymbols$g=Object.getOwnPropertySymbols,__hasOwnProp$g=Object.prototype.hasOwnProperty,__propIsEnum$g=Object.prototype.propertyIsEnumerable,__objRest$2=(t,e)=>{var n={};for(var r in t)__hasOwnProp$g.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&__getOwnPropSymbols$g)for(var r of __getOwnPropSymbols$g(t))e.indexOf(r)<0&&__propIsEnum$g.call(t,r)&&(n[r]=t[r]);return n};function useResizeObserver(t,e,n={}){const r=n,{window:i=defaultWindow}=r,s=__objRest$2(r,["window"]);let o;const a=useSupported(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},u=vue.watch(()=>unrefElement(t),d=>{l(),a.value&&i&&d&&(o=new ResizeObserver(e),o.observe(d,s))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return tryOnScopeDispose(c),{isSupported:a,stop:c}}var __getOwnPropSymbols$8=Object.getOwnPropertySymbols,__hasOwnProp$8=Object.prototype.hasOwnProperty,__propIsEnum$8=Object.prototype.propertyIsEnumerable,__objRest$1=(t,e)=>{var n={};for(var r in t)__hasOwnProp$8.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&__getOwnPropSymbols$8)for(var r of __getOwnPropSymbols$8(t))e.indexOf(r)<0&&__propIsEnum$8.call(t,r)&&(n[r]=t[r]);return n};function useMutationObserver(t,e,n={}){const r=n,{window:i=defaultWindow}=r,s=__objRest$1(r,["window"]);let o;const a=useSupported(()=>i&&"MutationObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},u=vue.watch(()=>unrefElement(t),d=>{l(),a.value&&i&&d&&(o=new MutationObserver(e),o.observe(d,s))},{immediate:!0}),c=()=>{l(),u()};return tryOnScopeDispose(c),{isSupported:a,stop:c}}var SwipeDirection;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(SwipeDirection||(SwipeDirection={}));var __defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__spreadValues=(t,e)=>{for(var n in e||(e={}))__hasOwnProp.call(e,n)&&__defNormalProp(t,n,e[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(e))__propIsEnum.call(e,n)&&__defNormalProp(t,n,e[n]);return t};const _TransitionPresets={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};__spreadValues({linear:identity},_TransitionPresets);const isFirefox=()=>isClient&&/firefox/i.test(window.navigator.userAgent);/**
|
|
2
2
|
* @vue/shared v3.5.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
|
-
**/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Pt=()=>{},yy=Object.prototype.hasOwnProperty,vl=(e,n)=>yy.call(e,n),ve=Array.isArray,El=e=>wy(e)==="[object Date]",Ue=e=>typeof e=="function",$t=e=>typeof e=="string",Sn=e=>e!==null&&typeof e=="object",by=Object.prototype.toString,wy=e=>by.call(e),_y=e=>{const n=Object.create(null);return r=>n[r]||(n[r]=e(r))},ky=/-(\w)/g,Sy=_y(e=>e.replace(ky,(n,r)=>r?r.toUpperCase():"")),Ml=e=>e===void 0,pr=e=>typeof e=="boolean",ot=e=>typeof e=="number",Tl=e=>!e&&e!==0||ve(e)&&e.length===0||Sn(e)&&!Object.keys(e).length,Cn=e=>typeof Element>"u"?!1:e instanceof Element,Cy=e=>$t(e)?!Number.isNaN(Number(e)):!1,vo=(e,n,r)=>({get value(){return Ni(e,n,r)},set value(a){zg(e,n,a)}});class Dl extends Error{constructor(n){super(n),this.name="ElementPlusError"}}function Eo(e,n){throw new Dl(`[${e}] ${n}`)}function Le(e,n){if(process.env.NODE_ENV!=="production"){const r=$t(e)?new Dl(`[${e}] ${n}`):e;console.warn(r)}}const vy="utils/dom/style",Ol=(e="")=>e.split(" ").filter(n=>!!n.trim()),Rn=(e,n)=>{if(!e||!n)return!1;if(n.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(n)},Ey=(e,n)=>{!e||!n.trim()||e.classList.add(...Ol(n))},My=(e,n)=>{!e||!n.trim()||e.classList.remove(...Ol(n))},xl=(e,n)=>{var r;if(!Fe||!e||!n)return"";let a=Sy(n);a==="float"&&(a="cssFloat");try{const o=e.style[a];if(o)return o;const s=(r=document.defaultView)==null?void 0:r.getComputedStyle(e,"");return s?s[a]:""}catch{return e.style[a]}};function ln(e,n="px"){if(!e)return"";if(ot(e)||Cy(e))return`${e}${n}`;if($t(e))return e;Le(vy,"binding value must be a string or number")}let oa;const Ty=e=>{var n;if(!Fe)return 0;if(oa!==void 0)return oa;const r=document.createElement("div");r.className=`${e}-scrollbar__wrap`,r.style.visibility="hidden",r.style.width="100px",r.style.position="absolute",r.style.top="-9999px",document.body.appendChild(r);const a=r.offsetWidth;r.style.overflow="scroll";const o=document.createElement("div");o.style.width="100%",r.appendChild(o);const s=o.offsetWidth;return(n=r.parentNode)==null||n.removeChild(r),oa=a-s,oa};/*! Element Plus Icons Vue v2.3.1 */var Dy=t.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Oy=Dy,xy=t.defineComponent({name:"ArrowLeft",__name:"arrow-left",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),Mo=xy,Ny=t.defineComponent({name:"ArrowRight",__name:"arrow-right",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),sa=Ny,Py=t.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),$y=Py,By=t.defineComponent({name:"Calendar",__name:"calendar",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),Vy=By,Iy=t.defineComponent({name:"CircleCheck",__name:"circle-check",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),t.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),Ay=Iy,Ry=t.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),t.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),To=Ry,Fy=t.defineComponent({name:"Clock",__name:"clock",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),t.createElementVNode("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),t.createElementVNode("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),Ly=Fy,Yy=t.defineComponent({name:"Close",__name:"close",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),zy=Yy,jy=t.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),vn=jy,Wy=t.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),En=Wy,Hy=t.defineComponent({name:"Hide",__name:"hide",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),t.createElementVNode("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),Uy=Hy,qy=t.defineComponent({name:"Loading",__name:"loading",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),Nl=qy,Gy=t.defineComponent({name:"View",__name:"view",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),Ky=Gy;const Pl="__epPropKey",J=e=>e,Zy=e=>Sn(e)&&!!e[Pl],ia=(e,n)=>{if(!Sn(e)||Zy(e))return e;const{values:r,required:a,default:o,type:s,validator:i}=e,c={type:s,required:!!a,validator:r||i?d=>{let u=!1,f=[];if(r&&(f=Array.from(r),vl(e,"default")&&f.push(o),u||(u=f.includes(d))),i&&(u||(u=i(d))),!u&&f.length>0){const p=[...new Set(f)].map(g=>JSON.stringify(g)).join(", ");t.warn(`Invalid prop: validation failed${n?` for prop "${n}"`:""}. Expected one of [${p}], got value ${JSON.stringify(d)}.`)}return u}:void 0,[Pl]:!0};return vl(e,"default")&&(c.default=o),c},le=e=>ta(Object.entries(e).map(([n,r])=>[n,ia(r,n)])),Fn=J([String,Object,Function]),Jy={Close:zy},Xy={validating:Nl,success:Ay,error:To},Ct=(e,n)=>{if(e.install=r=>{for(const a of[e,...Object.values(n??{})])r.component(a.name,a)},n)for(const[r,a]of Object.entries(n))e[r]=a;return e},$l=e=>(e.install=Pt,e),Qy=(...e)=>n=>{e.forEach(r=>{Ue(r)?r(n):r.value=n})},Pe={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},e0=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],mr="update:modelValue",Do=["","default","small","large"];var la=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(la||{});const st=e=>!e&&e!==0?[]:ve(e)?e:[e],t0=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),n0=e=>e,r0=["class","style"],a0=/^on[A-Z]/,Bl=(e={})=>{const{excludeListeners:n=!1,excludeKeys:r}=e,a=t.computed(()=>((r==null?void 0:r.value)||[]).concat(r0)),o=t.getCurrentInstance();return o?t.computed(()=>{var s;return ta(Object.entries((s=o.proxy)==null?void 0:s.$attrs).filter(([i])=>!a.value.includes(i)&&!(n&&a0.test(i))))}):(Le("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),t.computed(()=>({})))},Vl=({from:e,replacement:n,scope:r,version:a,ref:o,type:s="API"},i)=>{t.watch(()=>t.unref(i),l=>{l&&Le(r,`[${s}] ${e} is about to be deprecated in version ${a}, please use ${n} instead.
|
|
6
|
-
For more detail, please visit: ${
|
|
7
|
-
`)},{immediate:!0})},o0=(e,n,r,a)=>{let o={offsetX:0,offsetY:0};const s=d=>{const u=d.clientX,f=d.clientY,{offsetX:p,offsetY:g}=o,m=e.value.getBoundingClientRect(),h=m.left,w=m.top,y=m.width,k=m.height,C=document.documentElement.clientWidth,b=document.documentElement.clientHeight,_=-h+p,v=-w+g,M=C-h-y+p,D=b-w-k+g,B=V=>{let z=p+V.clientX-u,L=g+V.clientY-f;a!=null&&a.value||(z=Math.min(Math.max(z,_),M),L=Math.min(Math.max(L,v),D)),o={offsetX:z,offsetY:L},e.value&&(e.value.style.transform=`translate(${ln(z)}, ${ln(L)})`)},P=()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",P)};document.addEventListener("mousemove",B),document.addEventListener("mouseup",P)},i=()=>{n.value&&e.value&&n.value.addEventListener("mousedown",s)},l=()=>{n.value&&e.value&&n.value.removeEventListener("mousedown",s)},c=()=>{o={offsetX:0,offsetY:0},e.value&&(e.value.style.transform="none")};return t.onMounted(()=>{t.watchEffect(()=>{r.value?i():l()})}),t.onBeforeUnmount(()=>{l()}),{resetPosition:c}};var s0={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const i0=e=>(n,r)=>l0(n,r,t.unref(e)),l0=(e,n,r)=>Ni(r,e,e).replace(/\{(\w+)\}/g,(a,o)=>{var s;return`${(s=n==null?void 0:n[o])!=null?s:`{${o}}`}`}),c0=e=>{const n=t.computed(()=>t.unref(e).name),r=t.isRef(e)?e:t.ref(e);return{lang:n,locale:r,t:i0(e)}},d0=Symbol("localeContextKey"),it=e=>{const n=t.inject(d0,t.ref());return c0(t.computed(()=>n.value||s0))},ca="el",f0="is-",Mn=(e,n,r,a,o)=>{let s=`${e}-${n}`;return r&&(s+=`-${r}`),a&&(s+=`__${a}`),o&&(s+=`--${o}`),s},u0=Symbol("namespaceContextKey"),Oo=e=>{const n=t.getCurrentInstance()?t.inject(u0,t.ref(ca)):t.ref(ca);return t.computed(()=>t.unref(n)||ca)},me=(e,n)=>{const r=Oo();return{namespace:r,b:(h="")=>Mn(r.value,e,h,"",""),e:h=>h?Mn(r.value,e,"",h,""):"",m:h=>h?Mn(r.value,e,"","",h):"",be:(h,w)=>h&&w?Mn(r.value,e,h,w,""):"",em:(h,w)=>h&&w?Mn(r.value,e,"",h,w):"",bm:(h,w)=>h&&w?Mn(r.value,e,h,"",w):"",bem:(h,w,y)=>h&&w&&y?Mn(r.value,e,h,w,y):"",is:(h,...w)=>{const y=w.length>=1?w[0]:!0;return h&&y?`${f0}${h}`:""},cssVar:h=>{const w={};for(const y in h)h[y]&&(w[`--${r.value}-${y}`]=h[y]);return w},cssVarName:h=>`--${r.value}-${h}`,cssVarBlock:h=>{const w={};for(const y in h)h[y]&&(w[`--${r.value}-${e}-${y}`]=h[y]);return w},cssVarBlockName:h=>`--${r.value}-${e}-${h}`}},p0=(e,n={})=>{t.isRef(e)||Eo("[useLockscreen]","You need to pass a ref param to this function");const r=n.ns||me("popup"),a=t.computed(()=>r.bm("parent","hidden"));if(!Fe||Rn(document.body,a.value))return;let o=0,s=!1,i="0";const l=()=>{setTimeout(()=>{typeof document>"u"||(My(document==null?void 0:document.body,a.value),s&&document&&(document.body.style.width=i))},200)};t.watch(e,c=>{if(!c){l();return}s=!Rn(document.body,a.value),s&&(i=document.body.style.width),o=Ty(r.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,u=xl(document.body,"overflowY");o>0&&(d||u==="scroll")&&s&&(document.body.style.width=`calc(100% - ${o}px)`),Ey(document.body,a.value)}),t.onScopeDispose(()=>l())},m0=ia({type:J(Boolean),default:null}),h0=ia({type:J(Function)}),g0=e=>{const n=`update:${e}`,r=`onUpdate:${e}`,a=[n],o={[e]:m0,[r]:h0};return{useModelToggle:({indicator:i,toggleReason:l,shouldHideWhenRouteChanges:c,shouldProceed:d,onShow:u,onHide:f})=>{const p=t.getCurrentInstance(),{emit:g}=p,m=p.props,h=t.computed(()=>Ue(m[r])),w=t.computed(()=>m[e]===null),y=M=>{i.value!==!0&&(i.value=!0,l&&(l.value=M),Ue(u)&&u(M))},k=M=>{i.value!==!1&&(i.value=!1,l&&(l.value=M),Ue(f)&&f(M))},C=M=>{if(m.disabled===!0||Ue(d)&&!d())return;const D=h.value&&Fe;D&&g(n,!0),(w.value||!D)&&y(M)},b=M=>{if(m.disabled===!0||!Fe)return;const D=h.value&&Fe;D&&g(n,!1),(w.value||!D)&&k(M)},_=M=>{pr(M)&&(m.disabled&&M?h.value&&g(n,!1):i.value!==M&&(M?y():k()))},v=()=>{i.value?b():C()};return t.watch(()=>m[e],_),c&&p.appContext.config.globalProperties.$route!==void 0&&t.watch(()=>({...p.proxy.$route}),()=>{c.value&&i.value&&b()}),t.onMounted(()=>{_(m[e])}),{hide:b,show:C,toggle:v,hasUpdateHandler:h}},useModelToggleProps:o,useModelToggleEmits:a}},Il=e=>{const n=t.getCurrentInstance();return t.computed(()=>{var r,a;return(a=(r=n==null?void 0:n.proxy)==null?void 0:r.$props)==null?void 0:a[e]})};var Qe="top",pt="bottom",mt="right",et="left",xo="auto",hr=[Qe,pt,mt,et],Ln="start",gr="end",y0="clippingParents",Al="viewport",yr="popper",b0="reference",Rl=hr.reduce(function(e,n){return e.concat([n+"-"+Ln,n+"-"+gr])},[]),da=[].concat(hr,[xo]).reduce(function(e,n){return e.concat([n,n+"-"+Ln,n+"-"+gr])},[]),w0="beforeRead",_0="read",k0="afterRead",S0="beforeMain",C0="main",v0="afterMain",E0="beforeWrite",M0="write",T0="afterWrite",D0=[w0,_0,k0,S0,C0,v0,E0,M0,T0];function Bt(e){return e?(e.nodeName||"").toLowerCase():null}function vt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var n=e.ownerDocument;return n&&n.defaultView||window}return e}function Yn(e){var n=vt(e).Element;return e instanceof n||e instanceof Element}function ht(e){var n=vt(e).HTMLElement;return e instanceof n||e instanceof HTMLElement}function No(e){if(typeof ShadowRoot>"u")return!1;var n=vt(e).ShadowRoot;return e instanceof n||e instanceof ShadowRoot}function O0(e){var n=e.state;Object.keys(n.elements).forEach(function(r){var a=n.styles[r]||{},o=n.attributes[r]||{},s=n.elements[r];!ht(s)||!Bt(s)||(Object.assign(s.style,a),Object.keys(o).forEach(function(i){var l=o[i];l===!1?s.removeAttribute(i):s.setAttribute(i,l===!0?"":l)}))})}function x0(e){var n=e.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow),function(){Object.keys(n.elements).forEach(function(a){var o=n.elements[a],s=n.attributes[a]||{},i=Object.keys(n.styles.hasOwnProperty(a)?n.styles[a]:r[a]),l=i.reduce(function(c,d){return c[d]="",c},{});!ht(o)||!Bt(o)||(Object.assign(o.style,l),Object.keys(s).forEach(function(c){o.removeAttribute(c)}))})}}var Fl={name:"applyStyles",enabled:!0,phase:"write",fn:O0,effect:x0,requires:["computeStyles"]};function Vt(e){return e.split("-")[0]}var Tn=Math.max,fa=Math.min,zn=Math.round;function jn(e,n){n===void 0&&(n=!1);var r=e.getBoundingClientRect(),a=1,o=1;if(ht(e)&&n){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(a=zn(r.width)/i||1),s>0&&(o=zn(r.height)/s||1)}return{width:r.width/a,height:r.height/o,top:r.top/o,right:r.right/a,bottom:r.bottom/o,left:r.left/a,x:r.left/a,y:r.top/o}}function Po(e){var n=jn(e),r=e.offsetWidth,a=e.offsetHeight;return Math.abs(n.width-r)<=1&&(r=n.width),Math.abs(n.height-a)<=1&&(a=n.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:a}}function Ll(e,n){var r=n.getRootNode&&n.getRootNode();if(e.contains(n))return!0;if(r&&No(r)){var a=n;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function qt(e){return vt(e).getComputedStyle(e)}function N0(e){return["table","td","th"].indexOf(Bt(e))>=0}function cn(e){return((Yn(e)?e.ownerDocument:e.document)||window.document).documentElement}function ua(e){return Bt(e)==="html"?e:e.assignedSlot||e.parentNode||(No(e)?e.host:null)||cn(e)}function Yl(e){return!ht(e)||qt(e).position==="fixed"?null:e.offsetParent}function P0(e){var n=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&ht(e)){var a=qt(e);if(a.position==="fixed")return null}var o=ua(e);for(No(o)&&(o=o.host);ht(o)&&["html","body"].indexOf(Bt(o))<0;){var s=qt(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||n&&s.willChange==="filter"||n&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function br(e){for(var n=vt(e),r=Yl(e);r&&N0(r)&&qt(r).position==="static";)r=Yl(r);return r&&(Bt(r)==="html"||Bt(r)==="body"&&qt(r).position==="static")?n:r||P0(e)||n}function $o(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function wr(e,n,r){return Tn(e,fa(n,r))}function $0(e,n,r){var a=wr(e,n,r);return a>r?r:a}function zl(){return{top:0,right:0,bottom:0,left:0}}function jl(e){return Object.assign({},zl(),e)}function Wl(e,n){return n.reduce(function(r,a){return r[a]=e,r},{})}var B0=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,jl(typeof e!="number"?e:Wl(e,hr))};function V0(e){var n,r=e.state,a=e.name,o=e.options,s=r.elements.arrow,i=r.modifiersData.popperOffsets,l=Vt(r.placement),c=$o(l),d=[et,mt].indexOf(l)>=0,u=d?"height":"width";if(!(!s||!i)){var f=B0(o.padding,r),p=Po(s),g=c==="y"?Qe:et,m=c==="y"?pt:mt,h=r.rects.reference[u]+r.rects.reference[c]-i[c]-r.rects.popper[u],w=i[c]-r.rects.reference[c],y=br(s),k=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,C=h/2-w/2,b=f[g],_=k-p[u]-f[m],v=k/2-p[u]/2+C,M=wr(b,v,_),D=c;r.modifiersData[a]=(n={},n[D]=M,n.centerOffset=M-v,n)}}function I0(e){var n=e.state,r=e.options,a=r.element,o=a===void 0?"[data-popper-arrow]":a;o!=null&&(typeof o=="string"&&(o=n.elements.popper.querySelector(o),!o)||!Ll(n.elements.popper,o)||(n.elements.arrow=o))}var A0={name:"arrow",enabled:!0,phase:"main",fn:V0,effect:I0,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Wn(e){return e.split("-")[1]}var R0={top:"auto",right:"auto",bottom:"auto",left:"auto"};function F0(e){var n=e.x,r=e.y,a=window,o=a.devicePixelRatio||1;return{x:zn(n*o)/o||0,y:zn(r*o)/o||0}}function Hl(e){var n,r=e.popper,a=e.popperRect,o=e.placement,s=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,f=e.isFixed,p=i.x,g=p===void 0?0:p,m=i.y,h=m===void 0?0:m,w=typeof u=="function"?u({x:g,y:h}):{x:g,y:h};g=w.x,h=w.y;var y=i.hasOwnProperty("x"),k=i.hasOwnProperty("y"),C=et,b=Qe,_=window;if(d){var v=br(r),M="clientHeight",D="clientWidth";if(v===vt(r)&&(v=cn(r),qt(v).position!=="static"&&l==="absolute"&&(M="scrollHeight",D="scrollWidth")),v=v,o===Qe||(o===et||o===mt)&&s===gr){b=pt;var B=f&&v===_&&_.visualViewport?_.visualViewport.height:v[M];h-=B-a.height,h*=c?1:-1}if(o===et||(o===Qe||o===pt)&&s===gr){C=mt;var P=f&&v===_&&_.visualViewport?_.visualViewport.width:v[D];g-=P-a.width,g*=c?1:-1}}var V=Object.assign({position:l},d&&R0),z=u===!0?F0({x:g,y:h}):{x:g,y:h};if(g=z.x,h=z.y,c){var L;return Object.assign({},V,(L={},L[b]=k?"0":"",L[C]=y?"0":"",L.transform=(_.devicePixelRatio||1)<=1?"translate("+g+"px, "+h+"px)":"translate3d("+g+"px, "+h+"px, 0)",L))}return Object.assign({},V,(n={},n[b]=k?h+"px":"",n[C]=y?g+"px":"",n.transform="",n))}function L0(e){var n=e.state,r=e.options,a=r.gpuAcceleration,o=a===void 0?!0:a,s=r.adaptive,i=s===void 0?!0:s,l=r.roundOffsets,c=l===void 0?!0:l,d={placement:Vt(n.placement),variation:Wn(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o,isFixed:n.options.strategy==="fixed"};n.modifiersData.popperOffsets!=null&&(n.styles.popper=Object.assign({},n.styles.popper,Hl(Object.assign({},d,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i,roundOffsets:c})))),n.modifiersData.arrow!=null&&(n.styles.arrow=Object.assign({},n.styles.arrow,Hl(Object.assign({},d,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})}var Ul={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:L0,data:{}},pa={passive:!0};function Y0(e){var n=e.state,r=e.instance,a=e.options,o=a.scroll,s=o===void 0?!0:o,i=a.resize,l=i===void 0?!0:i,c=vt(n.elements.popper),d=[].concat(n.scrollParents.reference,n.scrollParents.popper);return s&&d.forEach(function(u){u.addEventListener("scroll",r.update,pa)}),l&&c.addEventListener("resize",r.update,pa),function(){s&&d.forEach(function(u){u.removeEventListener("scroll",r.update,pa)}),l&&c.removeEventListener("resize",r.update,pa)}}var ql={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Y0,data:{}},z0={left:"right",right:"left",bottom:"top",top:"bottom"};function ma(e){return e.replace(/left|right|bottom|top/g,function(n){return z0[n]})}var j0={start:"end",end:"start"};function Gl(e){return e.replace(/start|end/g,function(n){return j0[n]})}function Bo(e){var n=vt(e),r=n.pageXOffset,a=n.pageYOffset;return{scrollLeft:r,scrollTop:a}}function Vo(e){return jn(cn(e)).left+Bo(e).scrollLeft}function W0(e){var n=vt(e),r=cn(e),a=n.visualViewport,o=r.clientWidth,s=r.clientHeight,i=0,l=0;return a&&(o=a.width,s=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=a.offsetLeft,l=a.offsetTop)),{width:o,height:s,x:i+Vo(e),y:l}}function H0(e){var n,r=cn(e),a=Bo(e),o=(n=e.ownerDocument)==null?void 0:n.body,s=Tn(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Tn(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-a.scrollLeft+Vo(e),c=-a.scrollTop;return qt(o||r).direction==="rtl"&&(l+=Tn(r.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function Io(e){var n=qt(e),r=n.overflow,a=n.overflowX,o=n.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+a)}function Kl(e){return["html","body","#document"].indexOf(Bt(e))>=0?e.ownerDocument.body:ht(e)&&Io(e)?e:Kl(ua(e))}function _r(e,n){var r;n===void 0&&(n=[]);var a=Kl(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),s=vt(a),i=o?[s].concat(s.visualViewport||[],Io(a)?a:[]):a,l=n.concat(i);return o?l:l.concat(_r(ua(i)))}function Ao(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function U0(e){var n=jn(e);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Zl(e,n){return n===Al?Ao(W0(e)):Yn(n)?U0(n):Ao(H0(cn(e)))}function q0(e){var n=_r(ua(e)),r=["absolute","fixed"].indexOf(qt(e).position)>=0,a=r&&ht(e)?br(e):e;return Yn(a)?n.filter(function(o){return Yn(o)&&Ll(o,a)&&Bt(o)!=="body"}):[]}function G0(e,n,r){var a=n==="clippingParents"?q0(e):[].concat(n),o=[].concat(a,[r]),s=o[0],i=o.reduce(function(l,c){var d=Zl(e,c);return l.top=Tn(d.top,l.top),l.right=fa(d.right,l.right),l.bottom=fa(d.bottom,l.bottom),l.left=Tn(d.left,l.left),l},Zl(e,s));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function Jl(e){var n=e.reference,r=e.element,a=e.placement,o=a?Vt(a):null,s=a?Wn(a):null,i=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2,c;switch(o){case Qe:c={x:i,y:n.y-r.height};break;case pt:c={x:i,y:n.y+n.height};break;case mt:c={x:n.x+n.width,y:l};break;case et:c={x:n.x-r.width,y:l};break;default:c={x:n.x,y:n.y}}var d=o?$o(o):null;if(d!=null){var u=d==="y"?"height":"width";switch(s){case Ln:c[d]=c[d]-(n[u]/2-r[u]/2);break;case gr:c[d]=c[d]+(n[u]/2-r[u]/2);break}}return c}function kr(e,n){n===void 0&&(n={});var r=n,a=r.placement,o=a===void 0?e.placement:a,s=r.boundary,i=s===void 0?y0:s,l=r.rootBoundary,c=l===void 0?Al:l,d=r.elementContext,u=d===void 0?yr:d,f=r.altBoundary,p=f===void 0?!1:f,g=r.padding,m=g===void 0?0:g,h=jl(typeof m!="number"?m:Wl(m,hr)),w=u===yr?b0:yr,y=e.rects.popper,k=e.elements[p?w:u],C=G0(Yn(k)?k:k.contextElement||cn(e.elements.popper),i,c),b=jn(e.elements.reference),_=Jl({reference:b,element:y,placement:o}),v=Ao(Object.assign({},y,_)),M=u===yr?v:b,D={top:C.top-M.top+h.top,bottom:M.bottom-C.bottom+h.bottom,left:C.left-M.left+h.left,right:M.right-C.right+h.right},B=e.modifiersData.offset;if(u===yr&&B){var P=B[o];Object.keys(D).forEach(function(V){var z=[mt,pt].indexOf(V)>=0?1:-1,L=[Qe,pt].indexOf(V)>=0?"y":"x";D[V]+=P[L]*z})}return D}function K0(e,n){n===void 0&&(n={});var r=n,a=r.placement,o=r.boundary,s=r.rootBoundary,i=r.padding,l=r.flipVariations,c=r.allowedAutoPlacements,d=c===void 0?da:c,u=Wn(a),f=u?l?Rl:Rl.filter(function(m){return Wn(m)===u}):hr,p=f.filter(function(m){return d.indexOf(m)>=0});p.length===0&&(p=f);var g=p.reduce(function(m,h){return m[h]=kr(e,{placement:h,boundary:o,rootBoundary:s,padding:i})[Vt(h)],m},{});return Object.keys(g).sort(function(m,h){return g[m]-g[h]})}function Z0(e){if(Vt(e)===xo)return[];var n=ma(e);return[Gl(e),n,Gl(n)]}function J0(e){var n=e.state,r=e.options,a=e.name;if(!n.modifiersData[a]._skip){for(var o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,l=i===void 0?!0:i,c=r.fallbackPlacements,d=r.padding,u=r.boundary,f=r.rootBoundary,p=r.altBoundary,g=r.flipVariations,m=g===void 0?!0:g,h=r.allowedAutoPlacements,w=n.options.placement,y=Vt(w),k=y===w,C=c||(k||!m?[ma(w)]:Z0(w)),b=[w].concat(C).reduce(function(j,q){return j.concat(Vt(q)===xo?K0(n,{placement:q,boundary:u,rootBoundary:f,padding:d,flipVariations:m,allowedAutoPlacements:h}):q)},[]),_=n.rects.reference,v=n.rects.popper,M=new Map,D=!0,B=b[0],P=0;P<b.length;P++){var V=b[P],z=Vt(V),L=Wn(V)===Ln,W=[Qe,pt].indexOf(z)>=0,A=W?"width":"height",O=kr(n,{placement:V,boundary:u,rootBoundary:f,altBoundary:p,padding:d}),$=W?L?mt:et:L?pt:Qe;_[A]>v[A]&&($=ma($));var I=ma($),E=[];if(s&&E.push(O[z]<=0),l&&E.push(O[$]<=0,O[I]<=0),E.every(function(j){return j})){B=V,D=!1;break}M.set(V,E)}if(D)for(var N=m?3:1,T=function(j){var q=b.find(function(re){var ae=M.get(re);if(ae)return ae.slice(0,j).every(function(G){return G})});if(q)return B=q,"break"},R=N;R>0;R--){var x=T(R);if(x==="break")break}n.placement!==B&&(n.modifiersData[a]._skip=!0,n.placement=B,n.reset=!0)}}var X0={name:"flip",enabled:!0,phase:"main",fn:J0,requiresIfExists:["offset"],data:{_skip:!1}};function Xl(e,n,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-n.height-r.y,right:e.right-n.width+r.x,bottom:e.bottom-n.height+r.y,left:e.left-n.width-r.x}}function Ql(e){return[Qe,mt,pt,et].some(function(n){return e[n]>=0})}function Q0(e){var n=e.state,r=e.name,a=n.rects.reference,o=n.rects.popper,s=n.modifiersData.preventOverflow,i=kr(n,{elementContext:"reference"}),l=kr(n,{altBoundary:!0}),c=Xl(i,a),d=Xl(l,o,s),u=Ql(c),f=Ql(d);n.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:f},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}var eb={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Q0};function tb(e,n,r){var a=Vt(e),o=[et,Qe].indexOf(a)>=0?-1:1,s=typeof r=="function"?r(Object.assign({},n,{placement:e})):r,i=s[0],l=s[1];return i=i||0,l=(l||0)*o,[et,mt].indexOf(a)>=0?{x:l,y:i}:{x:i,y:l}}function nb(e){var n=e.state,r=e.options,a=e.name,o=r.offset,s=o===void 0?[0,0]:o,i=da.reduce(function(u,f){return u[f]=tb(f,n.rects,s),u},{}),l=i[n.placement],c=l.x,d=l.y;n.modifiersData.popperOffsets!=null&&(n.modifiersData.popperOffsets.x+=c,n.modifiersData.popperOffsets.y+=d),n.modifiersData[a]=i}var rb={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:nb};function ab(e){var n=e.state,r=e.name;n.modifiersData[r]=Jl({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})}var ec={name:"popperOffsets",enabled:!0,phase:"read",fn:ab,data:{}};function ob(e){return e==="x"?"y":"x"}function sb(e){var n=e.state,r=e.options,a=e.name,o=r.mainAxis,s=o===void 0?!0:o,i=r.altAxis,l=i===void 0?!1:i,c=r.boundary,d=r.rootBoundary,u=r.altBoundary,f=r.padding,p=r.tether,g=p===void 0?!0:p,m=r.tetherOffset,h=m===void 0?0:m,w=kr(n,{boundary:c,rootBoundary:d,padding:f,altBoundary:u}),y=Vt(n.placement),k=Wn(n.placement),C=!k,b=$o(y),_=ob(b),v=n.modifiersData.popperOffsets,M=n.rects.reference,D=n.rects.popper,B=typeof h=="function"?h(Object.assign({},n.rects,{placement:n.placement})):h,P=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),V=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,z={x:0,y:0};if(v){if(s){var L,W=b==="y"?Qe:et,A=b==="y"?pt:mt,O=b==="y"?"height":"width",$=v[b],I=$+w[W],E=$-w[A],N=g?-D[O]/2:0,T=k===Ln?M[O]:D[O],R=k===Ln?-D[O]:-M[O],x=n.elements.arrow,j=g&&x?Po(x):{width:0,height:0},q=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:zl(),re=q[W],ae=q[A],G=wr(0,M[O],j[O]),ne=C?M[O]/2-N-G-re-P.mainAxis:T-G-re-P.mainAxis,se=C?-M[O]/2+N+G+ae+P.mainAxis:R+G+ae+P.mainAxis,ie=n.elements.arrow&&br(n.elements.arrow),Ce=ie?b==="y"?ie.clientTop||0:ie.clientLeft||0:0,ue=(L=V==null?void 0:V[b])!=null?L:0,Ae=$+ne-ue-Ce,We=$+se-ue,Ke=wr(g?fa(I,Ae):I,$,g?Tn(E,We):E);v[b]=Ke,z[b]=Ke-$}if(l){var Ve,Je=b==="x"?Qe:et,ce=b==="x"?pt:mt,Ne=v[_],Re=_==="y"?"height":"width",wt=Ne+w[Je],nt=Ne-w[ce],U=[Qe,et].indexOf(y)!==-1,be=(Ve=V==null?void 0:V[_])!=null?Ve:0,Ze=U?wt:Ne-M[Re]-D[Re]-be+P.altAxis,rt=U?Ne+M[Re]+D[Re]-be-P.altAxis:nt,Xe=g&&U?$0(Ze,Ne,rt):wr(g?Ze:wt,Ne,g?rt:nt);v[_]=Xe,z[_]=Xe-Ne}n.modifiersData[a]=z}}var ib={name:"preventOverflow",enabled:!0,phase:"main",fn:sb,requiresIfExists:["offset"]};function lb(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function cb(e){return e===vt(e)||!ht(e)?Bo(e):lb(e)}function db(e){var n=e.getBoundingClientRect(),r=zn(n.width)/e.offsetWidth||1,a=zn(n.height)/e.offsetHeight||1;return r!==1||a!==1}function fb(e,n,r){r===void 0&&(r=!1);var a=ht(n),o=ht(n)&&db(n),s=cn(n),i=jn(e,o),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!r)&&((Bt(n)!=="body"||Io(s))&&(l=cb(n)),ht(n)?(c=jn(n,!0),c.x+=n.clientLeft,c.y+=n.clientTop):s&&(c.x=Vo(s))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function ub(e){var n=new Map,r=new Set,a=[];e.forEach(function(s){n.set(s.name,s)});function o(s){r.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!r.has(l)){var c=n.get(l);c&&o(c)}}),a.push(s)}return e.forEach(function(s){r.has(s.name)||o(s)}),a}function pb(e){var n=ub(e);return D0.reduce(function(r,a){return r.concat(n.filter(function(o){return o.phase===a}))},[])}function mb(e){var n;return function(){return n||(n=new Promise(function(r){Promise.resolve().then(function(){n=void 0,r(e())})})),n}}function hb(e){var n=e.reduce(function(r,a){var o=r[a.name];return r[a.name]=o?Object.assign({},o,a,{options:Object.assign({},o.options,a.options),data:Object.assign({},o.data,a.data)}):a,r},{});return Object.keys(n).map(function(r){return n[r]})}var tc={placement:"bottom",modifiers:[],strategy:"absolute"};function nc(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return!n.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function Ro(e){e===void 0&&(e={});var n=e,r=n.defaultModifiers,a=r===void 0?[]:r,o=n.defaultOptions,s=o===void 0?tc:o;return function(i,l,c){c===void 0&&(c=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},tc,s),modifiersData:{},elements:{reference:i,popper:l},attributes:{},styles:{}},u=[],f=!1,p={state:d,setOptions:function(h){var w=typeof h=="function"?h(d.options):h;m(),d.options=Object.assign({},s,d.options,w),d.scrollParents={reference:Yn(i)?_r(i):i.contextElement?_r(i.contextElement):[],popper:_r(l)};var y=pb(hb([].concat(a,d.options.modifiers)));return d.orderedModifiers=y.filter(function(k){return k.enabled}),g(),p.update()},forceUpdate:function(){if(!f){var h=d.elements,w=h.reference,y=h.popper;if(nc(w,y)){d.rects={reference:fb(w,br(y),d.options.strategy==="fixed"),popper:Po(y)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(D){return d.modifiersData[D.name]=Object.assign({},D.data)});for(var k=0;k<d.orderedModifiers.length;k++){if(d.reset===!0){d.reset=!1,k=-1;continue}var C=d.orderedModifiers[k],b=C.fn,_=C.options,v=_===void 0?{}:_,M=C.name;typeof b=="function"&&(d=b({state:d,options:v,name:M,instance:p})||d)}}}},update:mb(function(){return new Promise(function(h){p.forceUpdate(),h(d)})}),destroy:function(){m(),f=!0}};if(!nc(i,l))return p;p.setOptions(c).then(function(h){!f&&c.onFirstUpdate&&c.onFirstUpdate(h)});function g(){d.orderedModifiers.forEach(function(h){var w=h.name,y=h.options,k=y===void 0?{}:y,C=h.effect;if(typeof C=="function"){var b=C({state:d,name:w,instance:p,options:k}),_=function(){};u.push(b||_)}})}function m(){u.forEach(function(h){return h()}),u=[]}return p}}Ro();var gb=[ql,ec,Ul,Fl];Ro({defaultModifiers:gb});var yb=[ql,ec,Ul,Fl,rb,X0,ib,A0,eb],bb=Ro({defaultModifiers:yb});const wb=(e,n,r={})=>{const a={name:"updateState",enabled:!0,phase:"write",fn:({state:c})=>{const d=_b(c);Object.assign(i.value,d)},requires:["computeStyles"]},o=t.computed(()=>{const{onFirstUpdate:c,placement:d,strategy:u,modifiers:f}=t.unref(r);return{onFirstUpdate:c,placement:d||"bottom",strategy:u||"absolute",modifiers:[...f||[],a,{name:"applyStyles",enabled:!1}]}}),s=t.shallowRef(),i=t.ref({styles:{popper:{position:t.unref(o).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{s.value&&(s.value.destroy(),s.value=void 0)};return t.watch(o,c=>{const d=t.unref(s);d&&d.setOptions(c)},{deep:!0}),t.watch([e,n],([c,d])=>{l(),!(!c||!d)&&(s.value=bb(c,d,t.unref(o)))}),t.onBeforeUnmount(()=>{l()}),{state:t.computed(()=>{var c;return{...((c=t.unref(s))==null?void 0:c.state)||{}}}),styles:t.computed(()=>t.unref(i).styles),attributes:t.computed(()=>t.unref(i).attributes),update:()=>{var c;return(c=t.unref(s))==null?void 0:c.update()},forceUpdate:()=>{var c;return(c=t.unref(s))==null?void 0:c.forceUpdate()},instanceRef:t.computed(()=>t.unref(s))}};function _b(e){const n=Object.keys(e.elements),r=ta(n.map(o=>[o,e.styles[o]||{}])),a=ta(n.map(o=>[o,e.attributes[o]]));return{styles:r,attributes:a}}const rc=e=>{if(!e)return{onClick:Pt,onMousedown:Pt,onMouseup:Pt};let n=!1,r=!1;return{onClick:i=>{n&&r&&e(i),n=r=!1},onMousedown:i=>{n=i.target===i.currentTarget},onMouseup:i=>{r=i.target===i.currentTarget}}};function ac(){let e;const n=(a,o)=>{r(),e=window.setTimeout(a,o)},r=()=>window.clearTimeout(e);return aa(()=>r()),{registerTimeout:n,cancelTimeout:r}}const Fo={prefix:Math.floor(Math.random()*1e4),current:0},kb=Symbol("elIdInjection"),oc=()=>t.getCurrentInstance()?t.inject(kb,Fo):Fo,Sr=e=>{const n=oc();!Fe&&n===Fo&&Le("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
5
|
+
**/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const NOOP=()=>{},hasOwnProperty=Object.prototype.hasOwnProperty,hasOwn=(t,e)=>hasOwnProperty.call(t,e),isArray$1=Array.isArray,isDate$1=t=>toTypeString(t)==="[object Date]",isFunction$1=t=>typeof t=="function",isString$1=t=>typeof t=="string",isObject$1=t=>t!==null&&typeof t=="object",objectToString=Object.prototype.toString,toTypeString=t=>objectToString.call(t),isPlainObject=t=>toTypeString(t)==="[object Object]",cacheStringFunction=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(t=>t.replace(camelizeRE,(e,n)=>n?n.toUpperCase():"")),isUndefined$1=t=>t===void 0,isBoolean=t=>typeof t=="boolean",isNumber$1=t=>typeof t=="number",isEmpty$2=t=>!t&&t!==0||isArray$1(t)&&t.length===0||isObject$1(t)&&!Object.keys(t).length,isElement=t=>typeof Element>"u"?!1:t instanceof Element,isStringNumber=t=>isString$1(t)?!Number.isNaN(Number(t)):!1,escapeStringRegexp=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),getProp=(t,e,n)=>({get value(){return get$5(t,e,n)},set value(r){set$2(t,e,r)}});class ElementPlusError extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function throwError(t,e){throw new ElementPlusError(`[${t}] ${e}`)}function debugWarn(t,e){if(process.env.NODE_ENV!=="production"){const n=isString$1(t)?new ElementPlusError(`[${t}] ${e}`):t;console.warn(n)}}const SCOPE$2="utils/dom/style",classNameToArray=(t="")=>t.split(" ").filter(e=>!!e.trim()),hasClass=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},addClass=(t,e)=>{!t||!e.trim()||t.classList.add(...classNameToArray(e))},removeClass=(t,e)=>{!t||!e.trim()||t.classList.remove(...classNameToArray(e))},getStyle=(t,e)=>{var n;if(!isClient||!t||!e)return"";let r=camelize(e);r==="float"&&(r="cssFloat");try{const i=t.style[r];if(i)return i;const s=(n=document.defaultView)==null?void 0:n.getComputedStyle(t,"");return s?s[r]:""}catch{return t.style[r]}};function addUnit(t,e="px"){if(!t)return"";if(isNumber$1(t)||isStringNumber(t))return`${t}${e}`;if(isString$1(t))return t;debugWarn(SCOPE$2,"binding value must be a string or number")}let scrollBarWidth;const getScrollBarWidth=t=>{var e;if(!isClient)return 0;if(scrollBarWidth!==void 0)return scrollBarWidth;const n=document.createElement("div");n.className=`${t}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const r=n.offsetWidth;n.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",n.appendChild(i);const s=i.offsetWidth;return(e=n.parentNode)==null||e.removeChild(n),scrollBarWidth=r-s,scrollBarWidth};function scrollIntoView(t,e){if(!isClient)return;if(!e){t.scrollTop=0;return}const n=[];let r=e.offsetParent;for(;r!==null&&t!==r&&t.contains(r);)n.push(r),r=r.offsetParent;const i=e.offsetTop+n.reduce((l,u)=>l+u.offsetTop,0),s=i+e.offsetHeight,o=t.scrollTop,a=o+t.clientHeight;i<o?t.scrollTop=i:s>a&&(t.scrollTop=s-t.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var arrow_down_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),arrow_down_default=arrow_down_vue_vue_type_script_setup_true_lang_default,arrow_left_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),arrow_left_default=arrow_left_vue_vue_type_script_setup_true_lang_default,arrow_right_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),arrow_right_default=arrow_right_vue_vue_type_script_setup_true_lang_default,arrow_up_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),arrow_up_default=arrow_up_vue_vue_type_script_setup_true_lang_default,calendar_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),calendar_default=calendar_vue_vue_type_script_setup_true_lang_default,circle_check_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),vue.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),circle_check_default=circle_check_vue_vue_type_script_setup_true_lang_default,circle_close_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),vue.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),circle_close_default=circle_close_vue_vue_type_script_setup_true_lang_default,clock_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"Clock",__name:"clock",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),vue.createElementVNode("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),vue.createElementVNode("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),clock_default=clock_vue_vue_type_script_setup_true_lang_default,close_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"Close",__name:"close",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),close_default=close_vue_vue_type_script_setup_true_lang_default,d_arrow_left_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),d_arrow_left_default=d_arrow_left_vue_vue_type_script_setup_true_lang_default,d_arrow_right_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),d_arrow_right_default=d_arrow_right_vue_vue_type_script_setup_true_lang_default,hide_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"Hide",__name:"hide",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),vue.createElementVNode("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),hide_default=hide_vue_vue_type_script_setup_true_lang_default,loading_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"Loading",__name:"loading",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),loading_default=loading_vue_vue_type_script_setup_true_lang_default,view_vue_vue_type_script_setup_true_lang_default=vue.defineComponent({name:"View",__name:"view",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),view_default=view_vue_vue_type_script_setup_true_lang_default;const epPropKey="__epPropKey",definePropType=t=>t,isEpProp=t=>isObject$1(t)&&!!t[epPropKey],buildProp=(t,e)=>{if(!isObject$1(t)||isEpProp(t))return t;const{values:n,required:r,default:i,type:s,validator:o}=t,l={type:s,required:!!r,validator:n||o?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),hasOwn(t,"default")&&d.push(i),c||(c=d.includes(u))),o&&(c||(c=o(u))),!c&&d.length>0){const h=[...new Set(d)].map(f=>JSON.stringify(f)).join(", ");vue.warn(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${h}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[epPropKey]:!0};return hasOwn(t,"default")&&(l.default=i),l},buildProps=t=>fromPairs(Object.entries(t).map(([e,n])=>[e,buildProp(n,e)])),iconPropType=definePropType([String,Object,Function]),CloseComponents={Close:close_default},ValidateComponentsMap={validating:loading_default,success:circle_check_default,error:circle_close_default},withInstall=(t,e)=>{if(t.install=n=>{for(const r of[t,...Object.values(e??{})])n.component(r.name,r)},e)for(const[n,r]of Object.entries(e))t[n]=r;return t},withNoopInstall=t=>(t.install=NOOP,t),composeRefs=(...t)=>e=>{t.forEach(n=>{isFunction$1(n)?n(e):n.value=e})},EVENT_CODE={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},datePickTypes=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],UPDATE_MODEL_EVENT="update:modelValue",CHANGE_EVENT="change",componentSizes=["","default","small","large"];var PatchFlags=(t=>(t[t.TEXT=1]="TEXT",t[t.CLASS=2]="CLASS",t[t.STYLE=4]="STYLE",t[t.PROPS=8]="PROPS",t[t.FULL_PROPS=16]="FULL_PROPS",t[t.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",t[t.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",t[t.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",t[t.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",t[t.NEED_PATCH=512]="NEED_PATCH",t[t.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",t[t.HOISTED=-1]="HOISTED",t[t.BAIL=-2]="BAIL",t))(PatchFlags||{});const castArray=t=>!t&&t!==0?[]:isArray$1(t)?t:[t],isKorean=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t),mutable=t=>t,DEFAULT_EXCLUDE_KEYS=["class","style"],LISTENER_PREFIX=/^on[A-Z]/,useAttrs=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,r=vue.computed(()=>((n==null?void 0:n.value)||[]).concat(DEFAULT_EXCLUDE_KEYS)),i=vue.getCurrentInstance();return i?vue.computed(()=>{var s;return fromPairs(Object.entries((s=i.proxy)==null?void 0:s.$attrs).filter(([o])=>!r.value.includes(o)&&!(e&&LISTENER_PREFIX.test(o))))}):(debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),vue.computed(()=>({})))},useDeprecated=({from:t,replacement:e,scope:n,version:r,ref:i,type:s="API"},o)=>{vue.watch(()=>vue.unref(o),a=>{a&&debugWarn(n,`[${s}] ${t} is about to be deprecated in version ${r}, please use ${e} instead.
|
|
6
|
+
For more detail, please visit: ${i}
|
|
7
|
+
`)},{immediate:!0})},useDraggable=(t,e,n,r)=>{let i={offsetX:0,offsetY:0};const s=u=>{const c=u.clientX,d=u.clientY,{offsetX:h,offsetY:f}=i,p=t.value.getBoundingClientRect(),g=p.left,v=p.top,m=p.width,y=p.height,b=document.documentElement.clientWidth,_=document.documentElement.clientHeight,T=-g+h,x=-v+f,k=b-g-m+h,w=_-v-y+f,O=F=>{let z=h+F.clientX-c,Y=f+F.clientY-d;r!=null&&r.value||(z=Math.min(Math.max(z,T),k),Y=Math.min(Math.max(Y,x),w)),i={offsetX:z,offsetY:Y},t.value&&(t.value.style.transform=`translate(${addUnit(z)}, ${addUnit(Y)})`)},S=()=>{document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",S)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",S)},o=()=>{e.value&&t.value&&e.value.addEventListener("mousedown",s)},a=()=>{e.value&&t.value&&e.value.removeEventListener("mousedown",s)},l=()=>{i={offsetX:0,offsetY:0},t.value&&(t.value.style.transform="none")};return vue.onMounted(()=>{vue.watchEffect(()=>{n.value?o():a()})}),vue.onBeforeUnmount(()=>{a()}),{resetPosition:l}};var English={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const buildTranslator=t=>(e,n)=>translate$3(e,n,vue.unref(t)),translate$3=(t,e,n)=>get$5(n,t,t).replace(/\{(\w+)\}/g,(r,i)=>{var s;return`${(s=e==null?void 0:e[i])!=null?s:`{${i}}`}`}),buildLocaleContext=t=>{const e=vue.computed(()=>vue.unref(t).name),n=vue.isRef(t)?t:vue.ref(t);return{lang:e,locale:n,t:buildTranslator(t)}},localeContextKey=Symbol("localeContextKey"),useLocale=t=>{const e=vue.inject(localeContextKey,vue.ref());return buildLocaleContext(vue.computed(()=>e.value||English))},defaultNamespace="el",statePrefix="is-",_bem=(t,e,n,r,i)=>{let s=`${t}-${e}`;return n&&(s+=`-${n}`),r&&(s+=`__${r}`),i&&(s+=`--${i}`),s},namespaceContextKey=Symbol("namespaceContextKey"),useGetDerivedNamespace=t=>{const e=vue.getCurrentInstance()?vue.inject(namespaceContextKey,vue.ref(defaultNamespace)):vue.ref(defaultNamespace);return vue.computed(()=>vue.unref(e)||defaultNamespace)},useNamespace=(t,e)=>{const n=useGetDerivedNamespace();return{namespace:n,b:(g="")=>_bem(n.value,t,g,"",""),e:g=>g?_bem(n.value,t,"",g,""):"",m:g=>g?_bem(n.value,t,"","",g):"",be:(g,v)=>g&&v?_bem(n.value,t,g,v,""):"",em:(g,v)=>g&&v?_bem(n.value,t,"",g,v):"",bm:(g,v)=>g&&v?_bem(n.value,t,g,"",v):"",bem:(g,v,m)=>g&&v&&m?_bem(n.value,t,g,v,m):"",is:(g,...v)=>{const m=v.length>=1?v[0]:!0;return g&&m?`${statePrefix}${g}`:""},cssVar:g=>{const v={};for(const m in g)g[m]&&(v[`--${n.value}-${m}`]=g[m]);return v},cssVarName:g=>`--${n.value}-${g}`,cssVarBlock:g=>{const v={};for(const m in g)g[m]&&(v[`--${n.value}-${t}-${m}`]=g[m]);return v},cssVarBlockName:g=>`--${n.value}-${t}-${g}`}},useLockscreen=(t,e={})=>{vue.isRef(t)||throwError("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||useNamespace("popup"),r=vue.computed(()=>n.bm("parent","hidden"));if(!isClient||hasClass(document.body,r.value))return;let i=0,s=!1,o="0";const a=()=>{setTimeout(()=>{typeof document>"u"||(removeClass(document==null?void 0:document.body,r.value),s&&document&&(document.body.style.width=o))},200)};vue.watch(t,l=>{if(!l){a();return}s=!hasClass(document.body,r.value),s&&(o=document.body.style.width),i=getScrollBarWidth(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,c=getStyle(document.body,"overflowY");i>0&&(u||c==="scroll")&&s&&(document.body.style.width=`calc(100% - ${i}px)`),addClass(document.body,r.value)}),vue.onScopeDispose(()=>a())},_prop=buildProp({type:definePropType(Boolean),default:null}),_event=buildProp({type:definePropType(Function)}),createModelToggleComposable=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,r=[e],i={[t]:_prop,[n]:_event};return{useModelToggle:({indicator:o,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:u,onShow:c,onHide:d})=>{const h=vue.getCurrentInstance(),{emit:f}=h,p=h.props,g=vue.computed(()=>isFunction$1(p[n])),v=vue.computed(()=>p[t]===null),m=k=>{o.value!==!0&&(o.value=!0,a&&(a.value=k),isFunction$1(c)&&c(k))},y=k=>{o.value!==!1&&(o.value=!1,a&&(a.value=k),isFunction$1(d)&&d(k))},b=k=>{if(p.disabled===!0||isFunction$1(u)&&!u())return;const w=g.value&&isClient;w&&f(e,!0),(v.value||!w)&&m(k)},_=k=>{if(p.disabled===!0||!isClient)return;const w=g.value&&isClient;w&&f(e,!1),(v.value||!w)&&y(k)},T=k=>{isBoolean(k)&&(p.disabled&&k?g.value&&f(e,!1):o.value!==k&&(k?m():y()))},x=()=>{o.value?_():b()};return vue.watch(()=>p[t],T),l&&h.appContext.config.globalProperties.$route!==void 0&&vue.watch(()=>({...h.proxy.$route}),()=>{l.value&&o.value&&_()}),vue.onMounted(()=>{T(p[t])}),{hide:_,show:b,toggle:x,hasUpdateHandler:g}},useModelToggleProps:i,useModelToggleEmits:r}},useProp=t=>{const e=vue.getCurrentInstance();return vue.computed(()=>{var n,r;return(r=(n=e==null?void 0:e.proxy)==null?void 0:n.$props)==null?void 0:r[t]})};var E$1="top",R$1="bottom",W="right",P="left",me="auto",G=[E$1,R$1,W,P],U="start",J="end",Xe="clippingParents",je="viewport",K="popper",Ye="reference",De=G.reduce(function(t,e){return t.concat([e+"-"+U,e+"-"+J])},[]),Ee=[].concat(G,[me]).reduce(function(t,e){return t.concat([e,e+"-"+U,e+"-"+J])},[]),Ge="beforeRead",Je="read",Ke="afterRead",Qe="beforeMain",Ze="main",et="afterMain",tt="beforeWrite",nt="write",rt="afterWrite",ot=[Ge,Je,Ke,Qe,Ze,et,tt,nt,rt];function C(t){return t?(t.nodeName||"").toLowerCase():null}function H(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Q(t){var e=H(t).Element;return t instanceof e||t instanceof Element}function B(t){var e=H(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Pe(t){if(typeof ShadowRoot>"u")return!1;var e=H(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Mt(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},s=e.elements[n];!B(s)||!C(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function Rt(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],s=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=o.reduce(function(l,u){return l[u]="",l},{});!B(i)||!C(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(l){i.removeAttribute(l)}))})}}var Ae={name:"applyStyles",enabled:!0,phase:"write",fn:Mt,effect:Rt,requires:["computeStyles"]};function q(t){return t.split("-")[0]}var X=Math.max,ve=Math.min,Z=Math.round;function ee(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),r=1,i=1;if(B(t)&&e){var s=t.offsetHeight,o=t.offsetWidth;o>0&&(r=Z(n.width)/o||1),s>0&&(i=Z(n.height)/s||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function ke(t){var e=ee(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function it(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Pe(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function N(t){return H(t).getComputedStyle(t)}function Wt(t){return["table","td","th"].indexOf(C(t))>=0}function I(t){return((Q(t)?t.ownerDocument:t.document)||window.document).documentElement}function ge(t){return C(t)==="html"?t:t.assignedSlot||t.parentNode||(Pe(t)?t.host:null)||I(t)}function at(t){return!B(t)||N(t).position==="fixed"?null:t.offsetParent}function Bt(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&B(t)){var r=N(t);if(r.position==="fixed")return null}var i=ge(t);for(Pe(i)&&(i=i.host);B(i)&&["html","body"].indexOf(C(i))<0;){var s=N(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function se(t){for(var e=H(t),n=at(t);n&&Wt(n)&&N(n).position==="static";)n=at(n);return n&&(C(n)==="html"||C(n)==="body"&&N(n).position==="static")?e:n||Bt(t)||e}function Le(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function fe(t,e,n){return X(t,ve(e,n))}function St(t,e,n){var r=fe(t,e,n);return r>n?n:r}function st(){return{top:0,right:0,bottom:0,left:0}}function ft(t){return Object.assign({},st(),t)}function ct(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var Tt=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,ft(typeof t!="number"?t:ct(t,G))};function Ht(t){var e,n=t.state,r=t.name,i=t.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,a=q(n.placement),l=Le(a),u=[P,W].indexOf(a)>=0,c=u?"height":"width";if(!(!s||!o)){var d=Tt(i.padding,n),h=ke(s),f=l==="y"?E$1:P,p=l==="y"?R$1:W,g=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],v=o[l]-n.rects.reference[l],m=se(s),y=m?l==="y"?m.clientHeight||0:m.clientWidth||0:0,b=g/2-v/2,_=d[f],T=y-h[c]-d[p],x=y/2-h[c]/2+b,k=fe(_,x,T),w=l;n.modifiersData[r]=(e={},e[w]=k,e.centerOffset=k-x,e)}}function Ct(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!it(e.elements.popper,i)||(e.elements.arrow=i))}var pt={name:"arrow",enabled:!0,phase:"main",fn:Ht,effect:Ct,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function te(t){return t.split("-")[1]}var qt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vt(t){var e=t.x,n=t.y,r=window,i=r.devicePixelRatio||1;return{x:Z(e*i)/i||0,y:Z(n*i)/i||0}}function ut(t){var e,n=t.popper,r=t.popperRect,i=t.placement,s=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,h=o.x,f=h===void 0?0:h,p=o.y,g=p===void 0?0:p,v=typeof c=="function"?c({x:f,y:g}):{x:f,y:g};f=v.x,g=v.y;var m=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),b=P,_=E$1,T=window;if(u){var x=se(n),k="clientHeight",w="clientWidth";if(x===H(n)&&(x=I(n),N(x).position!=="static"&&a==="absolute"&&(k="scrollHeight",w="scrollWidth")),x=x,i===E$1||(i===P||i===W)&&s===J){_=R$1;var O=d&&x===T&&T.visualViewport?T.visualViewport.height:x[k];g-=O-r.height,g*=l?1:-1}if(i===P||(i===E$1||i===R$1)&&s===J){b=W;var S=d&&x===T&&T.visualViewport?T.visualViewport.width:x[w];f-=S-r.width,f*=l?1:-1}}var F=Object.assign({position:a},u&&qt),z=c===!0?Vt({x:f,y:g}):{x:f,y:g};if(f=z.x,g=z.y,l){var Y;return Object.assign({},F,(Y={},Y[_]=y?"0":"",Y[b]=m?"0":"",Y.transform=(T.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",Y))}return Object.assign({},F,(e={},e[_]=y?g+"px":"",e[b]=m?f+"px":"",e.transform="",e))}function Nt(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,o=s===void 0?!0:s,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:q(e.placement),variation:te(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ut(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ut(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Me={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Nt,data:{}},ye={passive:!0};function It(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,a=o===void 0?!0:o,l=H(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&u.forEach(function(c){c.addEventListener("scroll",n.update,ye)}),a&&l.addEventListener("resize",n.update,ye),function(){s&&u.forEach(function(c){c.removeEventListener("scroll",n.update,ye)}),a&&l.removeEventListener("resize",n.update,ye)}}var Re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:It,data:{}},_t={left:"right",right:"left",bottom:"top",top:"bottom"};function be(t){return t.replace(/left|right|bottom|top/g,function(e){return _t[e]})}var zt={start:"end",end:"start"};function lt(t){return t.replace(/start|end/g,function(e){return zt[e]})}function We(t){var e=H(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Be(t){return ee(I(t)).left+We(t).scrollLeft}function Ft(t){var e=H(t),n=I(t),r=e.visualViewport,i=n.clientWidth,s=n.clientHeight,o=0,a=0;return r&&(i=r.width,s=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=r.offsetLeft,a=r.offsetTop)),{width:i,height:s,x:o+Be(t),y:a}}function Ut(t){var e,n=I(t),r=We(t),i=(e=t.ownerDocument)==null?void 0:e.body,s=X(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=X(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Be(t),l=-r.scrollTop;return N(i||n).direction==="rtl"&&(a+=X(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function Se(t){var e=N(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function dt(t){return["html","body","#document"].indexOf(C(t))>=0?t.ownerDocument.body:B(t)&&Se(t)?t:dt(ge(t))}function ce(t,e){var n;e===void 0&&(e=[]);var r=dt(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),s=H(r),o=i?[s].concat(s.visualViewport||[],Se(r)?r:[]):r,a=e.concat(o);return i?a:a.concat(ce(ge(o)))}function Te(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Xt(t){var e=ee(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function ht(t,e){return e===je?Te(Ft(t)):Q(e)?Xt(e):Te(Ut(I(t)))}function Yt(t){var e=ce(ge(t)),n=["absolute","fixed"].indexOf(N(t).position)>=0,r=n&&B(t)?se(t):t;return Q(r)?e.filter(function(i){return Q(i)&&it(i,r)&&C(i)!=="body"}):[]}function Gt(t,e,n){var r=e==="clippingParents"?Yt(t):[].concat(e),i=[].concat(r,[n]),s=i[0],o=i.reduce(function(a,l){var u=ht(t,l);return a.top=X(u.top,a.top),a.right=ve(u.right,a.right),a.bottom=ve(u.bottom,a.bottom),a.left=X(u.left,a.left),a},ht(t,s));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function mt(t){var e=t.reference,n=t.element,r=t.placement,i=r?q(r):null,s=r?te(r):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case E$1:l={x:o,y:e.y-n.height};break;case R$1:l={x:o,y:e.y+e.height};break;case W:l={x:e.x+e.width,y:a};break;case P:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=i?Le(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(s){case U:l[u]=l[u]-(e[c]/2-n[c]/2);break;case J:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function ne(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,s=n.boundary,o=s===void 0?Xe:s,a=n.rootBoundary,l=a===void 0?je:a,u=n.elementContext,c=u===void 0?K:u,d=n.altBoundary,h=d===void 0?!1:d,f=n.padding,p=f===void 0?0:f,g=ft(typeof p!="number"?p:ct(p,G)),v=c===K?Ye:K,m=t.rects.popper,y=t.elements[h?v:c],b=Gt(Q(y)?y:y.contextElement||I(t.elements.popper),o,l),_=ee(t.elements.reference),T=mt({reference:_,element:m,placement:i}),x=Te(Object.assign({},m,T)),k=c===K?x:_,w={top:b.top-k.top+g.top,bottom:k.bottom-b.bottom+g.bottom,left:b.left-k.left+g.left,right:k.right-b.right+g.right},O=t.modifiersData.offset;if(c===K&&O){var S=O[i];Object.keys(w).forEach(function(F){var z=[W,R$1].indexOf(F)>=0?1:-1,Y=[E$1,R$1].indexOf(F)>=0?"y":"x";w[F]+=S[Y]*z})}return w}function Jt(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,s=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Ee:l,c=te(r),d=c?a?De:De.filter(function(p){return te(p)===c}):G,h=d.filter(function(p){return u.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,g){return p[g]=ne(t,{placement:g,boundary:i,rootBoundary:s,padding:o})[q(g)],p},{});return Object.keys(f).sort(function(p,g){return f[p]-f[g]})}function Kt(t){if(q(t)===me)return[];var e=be(t);return[lt(t),e,lt(e)]}function Qt(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,g=n.allowedAutoPlacements,v=e.options.placement,m=q(v),y=m===v,b=l||(y||!p?[be(v)]:Kt(v)),_=[v].concat(b).reduce(function(re,pe){return re.concat(q(pe)===me?Jt(e,{placement:pe,boundary:c,rootBoundary:d,padding:u,flipVariations:p,allowedAutoPlacements:g}):pe)},[]),T=e.rects.reference,x=e.rects.popper,k=new Map,w=!0,O=_[0],S=0;S<_.length;S++){var F=_[S],z=q(F),Y=te(F)===U,ae=[E$1,R$1].indexOf(z)>=0,j=ae?"width":"height",M=ne(e,{placement:F,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),$=ae?Y?W:P:Y?R$1:E$1;T[j]>x[j]&&($=be($));var oe=be($),A=[];if(s&&A.push(M[z]<=0),a&&A.push(M[$]<=0,M[oe]<=0),A.every(function(re){return re})){O=F,w=!1;break}k.set(F,A)}if(w)for(var V=p?3:1,D=function(re){var pe=_.find(function(xe){var Ie=k.get(xe);if(Ie)return Ie.slice(0,re).every(function(_e){return _e})});if(pe)return O=pe,"break"},le=V;le>0;le--){var ie=D(le);if(ie==="break")break}e.placement!==O&&(e.modifiersData[r]._skip=!0,e.placement=O,e.reset=!0)}}var vt={name:"flip",enabled:!0,phase:"main",fn:Qt,requiresIfExists:["offset"],data:{_skip:!1}};function gt(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function yt(t){return[E$1,W,R$1,P].some(function(e){return t[e]>=0})}function Zt(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,o=ne(e,{elementContext:"reference"}),a=ne(e,{altBoundary:!0}),l=gt(o,r),u=gt(a,i,s),c=yt(l),d=yt(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}var bt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zt};function en(t,e,n){var r=q(t),i=[P,E$1].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[P,W].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function tn(t){var e=t.state,n=t.options,r=t.name,i=n.offset,s=i===void 0?[0,0]:i,o=Ee.reduce(function(c,d){return c[d]=en(d,e.rects,s),c},{}),a=o[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=o}var wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:tn};function nn(t){var e=t.state,n=t.name;e.modifiersData[n]=mt({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}var He={name:"popperOffsets",enabled:!0,phase:"read",fn:nn,data:{}};function rn(t){return t==="x"?"y":"x"}function on(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,g=p===void 0?0:p,v=ne(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),m=q(e.placement),y=te(e.placement),b=!y,_=Le(m),T=rn(_),x=e.modifiersData.popperOffsets,k=e.rects.reference,w=e.rects.popper,O=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,S=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),F=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,z={x:0,y:0};if(x){if(s){var Y,ae=_==="y"?E$1:P,j=_==="y"?R$1:W,M=_==="y"?"height":"width",$=x[_],oe=$+v[ae],A=$-v[j],V=f?-w[M]/2:0,D=y===U?k[M]:w[M],le=y===U?-w[M]:-k[M],ie=e.elements.arrow,re=f&&ie?ke(ie):{width:0,height:0},pe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:st(),xe=pe[ae],Ie=pe[j],_e=fe(0,k[M],re[M]),Ne=b?k[M]/2-V-_e-xe-S.mainAxis:D-_e-xe-S.mainAxis,$e=b?-k[M]/2+V+_e+Ie+S.mainAxis:le+_e+Ie+S.mainAxis,Ue=e.elements.arrow&&se(e.elements.arrow),At=Ue?_==="y"?Ue.clientTop||0:Ue.clientLeft||0:0,kt=(Y=F==null?void 0:F[_])!=null?Y:0,En=$+Ne-kt-At,Tn=$+$e-kt,bn=fe(f?ve(oe,En):oe,$,f?X(A,Tn):A);x[_]=bn,z[_]=bn-$}if(a){var Lt,vn=_==="x"?E$1:P,Et=_==="x"?R$1:W,jt=x[T],_n=T==="y"?"height":"width",kn=jt+v[vn],Pn=jt-v[Et],Ce=[E$1,P].indexOf(m)!==-1,qe=(Lt=F==null?void 0:F[T])!=null?Lt:0,wn=Ce?kn:jt-k[_n]-w[_n]-qe+S.altAxis,In=Ce?jt+k[_n]+w[_n]-qe-S.altAxis:Pn,Rn=f&&Ce?St(wn,jt,In):fe(f?wn:kn,jt,f?In:Pn);x[T]=Rn,z[T]=Rn-jt}e.modifiersData[r]=z}}var xt={name:"preventOverflow",enabled:!0,phase:"main",fn:on,requiresIfExists:["offset"]};function an(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function sn(t){return t===H(t)||!B(t)?We(t):an(t)}function fn(t){var e=t.getBoundingClientRect(),n=Z(e.width)/t.offsetWidth||1,r=Z(e.height)/t.offsetHeight||1;return n!==1||r!==1}function cn(t,e,n){n===void 0&&(n=!1);var r=B(e),i=B(e)&&fn(e),s=I(e),o=ee(t,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((C(e)!=="body"||Se(s))&&(a=sn(e)),B(e)?(l=ee(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=Be(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function pn(t){var e=new Map,n=new Set,r=[];t.forEach(function(s){e.set(s.name,s)});function i(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&i(l)}}),r.push(s)}return t.forEach(function(s){n.has(s.name)||i(s)}),r}function un(t){var e=pn(t);return ot.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function ln(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function dn(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function $t(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function we(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,s=i===void 0?Ot:i;return function(o,a,l){l===void 0&&(l=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ot,s),modifiersData:{},elements:{reference:o,popper:a},attributes:{},styles:{}},c=[],d=!1,h={state:u,setOptions:function(g){var v=typeof g=="function"?g(u.options):g;p(),u.options=Object.assign({},s,u.options,v),u.scrollParents={reference:Q(o)?ce(o):o.contextElement?ce(o.contextElement):[],popper:ce(a)};var m=un(dn([].concat(r,u.options.modifiers)));return u.orderedModifiers=m.filter(function(y){return y.enabled}),f(),h.update()},forceUpdate:function(){if(!d){var g=u.elements,v=g.reference,m=g.popper;if($t(v,m)){u.rects={reference:cn(v,se(m),u.options.strategy==="fixed"),popper:ke(m)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(w){return u.modifiersData[w.name]=Object.assign({},w.data)});for(var y=0;y<u.orderedModifiers.length;y++){if(u.reset===!0){u.reset=!1,y=-1;continue}var b=u.orderedModifiers[y],_=b.fn,T=b.options,x=T===void 0?{}:T,k=b.name;typeof _=="function"&&(u=_({state:u,options:x,name:k,instance:h})||u)}}}},update:ln(function(){return new Promise(function(g){h.forceUpdate(),g(u)})}),destroy:function(){p(),d=!0}};if(!$t(o,a))return h;h.setOptions(l).then(function(g){!d&&l.onFirstUpdate&&l.onFirstUpdate(g)});function f(){u.orderedModifiers.forEach(function(g){var v=g.name,m=g.options,y=m===void 0?{}:m,b=g.effect;if(typeof b=="function"){var _=b({state:u,name:v,instance:h,options:y}),T=function(){};c.push(_||T)}})}function p(){c.forEach(function(g){return g()}),c=[]}return h}}we();var mn=[Re,He,Me,Ae];we({defaultModifiers:mn});var gn=[Re,He,Me,Ae,wt,vt,xt,pt,bt],yn=we({defaultModifiers:gn});const usePopper=(t,e,n={})=>{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const u=deriveState(l);Object.assign(o.value,u)},requires:["computeStyles"]},i=vue.computed(()=>{const{onFirstUpdate:l,placement:u,strategy:c,modifiers:d}=vue.unref(n);return{onFirstUpdate:l,placement:u||"bottom",strategy:c||"absolute",modifiers:[...d||[],r,{name:"applyStyles",enabled:!1}]}}),s=vue.shallowRef(),o=vue.ref({styles:{popper:{position:vue.unref(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{s.value&&(s.value.destroy(),s.value=void 0)};return vue.watch(i,l=>{const u=vue.unref(s);u&&u.setOptions(l)},{deep:!0}),vue.watch([t,e],([l,u])=>{a(),!(!l||!u)&&(s.value=yn(l,u,vue.unref(i)))}),vue.onBeforeUnmount(()=>{a()}),{state:vue.computed(()=>{var l;return{...((l=vue.unref(s))==null?void 0:l.state)||{}}}),styles:vue.computed(()=>vue.unref(o).styles),attributes:vue.computed(()=>vue.unref(o).attributes),update:()=>{var l;return(l=vue.unref(s))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=vue.unref(s))==null?void 0:l.forceUpdate()},instanceRef:vue.computed(()=>vue.unref(s))}};function deriveState(t){const e=Object.keys(t.elements),n=fromPairs(e.map(i=>[i,t.styles[i]||{}])),r=fromPairs(e.map(i=>[i,t.attributes[i]]));return{styles:n,attributes:r}}const useSameTarget=t=>{if(!t)return{onClick:NOOP,onMousedown:NOOP,onMouseup:NOOP};let e=!1,n=!1;return{onClick:o=>{e&&n&&t(o),e=n=!1},onMousedown:o=>{e=o.target===o.currentTarget},onMouseup:o=>{n=o.target===o.currentTarget}}};function useTimeout(){let t;const e=(r,i)=>{n(),t=window.setTimeout(r,i)},n=()=>window.clearTimeout(t);return tryOnScopeDispose(()=>n()),{registerTimeout:e,cancelTimeout:n}}const defaultIdInjection={prefix:Math.floor(Math.random()*1e4),current:0},ID_INJECTION_KEY=Symbol("elIdInjection"),useIdInjection=()=>vue.getCurrentInstance()?vue.inject(ID_INJECTION_KEY,defaultIdInjection):defaultIdInjection,useId=t=>{const e=useIdInjection();!isClient&&e===defaultIdInjection&&debugWarn("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
8
8
|
usage: app.provide(ID_INJECTION_KEY, {
|
|
9
9
|
prefix: number,
|
|
10
10
|
current: number,
|
|
11
|
-
})`);const
|
|
12
|
-
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:a,currentZIndex:o,nextZIndex:s}};function Nb(e){let n;function r(){if(e.value==null)return;const{selectionStart:o,selectionEnd:s,value:i}=e.value;if(o==null||s==null)return;const l=i.slice(0,Math.max(0,o)),c=i.slice(Math.max(0,s));n={selectionStart:o,selectionEnd:s,value:i,beforeTxt:l,afterTxt:c}}function a(){if(e.value==null||n==null)return;const{value:o}=e.value,{beforeTxt:s,afterTxt:i,selectionStart:l}=n;if(s==null||i==null||l==null)return;let c=o.length;if(o.endsWith(i))c=o.length-i.length;else if(o.startsWith(s))c=s.length;else{const d=s[l-1],u=o.indexOf(d,l-1);u!==-1&&(c=u+1)}e.value.setSelectionRange(c,c)}return[r,a]}const Lo=ia({type:String,values:Do,required:!1}),Pb=Symbol("size"),$b=()=>{const e=t.inject(Pb,{});return t.computed(()=>t.unref(e.size)||"")};function Yo(e,{beforeFocus:n,afterFocus:r,beforeBlur:a,afterBlur:o}={}){const s=t.getCurrentInstance(),{emit:i}=s,l=t.shallowRef(),c=t.ref(!1),d=p=>{Ue(n)&&n(p)||c.value||(c.value=!0,i("focus",p),r==null||r())},u=p=>{var g;Ue(a)&&a(p)||p.relatedTarget&&((g=l.value)!=null&&g.contains(p.relatedTarget))||(c.value=!1,i("blur",p),o==null||o())},f=()=>{var p,g;(p=l.value)!=null&&p.contains(document.activeElement)&&l.value!==document.activeElement||(g=e.value)==null||g.focus()};return t.watch(l,p=>{p&&p.setAttribute("tabindex","-1")}),St(l,"focus",d,!0),St(l,"blur",u,!0),St(l,"click",f,!0),process.env.NODE_ENV==="test"&&t.onMounted(()=>{const p=Cn(e.value)?e.value:document.querySelector("input,textarea");p&&(St(p,"focus",d,!0),St(p,"blur",u,!0))}),{isFocused:c,wrapperRef:l,handleFocus:d,handleBlur:u}}function Bb({afterComposition:e,emit:n}){const r=t.ref(!1),a=l=>{n==null||n("compositionstart",l),r.value=!0},o=l=>{var c;n==null||n("compositionupdate",l);const d=(c=l.target)==null?void 0:c.value,u=d[d.length-1]||"";r.value=!t0(u)},s=l=>{n==null||n("compositionend",l),r.value&&(r.value=!1,t.nextTick(()=>e(l)))};return{isComposing:r,handleComposition:l=>{l.type==="compositionend"?s(l):o(l)},handleCompositionStart:a,handleCompositionUpdate:o,handleCompositionEnd:s}}const Vb=Symbol("emptyValuesContextKey"),Ib="use-empty-values",Ab=["",void 0,null],Rb=le({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Ue(e)?!e():!e}}),Fb=(e,n)=>{const r=t.getCurrentInstance()?t.inject(Vb,t.ref({})):t.ref({}),a=t.computed(()=>e.emptyValues||r.value.emptyValues||Ab),o=t.computed(()=>Ue(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:Ue(r.value.valueOnClear)?r.value.valueOnClear():r.value.valueOnClear!==void 0?r.value.valueOnClear:n),s=i=>a.value.includes(i);return a.value.includes(o.value)||Le(Ib,"value-on-clear should be a value of empty-values"),{emptyValues:a,valueOnClear:o,isEmptyValue:s}},Lb=le({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Cr=e=>Yg(Lb,e),Yb=Symbol(),pc=t.ref();function mc(e,n=void 0){const r=t.getCurrentInstance()?t.inject(Yb,pc):pc;return e?t.computed(()=>{var a,o;return(o=(a=r.value)==null?void 0:a[e])!=null?o:n}):r}var _e=(e,n)=>{const r=e.__vccOpts||e;for(const[a,o]of n)r[a]=o;return r};const zb=le({size:{type:J([Number,String])},color:{type:String}}),jb=t.defineComponent({name:"ElIcon",inheritAttrs:!1}),Wb=t.defineComponent({...jb,props:zb,setup(e){const n=e,r=me("icon"),a=t.computed(()=>{const{size:o,color:s}=n;return!o&&!s?{}:{fontSize:Ml(o)?void 0:ln(o),"--color":s}});return(o,s)=>(t.openBlock(),t.createElementBlock("i",t.mergeProps({class:t.unref(r).b(),style:t.unref(a)},o.$attrs),[t.renderSlot(o.$slots,"default")],16))}});var Hb=_e(Wb,[["__file","icon.vue"]]);const he=Ct(Hb),Un=Symbol("formContextKey"),Dn=Symbol("formItemContextKey"),vr=(e,n={})=>{const r=t.ref(void 0),a=n.prop?r:Il("size"),o=n.global?r:$b(),s=n.form?{size:void 0}:t.inject(Un,void 0),i=n.formItem?{size:void 0}:t.inject(Dn,void 0);return t.computed(()=>a.value||t.unref(e)||(i==null?void 0:i.size)||(s==null?void 0:s.size)||o.value||"")},zo=e=>{const n=Il("disabled"),r=t.inject(Un,void 0);return t.computed(()=>n.value||t.unref(e)||(r==null?void 0:r.disabled)||!1)},jo=()=>{const e=t.inject(Un,void 0),n=t.inject(Dn,void 0);return{form:e,formItem:n}},Ub=(e,{formItemContext:n,disableIdGeneration:r,disableIdManagement:a})=>{r||(r=t.ref(!1)),a||(a=t.ref(!1));const o=t.ref();let s;const i=t.computed(()=>{var l;return!!(!(e.label||e.ariaLabel)&&n&&n.inputIds&&((l=n.inputIds)==null?void 0:l.length)<=1)});return t.onMounted(()=>{s=t.watch([t.toRef(e,"id"),r],([l,c])=>{const d=l??(c?void 0:Sr().value);d!==o.value&&(n!=null&&n.removeInputId&&(o.value&&n.removeInputId(o.value),!(a!=null&&a.value)&&!c&&d&&n.addInputId(d)),o.value=d)},{immediate:!0})}),t.onUnmounted(()=>{s&&s(),n!=null&&n.removeInputId&&o.value&&n.removeInputId(o.value)}),{isLabeledByFormItem:i,inputId:o}},qb=le({size:{type:String,values:Do},disabled:Boolean}),Gb=le({...qb,model:Object,rules:{type:J(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),Kb={validate:(e,n,r)=>(ve(e)||$t(e))&&pr(n)&&$t(r)},Zb="ElForm";function Jb(){const e=t.ref([]),n=t.computed(()=>{if(!e.value.length)return"0";const s=Math.max(...e.value);return s?`${s}px`:""});function r(s){const i=e.value.indexOf(s);return i===-1&&n.value==="0"&&Le(Zb,`unexpected width ${s}`),i}function a(s,i){if(s&&i){const l=r(i);e.value.splice(l,1,s)}else s&&e.value.push(s)}function o(s){const i=r(s);i>-1&&e.value.splice(i,1)}return{autoLabelWidth:n,registerLabelWidth:a,deregisterLabelWidth:o}}const ha=(e,n)=>{const r=po(n);return r.length>0?e.filter(a=>a.prop&&r.includes(a.prop)):e},ga="ElForm",Xb=t.defineComponent({name:ga}),Qb=t.defineComponent({...Xb,props:Gb,emits:Kb,setup(e,{expose:n,emit:r}){const a=e,o=[],s=vr(),i=me("form"),l=t.computed(()=>{const{labelPosition:C,inline:b}=a;return[i.b(),i.m(s.value||"default"),{[i.m(`label-${C}`)]:C,[i.m("inline")]:b}]}),c=C=>o.find(b=>b.prop===C),d=C=>{o.push(C)},u=C=>{C.prop&&o.splice(o.indexOf(C),1)},f=(C=[])=>{if(!a.model){Le(ga,"model is required for resetFields to work.");return}ha(o,C).forEach(b=>b.resetField())},p=(C=[])=>{ha(o,C).forEach(b=>b.clearValidate())},g=t.computed(()=>{const C=!!a.model;return C||Le(ga,"model is required for validate to work."),C}),m=C=>{if(o.length===0)return[];const b=ha(o,C);return b.length?b:(Le(ga,"please pass correct props!"),[])},h=async C=>y(void 0,C),w=async(C=[])=>{if(!g.value)return!1;const b=m(C);if(b.length===0)return!0;let _={};for(const v of b)try{await v.validate("")}catch(M){_={..._,...M}}return Object.keys(_).length===0?!0:Promise.reject(_)},y=async(C=[],b)=>{const _=!Ue(b);try{const v=await w(C);return v===!0&&await(b==null?void 0:b(v)),v}catch(v){if(v instanceof Error)throw v;const M=v;return a.scrollToError&&k(Object.keys(M)[0]),await(b==null?void 0:b(!1,M)),_&&Promise.reject(M)}},k=C=>{var b;const _=ha(o,C)[0];_&&((b=_.$el)==null||b.scrollIntoView(a.scrollIntoViewOptions))};return t.watch(()=>a.rules,()=>{a.validateOnRuleChange&&h().catch(C=>Le(C))},{deep:!0}),t.provide(Un,t.reactive({...t.toRefs(a),emit:r,resetFields:f,clearValidate:p,validateField:y,getField:c,addField:d,removeField:u,...Jb()})),n({validate:h,validateField:y,resetFields:f,clearValidate:p,scrollToField:k,fields:o}),(C,b)=>(t.openBlock(),t.createElementBlock("form",{class:t.normalizeClass(t.unref(l))},[t.renderSlot(C.$slots,"default")],2))}});var ew=_e(Qb,[["__file","form.vue"]]);function On(){return On=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},On.apply(this,arguments)}function tw(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,Er(e,n)}function Wo(e){return Wo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wo(e)}function Er(e,n){return Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,o){return a.__proto__=o,a},Er(e,n)}function nw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ya(e,n,r){return nw()?ya=Reflect.construct.bind():ya=function(o,s,i){var l=[null];l.push.apply(l,s);var c=Function.bind.apply(o,l),d=new c;return i&&Er(d,i.prototype),d},ya.apply(null,arguments)}function rw(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Ho(e){var n=typeof Map=="function"?new Map:void 0;return Ho=function(a){if(a===null||!rw(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(a))return n.get(a);n.set(a,o)}function o(){return ya(a,arguments,Wo(this).constructor)}return o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Er(o,a)},Ho(e)}var aw=/%[sdj%]/g,hc=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(hc=function(n,r){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&r.every(function(a){return typeof a=="string"})&&console.warn(n,r)});function Uo(e){if(!e||!e.length)return null;var n={};return e.forEach(function(r){var a=r.field;n[a]=n[a]||[],n[a].push(r)}),n}function lt(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];var o=0,s=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var i=e.replace(aw,function(l){if(l==="%%")return"%";if(o>=s)return l;switch(l){case"%s":return String(r[o++]);case"%d":return Number(r[o++]);case"%j":try{return JSON.stringify(r[o++])}catch{return"[Circular]"}break;default:return l}});return i}return e}function ow(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function ze(e,n){return!!(e==null||n==="array"&&Array.isArray(e)&&!e.length||ow(n)&&typeof e=="string"&&!e)}function sw(e,n,r){var a=[],o=0,s=e.length;function i(l){a.push.apply(a,l||[]),o++,o===s&&r(a)}e.forEach(function(l){n(l,i)})}function gc(e,n,r){var a=0,o=e.length;function s(i){if(i&&i.length){r(i);return}var l=a;a=a+1,l<o?n(e[l],s):r([])}s([])}function iw(e){var n=[];return Object.keys(e).forEach(function(r){n.push.apply(n,e[r]||[])}),n}var yc=function(e){tw(n,e);function n(r,a){var o;return o=e.call(this,"Async Validation Error")||this,o.errors=r,o.fields=a,o}return n}(Ho(Error));function lw(e,n,r,a,o){if(n.first){var s=new Promise(function(p,g){var m=function(y){return a(y),y.length?g(new yc(y,Uo(y))):p(o)},h=iw(e);gc(h,r,m)});return s.catch(function(p){return p}),s}var i=n.firstFields===!0?Object.keys(e):n.firstFields||[],l=Object.keys(e),c=l.length,d=0,u=[],f=new Promise(function(p,g){var m=function(w){if(u.push.apply(u,w),d++,d===c)return a(u),u.length?g(new yc(u,Uo(u))):p(o)};l.length||(a(u),p(o)),l.forEach(function(h){var w=e[h];i.indexOf(h)!==-1?gc(w,r,m):sw(w,r,m)})});return f.catch(function(p){return p}),f}function cw(e){return!!(e&&e.message!==void 0)}function dw(e,n){for(var r=e,a=0;a<n.length;a++){if(r==null)return r;r=r[n[a]]}return r}function bc(e,n){return function(r){var a;return e.fullFields?a=dw(n,e.fullFields):a=n[r.field||e.fullField],cw(r)?(r.field=r.field||e.fullField,r.fieldValue=a,r):{message:typeof r=="function"?r():r,fieldValue:a,field:r.field||e.fullField}}}function wc(e,n){if(n){for(var r in n)if(n.hasOwnProperty(r)){var a=n[r];typeof a=="object"&&typeof e[r]=="object"?e[r]=On({},e[r],a):e[r]=a}}return e}var _c=function(n,r,a,o,s,i){n.required&&(!a.hasOwnProperty(n.field)||ze(r,i||n.type))&&o.push(lt(s.messages.required,n.fullField))},fw=function(n,r,a,o,s){(/^\s+$/.test(r)||r==="")&&o.push(lt(s.messages.whitespace,n.fullField))},ba,uw=function(){if(ba)return ba;var e="[a-fA-F\\d:]",n=function(b){return b&&b.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",a="[a-fA-F\\d]{1,4}",o=(`
|
|
11
|
+
})`);const n=useGetDerivedNamespace();return computedEager(()=>vue.unref(t)||`${n.value}-id-${e.prefix}-${e.current++}`)};let registeredEscapeHandlers=[];const cachedHandler=t=>{t.code===EVENT_CODE.esc&®isteredEscapeHandlers.forEach(e=>e(t))},useEscapeKeydown=t=>{vue.onMounted(()=>{registeredEscapeHandlers.length===0&&document.addEventListener("keydown",cachedHandler),isClient&®isteredEscapeHandlers.push(t)}),vue.onBeforeUnmount(()=>{registeredEscapeHandlers=registeredEscapeHandlers.filter(e=>e!==t),registeredEscapeHandlers.length===0&&isClient&&document.removeEventListener("keydown",cachedHandler)})},usePopperContainerId=()=>{const t=useGetDerivedNamespace(),e=useIdInjection(),n=vue.computed(()=>`${t.value}-popper-container-${e.prefix}`),r=vue.computed(()=>`#${n.value}`);return{id:n,selector:r}},createContainer=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},usePopperContainer=()=>{const{id:t,selector:e}=usePopperContainerId();return vue.onBeforeMount(()=>{isClient&&(process.env.NODE_ENV==="test"||!document.body.querySelector(e.value))&&createContainer(t.value)}),{id:t,selector:e}},useDelayedToggleProps=buildProps({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),useDelayedToggle=({showAfter:t,hideAfter:e,autoClose:n,open:r,close:i})=>{const{registerTimeout:s}=useTimeout(),{registerTimeout:o,cancelTimeout:a}=useTimeout();return{onOpen:c=>{s(()=>{r(c);const d=vue.unref(n);isNumber$1(d)&&d>0&&o(()=>{i(c)},d)},vue.unref(t))},onClose:c=>{a(),s(()=>{i(c)},vue.unref(e))}}},FORWARD_REF_INJECTION_KEY=Symbol("elForwardRef"),useForwardRef=t=>{const e=n=>{t.value=n};vue.provide(FORWARD_REF_INJECTION_KEY,{setForwardRef:e})},useForwardRefDirective=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),initial={current:0},zIndex=vue.ref(0),defaultInitialZIndex=2e3,ZINDEX_INJECTION_KEY=Symbol("elZIndexContextKey"),zIndexContextKey=Symbol("zIndexContextKey"),useZIndex=t=>{const e=vue.getCurrentInstance()?vue.inject(ZINDEX_INJECTION_KEY,initial):initial,n=vue.getCurrentInstance()?vue.inject(zIndexContextKey,void 0):void 0,r=vue.computed(()=>{const o=vue.unref(n);return isNumber$1(o)?o:defaultInitialZIndex}),i=vue.computed(()=>r.value+zIndex.value),s=()=>(e.current++,zIndex.value=e.current,i.value);return!isClient&&!vue.inject(ZINDEX_INJECTION_KEY)&&debugWarn("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
|
|
12
|
+
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:r,currentZIndex:i,nextZIndex:s}};function useCursor(t){let e;function n(){if(t.value==null)return;const{selectionStart:i,selectionEnd:s,value:o}=t.value;if(i==null||s==null)return;const a=o.slice(0,Math.max(0,i)),l=o.slice(Math.max(0,s));e={selectionStart:i,selectionEnd:s,value:o,beforeTxt:a,afterTxt:l}}function r(){if(t.value==null||e==null)return;const{value:i}=t.value,{beforeTxt:s,afterTxt:o,selectionStart:a}=e;if(s==null||o==null||a==null)return;let l=i.length;if(i.endsWith(o))l=i.length-o.length;else if(i.startsWith(s))l=s.length;else{const u=s[a-1],c=i.indexOf(u,a-1);c!==-1&&(l=c+1)}t.value.setSelectionRange(l,l)}return[n,r]}const useSizeProp=buildProp({type:String,values:componentSizes,required:!1}),SIZE_INJECTION_KEY=Symbol("size"),useGlobalSize=()=>{const t=vue.inject(SIZE_INJECTION_KEY,{});return vue.computed(()=>vue.unref(t.size)||"")};function useFocusController(t,{beforeFocus:e,afterFocus:n,beforeBlur:r,afterBlur:i}={}){const s=vue.getCurrentInstance(),{emit:o}=s,a=vue.shallowRef(),l=vue.ref(!1),u=h=>{isFunction$1(e)&&e(h)||l.value||(l.value=!0,o("focus",h),n==null||n())},c=h=>{var f;isFunction$1(r)&&r(h)||h.relatedTarget&&((f=a.value)!=null&&f.contains(h.relatedTarget))||(l.value=!1,o("blur",h),i==null||i())},d=()=>{var h,f;(h=a.value)!=null&&h.contains(document.activeElement)&&a.value!==document.activeElement||(f=t.value)==null||f.focus()};return vue.watch(a,h=>{h&&h.setAttribute("tabindex","-1")}),useEventListener(a,"focus",u,!0),useEventListener(a,"blur",c,!0),useEventListener(a,"click",d,!0),process.env.NODE_ENV==="test"&&vue.onMounted(()=>{const h=isElement(t.value)?t.value:document.querySelector("input,textarea");h&&(useEventListener(h,"focus",u,!0),useEventListener(h,"blur",c,!0))}),{isFocused:l,wrapperRef:a,handleFocus:u,handleBlur:c}}function useComposition({afterComposition:t,emit:e}){const n=vue.ref(!1),r=a=>{e==null||e("compositionstart",a),n.value=!0},i=a=>{var l;e==null||e("compositionupdate",a);const u=(l=a.target)==null?void 0:l.value,c=u[u.length-1]||"";n.value=!isKorean(c)},s=a=>{e==null||e("compositionend",a),n.value&&(n.value=!1,vue.nextTick(()=>t(a)))};return{isComposing:n,handleComposition:a=>{a.type==="compositionend"?s(a):i(a)},handleCompositionStart:r,handleCompositionUpdate:i,handleCompositionEnd:s}}const emptyValuesContextKey=Symbol("emptyValuesContextKey"),SCOPE$1="use-empty-values",DEFAULT_EMPTY_VALUES=["",void 0,null],DEFAULT_VALUE_ON_CLEAR=void 0,useEmptyValuesProps=buildProps({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:t=>isFunction$1(t)?!t():!t}}),useEmptyValues=(t,e)=>{const n=vue.getCurrentInstance()?vue.inject(emptyValuesContextKey,vue.ref({})):vue.ref({}),r=vue.computed(()=>t.emptyValues||n.value.emptyValues||DEFAULT_EMPTY_VALUES),i=vue.computed(()=>isFunction$1(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:isFunction$1(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:DEFAULT_VALUE_ON_CLEAR),s=o=>r.value.includes(o);return r.value.includes(i.value)||debugWarn(SCOPE$1,"value-on-clear should be a value of empty-values"),{emptyValues:r,valueOnClear:i,isEmptyValue:s}},ariaProps=buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),useAriaProps=t=>pick(ariaProps,t),configProviderContextKey=Symbol(),globalConfig=vue.ref();function useGlobalConfig(t,e=void 0){const n=vue.getCurrentInstance()?vue.inject(configProviderContextKey,globalConfig):globalConfig;return t?vue.computed(()=>{var r,i;return(i=(r=n.value)==null?void 0:r[t])!=null?i:e}):n}var _export_sfc$1=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};const iconProps=buildProps({size:{type:definePropType([Number,String])},color:{type:String}}),__default__$l=vue.defineComponent({name:"ElIcon",inheritAttrs:!1}),_sfc_main$Y=vue.defineComponent({...__default__$l,props:iconProps,setup(t){const e=t,n=useNamespace("icon"),r=vue.computed(()=>{const{size:i,color:s}=e;return!i&&!s?{}:{fontSize:isUndefined$1(i)?void 0:addUnit(i),"--color":s}});return(i,s)=>(vue.openBlock(),vue.createElementBlock("i",vue.mergeProps({class:vue.unref(n).b(),style:vue.unref(r)},i.$attrs),[vue.renderSlot(i.$slots,"default")],16))}});var Icon$1=_export_sfc$1(_sfc_main$Y,[["__file","icon.vue"]]);const ElIcon=withInstall(Icon$1),formContextKey=Symbol("formContextKey"),formItemContextKey=Symbol("formItemContextKey"),useFormSize=(t,e={})=>{const n=vue.ref(void 0),r=e.prop?n:useProp("size"),i=e.global?n:useGlobalSize(),s=e.form?{size:void 0}:vue.inject(formContextKey,void 0),o=e.formItem?{size:void 0}:vue.inject(formItemContextKey,void 0);return vue.computed(()=>r.value||vue.unref(t)||(o==null?void 0:o.size)||(s==null?void 0:s.size)||i.value||"")},useFormDisabled=t=>{const e=useProp("disabled"),n=vue.inject(formContextKey,void 0);return vue.computed(()=>e.value||vue.unref(t)||(n==null?void 0:n.disabled)||!1)},useFormItem=()=>{const t=vue.inject(formContextKey,void 0),e=vue.inject(formItemContextKey,void 0);return{form:t,formItem:e}},useFormItemInputId=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:r})=>{n||(n=vue.ref(!1)),r||(r=vue.ref(!1));const i=vue.ref();let s;const o=vue.computed(()=>{var a;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((a=e.inputIds)==null?void 0:a.length)<=1)});return vue.onMounted(()=>{s=vue.watch([vue.toRef(t,"id"),n],([a,l])=>{const u=a??(l?void 0:useId().value);u!==i.value&&(e!=null&&e.removeInputId&&(i.value&&e.removeInputId(i.value),!(r!=null&&r.value)&&!l&&u&&e.addInputId(u)),i.value=u)},{immediate:!0})}),vue.onUnmounted(()=>{s&&s(),e!=null&&e.removeInputId&&i.value&&e.removeInputId(i.value)}),{isLabeledByFormItem:o,inputId:i}},formMetaProps=buildProps({size:{type:String,values:componentSizes},disabled:Boolean}),formProps=buildProps({...formMetaProps,model:Object,rules:{type:definePropType(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),formEmits={validate:(t,e,n)=>(isArray$1(t)||isString$1(t))&&isBoolean(e)&&isString$1(n)},SCOPE="ElForm";function useFormLabelWidth(){const t=vue.ref([]),e=vue.computed(()=>{if(!t.value.length)return"0";const s=Math.max(...t.value);return s?`${s}px`:""});function n(s){const o=t.value.indexOf(s);return o===-1&&e.value==="0"&&debugWarn(SCOPE,`unexpected width ${s}`),o}function r(s,o){if(s&&o){const a=n(o);t.value.splice(a,1,s)}else s&&t.value.push(s)}function i(s){const o=n(s);o>-1&&t.value.splice(o,1)}return{autoLabelWidth:e,registerLabelWidth:r,deregisterLabelWidth:i}}const filterFields=(t,e)=>{const n=castArray$1(e);return n.length>0?t.filter(r=>r.prop&&n.includes(r.prop)):t},COMPONENT_NAME$4="ElForm",__default__$k=vue.defineComponent({name:COMPONENT_NAME$4}),_sfc_main$X=vue.defineComponent({...__default__$k,props:formProps,emits:formEmits,setup(t,{expose:e,emit:n}){const r=t,i=[],s=useFormSize(),o=useNamespace("form"),a=vue.computed(()=>{const{labelPosition:b,inline:_}=r;return[o.b(),o.m(s.value||"default"),{[o.m(`label-${b}`)]:b,[o.m("inline")]:_}]}),l=b=>i.find(_=>_.prop===b),u=b=>{i.push(b)},c=b=>{b.prop&&i.splice(i.indexOf(b),1)},d=(b=[])=>{if(!r.model){debugWarn(COMPONENT_NAME$4,"model is required for resetFields to work.");return}filterFields(i,b).forEach(_=>_.resetField())},h=(b=[])=>{filterFields(i,b).forEach(_=>_.clearValidate())},f=vue.computed(()=>{const b=!!r.model;return b||debugWarn(COMPONENT_NAME$4,"model is required for validate to work."),b}),p=b=>{if(i.length===0)return[];const _=filterFields(i,b);return _.length?_:(debugWarn(COMPONENT_NAME$4,"please pass correct props!"),[])},g=async b=>m(void 0,b),v=async(b=[])=>{if(!f.value)return!1;const _=p(b);if(_.length===0)return!0;let T={};for(const x of _)try{await x.validate("")}catch(k){T={...T,...k}}return Object.keys(T).length===0?!0:Promise.reject(T)},m=async(b=[],_)=>{const T=!isFunction$1(_);try{const x=await v(b);return x===!0&&await(_==null?void 0:_(x)),x}catch(x){if(x instanceof Error)throw x;const k=x;return r.scrollToError&&y(Object.keys(k)[0]),await(_==null?void 0:_(!1,k)),T&&Promise.reject(k)}},y=b=>{var _;const T=filterFields(i,b)[0];T&&((_=T.$el)==null||_.scrollIntoView(r.scrollIntoViewOptions))};return vue.watch(()=>r.rules,()=>{r.validateOnRuleChange&&g().catch(b=>debugWarn(b))},{deep:!0}),vue.provide(formContextKey,vue.reactive({...vue.toRefs(r),emit:n,resetFields:d,clearValidate:h,validateField:m,getField:l,addField:u,removeField:c,...useFormLabelWidth()})),e({validate:g,validateField:m,resetFields:d,clearValidate:h,scrollToField:y,fields:i}),(b,_)=>(vue.openBlock(),vue.createElementBlock("form",{class:vue.normalizeClass(vue.unref(a))},[vue.renderSlot(b.$slots,"default")],2))}});var Form=_export_sfc$1(_sfc_main$X,[["__file","form.vue"]]);function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_extends.apply(this,arguments)}function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,_setPrototypeOf(t,e)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_getPrototypeOf(t)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_setPrototypeOf(t,e)}function _isNativeReflectConstruct(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _construct(t,e,n){return _isNativeReflectConstruct()?_construct=Reflect.construct.bind():_construct=function(i,s,o){var a=[null];a.push.apply(a,s);var l=Function.bind.apply(i,a),u=new l;return o&&_setPrototypeOf(u,o.prototype),u},_construct.apply(null,arguments)}function _isNativeFunction(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function _wrapNativeSuper(t){var e=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(r){if(r===null||!_isNativeFunction(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return _construct(r,arguments,_getPrototypeOf(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(i,r)},_wrapNativeSuper(t)}var formatRegExp=/%[sdj%]/g,warning=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(warning=function(e,n){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&n.every(function(r){return typeof r=="string"})&&console.warn(e,n)});function convertFieldsError(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function format$1(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=0,s=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var o=t.replace(formatRegExp,function(a){if(a==="%%")return"%";if(i>=s)return a;switch(a){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return a}});return o}return t}function isNativeStringType(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function isEmptyValue(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||isNativeStringType(e)&&typeof t=="string"&&!t)}function asyncParallelArray(t,e,n){var r=[],i=0,s=t.length;function o(a){r.push.apply(r,a||[]),i++,i===s&&n(r)}t.forEach(function(a){e(a,o)})}function asyncSerialArray(t,e,n){var r=0,i=t.length;function s(o){if(o&&o.length){n(o);return}var a=r;r=r+1,a<i?e(t[a],s):n([])}s([])}function flattenObjArr(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var AsyncValidationError=function(t){_inheritsLoose(e,t);function e(n,r){var i;return i=t.call(this,"Async Validation Error")||this,i.errors=n,i.fields=r,i}return e}(_wrapNativeSuper(Error));function asyncMap(t,e,n,r,i){if(e.first){var s=new Promise(function(h,f){var p=function(m){return r(m),m.length?f(new AsyncValidationError(m,convertFieldsError(m))):h(i)},g=flattenObjArr(t);asyncSerialArray(g,n,p)});return s.catch(function(h){return h}),s}var o=e.firstFields===!0?Object.keys(t):e.firstFields||[],a=Object.keys(t),l=a.length,u=0,c=[],d=new Promise(function(h,f){var p=function(v){if(c.push.apply(c,v),u++,u===l)return r(c),c.length?f(new AsyncValidationError(c,convertFieldsError(c))):h(i)};a.length||(r(c),h(i)),a.forEach(function(g){var v=t[g];o.indexOf(g)!==-1?asyncSerialArray(v,n,p):asyncParallelArray(v,n,p)})});return d.catch(function(h){return h}),d}function isErrorObj(t){return!!(t&&t.message!==void 0)}function getValue(t,e){for(var n=t,r=0;r<e.length;r++){if(n==null)return n;n=n[e[r]]}return n}function complementError(t,e){return function(n){var r;return t.fullFields?r=getValue(e,t.fullFields):r=e[n.field||t.fullField],isErrorObj(n)?(n.field=n.field||t.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||t.fullField}}}function deepMerge(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];typeof r=="object"&&typeof t[n]=="object"?t[n]=_extends({},t[n],r):t[n]=r}}return t}var required$1=function(e,n,r,i,s,o){e.required&&(!r.hasOwnProperty(e.field)||isEmptyValue(n,o||e.type))&&i.push(format$1(s.messages.required,e.fullField))},whitespace=function(e,n,r,i,s){(/^\s+$/.test(n)||n==="")&&i.push(format$1(s.messages.whitespace,e.fullField))},urlReg,getUrlRegex=function(){if(urlReg)return urlReg;var t="[a-fA-F\\d:]",e=function(_){return _&&_.includeBoundaries?"(?:(?<=\\s|^)(?="+t+")|(?<="+t+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=(`
|
|
13
13
|
(?:
|
|
14
|
-
(?:`+
|
|
15
|
-
(?:`+
|
|
16
|
-
(?:`+
|
|
17
|
-
(?:`+
|
|
18
|
-
(?:`+
|
|
19
|
-
(?:`+
|
|
20
|
-
(?:`+
|
|
21
|
-
(?::(?:(?::`+
|
|
14
|
+
(?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
15
|
+
(?:`+r+":){6}(?:"+n+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
16
|
+
(?:`+r+":){5}(?::"+n+"|(?::"+r+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
17
|
+
(?:`+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
18
|
+
(?:`+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
19
|
+
(?:`+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
20
|
+
(?:`+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
21
|
+
(?::(?:(?::`+r+"){0,5}:"+n+"|(?::"+r+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
22
22
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
23
|
-
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),s=new RegExp("(?:^"+r+"$)|(?:^"+o+"$)"),i=new RegExp("^"+r+"$"),l=new RegExp("^"+o+"$"),c=function(b){return b&&b.exact?s:new RegExp("(?:"+n(b)+r+n(b)+")|(?:"+n(b)+o+n(b)+")","g")};c.v4=function(C){return C&&C.exact?i:new RegExp(""+n(C)+r+n(C),"g")},c.v6=function(C){return C&&C.exact?l:new RegExp(""+n(C)+o+n(C),"g")};var d="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",f=c.v4().source,p=c.v6().source,g="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",h="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",w="(?::\\d{2,5})?",y='(?:[/?#][^\\s"]*)?',k="(?:"+d+"|www\\.)"+u+"(?:localhost|"+f+"|"+p+"|"+g+m+h+")"+w+y;return ba=new RegExp("(?:^"+k+"$)","i"),ba},kc={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Mr={integer:function(n){return Mr.number(n)&&parseInt(n,10)===n},float:function(n){return Mr.number(n)&&!Mr.integer(n)},array:function(n){return Array.isArray(n)},regexp:function(n){if(n instanceof RegExp)return!0;try{return!!new RegExp(n)}catch{return!1}},date:function(n){return typeof n.getTime=="function"&&typeof n.getMonth=="function"&&typeof n.getYear=="function"&&!isNaN(n.getTime())},number:function(n){return isNaN(n)?!1:typeof n=="number"},object:function(n){return typeof n=="object"&&!Mr.array(n)},method:function(n){return typeof n=="function"},email:function(n){return typeof n=="string"&&n.length<=320&&!!n.match(kc.email)},url:function(n){return typeof n=="string"&&n.length<=2048&&!!n.match(uw())},hex:function(n){return typeof n=="string"&&!!n.match(kc.hex)}},pw=function(n,r,a,o,s){if(n.required&&r===void 0){_c(n,r,a,o,s);return}var i=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=n.type;i.indexOf(l)>-1?Mr[l](r)||o.push(lt(s.messages.types[l],n.fullField,n.type)):l&&typeof r!==n.type&&o.push(lt(s.messages.types[l],n.fullField,n.type))},mw=function(n,r,a,o,s){var i=typeof n.len=="number",l=typeof n.min=="number",c=typeof n.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=r,f=null,p=typeof r=="number",g=typeof r=="string",m=Array.isArray(r);if(p?f="number":g?f="string":m&&(f="array"),!f)return!1;m&&(u=r.length),g&&(u=r.replace(d,"_").length),i?u!==n.len&&o.push(lt(s.messages[f].len,n.fullField,n.len)):l&&!c&&u<n.min?o.push(lt(s.messages[f].min,n.fullField,n.min)):c&&!l&&u>n.max?o.push(lt(s.messages[f].max,n.fullField,n.max)):l&&c&&(u<n.min||u>n.max)&&o.push(lt(s.messages[f].range,n.fullField,n.min,n.max))},qn="enum",hw=function(n,r,a,o,s){n[qn]=Array.isArray(n[qn])?n[qn]:[],n[qn].indexOf(r)===-1&&o.push(lt(s.messages[qn],n.fullField,n[qn].join(", ")))},gw=function(n,r,a,o,s){if(n.pattern){if(n.pattern instanceof RegExp)n.pattern.lastIndex=0,n.pattern.test(r)||o.push(lt(s.messages.pattern.mismatch,n.fullField,r,n.pattern));else if(typeof n.pattern=="string"){var i=new RegExp(n.pattern);i.test(r)||o.push(lt(s.messages.pattern.mismatch,n.fullField,r,n.pattern))}}},ge={required:_c,whitespace:fw,type:pw,range:mw,enum:hw,pattern:gw},yw=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r,"string")&&!n.required)return a();ge.required(n,r,o,i,s,"string"),ze(r,"string")||(ge.type(n,r,o,i,s),ge.range(n,r,o,i,s),ge.pattern(n,r,o,i,s),n.whitespace===!0&&ge.whitespace(n,r,o,i,s))}a(i)},bw=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r)&&!n.required)return a();ge.required(n,r,o,i,s),r!==void 0&&ge.type(n,r,o,i,s)}a(i)},ww=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(r===""&&(r=void 0),ze(r)&&!n.required)return a();ge.required(n,r,o,i,s),r!==void 0&&(ge.type(n,r,o,i,s),ge.range(n,r,o,i,s))}a(i)},_w=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r)&&!n.required)return a();ge.required(n,r,o,i,s),r!==void 0&&ge.type(n,r,o,i,s)}a(i)},kw=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r)&&!n.required)return a();ge.required(n,r,o,i,s),ze(r)||ge.type(n,r,o,i,s)}a(i)},Sw=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r)&&!n.required)return a();ge.required(n,r,o,i,s),r!==void 0&&(ge.type(n,r,o,i,s),ge.range(n,r,o,i,s))}a(i)},Cw=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r)&&!n.required)return a();ge.required(n,r,o,i,s),r!==void 0&&(ge.type(n,r,o,i,s),ge.range(n,r,o,i,s))}a(i)},vw=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(r==null&&!n.required)return a();ge.required(n,r,o,i,s,"array"),r!=null&&(ge.type(n,r,o,i,s),ge.range(n,r,o,i,s))}a(i)},Ew=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r)&&!n.required)return a();ge.required(n,r,o,i,s),r!==void 0&&ge.type(n,r,o,i,s)}a(i)},Mw="enum",Tw=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r)&&!n.required)return a();ge.required(n,r,o,i,s),r!==void 0&&ge[Mw](n,r,o,i,s)}a(i)},Dw=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r,"string")&&!n.required)return a();ge.required(n,r,o,i,s),ze(r,"string")||ge.pattern(n,r,o,i,s)}a(i)},Ow=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r,"date")&&!n.required)return a();if(ge.required(n,r,o,i,s),!ze(r,"date")){var c;r instanceof Date?c=r:c=new Date(r),ge.type(n,c,o,i,s),c&&ge.range(n,c.getTime(),o,i,s)}}a(i)},xw=function(n,r,a,o,s){var i=[],l=Array.isArray(r)?"array":typeof r;ge.required(n,r,o,i,s,l),a(i)},qo=function(n,r,a,o,s){var i=n.type,l=[],c=n.required||!n.required&&o.hasOwnProperty(n.field);if(c){if(ze(r,i)&&!n.required)return a();ge.required(n,r,o,l,s,i),ze(r,i)||ge.type(n,r,o,l,s)}a(l)},Nw=function(n,r,a,o,s){var i=[],l=n.required||!n.required&&o.hasOwnProperty(n.field);if(l){if(ze(r)&&!n.required)return a();ge.required(n,r,o,i,s)}a(i)},Tr={string:yw,method:bw,number:ww,boolean:_w,regexp:kw,integer:Sw,float:Cw,array:vw,object:Ew,enum:Tw,pattern:Dw,date:Ow,url:qo,hex:qo,email:qo,required:xw,any:Nw};function Go(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var n=JSON.parse(JSON.stringify(this));return n.clone=this.clone,n}}}var Ko=Go(),Dr=function(){function e(r){this.rules=null,this._messages=Ko,this.define(r)}var n=e.prototype;return n.define=function(a){var o=this;if(!a)throw new Error("Cannot configure a schema with no rules");if(typeof a!="object"||Array.isArray(a))throw new Error("Rules must be an object");this.rules={},Object.keys(a).forEach(function(s){var i=a[s];o.rules[s]=Array.isArray(i)?i:[i]})},n.messages=function(a){return a&&(this._messages=wc(Go(),a)),this._messages},n.validate=function(a,o,s){var i=this;o===void 0&&(o={}),s===void 0&&(s=function(){});var l=a,c=o,d=s;if(typeof c=="function"&&(d=c,c={}),!this.rules||Object.keys(this.rules).length===0)return d&&d(null,l),Promise.resolve(l);function u(h){var w=[],y={};function k(b){if(Array.isArray(b)){var _;w=(_=w).concat.apply(_,b)}else w.push(b)}for(var C=0;C<h.length;C++)k(h[C]);w.length?(y=Uo(w),d(w,y)):d(null,l)}if(c.messages){var f=this.messages();f===Ko&&(f=Go()),wc(f,c.messages),c.messages=f}else c.messages=this.messages();var p={},g=c.keys||Object.keys(this.rules);g.forEach(function(h){var w=i.rules[h],y=l[h];w.forEach(function(k){var C=k;typeof C.transform=="function"&&(l===a&&(l=On({},l)),y=l[h]=C.transform(y)),typeof C=="function"?C={validator:C}:C=On({},C),C.validator=i.getValidationMethod(C),C.validator&&(C.field=h,C.fullField=C.fullField||h,C.type=i.getType(C),p[h]=p[h]||[],p[h].push({rule:C,value:y,source:l,field:h}))})});var m={};return lw(p,c,function(h,w){var y=h.rule,k=(y.type==="object"||y.type==="array")&&(typeof y.fields=="object"||typeof y.defaultField=="object");k=k&&(y.required||!y.required&&h.value),y.field=h.field;function C(v,M){return On({},M,{fullField:y.fullField+"."+v,fullFields:y.fullFields?[].concat(y.fullFields,[v]):[v]})}function b(v){v===void 0&&(v=[]);var M=Array.isArray(v)?v:[v];!c.suppressWarning&&M.length&&e.warning("async-validator:",M),M.length&&y.message!==void 0&&(M=[].concat(y.message));var D=M.map(bc(y,l));if(c.first&&D.length)return m[y.field]=1,w(D);if(!k)w(D);else{if(y.required&&!h.value)return y.message!==void 0?D=[].concat(y.message).map(bc(y,l)):c.error&&(D=[c.error(y,lt(c.messages.required,y.field))]),w(D);var B={};y.defaultField&&Object.keys(h.value).map(function(z){B[z]=y.defaultField}),B=On({},B,h.rule.fields);var P={};Object.keys(B).forEach(function(z){var L=B[z],W=Array.isArray(L)?L:[L];P[z]=W.map(C.bind(null,z))});var V=new e(P);V.messages(c.messages),h.rule.options&&(h.rule.options.messages=c.messages,h.rule.options.error=c.error),V.validate(h.value,h.rule.options||c,function(z){var L=[];D&&D.length&&L.push.apply(L,D),z&&z.length&&L.push.apply(L,z),w(L.length?L:null)})}}var _;if(y.asyncValidator)_=y.asyncValidator(y,h.value,b,h.source,c);else if(y.validator){try{_=y.validator(y,h.value,b,h.source,c)}catch(v){console.error==null||console.error(v),c.suppressValidatorError||setTimeout(function(){throw v},0),b(v.message)}_===!0?b():_===!1?b(typeof y.message=="function"?y.message(y.fullField||y.field):y.message||(y.fullField||y.field)+" fails"):_ instanceof Array?b(_):_ instanceof Error&&b(_.message)}_&&_.then&&_.then(function(){return b()},function(v){return b(v)})},function(h){u(h)},l)},n.getType=function(a){if(a.type===void 0&&a.pattern instanceof RegExp&&(a.type="pattern"),typeof a.validator!="function"&&a.type&&!Tr.hasOwnProperty(a.type))throw new Error(lt("Unknown rule type %s",a.type));return a.type||"string"},n.getValidationMethod=function(a){if(typeof a.validator=="function")return a.validator;var o=Object.keys(a),s=o.indexOf("message");return s!==-1&&o.splice(s,1),o.length===1&&o[0]==="required"?Tr.required:Tr[this.getType(a)]||void 0},e}();Dr.register=function(n,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");Tr[n]=r},Dr.warning=hc,Dr.messages=Ko,Dr.validators=Tr;const Pw=["","error","validating","success"],$w=le({label:String,labelWidth:{type:[String,Number],default:""},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:J([String,Array])},required:{type:Boolean,default:void 0},rules:{type:J([Object,Array])},error:String,validateStatus:{type:String,values:Pw},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:Do}}),Sc="ElLabelWrap";var Bw=t.defineComponent({name:Sc,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:n}){const r=t.inject(Un,void 0),a=t.inject(Dn);a||Eo(Sc,"usage: <el-form-item><label-wrap /></el-form-item>");const o=me("form"),s=t.ref(),i=t.ref(0),l=()=>{var u;if((u=s.value)!=null&&u.firstElementChild){const f=window.getComputedStyle(s.value.firstElementChild).width;return Math.ceil(Number.parseFloat(f))}else return 0},c=(u="update")=>{t.nextTick(()=>{n.default&&e.isAutoWidth&&(u==="update"?i.value=l():u==="remove"&&(r==null||r.deregisterLabelWidth(i.value)))})},d=()=>c("update");return t.onMounted(()=>{d()}),t.onBeforeUnmount(()=>{c("remove")}),t.onUpdated(()=>d()),t.watch(i,(u,f)=>{e.updateAll&&(r==null||r.registerLabelWidth(u,f))}),Co(t.computed(()=>{var u,f;return(f=(u=s.value)==null?void 0:u.firstElementChild)!=null?f:null}),d),()=>{var u,f;if(!n)return null;const{isAutoWidth:p}=e;if(p){const g=r==null?void 0:r.autoLabelWidth,m=a==null?void 0:a.hasLabel,h={};if(m&&g&&g!=="auto"){const w=Math.max(0,Number.parseInt(g,10)-i.value),k=(a.labelPosition||r.labelPosition)==="left"?"marginRight":"marginLeft";w&&(h[k]=`${w}px`)}return t.createVNode("div",{ref:s,class:[o.be("item","label-wrap")],style:h},[(u=n.default)==null?void 0:u.call(n)])}else return t.createVNode(t.Fragment,{ref:s},[(f=n.default)==null?void 0:f.call(n)])}}});const Vw=t.defineComponent({name:"ElFormItem"}),Iw=t.defineComponent({...Vw,props:$w,setup(e,{expose:n}){const r=e,a=t.useSlots(),o=t.inject(Un,void 0),s=t.inject(Dn,void 0),i=vr(void 0,{formItem:!1}),l=me("form-item"),c=Sr().value,d=t.ref([]),u=t.ref(""),f=sy(u,100),p=t.ref(""),g=t.ref();let m,h=!1;const w=t.computed(()=>r.labelPosition||(o==null?void 0:o.labelPosition)),y=t.computed(()=>{if(w.value==="top")return{};const G=ln(r.labelWidth||(o==null?void 0:o.labelWidth)||"");return G?{width:G}:{}}),k=t.computed(()=>{if(w.value==="top"||o!=null&&o.inline)return{};if(!r.label&&!r.labelWidth&&P)return{};const G=ln(r.labelWidth||(o==null?void 0:o.labelWidth)||"");return!r.label&&!a.label?{marginLeft:G}:{}}),C=t.computed(()=>[l.b(),l.m(i.value),l.is("error",u.value==="error"),l.is("validating",u.value==="validating"),l.is("success",u.value==="success"),l.is("required",A.value||r.required),l.is("no-asterisk",o==null?void 0:o.hideRequiredAsterisk),(o==null?void 0:o.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[l.m("feedback")]:o==null?void 0:o.statusIcon,[l.m(`label-${w.value}`)]:w.value}]),b=t.computed(()=>pr(r.inlineMessage)?r.inlineMessage:(o==null?void 0:o.inlineMessage)||!1),_=t.computed(()=>[l.e("error"),{[l.em("error","inline")]:b.value}]),v=t.computed(()=>r.prop?$t(r.prop)?r.prop:r.prop.join("."):""),M=t.computed(()=>!!(r.label||a.label)),D=t.computed(()=>r.for||(d.value.length===1?d.value[0]:void 0)),B=t.computed(()=>!D.value&&M.value),P=!!s,V=t.computed(()=>{const G=o==null?void 0:o.model;if(!(!G||!r.prop))return vo(G,r.prop).value}),z=t.computed(()=>{const{required:G}=r,ne=[];r.rules&&ne.push(...po(r.rules));const se=o==null?void 0:o.rules;if(se&&r.prop){const ie=vo(se,r.prop).value;ie&&ne.push(...po(ie))}if(G!==void 0){const ie=ne.map((Ce,ue)=>[Ce,ue]).filter(([Ce])=>Object.keys(Ce).includes("required"));if(ie.length>0)for(const[Ce,ue]of ie)Ce.required!==G&&(ne[ue]={...Ce,required:G});else ne.push({required:G})}return ne}),L=t.computed(()=>z.value.length>0),W=G=>z.value.filter(se=>!se.trigger||!G?!0:ve(se.trigger)?se.trigger.includes(G):se.trigger===G).map(({trigger:se,...ie})=>ie),A=t.computed(()=>z.value.some(G=>G.required)),O=t.computed(()=>{var G;return f.value==="error"&&r.showMessage&&((G=o==null?void 0:o.showMessage)!=null?G:!0)}),$=t.computed(()=>`${r.label||""}${(o==null?void 0:o.labelSuffix)||""}`),I=G=>{u.value=G},E=G=>{var ne,se;const{errors:ie,fields:Ce}=G;(!ie||!Ce)&&console.error(G),I("error"),p.value=ie?(se=(ne=ie==null?void 0:ie[0])==null?void 0:ne.message)!=null?se:`${r.prop} is required`:"",o==null||o.emit("validate",r.prop,!1,p.value)},N=()=>{I("success"),o==null||o.emit("validate",r.prop,!0,"")},T=async G=>{const ne=v.value;return new Dr({[ne]:G}).validate({[ne]:V.value},{firstFields:!0}).then(()=>(N(),!0)).catch(ie=>(E(ie),Promise.reject(ie)))},R=async(G,ne)=>{if(h||!r.prop)return!1;const se=Ue(ne);if(!L.value)return ne==null||ne(!1),!1;const ie=W(G);return ie.length===0?(ne==null||ne(!0),!0):(I("validating"),T(ie).then(()=>(ne==null||ne(!0),!0)).catch(Ce=>{const{fields:ue}=Ce;return ne==null||ne(!1,ue),se?!1:Promise.reject(ue)}))},x=()=>{I(""),p.value="",h=!1},j=async()=>{const G=o==null?void 0:o.model;if(!G||!r.prop)return;const ne=vo(G,r.prop);h=!0,ne.value=tl(m),await t.nextTick(),x(),h=!1},q=G=>{d.value.includes(G)||d.value.push(G)},re=G=>{d.value=d.value.filter(ne=>ne!==G)};t.watch(()=>r.error,G=>{p.value=G||"",I(G?"error":"")},{immediate:!0}),t.watch(()=>r.validateStatus,G=>I(G||""));const ae=t.reactive({...t.toRefs(r),$el:g,size:i,validateState:u,labelId:c,inputIds:d,isGroup:B,hasLabel:M,fieldValue:V,addInputId:q,removeInputId:re,resetField:j,clearValidate:x,validate:R});return t.provide(Dn,ae),t.onMounted(()=>{r.prop&&(o==null||o.addField(ae),m=tl(V.value))}),t.onBeforeUnmount(()=>{o==null||o.removeField(ae)}),n({size:i,validateMessage:p,validateState:u,validate:R,clearValidate:x,resetField:j}),(G,ne)=>{var se;return t.openBlock(),t.createElementBlock("div",{ref_key:"formItemRef",ref:g,class:t.normalizeClass(t.unref(C)),role:t.unref(B)?"group":void 0,"aria-labelledby":t.unref(B)?t.unref(c):void 0},[t.createVNode(t.unref(Bw),{"is-auto-width":t.unref(y).width==="auto","update-all":((se=t.unref(o))==null?void 0:se.labelWidth)==="auto"},{default:t.withCtx(()=>[t.unref(M)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(D)?"label":"div"),{key:0,id:t.unref(c),for:t.unref(D),class:t.normalizeClass(t.unref(l).e("label")),style:t.normalizeStyle(t.unref(y))},{default:t.withCtx(()=>[t.renderSlot(G.$slots,"label",{label:t.unref($)},()=>[t.createTextVNode(t.toDisplayString(t.unref($)),1)])]),_:3},8,["id","for","class","style"])):t.createCommentVNode("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),t.createElementVNode("div",{class:t.normalizeClass(t.unref(l).e("content")),style:t.normalizeStyle(t.unref(k))},[t.renderSlot(G.$slots,"default"),t.createVNode(t.TransitionGroup,{name:`${t.unref(l).namespace.value}-zoom-in-top`},{default:t.withCtx(()=>[t.unref(O)?t.renderSlot(G.$slots,"error",{key:0,error:p.value},()=>[t.createElementVNode("div",{class:t.normalizeClass(t.unref(_))},t.toDisplayString(p.value),3)]):t.createCommentVNode("v-if",!0)]),_:3},8,["name"])],6)],10,["role","aria-labelledby"])}}});var Cc=_e(Iw,[["__file","form-item.vue"]]);const Aw=Ct(ew,{FormItem:Cc}),Rw=$l(Cc);let Et;const Fw=`
|
|
23
|
+
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),s=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),o=new RegExp("^"+n+"$"),a=new RegExp("^"+i+"$"),l=function(_){return _&&_.exact?s:new RegExp("(?:"+e(_)+n+e(_)+")|(?:"+e(_)+i+e(_)+")","g")};l.v4=function(b){return b&&b.exact?o:new RegExp(""+e(b)+n+e(b),"g")},l.v6=function(b){return b&&b.exact?a:new RegExp(""+e(b)+i+e(b),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,h=l.v6().source,f="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",p="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",g="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",v="(?::\\d{2,5})?",m='(?:[/?#][^\\s"]*)?',y="(?:"+u+"|www\\.)"+c+"(?:localhost|"+d+"|"+h+"|"+f+p+g+")"+v+m;return urlReg=new RegExp("(?:^"+y+"$)","i"),urlReg},pattern$2={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},types={integer:function(e){return types.number(e)&&parseInt(e,10)===e},float:function(e){return types.number(e)&&!types.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!types.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(pattern$2.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(getUrlRegex())},hex:function(e){return typeof e=="string"&&!!e.match(pattern$2.hex)}},type$1=function(e,n,r,i,s){if(e.required&&n===void 0){required$1(e,n,r,i,s);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;o.indexOf(a)>-1?types[a](n)||i.push(format$1(s.messages.types[a],e.fullField,e.type)):a&&typeof n!==e.type&&i.push(format$1(s.messages.types[a],e.fullField,e.type))},range=function(e,n,r,i,s){var o=typeof e.len=="number",a=typeof e.min=="number",l=typeof e.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,d=null,h=typeof n=="number",f=typeof n=="string",p=Array.isArray(n);if(h?d="number":f?d="string":p&&(d="array"),!d)return!1;p&&(c=n.length),f&&(c=n.replace(u,"_").length),o?c!==e.len&&i.push(format$1(s.messages[d].len,e.fullField,e.len)):a&&!l&&c<e.min?i.push(format$1(s.messages[d].min,e.fullField,e.min)):l&&!a&&c>e.max?i.push(format$1(s.messages[d].max,e.fullField,e.max)):a&&l&&(c<e.min||c>e.max)&&i.push(format$1(s.messages[d].range,e.fullField,e.min,e.max))},ENUM$1="enum",enumerable$1=function(e,n,r,i,s){e[ENUM$1]=Array.isArray(e[ENUM$1])?e[ENUM$1]:[],e[ENUM$1].indexOf(n)===-1&&i.push(format$1(s.messages[ENUM$1],e.fullField,e[ENUM$1].join(", ")))},pattern$1=function(e,n,r,i,s){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||i.push(format$1(s.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var o=new RegExp(e.pattern);o.test(n)||i.push(format$1(s.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},rules={required:required$1,whitespace,type:type$1,range,enum:enumerable$1,pattern:pattern$1},string=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n,"string")&&!e.required)return r();rules.required(e,n,i,o,s,"string"),isEmptyValue(n,"string")||(rules.type(e,n,i,o,s),rules.range(e,n,i,o,s),rules.pattern(e,n,i,o,s),e.whitespace===!0&&rules.whitespace(e,n,i,o,s))}r(o)},method=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n)&&!e.required)return r();rules.required(e,n,i,o,s),n!==void 0&&rules.type(e,n,i,o,s)}r(o)},number=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(n===""&&(n=void 0),isEmptyValue(n)&&!e.required)return r();rules.required(e,n,i,o,s),n!==void 0&&(rules.type(e,n,i,o,s),rules.range(e,n,i,o,s))}r(o)},_boolean=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n)&&!e.required)return r();rules.required(e,n,i,o,s),n!==void 0&&rules.type(e,n,i,o,s)}r(o)},regexp=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n)&&!e.required)return r();rules.required(e,n,i,o,s),isEmptyValue(n)||rules.type(e,n,i,o,s)}r(o)},integer=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n)&&!e.required)return r();rules.required(e,n,i,o,s),n!==void 0&&(rules.type(e,n,i,o,s),rules.range(e,n,i,o,s))}r(o)},floatFn=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n)&&!e.required)return r();rules.required(e,n,i,o,s),n!==void 0&&(rules.type(e,n,i,o,s),rules.range(e,n,i,o,s))}r(o)},array=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(n==null&&!e.required)return r();rules.required(e,n,i,o,s,"array"),n!=null&&(rules.type(e,n,i,o,s),rules.range(e,n,i,o,s))}r(o)},object=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n)&&!e.required)return r();rules.required(e,n,i,o,s),n!==void 0&&rules.type(e,n,i,o,s)}r(o)},ENUM="enum",enumerable=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n)&&!e.required)return r();rules.required(e,n,i,o,s),n!==void 0&&rules[ENUM](e,n,i,o,s)}r(o)},pattern=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n,"string")&&!e.required)return r();rules.required(e,n,i,o,s),isEmptyValue(n,"string")||rules.pattern(e,n,i,o,s)}r(o)},date=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n,"date")&&!e.required)return r();if(rules.required(e,n,i,o,s),!isEmptyValue(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),rules.type(e,l,i,o,s),l&&rules.range(e,l.getTime(),i,o,s)}}r(o)},required=function(e,n,r,i,s){var o=[],a=Array.isArray(n)?"array":typeof n;rules.required(e,n,i,o,s,a),r(o)},type=function(e,n,r,i,s){var o=e.type,a=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(isEmptyValue(n,o)&&!e.required)return r();rules.required(e,n,i,a,s,o),isEmptyValue(n,o)||rules.type(e,n,i,a,s)}r(a)},any=function(e,n,r,i,s){var o=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(isEmptyValue(n)&&!e.required)return r();rules.required(e,n,i,o,s)}r(o)},validators={string,method,number,boolean:_boolean,regexp,integer,float:floatFn,array,object,enum:enumerable,pattern,date,url:type,hex:type,email:type,required,any};function newMessages(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var messages=newMessages(),Schema=function(){function t(n){this.rules=null,this._messages=messages,this.define(n)}var e=t.prototype;return e.define=function(r){var i=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(s){var o=r[s];i.rules[s]=Array.isArray(o)?o:[o]})},e.messages=function(r){return r&&(this._messages=deepMerge(newMessages(),r)),this._messages},e.validate=function(r,i,s){var o=this;i===void 0&&(i={}),s===void 0&&(s=function(){});var a=r,l=i,u=s;if(typeof l=="function"&&(u=l,l={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,a),Promise.resolve(a);function c(g){var v=[],m={};function y(_){if(Array.isArray(_)){var T;v=(T=v).concat.apply(T,_)}else v.push(_)}for(var b=0;b<g.length;b++)y(g[b]);v.length?(m=convertFieldsError(v),u(v,m)):u(null,a)}if(l.messages){var d=this.messages();d===messages&&(d=newMessages()),deepMerge(d,l.messages),l.messages=d}else l.messages=this.messages();var h={},f=l.keys||Object.keys(this.rules);f.forEach(function(g){var v=o.rules[g],m=a[g];v.forEach(function(y){var b=y;typeof b.transform=="function"&&(a===r&&(a=_extends({},a)),m=a[g]=b.transform(m)),typeof b=="function"?b={validator:b}:b=_extends({},b),b.validator=o.getValidationMethod(b),b.validator&&(b.field=g,b.fullField=b.fullField||g,b.type=o.getType(b),h[g]=h[g]||[],h[g].push({rule:b,value:m,source:a,field:g}))})});var p={};return asyncMap(h,l,function(g,v){var m=g.rule,y=(m.type==="object"||m.type==="array")&&(typeof m.fields=="object"||typeof m.defaultField=="object");y=y&&(m.required||!m.required&&g.value),m.field=g.field;function b(x,k){return _extends({},k,{fullField:m.fullField+"."+x,fullFields:m.fullFields?[].concat(m.fullFields,[x]):[x]})}function _(x){x===void 0&&(x=[]);var k=Array.isArray(x)?x:[x];!l.suppressWarning&&k.length&&t.warning("async-validator:",k),k.length&&m.message!==void 0&&(k=[].concat(m.message));var w=k.map(complementError(m,a));if(l.first&&w.length)return p[m.field]=1,v(w);if(!y)v(w);else{if(m.required&&!g.value)return m.message!==void 0?w=[].concat(m.message).map(complementError(m,a)):l.error&&(w=[l.error(m,format$1(l.messages.required,m.field))]),v(w);var O={};m.defaultField&&Object.keys(g.value).map(function(z){O[z]=m.defaultField}),O=_extends({},O,g.rule.fields);var S={};Object.keys(O).forEach(function(z){var Y=O[z],ae=Array.isArray(Y)?Y:[Y];S[z]=ae.map(b.bind(null,z))});var F=new t(S);F.messages(l.messages),g.rule.options&&(g.rule.options.messages=l.messages,g.rule.options.error=l.error),F.validate(g.value,g.rule.options||l,function(z){var Y=[];w&&w.length&&Y.push.apply(Y,w),z&&z.length&&Y.push.apply(Y,z),v(Y.length?Y:null)})}}var T;if(m.asyncValidator)T=m.asyncValidator(m,g.value,_,g.source,l);else if(m.validator){try{T=m.validator(m,g.value,_,g.source,l)}catch(x){console.error==null||console.error(x),l.suppressValidatorError||setTimeout(function(){throw x},0),_(x.message)}T===!0?_():T===!1?_(typeof m.message=="function"?m.message(m.fullField||m.field):m.message||(m.fullField||m.field)+" fails"):T instanceof Array?_(T):T instanceof Error&&_(T.message)}T&&T.then&&T.then(function(){return _()},function(x){return _(x)})},function(g){c(g)},a)},e.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!validators.hasOwnProperty(r.type))throw new Error(format$1("Unknown rule type %s",r.type));return r.type||"string"},e.getValidationMethod=function(r){if(typeof r.validator=="function")return r.validator;var i=Object.keys(r),s=i.indexOf("message");return s!==-1&&i.splice(s,1),i.length===1&&i[0]==="required"?validators.required:validators[this.getType(r)]||void 0},t}();Schema.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");validators[e]=n},Schema.warning=warning,Schema.messages=messages,Schema.validators=validators;const formItemValidateStates=["","error","validating","success"],formItemProps=buildProps({label:String,labelWidth:{type:[String,Number],default:""},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:definePropType([String,Array])},required:{type:Boolean,default:void 0},rules:{type:definePropType([Object,Array])},error:String,validateStatus:{type:String,values:formItemValidateStates},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:componentSizes}}),COMPONENT_NAME$3="ElLabelWrap";var FormLabelWrap=vue.defineComponent({name:COMPONENT_NAME$3,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=vue.inject(formContextKey,void 0),r=vue.inject(formItemContextKey);r||throwError(COMPONENT_NAME$3,"usage: <el-form-item><label-wrap /></el-form-item>");const i=useNamespace("form"),s=vue.ref(),o=vue.ref(0),a=()=>{var c;if((c=s.value)!=null&&c.firstElementChild){const d=window.getComputedStyle(s.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},l=(c="update")=>{vue.nextTick(()=>{e.default&&t.isAutoWidth&&(c==="update"?o.value=a():c==="remove"&&(n==null||n.deregisterLabelWidth(o.value)))})},u=()=>l("update");return vue.onMounted(()=>{u()}),vue.onBeforeUnmount(()=>{l("remove")}),vue.onUpdated(()=>u()),vue.watch(o,(c,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(c,d))}),useResizeObserver(vue.computed(()=>{var c,d;return(d=(c=s.value)==null?void 0:c.firstElementChild)!=null?d:null}),u),()=>{var c,d;if(!e)return null;const{isAutoWidth:h}=t;if(h){const f=n==null?void 0:n.autoLabelWidth,p=r==null?void 0:r.hasLabel,g={};if(p&&f&&f!=="auto"){const v=Math.max(0,Number.parseInt(f,10)-o.value),y=(r.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";v&&(g[y]=`${v}px`)}return vue.createVNode("div",{ref:s,class:[i.be("item","label-wrap")],style:g},[(c=e.default)==null?void 0:c.call(e)])}else return vue.createVNode(vue.Fragment,{ref:s},[(d=e.default)==null?void 0:d.call(e)])}}});const __default__$j=vue.defineComponent({name:"ElFormItem"}),_sfc_main$W=vue.defineComponent({...__default__$j,props:formItemProps,setup(t,{expose:e}){const n=t,r=vue.useSlots(),i=vue.inject(formContextKey,void 0),s=vue.inject(formItemContextKey,void 0),o=useFormSize(void 0,{formItem:!1}),a=useNamespace("form-item"),l=useId().value,u=vue.ref([]),c=vue.ref(""),d=refDebounced(c,100),h=vue.ref(""),f=vue.ref();let p,g=!1;const v=vue.computed(()=>n.labelPosition||(i==null?void 0:i.labelPosition)),m=vue.computed(()=>{if(v.value==="top")return{};const _e=addUnit(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return _e?{width:_e}:{}}),y=vue.computed(()=>{if(v.value==="top"||i!=null&&i.inline)return{};if(!n.label&&!n.labelWidth&&S)return{};const _e=addUnit(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return!n.label&&!r.label?{marginLeft:_e}:{}}),b=vue.computed(()=>[a.b(),a.m(o.value),a.is("error",c.value==="error"),a.is("validating",c.value==="validating"),a.is("success",c.value==="success"),a.is("required",j.value||n.required),a.is("no-asterisk",i==null?void 0:i.hideRequiredAsterisk),(i==null?void 0:i.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[a.m("feedback")]:i==null?void 0:i.statusIcon,[a.m(`label-${v.value}`)]:v.value}]),_=vue.computed(()=>isBoolean(n.inlineMessage)?n.inlineMessage:(i==null?void 0:i.inlineMessage)||!1),T=vue.computed(()=>[a.e("error"),{[a.em("error","inline")]:_.value}]),x=vue.computed(()=>n.prop?isString$1(n.prop)?n.prop:n.prop.join("."):""),k=vue.computed(()=>!!(n.label||r.label)),w=vue.computed(()=>n.for||(u.value.length===1?u.value[0]:void 0)),O=vue.computed(()=>!w.value&&k.value),S=!!s,F=vue.computed(()=>{const _e=i==null?void 0:i.model;if(!(!_e||!n.prop))return getProp(_e,n.prop).value}),z=vue.computed(()=>{const{required:_e}=n,Ne=[];n.rules&&Ne.push(...castArray$1(n.rules));const $e=i==null?void 0:i.rules;if($e&&n.prop){const Ue=getProp($e,n.prop).value;Ue&&Ne.push(...castArray$1(Ue))}if(_e!==void 0){const Ue=Ne.map((At,kt)=>[At,kt]).filter(([At])=>Object.keys(At).includes("required"));if(Ue.length>0)for(const[At,kt]of Ue)At.required!==_e&&(Ne[kt]={...At,required:_e});else Ne.push({required:_e})}return Ne}),Y=vue.computed(()=>z.value.length>0),ae=_e=>z.value.filter($e=>!$e.trigger||!_e?!0:isArray$1($e.trigger)?$e.trigger.includes(_e):$e.trigger===_e).map(({trigger:$e,...Ue})=>Ue),j=vue.computed(()=>z.value.some(_e=>_e.required)),M=vue.computed(()=>{var _e;return d.value==="error"&&n.showMessage&&((_e=i==null?void 0:i.showMessage)!=null?_e:!0)}),$=vue.computed(()=>`${n.label||""}${(i==null?void 0:i.labelSuffix)||""}`),oe=_e=>{c.value=_e},A=_e=>{var Ne,$e;const{errors:Ue,fields:At}=_e;(!Ue||!At)&&console.error(_e),oe("error"),h.value=Ue?($e=(Ne=Ue==null?void 0:Ue[0])==null?void 0:Ne.message)!=null?$e:`${n.prop} is required`:"",i==null||i.emit("validate",n.prop,!1,h.value)},V=()=>{oe("success"),i==null||i.emit("validate",n.prop,!0,"")},D=async _e=>{const Ne=x.value;return new Schema({[Ne]:_e}).validate({[Ne]:F.value},{firstFields:!0}).then(()=>(V(),!0)).catch(Ue=>(A(Ue),Promise.reject(Ue)))},le=async(_e,Ne)=>{if(g||!n.prop)return!1;const $e=isFunction$1(Ne);if(!Y.value)return Ne==null||Ne(!1),!1;const Ue=ae(_e);return Ue.length===0?(Ne==null||Ne(!0),!0):(oe("validating"),D(Ue).then(()=>(Ne==null||Ne(!0),!0)).catch(At=>{const{fields:kt}=At;return Ne==null||Ne(!1,kt),$e?!1:Promise.reject(kt)}))},ie=()=>{oe(""),h.value="",g=!1},re=async()=>{const _e=i==null?void 0:i.model;if(!_e||!n.prop)return;const Ne=getProp(_e,n.prop);g=!0,Ne.value=clone$2(p),await vue.nextTick(),ie(),g=!1},pe=_e=>{u.value.includes(_e)||u.value.push(_e)},xe=_e=>{u.value=u.value.filter(Ne=>Ne!==_e)};vue.watch(()=>n.error,_e=>{h.value=_e||"",oe(_e?"error":"")},{immediate:!0}),vue.watch(()=>n.validateStatus,_e=>oe(_e||""));const Ie=vue.reactive({...vue.toRefs(n),$el:f,size:o,validateState:c,labelId:l,inputIds:u,isGroup:O,hasLabel:k,fieldValue:F,addInputId:pe,removeInputId:xe,resetField:re,clearValidate:ie,validate:le});return vue.provide(formItemContextKey,Ie),vue.onMounted(()=>{n.prop&&(i==null||i.addField(Ie),p=clone$2(F.value))}),vue.onBeforeUnmount(()=>{i==null||i.removeField(Ie)}),e({size:o,validateMessage:h,validateState:c,validate:le,clearValidate:ie,resetField:re}),(_e,Ne)=>{var $e;return vue.openBlock(),vue.createElementBlock("div",{ref_key:"formItemRef",ref:f,class:vue.normalizeClass(vue.unref(b)),role:vue.unref(O)?"group":void 0,"aria-labelledby":vue.unref(O)?vue.unref(l):void 0},[vue.createVNode(vue.unref(FormLabelWrap),{"is-auto-width":vue.unref(m).width==="auto","update-all":(($e=vue.unref(i))==null?void 0:$e.labelWidth)==="auto"},{default:vue.withCtx(()=>[vue.unref(k)?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(w)?"label":"div"),{key:0,id:vue.unref(l),for:vue.unref(w),class:vue.normalizeClass(vue.unref(a).e("label")),style:vue.normalizeStyle(vue.unref(m))},{default:vue.withCtx(()=>[vue.renderSlot(_e.$slots,"label",{label:vue.unref($)},()=>[vue.createTextVNode(vue.toDisplayString(vue.unref($)),1)])]),_:3},8,["id","for","class","style"])):vue.createCommentVNode("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(a).e("content")),style:vue.normalizeStyle(vue.unref(y))},[vue.renderSlot(_e.$slots,"default"),vue.createVNode(vue.TransitionGroup,{name:`${vue.unref(a).namespace.value}-zoom-in-top`},{default:vue.withCtx(()=>[vue.unref(M)?vue.renderSlot(_e.$slots,"error",{key:0,error:h.value},()=>[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(T))},vue.toDisplayString(h.value),3)]):vue.createCommentVNode("v-if",!0)]),_:3},8,["name"])],6)],10,["role","aria-labelledby"])}}});var FormItem=_export_sfc$1(_sfc_main$W,[["__file","form-item.vue"]]);const ElForm=withInstall(Form,{FormItem}),ElFormItem=withNoopInstall(FormItem);let hiddenTextarea;const HIDDEN_STYLE=`
|
|
24
24
|
height:0 !important;
|
|
25
25
|
visibility:hidden !important;
|
|
26
|
-
${
|
|
26
|
+
${isFirefox()?"":"overflow:hidden !important;"}
|
|
27
27
|
position:absolute !important;
|
|
28
28
|
z-index:-1000 !important;
|
|
29
29
|
top:0 !important;
|
|
30
30
|
right:0 !important;
|
|
31
|
-
`,Lw=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Yw(e){const n=window.getComputedStyle(e),r=n.getPropertyValue("box-sizing"),a=Number.parseFloat(n.getPropertyValue("padding-bottom"))+Number.parseFloat(n.getPropertyValue("padding-top")),o=Number.parseFloat(n.getPropertyValue("border-bottom-width"))+Number.parseFloat(n.getPropertyValue("border-top-width"));return{contextStyle:Lw.map(i=>`${i}:${n.getPropertyValue(i)}`).join(";"),paddingSize:a,borderSize:o,boxSizing:r}}function vc(e,n=1,r){var a;Et||(Et=document.createElement("textarea"),document.body.appendChild(Et));const{paddingSize:o,borderSize:s,boxSizing:i,contextStyle:l}=Yw(e);Et.setAttribute("style",`${l};${Fw}`),Et.value=e.value||e.placeholder||"";let c=Et.scrollHeight;const d={};i==="border-box"?c=c+s:i==="content-box"&&(c=c-o),Et.value="";const u=Et.scrollHeight-o;if(ot(n)){let f=u*n;i==="border-box"&&(f=f+o+s),c=Math.max(f,c),d.minHeight=`${f}px`}if(ot(r)){let f=u*r;i==="border-box"&&(f=f+o+s),c=Math.min(f,c)}return d.height=`${c}px`,(a=Et.parentNode)==null||a.removeChild(Et),Et=void 0,d}const zw=le({id:{type:String,default:void 0},size:Lo,disabled:Boolean,modelValue:{type:J([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:J([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:Fn},prefixIcon:{type:Fn},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:J([Object,Array,String]),default:()=>n0({})},autofocus:Boolean,rows:{type:Number,default:2},...Cr(["ariaLabel"])}),jw={[mr]:e=>$t(e),input:e=>$t(e),change:e=>$t(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},Ww=t.defineComponent({name:"ElInput",inheritAttrs:!1}),Hw=t.defineComponent({...Ww,props:zw,emits:jw,setup(e,{expose:n,emit:r}){const a=e,o=t.useAttrs(),s=Bl(),i=t.useSlots(),l=t.computed(()=>[a.type==="textarea"?h.b():m.b(),m.m(p.value),m.is("disabled",g.value),m.is("exceed",R.value),{[m.b("group")]:i.prepend||i.append,[m.m("prefix")]:i.prefix||a.prefixIcon,[m.m("suffix")]:i.suffix||a.suffixIcon||a.clearable||a.showPassword,[m.bm("suffix","password-clear")]:I.value&&E.value,[m.b("hidden")]:a.type==="hidden"},o.class]),c=t.computed(()=>[m.e("wrapper"),m.is("focus",D.value)]),{form:d,formItem:u}=jo(),{inputId:f}=Ub(a,{formItemContext:u}),p=vr(),g=zo(),m=me("input"),h=me("textarea"),w=t.shallowRef(),y=t.shallowRef(),k=t.ref(!1),C=t.ref(!1),b=t.ref(),_=t.shallowRef(a.inputStyle),v=t.computed(()=>w.value||y.value),{wrapperRef:M,isFocused:D,handleFocus:B,handleBlur:P}=Yo(v,{beforeFocus(){return g.value},afterBlur(){var U;a.validateEvent&&((U=u==null?void 0:u.validate)==null||U.call(u,"blur").catch(be=>Le(be)))}}),V=t.computed(()=>{var U;return(U=d==null?void 0:d.statusIcon)!=null?U:!1}),z=t.computed(()=>(u==null?void 0:u.validateState)||""),L=t.computed(()=>z.value&&Xy[z.value]),W=t.computed(()=>C.value?Ky:Uy),A=t.computed(()=>[o.style]),O=t.computed(()=>[a.inputStyle,_.value,{resize:a.resize}]),$=t.computed(()=>na(a.modelValue)?"":String(a.modelValue)),I=t.computed(()=>a.clearable&&!g.value&&!a.readonly&&!!$.value&&(D.value||k.value)),E=t.computed(()=>a.showPassword&&!g.value&&!!$.value&&(!!$.value||D.value)),N=t.computed(()=>a.showWordLimit&&!!a.maxlength&&(a.type==="text"||a.type==="textarea")&&!g.value&&!a.readonly&&!a.showPassword),T=t.computed(()=>$.value.length),R=t.computed(()=>!!N.value&&T.value>Number(a.maxlength)),x=t.computed(()=>!!i.suffix||!!a.suffixIcon||I.value||a.showPassword||N.value||!!z.value&&V.value),[j,q]=Nb(w);Co(y,U=>{if(G(),!N.value||a.resize!=="both")return;const be=U[0],{width:Ze}=be.contentRect;b.value={right:`calc(100% - ${Ze+15+6}px)`}});const re=()=>{const{type:U,autosize:be}=a;if(!(!Fe||U!=="textarea"||!y.value))if(be){const Ze=Sn(be)?be.minRows:void 0,rt=Sn(be)?be.maxRows:void 0,Xe=vc(y.value,Ze,rt);_.value={overflowY:"hidden",...Xe},t.nextTick(()=>{y.value.offsetHeight,_.value=Xe})}else _.value={minHeight:vc(y.value).minHeight}},G=(U=>{let be=!1;return()=>{var Ze;if(be||!a.autosize)return;((Ze=y.value)==null?void 0:Ze.offsetParent)===null||(U(),be=!0)}})(re),ne=()=>{const U=v.value,be=a.formatter?a.formatter($.value):$.value;!U||U.value===be||(U.value=be)},se=async U=>{j();let{value:be}=U.target;if(a.formatter&&(be=a.parser?a.parser(be):be),!Ce.value){if(be===$.value){ne();return}r(mr,be),r("input",be),await t.nextTick(),ne(),q()}},ie=U=>{r("change",U.target.value)},{isComposing:Ce,handleCompositionStart:ue,handleCompositionUpdate:Ae,handleCompositionEnd:We}=Bb({emit:r,afterComposition:se}),Ke=()=>{C.value=!C.value,Ve()},Ve=async()=>{var U;await t.nextTick(),(U=v.value)==null||U.focus()},Je=()=>{var U;return(U=v.value)==null?void 0:U.blur()},ce=U=>{k.value=!1,r("mouseleave",U)},Ne=U=>{k.value=!0,r("mouseenter",U)},Re=U=>{r("keydown",U)},wt=()=>{var U;(U=v.value)==null||U.select()},nt=()=>{r(mr,""),r("change",""),r("clear"),r("input","")};return t.watch(()=>a.modelValue,()=>{var U;t.nextTick(()=>re()),a.validateEvent&&((U=u==null?void 0:u.validate)==null||U.call(u,"change").catch(be=>Le(be)))}),t.watch($,()=>ne()),t.watch(()=>a.type,async()=>{await t.nextTick(),ne(),re()}),t.onMounted(()=>{!a.formatter&&a.parser&&Le("ElInput","If you set the parser, you also need to set the formatter."),ne(),t.nextTick(re)}),n({input:w,textarea:y,ref:v,textareaStyle:O,autosize:t.toRef(a,"autosize"),isComposing:Ce,focus:Ve,blur:Je,select:wt,clear:nt,resizeTextarea:re}),(U,be)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(l),{[t.unref(m).bm("group","append")]:U.$slots.append,[t.unref(m).bm("group","prepend")]:U.$slots.prepend}]),style:t.normalizeStyle(t.unref(A)),onMouseenter:Ne,onMouseleave:ce},[t.createCommentVNode(" input "),U.type!=="textarea"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createCommentVNode(" prepend slot "),U.$slots.prepend?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(m).be("group","prepend"))},[t.renderSlot(U.$slots,"prepend")],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{ref_key:"wrapperRef",ref:M,class:t.normalizeClass(t.unref(c))},[t.createCommentVNode(" prefix slot "),U.$slots.prefix||U.prefixIcon?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(t.unref(m).e("prefix"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(m).e("prefix-inner"))},[t.renderSlot(U.$slots,"prefix"),U.prefixIcon?(t.openBlock(),t.createBlock(t.unref(he),{key:0,class:t.normalizeClass(t.unref(m).e("icon"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(U.prefixIcon)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],2)],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("input",t.mergeProps({id:t.unref(f),ref_key:"input",ref:w,class:t.unref(m).e("inner")},t.unref(s),{minlength:U.minlength,maxlength:U.maxlength,type:U.showPassword?C.value?"text":"password":U.type,disabled:t.unref(g),readonly:U.readonly,autocomplete:U.autocomplete,tabindex:U.tabindex,"aria-label":U.ariaLabel,placeholder:U.placeholder,style:U.inputStyle,form:U.form,autofocus:U.autofocus,role:U.containerRole,onCompositionstart:t.unref(ue),onCompositionupdate:t.unref(Ae),onCompositionend:t.unref(We),onInput:se,onChange:ie,onKeydown:Re}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","onCompositionstart","onCompositionupdate","onCompositionend"]),t.createCommentVNode(" suffix slot "),t.unref(x)?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(t.unref(m).e("suffix"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(m).e("suffix-inner"))},[!t.unref(I)||!t.unref(E)||!t.unref(N)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.renderSlot(U.$slots,"suffix"),U.suffixIcon?(t.openBlock(),t.createBlock(t.unref(he),{key:0,class:t.normalizeClass(t.unref(m).e("icon"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(U.suffixIcon)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],64)):t.createCommentVNode("v-if",!0),t.unref(I)?(t.openBlock(),t.createBlock(t.unref(he),{key:1,class:t.normalizeClass([t.unref(m).e("icon"),t.unref(m).e("clear")]),onMousedown:t.withModifiers(t.unref(Pt),["prevent"]),onClick:nt},{default:t.withCtx(()=>[t.createVNode(t.unref(To))]),_:1},8,["class","onMousedown"])):t.createCommentVNode("v-if",!0),t.unref(E)?(t.openBlock(),t.createBlock(t.unref(he),{key:2,class:t.normalizeClass([t.unref(m).e("icon"),t.unref(m).e("password")]),onClick:Ke},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(W))))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),t.unref(N)?(t.openBlock(),t.createElementBlock("span",{key:3,class:t.normalizeClass(t.unref(m).e("count"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(m).e("count-inner"))},t.toDisplayString(t.unref(T))+" / "+t.toDisplayString(U.maxlength),3)],2)):t.createCommentVNode("v-if",!0),t.unref(z)&&t.unref(L)&&t.unref(V)?(t.openBlock(),t.createBlock(t.unref(he),{key:4,class:t.normalizeClass([t.unref(m).e("icon"),t.unref(m).e("validateIcon"),t.unref(m).is("loading",t.unref(z)==="validating")])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(L))))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],2)],2)):t.createCommentVNode("v-if",!0)],2),t.createCommentVNode(" append slot "),U.$slots.append?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(t.unref(m).be("group","append"))},[t.renderSlot(U.$slots,"append")],2)):t.createCommentVNode("v-if",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" textarea "),t.createElementVNode("textarea",t.mergeProps({id:t.unref(f),ref_key:"textarea",ref:y,class:[t.unref(h).e("inner"),t.unref(m).is("focus",t.unref(D))]},t.unref(s),{minlength:U.minlength,maxlength:U.maxlength,tabindex:U.tabindex,disabled:t.unref(g),readonly:U.readonly,autocomplete:U.autocomplete,style:t.unref(O),"aria-label":U.ariaLabel,placeholder:U.placeholder,form:U.form,autofocus:U.autofocus,rows:U.rows,role:U.containerRole,onCompositionstart:t.unref(ue),onCompositionupdate:t.unref(Ae),onCompositionend:t.unref(We),onInput:se,onFocus:t.unref(B),onBlur:t.unref(P),onChange:ie,onKeydown:Re}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),t.unref(N)?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle(b.value),class:t.normalizeClass(t.unref(m).e("count"))},t.toDisplayString(t.unref(T))+" / "+t.toDisplayString(U.maxlength),7)):t.createCommentVNode("v-if",!0)],64))],38))}});var Uw=_e(Hw,[["__file","input.vue"]]);const It=Ct(Uw),Gn=4,qw={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},Gw=({move:e,size:n,bar:r})=>({[r.size]:n,transform:`translate${r.axis}(${e}%)`}),Zo=Symbol("scrollbarContextKey"),Kw=le({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Zw="Thumb";var Ec=_e(t.defineComponent({__name:"thumb",props:Kw,setup(e){const n=e,r=t.inject(Zo),a=me("scrollbar");r||Eo(Zw,"can not inject scrollbar context");const o=t.ref(),s=t.ref(),i=t.ref({}),l=t.ref(!1);let c=!1,d=!1,u=Fe?document.onselectstart:null;const f=t.computed(()=>qw[n.vertical?"vertical":"horizontal"]),p=t.computed(()=>Gw({size:n.size,move:n.move,bar:f.value})),g=t.computed(()=>o.value[f.value.offset]**2/r.wrapElement[f.value.scrollSize]/n.ratio/s.value[f.value.offset]),m=v=>{var M;if(v.stopPropagation(),v.ctrlKey||[1,2].includes(v.button))return;(M=window.getSelection())==null||M.removeAllRanges(),w(v);const D=v.currentTarget;D&&(i.value[f.value.axis]=D[f.value.offset]-(v[f.value.client]-D.getBoundingClientRect()[f.value.direction]))},h=v=>{if(!s.value||!o.value||!r.wrapElement)return;const M=Math.abs(v.target.getBoundingClientRect()[f.value.direction]-v[f.value.client]),D=s.value[f.value.offset]/2,B=(M-D)*100*g.value/o.value[f.value.offset];r.wrapElement[f.value.scroll]=B*r.wrapElement[f.value.scrollSize]/100},w=v=>{v.stopImmediatePropagation(),c=!0,document.addEventListener("mousemove",y),document.addEventListener("mouseup",k),u=document.onselectstart,document.onselectstart=()=>!1},y=v=>{if(!o.value||!s.value||c===!1)return;const M=i.value[f.value.axis];if(!M)return;const D=(o.value.getBoundingClientRect()[f.value.direction]-v[f.value.client])*-1,B=s.value[f.value.offset]-M,P=(D-B)*100*g.value/o.value[f.value.offset];r.wrapElement[f.value.scroll]=P*r.wrapElement[f.value.scrollSize]/100},k=()=>{c=!1,i.value[f.value.axis]=0,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",k),_(),d&&(l.value=!1)},C=()=>{d=!1,l.value=!!n.size},b=()=>{d=!0,l.value=c};t.onBeforeUnmount(()=>{_(),document.removeEventListener("mouseup",k)});const _=()=>{document.onselectstart!==u&&(document.onselectstart=u)};return St(t.toRef(r,"scrollbarElement"),"mousemove",C),St(t.toRef(r,"scrollbarElement"),"mouseleave",b),(v,M)=>(t.openBlock(),t.createBlock(t.Transition,{name:t.unref(a).b("fade"),persisted:""},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{ref_key:"instance",ref:o,class:t.normalizeClass([t.unref(a).e("bar"),t.unref(a).is(t.unref(f).key)]),onMousedown:h},[t.createElementVNode("div",{ref_key:"thumb",ref:s,class:t.normalizeClass(t.unref(a).e("thumb")),style:t.normalizeStyle(t.unref(p)),onMousedown:m},null,38)],34),[[t.vShow,v.always||l.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const Jw=le({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var Xw=_e(t.defineComponent({__name:"bar",props:Jw,setup(e,{expose:n}){const r=e,a=t.inject(Zo),o=t.ref(0),s=t.ref(0),i=t.ref(""),l=t.ref(""),c=t.ref(1),d=t.ref(1);return n({handleScroll:p=>{if(p){const g=p.offsetHeight-Gn,m=p.offsetWidth-Gn;s.value=p.scrollTop*100/g*c.value,o.value=p.scrollLeft*100/m*d.value}},update:()=>{const p=a==null?void 0:a.wrapElement;if(!p)return;const g=p.offsetHeight-Gn,m=p.offsetWidth-Gn,h=g**2/p.scrollHeight,w=m**2/p.scrollWidth,y=Math.max(h,r.minSize),k=Math.max(w,r.minSize);c.value=h/(g-h)/(y/(g-y)),d.value=w/(m-w)/(k/(m-k)),l.value=y+Gn<g?`${y}px`:"",i.value=k+Gn<m?`${k}px`:""}}),(p,g)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(Ec,{move:o.value,ratio:d.value,size:i.value,always:p.always},null,8,["move","ratio","size","always"]),t.createVNode(Ec,{move:s.value,ratio:c.value,size:l.value,vertical:"",always:p.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const Qw=le({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:J([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Cr(["ariaLabel","ariaOrientation"])}),e1={scroll:({scrollTop:e,scrollLeft:n})=>[e,n].every(ot)},Jo="ElScrollbar",t1=t.defineComponent({name:Jo}),n1=t.defineComponent({...t1,props:Qw,emits:e1,setup(e,{expose:n,emit:r}){const a=e,o=me("scrollbar");let s,i,l=0,c=0;const d=t.ref(),u=t.ref(),f=t.ref(),p=t.ref(),g=t.computed(()=>{const _={};return a.height&&(_.height=ln(a.height)),a.maxHeight&&(_.maxHeight=ln(a.maxHeight)),[a.wrapStyle,_]}),m=t.computed(()=>[a.wrapClass,o.e("wrap"),{[o.em("wrap","hidden-default")]:!a.native}]),h=t.computed(()=>[o.e("view"),a.viewClass]),w=()=>{var _;u.value&&((_=p.value)==null||_.handleScroll(u.value),l=u.value.scrollTop,c=u.value.scrollLeft,r("scroll",{scrollTop:u.value.scrollTop,scrollLeft:u.value.scrollLeft}))};function y(_,v){Sn(_)?u.value.scrollTo(_):ot(_)&&ot(v)&&u.value.scrollTo(_,v)}const k=_=>{if(!ot(_)){Le(Jo,"value must be a number");return}u.value.scrollTop=_},C=_=>{if(!ot(_)){Le(Jo,"value must be a number");return}u.value.scrollLeft=_},b=()=>{var _;(_=p.value)==null||_.update()};return t.watch(()=>a.noresize,_=>{_?(s==null||s(),i==null||i()):({stop:s}=Co(f,b),i=St("resize",b))},{immediate:!0}),t.watch(()=>[a.maxHeight,a.height],()=>{a.native||t.nextTick(()=>{var _;b(),u.value&&((_=p.value)==null||_.handleScroll(u.value))})}),t.provide(Zo,t.reactive({scrollbarElement:d,wrapElement:u})),t.onActivated(()=>{u.value&&(u.value.scrollTop=l,u.value.scrollLeft=c)}),t.onMounted(()=>{a.native||t.nextTick(()=>{b()})}),t.onUpdated(()=>b()),n({wrapRef:u,update:b,scrollTo:y,setScrollTop:k,setScrollLeft:C,handleScroll:w}),(_,v)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"scrollbarRef",ref:d,class:t.normalizeClass(t.unref(o).b())},[t.createElementVNode("div",{ref_key:"wrapRef",ref:u,class:t.normalizeClass(t.unref(m)),style:t.normalizeStyle(t.unref(g)),tabindex:_.tabindex,onScroll:w},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(_.tag),{id:_.id,ref_key:"resizeRef",ref:f,class:t.normalizeClass(t.unref(h)),style:t.normalizeStyle(_.viewStyle),role:_.role,"aria-label":_.ariaLabel,"aria-orientation":_.ariaOrientation},{default:t.withCtx(()=>[t.renderSlot(_.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),_.native?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createBlock(Xw,{key:0,ref_key:"barRef",ref:p,always:_.always,"min-size":_.minSize},null,8,["always","min-size"]))],2))}});var r1=_e(n1,[["__file","scrollbar.vue"]]);const a1=Ct(r1),Xo=Symbol("popper"),Mc=Symbol("popperContent"),Tc=le({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),o1=t.defineComponent({name:"ElPopper",inheritAttrs:!1}),s1=t.defineComponent({...o1,props:Tc,setup(e,{expose:n}){const r=e,a=t.ref(),o=t.ref(),s=t.ref(),i=t.ref(),l=t.computed(()=>r.role),c={triggerRef:a,popperInstanceRef:o,contentRef:s,referenceRef:i,role:l};return n(c),t.provide(Xo,c),(d,u)=>t.renderSlot(d.$slots,"default")}});var i1=_e(s1,[["__file","popper.vue"]]);const Dc=le({arrowOffset:{type:Number,default:5}}),l1=t.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),c1=t.defineComponent({...l1,props:Dc,setup(e,{expose:n}){const r=e,a=me("popper"),{arrowOffset:o,arrowRef:s,arrowStyle:i}=t.inject(Mc,void 0);return t.watch(()=>r.arrowOffset,l=>{o.value=l}),t.onBeforeUnmount(()=>{s.value=void 0}),n({arrowRef:s}),(l,c)=>(t.openBlock(),t.createElementBlock("span",{ref_key:"arrowRef",ref:s,class:t.normalizeClass(t.unref(a).e("arrow")),style:t.normalizeStyle(t.unref(i)),"data-popper-arrow":""},null,6))}});var d1=_e(c1,[["__file","arrow.vue"]]);const Qo="ElOnlyChild",f1=t.defineComponent({name:Qo,setup(e,{slots:n,attrs:r}){var a;const o=t.inject(lc),s=Db((a=o==null?void 0:o.setForwardRef)!=null?a:Pt);return()=>{var i;const l=(i=n.default)==null?void 0:i.call(n,r);if(!l)return null;if(l.length>1)return Le(Qo,"requires exact only one valid child."),null;const c=Oc(l);return c?t.withDirectives(t.cloneVNode(c,r),[[s]]):(Le(Qo,"no valid child node found"),null)}}});function Oc(e){if(!e)return null;const n=e;for(const r of n){if(Sn(r))switch(r.type){case t.Comment:continue;case t.Text:case"svg":return xc(r);case t.Fragment:return Oc(r.children);default:return r}return xc(r)}return null}function xc(e){const n=me("only-child");return t.createVNode("span",{class:n.e("content")},[e])}const Nc=le({virtualRef:{type:J(Object)},virtualTriggering:Boolean,onMouseenter:{type:J(Function)},onMouseleave:{type:J(Function)},onClick:{type:J(Function)},onKeydown:{type:J(Function)},onFocus:{type:J(Function)},onBlur:{type:J(Function)},onContextmenu:{type:J(Function)},id:String,open:Boolean}),u1=t.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),p1=t.defineComponent({...u1,props:Nc,setup(e,{expose:n}){const r=e,{role:a,triggerRef:o}=t.inject(Xo,void 0);Tb(o);const s=t.computed(()=>l.value?r.id:void 0),i=t.computed(()=>{if(a&&a.value==="tooltip")return r.open&&r.id?r.id:void 0}),l=t.computed(()=>{if(a&&a.value!=="tooltip")return a.value}),c=t.computed(()=>l.value?`${r.open}`:void 0);let d;const u=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return t.onMounted(()=>{t.watch(()=>r.virtualRef,f=>{f&&(o.value=Ut(f))},{immediate:!0}),t.watch(o,(f,p)=>{d==null||d(),d=void 0,Cn(f)&&(u.forEach(g=>{var m;const h=r[g];h&&(f.addEventListener(g.slice(2).toLowerCase(),h),(m=p==null?void 0:p.removeEventListener)==null||m.call(p,g.slice(2).toLowerCase(),h))}),fl(f)&&(d=t.watch([s,i,l,c],g=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((m,h)=>{na(g[h])?f.removeAttribute(m):f.setAttribute(m,g[h])})},{immediate:!0}))),Cn(p)&&fl(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(g=>p.removeAttribute(g))},{immediate:!0})}),t.onBeforeUnmount(()=>{if(d==null||d(),d=void 0,o.value&&Cn(o.value)){const f=o.value;u.forEach(p=>{const g=r[p];g&&f.removeEventListener(p.slice(2).toLowerCase(),g)}),o.value=void 0}}),n({triggerRef:o}),(f,p)=>f.virtualTriggering?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createBlock(t.unref(f1),t.mergeProps({key:0},f.$attrs,{"aria-controls":t.unref(s),"aria-describedby":t.unref(i),"aria-expanded":t.unref(c),"aria-haspopup":t.unref(l)}),{default:t.withCtx(()=>[t.renderSlot(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var m1=_e(p1,[["__file","trigger.vue"]]);const es="focus-trap.focus-after-trapped",ts="focus-trap.focus-after-released",h1="focus-trap.focusout-prevented",Pc={cancelable:!0,bubbles:!1},g1={cancelable:!0,bubbles:!1},$c="focusAfterTrapped",Bc="focusAfterReleased",Vc=Symbol("elFocusTrap"),ns=t.ref(),wa=t.ref(0),rs=t.ref(0);let _a=0;const Ic=e=>{const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0||a===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n},Ac=(e,n)=>{for(const r of e)if(!y1(r,n))return r},y1=(e,n)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},b1=e=>{const n=Ic(e),r=Ac(n,e),a=Ac(n.reverse(),e);return[r,a]},w1=e=>e instanceof HTMLInputElement&&"select"in e,dn=(e,n)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),rs.value=window.performance.now(),e!==r&&w1(e)&&n&&e.select()}};function Rc(e,n){const r=[...e],a=e.indexOf(n);return a!==-1&&r.splice(a,1),r}const _1=()=>{let e=[];return{push:a=>{const o=e[0];o&&a!==o&&o.pause(),e=Rc(e,a),e.unshift(a)},remove:a=>{var o,s;e=Rc(e,a),(s=(o=e[0])==null?void 0:o.resume)==null||s.call(o)}}},k1=(e,n=!1)=>{const r=document.activeElement;for(const a of e)if(dn(a,n),document.activeElement!==r)return},Fc=_1(),S1=()=>wa.value>rs.value,ka=()=>{ns.value="pointer",wa.value=window.performance.now()},Lc=()=>{ns.value="keyboard",wa.value=window.performance.now()},C1=()=>(t.onMounted(()=>{_a===0&&(document.addEventListener("mousedown",ka),document.addEventListener("touchstart",ka),document.addEventListener("keydown",Lc)),_a++}),t.onBeforeUnmount(()=>{_a--,_a<=0&&(document.removeEventListener("mousedown",ka),document.removeEventListener("touchstart",ka),document.removeEventListener("keydown",Lc))}),{focusReason:ns,lastUserFocusTimestamp:wa,lastAutomatedFocusTimestamp:rs}),Sa=e=>new CustomEvent(h1,{...g1,detail:e}),v1=t.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[$c,Bc,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:n}){const r=t.ref();let a,o;const{focusReason:s}=C1();Sb(m=>{e.trapped&&!i.paused&&n("release-requested",m)});const i={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=m=>{if(!e.loop&&!e.trapped||i.paused)return;const{code:h,altKey:w,ctrlKey:y,metaKey:k,currentTarget:C,shiftKey:b}=m,{loop:_}=e,v=h===Pe.tab&&!w&&!y&&!k,M=document.activeElement;if(v&&M){const D=C,[B,P]=b1(D);if(B&&P){if(!b&&M===P){const z=Sa({focusReason:s.value});n("focusout-prevented",z),z.defaultPrevented||(m.preventDefault(),_&&dn(B,!0))}else if(b&&[B,D].includes(M)){const z=Sa({focusReason:s.value});n("focusout-prevented",z),z.defaultPrevented||(m.preventDefault(),_&&dn(P,!0))}}else if(M===D){const z=Sa({focusReason:s.value});n("focusout-prevented",z),z.defaultPrevented||m.preventDefault()}}};t.provide(Vc,{focusTrapRef:r,onKeydown:l}),t.watch(()=>e.focusTrapEl,m=>{m&&(r.value=m)},{immediate:!0}),t.watch([r],([m],[h])=>{m&&(m.addEventListener("keydown",l),m.addEventListener("focusin",u),m.addEventListener("focusout",f)),h&&(h.removeEventListener("keydown",l),h.removeEventListener("focusin",u),h.removeEventListener("focusout",f))});const c=m=>{n($c,m)},d=m=>n(Bc,m),u=m=>{const h=t.unref(r);if(!h)return;const w=m.target,y=m.relatedTarget,k=w&&h.contains(w);e.trapped||y&&h.contains(y)||(a=y),k&&n("focusin",m),!i.paused&&e.trapped&&(k?o=w:dn(o,!0))},f=m=>{const h=t.unref(r);if(!(i.paused||!h))if(e.trapped){const w=m.relatedTarget;!na(w)&&!h.contains(w)&&setTimeout(()=>{if(!i.paused&&e.trapped){const y=Sa({focusReason:s.value});n("focusout-prevented",y),y.defaultPrevented||dn(o,!0)}},0)}else{const w=m.target;w&&h.contains(w)||n("focusout",m)}};async function p(){await t.nextTick();const m=t.unref(r);if(m){Fc.push(i);const h=m.contains(document.activeElement)?a:document.activeElement;if(a=h,!m.contains(h)){const y=new Event(es,Pc);m.addEventListener(es,c),m.dispatchEvent(y),y.defaultPrevented||t.nextTick(()=>{let k=e.focusStartEl;$t(k)||(dn(k),document.activeElement!==k&&(k="first")),k==="first"&&k1(Ic(m),!0),(document.activeElement===h||k==="container")&&dn(m)})}}}function g(){const m=t.unref(r);if(m){m.removeEventListener(es,c);const h=new CustomEvent(ts,{...Pc,detail:{focusReason:s.value}});m.addEventListener(ts,d),m.dispatchEvent(h),!h.defaultPrevented&&(s.value=="keyboard"||!S1()||m.contains(document.activeElement))&&dn(a??document.body),m.removeEventListener(ts,d),Fc.remove(i)}}return t.onMounted(()=>{e.trapped&&p(),t.watch(()=>e.trapped,m=>{m?p():g()})}),t.onBeforeUnmount(()=>{e.trapped&&g(),r.value&&(r.value.removeEventListener("keydown",l),r.value.removeEventListener("focusin",u),r.value.removeEventListener("focusout",f),r.value=void 0)}),{onKeydown:l}}});function E1(e,n,r,a,o,s){return t.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var Yc=_e(v1,[["render",E1],["__file","focus-trap.vue"]]);const M1=["fixed","absolute"],T1=le({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:J(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:da,default:"bottom"},popperOptions:{type:J(Object),default:()=>({})},strategy:{type:String,values:M1,default:"absolute"}}),zc=le({...T1,id:String,style:{type:J([String,Array,Object])},className:{type:J([String,Array,Object])},effect:{type:J(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:J([String,Array,Object])},popperStyle:{type:J([String,Array,Object])},referenceEl:{type:J(Object)},triggerTargetEl:{type:J(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Cr(["ariaLabel"])}),D1={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},O1=(e,n=[])=>{const{placement:r,strategy:a,popperOptions:o}=e,s={placement:r,strategy:a,...o,modifiers:[...N1(e),...n]};return P1(s,o==null?void 0:o.modifiers),s},x1=e=>{if(Fe)return Ut(e)};function N1(e){const{offset:n,gpuAcceleration:r,fallbackPlacements:a}=e;return[{name:"offset",options:{offset:[0,n??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:a}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function P1(e,n){n&&(e.modifiers=[...e.modifiers,...n??[]])}const $1=0,B1=e=>{const{popperInstanceRef:n,contentRef:r,triggerRef:a,role:o}=t.inject(Xo,void 0),s=t.ref(),i=t.ref(),l=t.computed(()=>({name:"eventListeners",enabled:!!e.visible})),c=t.computed(()=>{var y;const k=t.unref(s),C=(y=t.unref(i))!=null?y:$1;return{name:"arrow",enabled:!ll(k),options:{element:k,padding:C}}}),d=t.computed(()=>({onFirstUpdate:()=>{m()},...O1(e,[t.unref(c),t.unref(l)])})),u=t.computed(()=>x1(e.referenceEl)||t.unref(a)),{attributes:f,state:p,styles:g,update:m,forceUpdate:h,instanceRef:w}=wb(u,r,d);return t.watch(w,y=>n.value=y),t.onMounted(()=>{t.watch(()=>{var y;return(y=t.unref(u))==null?void 0:y.getBoundingClientRect()},()=>{m()})}),{attributes:f,arrowRef:s,contentRef:r,instanceRef:w,state:p,styles:g,role:o,forceUpdate:h,update:m}},V1=(e,{attributes:n,styles:r,role:a})=>{const{nextZIndex:o}=uc(),s=me("popper"),i=t.computed(()=>t.unref(n).popper),l=t.ref(ot(e.zIndex)?e.zIndex:o()),c=t.computed(()=>[s.b(),s.is("pure",e.pure),s.is(e.effect),e.popperClass]),d=t.computed(()=>[{zIndex:t.unref(l)},t.unref(r).popper,e.popperStyle||{}]),u=t.computed(()=>a.value==="dialog"?"false":void 0),f=t.computed(()=>t.unref(r).arrow||{});return{ariaModal:u,arrowStyle:f,contentAttrs:i,contentClass:c,contentStyle:d,contentZIndex:l,updateZIndex:()=>{l.value=ot(e.zIndex)?e.zIndex:o()}}},I1=(e,n)=>{const r=t.ref(!1),a=t.ref();return{focusStartRef:a,trapped:r,onFocusAfterReleased:d=>{var u;((u=d.detail)==null?void 0:u.focusReason)!=="pointer"&&(a.value="first",n("blur"))},onFocusAfterTrapped:()=>{n("focus")},onFocusInTrap:d=>{e.visible&&!r.value&&(d.target&&(a.value=d.target),r.value=!0)},onFocusoutPrevented:d=>{e.trapping||(d.detail.focusReason==="pointer"&&d.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,n("close")}}},A1=t.defineComponent({name:"ElPopperContent"}),R1=t.defineComponent({...A1,props:zc,emits:D1,setup(e,{expose:n,emit:r}){const a=e,{focusStartRef:o,trapped:s,onFocusAfterReleased:i,onFocusAfterTrapped:l,onFocusInTrap:c,onFocusoutPrevented:d,onReleaseRequested:u}=I1(a,r),{attributes:f,arrowRef:p,contentRef:g,styles:m,instanceRef:h,role:w,update:y}=B1(a),{ariaModal:k,arrowStyle:C,contentAttrs:b,contentClass:_,contentStyle:v,updateZIndex:M}=V1(a,{styles:m,attributes:f,role:w}),D=t.inject(Dn,void 0),B=t.ref();t.provide(Mc,{arrowStyle:C,arrowRef:p,arrowOffset:B}),D&&t.provide(Dn,{...D,addInputId:Pt,removeInputId:Pt});let P;const V=(L=!0)=>{y(),L&&M()},z=()=>{V(!1),a.visible&&a.focusOnShow?s.value=!0:a.visible===!1&&(s.value=!1)};return t.onMounted(()=>{t.watch(()=>a.triggerTargetEl,(L,W)=>{P==null||P(),P=void 0;const A=t.unref(L||g.value),O=t.unref(W||g.value);Cn(A)&&(P=t.watch([w,()=>a.ariaLabel,k,()=>a.id],$=>{["role","aria-label","aria-modal","id"].forEach((I,E)=>{na($[E])?A.removeAttribute(I):A.setAttribute(I,$[E])})},{immediate:!0})),O!==A&&Cn(O)&&["role","aria-label","aria-modal","id"].forEach($=>{O.removeAttribute($)})},{immediate:!0}),t.watch(()=>a.visible,z,{immediate:!0})}),t.onBeforeUnmount(()=>{P==null||P(),P=void 0}),n({popperContentRef:g,popperInstanceRef:h,updatePopper:V,contentStyle:v}),(L,W)=>(t.openBlock(),t.createElementBlock("div",t.mergeProps({ref_key:"contentRef",ref:g},t.unref(b),{style:t.unref(v),class:t.unref(_),tabindex:"-1",onMouseenter:A=>L.$emit("mouseenter",A),onMouseleave:A=>L.$emit("mouseleave",A)}),[t.createVNode(t.unref(Yc),{trapped:t.unref(s),"trap-on-focus-in":!0,"focus-trap-el":t.unref(g),"focus-start-el":t.unref(o),onFocusAfterTrapped:t.unref(l),onFocusAfterReleased:t.unref(i),onFocusin:t.unref(c),onFocusoutPrevented:t.unref(d),onReleaseRequested:t.unref(u)},{default:t.withCtx(()=>[t.renderSlot(L.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var F1=_e(R1,[["__file","content.vue"]]);const L1=Ct(i1),Ca=Symbol("elTooltip"),jc=le({...Eb,...zc,appendTo:{type:J([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:J(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Cr(["ariaLabel"])}),Wc=le({...Nc,disabled:Boolean,trigger:{type:J([String,Array]),default:"hover"},triggerKeys:{type:J(Array),default:()=>[Pe.enter,Pe.numpadEnter,Pe.space]}}),{useModelToggleProps:Y1,useModelToggleEmits:z1,useModelToggle:j1}=g0("visible"),W1=le({...Tc,...Y1,...jc,...Wc,...Dc,showArrow:{type:Boolean,default:!0}}),H1=[...z1,"before-show","before-hide","show","hide","open","close"],U1=(e,n)=>ve(e)?e.includes(n):e===n,Kn=(e,n,r)=>a=>{U1(t.unref(e),n)&&r(a)},q1=t.defineComponent({name:"ElTooltipTrigger"}),G1=t.defineComponent({...q1,props:Wc,setup(e,{expose:n}){const r=e,a=me("tooltip"),{controlled:o,id:s,open:i,onOpen:l,onClose:c,onToggle:d}=t.inject(Ca,void 0),u=t.ref(null),f=()=>{if(t.unref(o)||r.disabled)return!0},p=t.toRef(r,"trigger"),g=Ht(f,Kn(p,"hover",l)),m=Ht(f,Kn(p,"hover",c)),h=Ht(f,Kn(p,"click",b=>{b.button===0&&d(b)})),w=Ht(f,Kn(p,"focus",l)),y=Ht(f,Kn(p,"focus",c)),k=Ht(f,Kn(p,"contextmenu",b=>{b.preventDefault(),d(b)})),C=Ht(f,b=>{const{code:_}=b;r.triggerKeys.includes(_)&&(b.preventDefault(),d(b))});return n({triggerRef:u}),(b,_)=>(t.openBlock(),t.createBlock(t.unref(m1),{id:t.unref(s),"virtual-ref":b.virtualRef,open:t.unref(i),"virtual-triggering":b.virtualTriggering,class:t.normalizeClass(t.unref(a).e("trigger")),onBlur:t.unref(y),onClick:t.unref(h),onContextmenu:t.unref(k),onFocus:t.unref(w),onMouseenter:t.unref(g),onMouseleave:t.unref(m),onKeydown:t.unref(C)},{default:t.withCtx(()=>[t.renderSlot(b.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var K1=_e(G1,[["__file","trigger.vue"]]);const Z1=le({to:{type:J([String,Object]),required:!0},disabled:Boolean});var J1=_e(t.defineComponent({__name:"teleport",props:Z1,setup(e){return(n,r)=>n.disabled?t.renderSlot(n.$slots,"default",{key:0}):(t.openBlock(),t.createBlock(t.Teleport,{key:1,to:n.to},[t.renderSlot(n.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const Hc=Ct(J1),X1=t.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),Q1=t.defineComponent({...X1,props:jc,setup(e,{expose:n}){const r=e,{selector:a}=ic(),o=me("tooltip"),s=t.ref(null);let i;const{controlled:l,id:c,open:d,trigger:u,onClose:f,onOpen:p,onShow:g,onHide:m,onBeforeShow:h,onBeforeHide:w}=t.inject(Ca,void 0),y=t.computed(()=>r.transition||`${o.namespace.value}-fade-in-linear`),k=t.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);t.onBeforeUnmount(()=>{i==null||i()});const C=t.computed(()=>t.unref(k)?!0:t.unref(d)),b=t.computed(()=>r.disabled?!1:t.unref(d)),_=t.computed(()=>r.appendTo||a.value),v=t.computed(()=>{var O;return(O=r.style)!=null?O:{}}),M=t.ref(!0),D=()=>{m(),M.value=!0},B=()=>{if(t.unref(l))return!0},P=Ht(B,()=>{r.enterable&&t.unref(u)==="hover"&&p()}),V=Ht(B,()=>{t.unref(u)==="hover"&&f()}),z=()=>{var O,$;($=(O=s.value)==null?void 0:O.updatePopper)==null||$.call(O),h==null||h()},L=()=>{w==null||w()},W=()=>{g(),i=yl(t.computed(()=>{var O;return(O=s.value)==null?void 0:O.popperContentRef}),()=>{if(t.unref(l))return;t.unref(u)!=="hover"&&f()})},A=()=>{r.virtualTriggering||f()};return t.watch(()=>t.unref(d),O=>{O?M.value=!1:i==null||i()},{flush:"post"}),t.watch(()=>r.content,()=>{var O,$;($=(O=s.value)==null?void 0:O.updatePopper)==null||$.call(O)}),n({contentRef:s}),(O,$)=>(t.openBlock(),t.createBlock(t.unref(Hc),{disabled:!O.teleported,to:t.unref(_)},{default:t.withCtx(()=>[t.createVNode(t.Transition,{name:t.unref(y),onAfterLeave:D,onBeforeEnter:z,onAfterEnter:W,onBeforeLeave:L},{default:t.withCtx(()=>[t.unref(C)?t.withDirectives((t.openBlock(),t.createBlock(t.unref(F1),t.mergeProps({key:0,id:t.unref(c),ref_key:"contentRef",ref:s},O.$attrs,{"aria-label":O.ariaLabel,"aria-hidden":M.value,"boundaries-padding":O.boundariesPadding,"fallback-placements":O.fallbackPlacements,"gpu-acceleration":O.gpuAcceleration,offset:O.offset,placement:O.placement,"popper-options":O.popperOptions,strategy:O.strategy,effect:O.effect,enterable:O.enterable,pure:O.pure,"popper-class":O.popperClass,"popper-style":[O.popperStyle,t.unref(v)],"reference-el":O.referenceEl,"trigger-target-el":O.triggerTargetEl,visible:t.unref(b),"z-index":O.zIndex,onMouseenter:t.unref(P),onMouseleave:t.unref(V),onBlur:A,onClose:t.unref(f)}),{default:t.withCtx(()=>[t.renderSlot(O.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[t.vShow,t.unref(b)]]):t.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var e_=_e(Q1,[["__file","content.vue"]]);const t_=t.defineComponent({name:"ElTooltip"}),n_=t.defineComponent({...t_,props:W1,emits:H1,setup(e,{expose:n,emit:r}){const a=e;vb();const o=Sr(),s=t.ref(),i=t.ref(),l=()=>{var y;const k=t.unref(s);k&&((y=k.popperInstanceRef)==null||y.update())},c=t.ref(!1),d=t.ref(),{show:u,hide:f,hasUpdateHandler:p}=j1({indicator:c,toggleReason:d}),{onOpen:g,onClose:m}=Mb({showAfter:t.toRef(a,"showAfter"),hideAfter:t.toRef(a,"hideAfter"),autoClose:t.toRef(a,"autoClose"),open:u,close:f}),h=t.computed(()=>pr(a.visible)&&!p.value);t.provide(Ca,{controlled:h,id:o,open:t.readonly(c),trigger:t.toRef(a,"trigger"),onOpen:y=>{g(y)},onClose:y=>{m(y)},onToggle:y=>{t.unref(c)?m(y):g(y)},onShow:()=>{r("show",d.value)},onHide:()=>{r("hide",d.value)},onBeforeShow:()=>{r("before-show",d.value)},onBeforeHide:()=>{r("before-hide",d.value)},updatePopper:l}),t.watch(()=>a.disabled,y=>{y&&c.value&&(c.value=!1)});const w=y=>{var k,C;const b=(C=(k=i.value)==null?void 0:k.contentRef)==null?void 0:C.popperContentRef,_=(y==null?void 0:y.relatedTarget)||document.activeElement;return b&&b.contains(_)};return t.onDeactivated(()=>c.value&&f()),n({popperRef:s,contentRef:i,isFocusInsideContent:w,updatePopper:l,onOpen:g,onClose:m,hide:f}),(y,k)=>(t.openBlock(),t.createBlock(t.unref(L1),{ref_key:"popperRef",ref:s,role:y.role},{default:t.withCtx(()=>[t.createVNode(K1,{disabled:y.disabled,trigger:y.trigger,"trigger-keys":y.triggerKeys,"virtual-ref":y.virtualRef,"virtual-triggering":y.virtualTriggering},{default:t.withCtx(()=>[y.$slots.default?t.renderSlot(y.$slots,"default",{key:0}):t.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),t.createVNode(e_,{ref_key:"contentRef",ref:i,"aria-label":y.ariaLabel,"boundaries-padding":y.boundariesPadding,content:y.content,disabled:y.disabled,effect:y.effect,enterable:y.enterable,"fallback-placements":y.fallbackPlacements,"hide-after":y.hideAfter,"gpu-acceleration":y.gpuAcceleration,offset:y.offset,persistent:y.persistent,"popper-class":y.popperClass,"popper-style":y.popperStyle,placement:y.placement,"popper-options":y.popperOptions,pure:y.pure,"raw-content":y.rawContent,"reference-el":y.referenceEl,"trigger-target-el":y.triggerTargetEl,"show-after":y.showAfter,strategy:y.strategy,teleported:y.teleported,transition:y.transition,"virtual-triggering":y.virtualTriggering,"z-index":y.zIndex,"append-to":y.appendTo},{default:t.withCtx(()=>[t.renderSlot(y.$slots,"content",{},()=>[y.rawContent?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:y.content},null,8,["innerHTML"])):(t.openBlock(),t.createElementBlock("span",{key:1},t.toDisplayString(y.content),1))]),y.showArrow?(t.openBlock(),t.createBlock(t.unref(d1),{key:0,"arrow-offset":y.arrowOffset},null,8,["arrow-offset"])):t.createCommentVNode("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var r_=_e(n_,[["__file","tooltip.vue"]]);const as=Ct(r_),Uc=Symbol("buttonGroupContextKey"),a_=(e,n)=>{Vl({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},t.computed(()=>e.type==="text"));const r=t.inject(Uc,void 0),a=mc("button"),{form:o}=jo(),s=vr(t.computed(()=>r==null?void 0:r.size)),i=zo(),l=t.ref(),c=t.useSlots(),d=t.computed(()=>e.type||(r==null?void 0:r.type)||""),u=t.computed(()=>{var m,h,w;return(w=(h=e.autoInsertSpace)!=null?h:(m=a.value)==null?void 0:m.autoInsertSpace)!=null?w:!1}),f=t.computed(()=>e.tag==="button"?{ariaDisabled:i.value||e.loading,disabled:i.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),p=t.computed(()=>{var m;const h=(m=c.default)==null?void 0:m.call(c);if(u.value&&(h==null?void 0:h.length)===1){const w=h[0];if((w==null?void 0:w.type)===t.Text){const y=w.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(y.trim())}}return!1});return{_disabled:i,_size:s,_type:d,_ref:l,_props:f,shouldAddSpace:p,handleClick:m=>{if(i.value||e.loading){m.stopPropagation();return}e.nativeType==="reset"&&(o==null||o.resetFields()),n("click",m)}}},os=le({size:Lo,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:Fn},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:Fn,default:()=>Nl},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:J([String,Object]),default:"button"}}),o_={click:e=>e instanceof MouseEvent};function qe(e,n){s_(e)&&(e="100%");var r=i_(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function va(e){return Math.min(1,Math.max(0,e))}function s_(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function i_(e){return typeof e=="string"&&e.indexOf("%")!==-1}function qc(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ea(e){return e<=1?"".concat(Number(e)*100,"%"):e}function xn(e){return e.length===1?"0"+e:String(e)}function l_(e,n,r){return{r:qe(e,255)*255,g:qe(n,255)*255,b:qe(r,255)*255}}function Gc(e,n,r){e=qe(e,255),n=qe(n,255),r=qe(r,255);var a=Math.max(e,n,r),o=Math.min(e,n,r),s=0,i=0,l=(a+o)/2;if(a===o)i=0,s=0;else{var c=a-o;switch(i=l>.5?c/(2-a-o):c/(a+o),a){case e:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-e)/c+2;break;case r:s=(e-n)/c+4;break}s/=6}return{h:s,s:i,l}}function ss(e,n,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(n-e)*(6*r):r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}function c_(e,n,r){var a,o,s;if(e=qe(e,360),n=qe(n,100),r=qe(r,100),n===0)o=r,s=r,a=r;else{var i=r<.5?r*(1+n):r+n-r*n,l=2*r-i;a=ss(l,i,e+1/3),o=ss(l,i,e),s=ss(l,i,e-1/3)}return{r:a*255,g:o*255,b:s*255}}function Kc(e,n,r){e=qe(e,255),n=qe(n,255),r=qe(r,255);var a=Math.max(e,n,r),o=Math.min(e,n,r),s=0,i=a,l=a-o,c=a===0?0:l/a;if(a===o)s=0;else{switch(a){case e:s=(n-r)/l+(n<r?6:0);break;case n:s=(r-e)/l+2;break;case r:s=(e-n)/l+4;break}s/=6}return{h:s,s:c,v:i}}function d_(e,n,r){e=qe(e,360)*6,n=qe(n,100),r=qe(r,100);var a=Math.floor(e),o=e-a,s=r*(1-n),i=r*(1-o*n),l=r*(1-(1-o)*n),c=a%6,d=[r,i,s,s,l,r][c],u=[l,r,r,i,s,s][c],f=[s,s,l,r,r,i][c];return{r:d*255,g:u*255,b:f*255}}function Zc(e,n,r,a){var o=[xn(Math.round(e).toString(16)),xn(Math.round(n).toString(16)),xn(Math.round(r).toString(16))];return a&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function f_(e,n,r,a,o){var s=[xn(Math.round(e).toString(16)),xn(Math.round(n).toString(16)),xn(Math.round(r).toString(16)),xn(u_(a))];return o&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function u_(e){return Math.round(parseFloat(e)*255).toString(16)}function Jc(e){return ct(e)/255}function ct(e){return parseInt(e,16)}function p_(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var is={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function m_(e){var n={r:0,g:0,b:0},r=1,a=null,o=null,s=null,i=!1,l=!1;return typeof e=="string"&&(e=y_(e)),typeof e=="object"&&(Gt(e.r)&&Gt(e.g)&&Gt(e.b)?(n=l_(e.r,e.g,e.b),i=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Gt(e.h)&&Gt(e.s)&&Gt(e.v)?(a=Ea(e.s),o=Ea(e.v),n=d_(e.h,a,o),i=!0,l="hsv"):Gt(e.h)&&Gt(e.s)&&Gt(e.l)&&(a=Ea(e.s),s=Ea(e.l),n=c_(e.h,a,s),i=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=qc(r),{ok:i,format:e.format||l,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}var h_="[-\\+]?\\d+%?",g_="[-\\+]?\\d*\\.\\d+%?",fn="(?:".concat(g_,")|(?:").concat(h_,")"),ls="[\\s|\\(]+(".concat(fn,")[,|\\s]+(").concat(fn,")[,|\\s]+(").concat(fn,")\\s*\\)?"),cs="[\\s|\\(]+(".concat(fn,")[,|\\s]+(").concat(fn,")[,|\\s]+(").concat(fn,")[,|\\s]+(").concat(fn,")\\s*\\)?"),Mt={CSS_UNIT:new RegExp(fn),rgb:new RegExp("rgb"+ls),rgba:new RegExp("rgba"+cs),hsl:new RegExp("hsl"+ls),hsla:new RegExp("hsla"+cs),hsv:new RegExp("hsv"+ls),hsva:new RegExp("hsva"+cs),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function y_(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(is[e])e=is[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=Mt.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=Mt.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Mt.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=Mt.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Mt.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=Mt.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Mt.hex8.exec(e),r?{r:ct(r[1]),g:ct(r[2]),b:ct(r[3]),a:Jc(r[4]),format:n?"name":"hex8"}:(r=Mt.hex6.exec(e),r?{r:ct(r[1]),g:ct(r[2]),b:ct(r[3]),format:n?"name":"hex"}:(r=Mt.hex4.exec(e),r?{r:ct(r[1]+r[1]),g:ct(r[2]+r[2]),b:ct(r[3]+r[3]),a:Jc(r[4]+r[4]),format:n?"name":"hex8"}:(r=Mt.hex3.exec(e),r?{r:ct(r[1]+r[1]),g:ct(r[2]+r[2]),b:ct(r[3]+r[3]),format:n?"name":"hex"}:!1)))))))))}function Gt(e){return!!Mt.CSS_UNIT.exec(String(e))}var b_=function(){function e(n,r){n===void 0&&(n=""),r===void 0&&(r={});var a;if(n instanceof e)return n;typeof n=="number"&&(n=p_(n)),this.originalInput=n;var o=m_(n);this.originalInput=n,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(a=r.format)!==null&&a!==void 0?a:o.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},e.prototype.getLuminance=function(){var n=this.toRgb(),r,a,o,s=n.r/255,i=n.g/255,l=n.b/255;return s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),.2126*r+.7152*a+.0722*o},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(n){return this.a=qc(n),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},e.prototype.toHsv=function(){var n=Kc(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},e.prototype.toHsvString=function(){var n=Kc(this.r,this.g,this.b),r=Math.round(n.h*360),a=Math.round(n.s*100),o=Math.round(n.v*100);return this.a===1?"hsv(".concat(r,", ").concat(a,"%, ").concat(o,"%)"):"hsva(".concat(r,", ").concat(a,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var n=Gc(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},e.prototype.toHslString=function(){var n=Gc(this.r,this.g,this.b),r=Math.round(n.h*360),a=Math.round(n.s*100),o=Math.round(n.l*100);return this.a===1?"hsl(".concat(r,", ").concat(a,"%, ").concat(o,"%)"):"hsla(".concat(r,", ").concat(a,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(n){return n===void 0&&(n=!1),Zc(this.r,this.g,this.b,n)},e.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},e.prototype.toHex8=function(n){return n===void 0&&(n=!1),f_(this.r,this.g,this.b,this.a,n)},e.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},e.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var n=Math.round(this.r),r=Math.round(this.g),a=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(r,", ").concat(a,")"):"rgba(".concat(n,", ").concat(r,", ").concat(a,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var n=function(r){return"".concat(Math.round(qe(r,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var n=function(r){return Math.round(qe(r,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+Zc(this.r,this.g,this.b,!1),r=0,a=Object.entries(is);r<a.length;r++){var o=a[r],s=o[0],i=o[1];if(n===i)return s}return!1},e.prototype.toString=function(n){var r=!!n;n=n??this.format;var a=!1,o=this.a<1&&this.a>=0,s=!r&&o&&(n.startsWith("hex")||n==="name");return s?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(a=this.toRgbString()),n==="prgb"&&(a=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(a=this.toHexString()),n==="hex3"&&(a=this.toHexString(!0)),n==="hex4"&&(a=this.toHex8String(!0)),n==="hex8"&&(a=this.toHex8String()),n==="name"&&(a=this.toName()),n==="hsl"&&(a=this.toHslString()),n==="hsv"&&(a=this.toHsvString()),a||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(n){n===void 0&&(n=10);var r=this.toHsl();return r.l+=n/100,r.l=va(r.l),new e(r)},e.prototype.brighten=function(n){n===void 0&&(n=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),new e(r)},e.prototype.darken=function(n){n===void 0&&(n=10);var r=this.toHsl();return r.l-=n/100,r.l=va(r.l),new e(r)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var r=this.toHsl();return r.s-=n/100,r.s=va(r.s),new e(r)},e.prototype.saturate=function(n){n===void 0&&(n=10);var r=this.toHsl();return r.s+=n/100,r.s=va(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var r=this.toHsl(),a=(r.h+n)%360;return r.h=a<0?360+a:a,new e(r)},e.prototype.mix=function(n,r){r===void 0&&(r=50);var a=this.toRgb(),o=new e(n).toRgb(),s=r/100,i={r:(o.r-a.r)*s+a.r,g:(o.g-a.g)*s+a.g,b:(o.b-a.b)*s+a.b,a:(o.a-a.a)*s+a.a};return new e(i)},e.prototype.analogous=function(n,r){n===void 0&&(n=6),r===void 0&&(r=30);var a=this.toHsl(),o=360/r,s=[this];for(a.h=(a.h-(o*n>>1)+720)%360;--n;)a.h=(a.h+o)%360,s.push(new e(a));return s},e.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new e(n)},e.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var r=this.toHsv(),a=r.h,o=r.s,s=r.v,i=[],l=1/n;n--;)i.push(new e({h:a,s:o,v:s})),s=(s+l)%1;return i},e.prototype.splitcomplement=function(){var n=this.toHsl(),r=n.h;return[this,new e({h:(r+72)%360,s:n.s,l:n.l}),new e({h:(r+216)%360,s:n.s,l:n.l})]},e.prototype.onBackground=function(n){var r=this.toRgb(),a=new e(n).toRgb(),o=r.a+a.a*(1-r.a);return new e({r:(r.r*r.a+a.r*a.a*(1-r.a))/o,g:(r.g*r.a+a.g*a.a*(1-r.a))/o,b:(r.b*r.a+a.b*a.a*(1-r.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(n){for(var r=this.toHsl(),a=r.h,o=[this],s=360/n,i=1;i<n;i++)o.push(new e({h:(a+i*s)%360,s:r.s,l:r.l}));return o},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}();function un(e,n=20){return e.mix("#141414",n).toString()}function w_(e){const n=zo(),r=me("button");return t.computed(()=>{let a={},o=e.color;if(o){const s=o.match(/var\((.*?)\)/);s&&(o=window.getComputedStyle(window.document.documentElement).getPropertyValue(s[1]));const i=new b_(o),l=e.dark?i.tint(20).toString():un(i,20);if(e.plain)a=r.cssVarBlock({"bg-color":e.dark?un(i,90):i.tint(90).toString(),"text-color":o,"border-color":e.dark?un(i,50):i.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":o,"hover-border-color":o,"active-bg-color":l,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":l}),n.value&&(a[r.cssVarBlockName("disabled-bg-color")]=e.dark?un(i,90):i.tint(90).toString(),a[r.cssVarBlockName("disabled-text-color")]=e.dark?un(i,50):i.tint(50).toString(),a[r.cssVarBlockName("disabled-border-color")]=e.dark?un(i,80):i.tint(80).toString());else{const c=e.dark?un(i,30):i.tint(30).toString(),d=i.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(a=r.cssVarBlock({"bg-color":o,"text-color":d,"border-color":o,"hover-bg-color":c,"hover-text-color":d,"hover-border-color":c,"active-bg-color":l,"active-border-color":l}),n.value){const u=e.dark?un(i,50):i.tint(50).toString();a[r.cssVarBlockName("disabled-bg-color")]=u,a[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,a[r.cssVarBlockName("disabled-border-color")]=u}}}return a})}const __=t.defineComponent({name:"ElButton"}),k_=t.defineComponent({...__,props:os,emits:o_,setup(e,{expose:n,emit:r}){const a=e,o=w_(a),s=me("button"),{_ref:i,_size:l,_type:c,_disabled:d,_props:u,shouldAddSpace:f,handleClick:p}=a_(a,r),g=t.computed(()=>[s.b(),s.m(c.value),s.m(l.value),s.is("disabled",d.value),s.is("loading",a.loading),s.is("plain",a.plain),s.is("round",a.round),s.is("circle",a.circle),s.is("text",a.text),s.is("link",a.link),s.is("has-bg",a.bg)]);return n({ref:i,size:l,type:c,disabled:d,shouldAddSpace:f}),(m,h)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m.tag),t.mergeProps({ref_key:"_ref",ref:i},t.unref(u),{class:t.unref(g),style:t.unref(o),onClick:t.unref(p)}),{default:t.withCtx(()=>[m.loading?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[m.$slots.loading?t.renderSlot(m.$slots,"loading",{key:0}):(t.openBlock(),t.createBlock(t.unref(he),{key:1,class:t.normalizeClass(t.unref(s).is("loading"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m.loadingIcon)))]),_:1},8,["class"]))],64)):m.icon||m.$slots.icon?(t.openBlock(),t.createBlock(t.unref(he),{key:1},{default:t.withCtx(()=>[m.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m.icon),{key:0})):t.renderSlot(m.$slots,"icon",{key:1})]),_:3})):t.createCommentVNode("v-if",!0),m.$slots.default?(t.openBlock(),t.createElementBlock("span",{key:2,class:t.normalizeClass({[t.unref(s).em("text","expand")]:t.unref(f)})},[t.renderSlot(m.$slots,"default")],2)):t.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var S_=_e(k_,[["__file","button.vue"]]);const C_={size:os.size,type:os.type},v_=t.defineComponent({name:"ElButtonGroup"}),E_=t.defineComponent({...v_,props:C_,setup(e){const n=e;t.provide(Uc,t.reactive({size:t.toRef(n,"size"),type:t.toRef(n,"type")}));const r=me("button");return(a,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(r).b("group"))},[t.renderSlot(a.$slots,"default")],2))}});var Xc=_e(E_,[["__file","button-group.vue"]]);const Zn=Ct(S_,{ButtonGroup:Xc});$l(Xc);var Kt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qc={exports:{}};(function(e,n){(function(r,a){e.exports=a()})(Kt,function(){var r=1e3,a=6e4,o=36e5,s="millisecond",i="second",l="minute",c="hour",d="day",u="week",f="month",p="quarter",g="year",m="date",h="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,k={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("_"),ordinal:function(W){var A=["th","st","nd","rd"],O=W%100;return"["+W+(A[(O-20)%10]||A[O]||A[0])+"]"}},C=function(W,A,O){var $=String(W);return!$||$.length>=A?W:""+Array(A+1-$.length).join(O)+W},b={s:C,z:function(W){var A=-W.utcOffset(),O=Math.abs(A),$=Math.floor(O/60),I=O%60;return(A<=0?"+":"-")+C($,2,"0")+":"+C(I,2,"0")},m:function W(A,O){if(A.date()<O.date())return-W(O,A);var $=12*(O.year()-A.year())+(O.month()-A.month()),I=A.clone().add($,f),E=O-I<0,N=A.clone().add($+(E?-1:1),f);return+(-($+(O-I)/(E?I-N:N-I))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:f,y:g,w:u,d,D:m,h:c,m:l,s:i,ms:s,Q:p}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},_="en",v={};v[_]=k;var M="$isDayjsObject",D=function(W){return W instanceof z||!(!W||!W[M])},B=function W(A,O,$){var I;if(!A)return _;if(typeof A=="string"){var E=A.toLowerCase();v[E]&&(I=E),O&&(v[E]=O,I=E);var N=A.split("-");if(!I&&N.length>1)return W(N[0])}else{var T=A.name;v[T]=A,I=T}return!$&&I&&(_=I),I||!$&&_},P=function(W,A){if(D(W))return W.clone();var O=typeof A=="object"?A:{};return O.date=W,O.args=arguments,new z(O)},V=b;V.l=B,V.i=D,V.w=function(W,A){return P(W,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var z=function(){function W(O){this.$L=B(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[M]=!0}var A=W.prototype;return A.parse=function(O){this.$d=function($){var I=$.date,E=$.utc;if(I===null)return new Date(NaN);if(V.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var N=I.match(w);if(N){var T=N[2]-1||0,R=(N[7]||"0").substring(0,3);return E?new Date(Date.UTC(N[1],T,N[3]||1,N[4]||0,N[5]||0,N[6]||0,R)):new Date(N[1],T,N[3]||1,N[4]||0,N[5]||0,N[6]||0,R)}}return new Date(I)}(O),this.init()},A.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},A.$utils=function(){return V},A.isValid=function(){return this.$d.toString()!==h},A.isSame=function(O,$){var I=P(O);return this.startOf($)<=I&&I<=this.endOf($)},A.isAfter=function(O,$){return P(O)<this.startOf($)},A.isBefore=function(O,$){return this.endOf($)<P(O)},A.$g=function(O,$,I){return V.u(O)?this[$]:this.set(I,O)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(O,$){var I=this,E=!!V.u($)||$,N=V.p(O),T=function(ne,se){var ie=V.w(I.$u?Date.UTC(I.$y,se,ne):new Date(I.$y,se,ne),I);return E?ie:ie.endOf(d)},R=function(ne,se){return V.w(I.toDate()[ne].apply(I.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(se)),I)},x=this.$W,j=this.$M,q=this.$D,re="set"+(this.$u?"UTC":"");switch(N){case g:return E?T(1,0):T(31,11);case f:return E?T(1,j):T(0,j+1);case u:var ae=this.$locale().weekStart||0,G=(x<ae?x+7:x)-ae;return T(E?q-G:q+(6-G),j);case d:case m:return R(re+"Hours",0);case c:return R(re+"Minutes",1);case l:return R(re+"Seconds",2);case i:return R(re+"Milliseconds",3);default:return this.clone()}},A.endOf=function(O){return this.startOf(O,!1)},A.$set=function(O,$){var I,E=V.p(O),N="set"+(this.$u?"UTC":""),T=(I={},I[d]=N+"Date",I[m]=N+"Date",I[f]=N+"Month",I[g]=N+"FullYear",I[c]=N+"Hours",I[l]=N+"Minutes",I[i]=N+"Seconds",I[s]=N+"Milliseconds",I)[E],R=E===d?this.$D+($-this.$W):$;if(E===f||E===g){var x=this.clone().set(m,1);x.$d[T](R),x.init(),this.$d=x.set(m,Math.min(this.$D,x.daysInMonth())).$d}else T&&this.$d[T](R);return this.init(),this},A.set=function(O,$){return this.clone().$set(O,$)},A.get=function(O){return this[V.p(O)]()},A.add=function(O,$){var I,E=this;O=Number(O);var N=V.p($),T=function(j){var q=P(E);return V.w(q.date(q.date()+Math.round(j*O)),E)};if(N===f)return this.set(f,this.$M+O);if(N===g)return this.set(g,this.$y+O);if(N===d)return T(1);if(N===u)return T(7);var R=(I={},I[l]=a,I[c]=o,I[i]=r,I)[N]||1,x=this.$d.getTime()+O*R;return V.w(x,this)},A.subtract=function(O,$){return this.add(-1*O,$)},A.format=function(O){var $=this,I=this.$locale();if(!this.isValid())return I.invalidDate||h;var E=O||"YYYY-MM-DDTHH:mm:ssZ",N=V.z(this),T=this.$H,R=this.$m,x=this.$M,j=I.weekdays,q=I.months,re=I.meridiem,ae=function(se,ie,Ce,ue){return se&&(se[ie]||se($,E))||Ce[ie].slice(0,ue)},G=function(se){return V.s(T%12||12,se,"0")},ne=re||function(se,ie,Ce){var ue=se<12?"AM":"PM";return Ce?ue.toLowerCase():ue};return E.replace(y,function(se,ie){return ie||function(Ce){switch(Ce){case"YY":return String($.$y).slice(-2);case"YYYY":return V.s($.$y,4,"0");case"M":return x+1;case"MM":return V.s(x+1,2,"0");case"MMM":return ae(I.monthsShort,x,q,3);case"MMMM":return ae(q,x);case"D":return $.$D;case"DD":return V.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ae(I.weekdaysMin,$.$W,j,2);case"ddd":return ae(I.weekdaysShort,$.$W,j,3);case"dddd":return j[$.$W];case"H":return String(T);case"HH":return V.s(T,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return ne(T,R,!0);case"A":return ne(T,R,!1);case"m":return String(R);case"mm":return V.s(R,2,"0");case"s":return String($.$s);case"ss":return V.s($.$s,2,"0");case"SSS":return V.s($.$ms,3,"0");case"Z":return N}return null}(se)||N.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(O,$,I){var E,N=this,T=V.p($),R=P(O),x=(R.utcOffset()-this.utcOffset())*a,j=this-R,q=function(){return V.m(N,R)};switch(T){case g:E=q()/12;break;case f:E=q();break;case p:E=q()/3;break;case u:E=(j-x)/6048e5;break;case d:E=(j-x)/864e5;break;case c:E=j/o;break;case l:E=j/a;break;case i:E=j/r;break;default:E=j}return I?E:V.a(E)},A.daysInMonth=function(){return this.endOf(f).$D},A.$locale=function(){return v[this.$L]},A.locale=function(O,$){if(!O)return this.$L;var I=this.clone(),E=B(O,$,!0);return E&&(I.$L=E),I},A.clone=function(){return V.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},W}(),L=z.prototype;return P.prototype=L,[["$ms",s],["$s",i],["$m",l],["$H",c],["$W",d],["$M",f],["$y",g],["$D",m]].forEach(function(W){L[W[1]]=function(A){return this.$g(A,W[0],W[1])}}),P.extend=function(W,A){return W.$i||(W(A,z,P),W.$i=!0),P},P.locale=B,P.isDayjs=D,P.unix=function(W){return P(1e3*W)},P.en=v[_],P.Ls=v,P.p={},P})})(Qc);var M_=Qc.exports;const X=Zt(M_);var ed={exports:{}};(function(e,n){(function(r,a){e.exports=a()})(Kt,function(){var r={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"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,s=/\d\d/,i=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,c={},d=function(w){return(w=+w)+(w>68?1900:2e3)},u=function(w){return function(y){this[w]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(w){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var k=y.match(/([+-]|\d\d)/g),C=60*k[1]+(+k[2]||0);return C===0?0:k[0]==="+"?-C:C}(w)}],p=function(w){var y=c[w];return y&&(y.indexOf?y:y.s.concat(y.f))},g=function(w,y){var k,C=c.meridiem;if(C){for(var b=1;b<=24;b+=1)if(w.indexOf(C(b,0,y))>-1){k=b>12;break}}else k=w===(y?"pm":"PM");return k},m={A:[l,function(w){this.afternoon=g(w,!1)}],a:[l,function(w){this.afternoon=g(w,!0)}],Q:[o,function(w){this.month=3*(w-1)+1}],S:[o,function(w){this.milliseconds=100*+w}],SS:[s,function(w){this.milliseconds=10*+w}],SSS:[/\d{3}/,function(w){this.milliseconds=+w}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[s,u("day")],Do:[l,function(w){var y=c.ordinal,k=w.match(/\d+/);if(this.day=k[0],y)for(var C=1;C<=31;C+=1)y(C).replace(/\[|\]/g,"")===w&&(this.day=C)}],w:[i,u("week")],ww:[s,u("week")],M:[i,u("month")],MM:[s,u("month")],MMM:[l,function(w){var y=p("months"),k=(p("monthsShort")||y.map(function(C){return C.slice(0,3)})).indexOf(w)+1;if(k<1)throw new Error;this.month=k%12||k}],MMMM:[l,function(w){var y=p("months").indexOf(w)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[s,function(w){this.year=d(w)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function h(w){var y,k;y=w,k=c&&c.formats;for(var C=(w=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,V,z){var L=z&&z.toUpperCase();return V||k[z]||r[z]||k[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(W,A,O){return A||O.slice(1)})})).match(a),b=C.length,_=0;_<b;_+=1){var v=C[_],M=m[v],D=M&&M[0],B=M&&M[1];C[_]=B?{regex:D,parser:B}:v.replace(/^\[|\]$/g,"")}return function(P){for(var V={},z=0,L=0;z<b;z+=1){var W=C[z];if(typeof W=="string")L+=W.length;else{var A=W.regex,O=W.parser,$=P.slice(L),I=A.exec($)[0];O.call(V,I),P=P.replace(I,"")}}return function(E){var N=E.afternoon;if(N!==void 0){var T=E.hours;N?T<12&&(E.hours+=12):T===12&&(E.hours=0),delete E.afternoon}}(V),V}}return function(w,y,k){k.p.customParseFormat=!0,w&&w.parseTwoDigitYear&&(d=w.parseTwoDigitYear);var C=y.prototype,b=C.parse;C.parse=function(_){var v=_.date,M=_.utc,D=_.args;this.$u=M;var B=D[1];if(typeof B=="string"){var P=D[2]===!0,V=D[3]===!0,z=P||V,L=D[2];V&&(L=D[2]),c=this.$locale(),!P&&L&&(c=k.Ls[L]),this.$d=function($,I,E,N){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*$);var T=h(I)($),R=T.year,x=T.month,j=T.day,q=T.hours,re=T.minutes,ae=T.seconds,G=T.milliseconds,ne=T.zone,se=T.week,ie=new Date,Ce=j||(R||x?1:ie.getDate()),ue=R||ie.getFullYear(),Ae=0;R&&!x||(Ae=x>0?x-1:ie.getMonth());var We,Ke=q||0,Ve=re||0,Je=ae||0,ce=G||0;return ne?new Date(Date.UTC(ue,Ae,Ce,Ke,Ve,Je,ce+60*ne.offset*1e3)):E?new Date(Date.UTC(ue,Ae,Ce,Ke,Ve,Je,ce)):(We=new Date(ue,Ae,Ce,Ke,Ve,Je,ce),se&&(We=N(We).week(se).toDate()),We)}catch{return new Date("")}}(v,B,M,k),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),z&&v!=this.format(B)&&(this.$d=new Date("")),c={}}else if(B instanceof Array)for(var W=B.length,A=1;A<=W;A+=1){D[1]=B[A-1];var O=k.apply(this,D);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}A===W&&(this.$d=new Date(""))}else b.call(this,_)}}})})(ed);var T_=ed.exports;const D_=Zt(T_),td=["hours","minutes","seconds"],nd="HH:mm:ss",Jn="YYYY-MM-DD",O_={date:Jn,dates:Jn,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${Jn} ${nd}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:Jn,datetimerange:`${Jn} ${nd}`},ds=(e,n)=>[e>0?e-1:void 0,e,e<n?e+1:void 0],rd=e=>Array.from(Array.from({length:e}).keys()),ad=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),od=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),sd=function(e,n){const r=El(e),a=El(n);return r&&a?e.getTime()===n.getTime():!r&&!a?e===n:!1},id=function(e,n){const r=ve(e),a=ve(n);return r&&a?e.length!==n.length?!1:e.every((o,s)=>sd(o,n[s])):!r&&!a?sd(e,n):!1},ld=function(e,n,r){const a=Tl(n)||n==="x"?X(e).locale(r):X(e,n).locale(r);return a.isValid()?a:void 0},cd=function(e,n,r){return Tl(n)?e:n==="x"?+e:X(e).locale(r).format(n)},fs=(e,n)=>{var r;const a=[],o=n==null?void 0:n();for(let s=0;s<e;s++)a.push((r=o==null?void 0:o.includes(s))!=null?r:!1);return a},dd=le({disabledHours:{type:J(Function)},disabledMinutes:{type:J(Function)},disabledSeconds:{type:J(Function)}}),x_=le({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),fd=le({id:{type:J([Array,String])},name:{type:J([Array,String])},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:J([String,Object]),default:To},editable:{type:Boolean,default:!0},prefixIcon:{type:J([String,Object]),default:""},size:Lo,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:J(Object),default:()=>({})},modelValue:{type:J([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:J([Date,Array])},defaultTime:{type:J([Date,Array])},isRange:Boolean,...dd,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:J([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:J(String),values:da,default:"bottom"},fallbackPlacements:{type:J(Array),default:["bottom","top","right","left"]},...Rb,...Cr(["ariaLabel"]),showNow:{type:Boolean,default:!0}}),N_=le({id:{type:J(Array)},name:{type:J(Array)},modelValue:{type:J([Array,String])},startPlaceholder:String,endPlaceholder:String}),P_=t.defineComponent({name:"PickerRangeTrigger",inheritAttrs:!1}),$_=t.defineComponent({...P_,props:N_,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(e,{expose:n,emit:r}){const a=Bl(),o=me("date"),s=me("range"),i=t.ref(),l=t.ref(),{wrapperRef:c,isFocused:d}=Yo(i),u=b=>{r("click",b)},f=b=>{r("mouseenter",b)},p=b=>{r("mouseleave",b)},g=b=>{r("mouseenter",b)},m=b=>{r("startInput",b)},h=b=>{r("endInput",b)},w=b=>{r("startChange",b)},y=b=>{r("endChange",b)};return n({focus:()=>{var b;(b=i.value)==null||b.focus()},blur:()=>{var b,_;(b=i.value)==null||b.blur(),(_=l.value)==null||_.blur()}}),(b,_)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"wrapperRef",ref:c,class:t.normalizeClass([t.unref(o).is("active",t.unref(d)),b.$attrs.class]),style:t.normalizeStyle(b.$attrs.style),onClick:u,onMouseenter:f,onMouseleave:p,onTouchstart:g},[t.renderSlot(b.$slots,"prefix"),t.createElementVNode("input",t.mergeProps(t.unref(a),{id:b.id&&b.id[0],ref_key:"inputRef",ref:i,name:b.name&&b.name[0],placeholder:b.startPlaceholder,value:b.modelValue&&b.modelValue[0],class:t.unref(s).b("input"),onInput:m,onChange:w}),null,16,["id","name","placeholder","value"]),t.renderSlot(b.$slots,"range-separator"),t.createElementVNode("input",t.mergeProps(t.unref(a),{id:b.id&&b.id[1],ref_key:"endInputRef",ref:l,name:b.name&&b.name[1],placeholder:b.endPlaceholder,value:b.modelValue&&b.modelValue[1],class:t.unref(s).b("input"),onInput:h,onChange:y}),null,16,["id","name","placeholder","value"]),t.renderSlot(b.$slots,"suffix")],38))}});var B_=_e($_,[["__file","picker-range-trigger.vue"]]);const V_=t.defineComponent({name:"Picker"}),I_=t.defineComponent({...V_,props:fd,emits:["update:modelValue","change","focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:n,emit:r}){const a=e,o=t.useAttrs(),{lang:s}=it(),i=me("date"),l=me("input"),c=me("range"),{form:d,formItem:u}=jo(),f=t.inject("ElPopperOptions",{}),{valueOnClear:p}=Fb(a,null),g=t.ref(),m=t.ref(),h=t.ref(!1),w=t.ref(!1),y=t.ref(null);let k=!1;const{isFocused:C,handleFocus:b,handleBlur:_}=Yo(m,{beforeFocus(){return a.readonly||E.value},afterFocus(){h.value=!0},beforeBlur(S){var K;return!k&&((K=g.value)==null?void 0:K.isFocusInsideContent(S))},afterBlur(){Ne(),h.value=!1,k=!1,a.validateEvent&&(u==null||u.validate("blur").catch(S=>Le(S)))}}),v=t.computed(()=>[i.b("editor"),i.bm("editor",a.type),l.e("wrapper"),i.is("disabled",E.value),i.is("active",h.value),c.b("editor"),Ke?c.bm("editor",Ke.value):"",o.class]),M=t.computed(()=>[l.e("icon"),c.e("close-icon"),G.value?"":c.e("close-icon--hidden")]);t.watch(h,S=>{S?t.nextTick(()=>{S&&(y.value=a.modelValue)}):(ce.value=null,t.nextTick(()=>{D(a.modelValue)}))});const D=(S,K)=>{(K||!id(S,y.value))&&(r("change",S),a.validateEvent&&(u==null||u.validate("change").catch(fe=>Le(fe))))},B=S=>{if(!id(a.modelValue,S)){let K;ve(S)?K=S.map(fe=>cd(fe,a.valueFormat,s.value)):S&&(K=cd(S,a.valueFormat,s.value)),r("update:modelValue",S&&K,s.value)}},P=S=>{r("keydown",S)},V=t.computed(()=>m.value?Array.from(m.value.$el.querySelectorAll("input")):[]),z=(S,K,fe)=>{const Ye=V.value;Ye.length&&(!fe||fe==="min"?(Ye[0].setSelectionRange(S,K),Ye[0].focus()):fe==="max"&&(Ye[1].setSelectionRange(S,K),Ye[1].focus()))},L=(S="",K=!1)=>{h.value=K;let fe;ve(S)?fe=S.map(Ye=>Ye.toDate()):fe=S&&S.toDate(),ce.value=null,B(fe)},W=()=>{w.value=!0},A=()=>{r("visible-change",!0)},O=()=>{w.value=!1,h.value=!1,r("visible-change",!1)},$=()=>{h.value=!0},I=()=>{h.value=!1},E=t.computed(()=>a.disabled||(d==null?void 0:d.disabled)),N=t.computed(()=>{let S;if(se.value?Be.value.getDefaultValue&&(S=Be.value.getDefaultValue()):ve(a.modelValue)?S=a.modelValue.map(K=>ld(K,a.valueFormat,s.value)):S=ld(a.modelValue,a.valueFormat,s.value),Be.value.getRangeAvailableTime){const K=Be.value.getRangeAvailableTime(S);Rg(K,S)||(S=K,se.value||B(ve(S)?S.map(fe=>fe.toDate()):S.toDate()))}return ve(S)&&S.some(K=>!K)&&(S=[]),S}),T=t.computed(()=>{if(!Be.value.panelReady)return"";const S=wt(N.value);return ve(ce.value)?[ce.value[0]||S&&S[0]||"",ce.value[1]||S&&S[1]||""]:ce.value!==null?ce.value:!x.value&&se.value||!h.value&&se.value?"":S?j.value||q.value||re.value?S.join(", "):S:""}),R=t.computed(()=>a.type.includes("time")),x=t.computed(()=>a.type.startsWith("time")),j=t.computed(()=>a.type==="dates"),q=t.computed(()=>a.type==="months"),re=t.computed(()=>a.type==="years"),ae=t.computed(()=>a.prefixIcon||(R.value?Ly:Vy)),G=t.ref(!1),ne=S=>{a.readonly||E.value||(G.value&&(S.stopPropagation(),Be.value.handleClear?Be.value.handleClear():B(p.value),D(p.value,!0),G.value=!1,O()),r("clear"))},se=t.computed(()=>{const{modelValue:S}=a;return!S||ve(S)&&!S.filter(Boolean).length}),ie=async S=>{var K;a.readonly||E.value||(((K=S.target)==null?void 0:K.tagName)!=="INPUT"||C.value)&&(h.value=!0)},Ce=()=>{a.readonly||E.value||!se.value&&a.clearable&&(G.value=!0)},ue=()=>{G.value=!1},Ae=S=>{var K;a.readonly||E.value||(((K=S.touches[0].target)==null?void 0:K.tagName)!=="INPUT"||C.value)&&(h.value=!0)},We=t.computed(()=>a.type.includes("range")),Ke=vr(),Ve=t.computed(()=>{var S,K;return(K=(S=t.unref(g))==null?void 0:S.popperRef)==null?void 0:K.contentRef}),Je=yl(m,S=>{const K=t.unref(Ve),fe=Ut(m);K&&(S.target===K||S.composedPath().includes(K))||S.target===fe||fe&&S.composedPath().includes(fe)||(h.value=!1)});t.onBeforeUnmount(()=>{Je==null||Je()});const ce=t.ref(null),Ne=()=>{if(ce.value){const S=Re(T.value);S&&nt(S)&&(B(ve(S)?S.map(K=>K.toDate()):S.toDate()),ce.value=null)}ce.value===""&&(B(p.value),D(p.value),ce.value=null)},Re=S=>S?Be.value.parseUserInput(S):null,wt=S=>S?Be.value.formatToString(S):null,nt=S=>Be.value.isValidValue(S),U=async S=>{if(a.readonly||E.value)return;const{code:K}=S;if(P(S),K===Pe.esc){h.value===!0&&(h.value=!1,S.preventDefault(),S.stopPropagation());return}if(K===Pe.down&&(Be.value.handleFocusPicker&&(S.preventDefault(),S.stopPropagation()),h.value===!1&&(h.value=!0,await t.nextTick()),Be.value.handleFocusPicker)){Be.value.handleFocusPicker();return}if(K===Pe.tab){k=!0;return}if(K===Pe.enter||K===Pe.numpadEnter){(ce.value===null||ce.value===""||nt(Re(T.value)))&&(Ne(),h.value=!1),S.stopPropagation();return}if(ce.value){S.stopPropagation();return}Be.value.handleKeydownInput&&Be.value.handleKeydownInput(S)},be=S=>{ce.value=S,h.value||(h.value=!0)},Ze=S=>{const K=S.target;ce.value?ce.value=[K.value,ce.value[1]]:ce.value=[K.value,null]},rt=S=>{const K=S.target;ce.value?ce.value=[ce.value[0],K.value]:ce.value=[null,K.value]},Xe=()=>{var S;const K=ce.value,fe=Re(K&&K[0]),Ye=t.unref(N);if(fe&&fe.isValid()){ce.value=[wt(fe),((S=T.value)==null?void 0:S[1])||null];const Vn=[fe,Ye&&(Ye[1]||null)];nt(Vn)&&(B(Vn),ce.value=null)}},Yr=()=>{var S;const K=t.unref(ce),fe=Re(K&&K[1]),Ye=t.unref(N);if(fe&&fe.isValid()){ce.value=[((S=t.unref(T))==null?void 0:S[0])||null,wt(fe)];const Vn=[Ye&&Ye[0],fe];nt(Vn)&&(B(Vn),ce.value=null)}},Be=t.ref({}),bn=S=>{Be.value[S[0]]=S[1],Be.value.panelReady=!0},F=S=>{r("calendar-change",S)},ee=(S,K,fe)=>{r("panel-change",S,K,fe)},Y=()=>{var S;(S=m.value)==null||S.focus()},oe=()=>{var S;(S=m.value)==null||S.blur()};return t.provide("EP_PICKER_BASE",{props:a}),n({focus:Y,blur:oe,handleOpen:$,handleClose:I,onPick:L}),(S,K)=>(t.openBlock(),t.createBlock(t.unref(as),t.mergeProps({ref_key:"refPopper",ref:g,visible:h.value,effect:"light",pure:"",trigger:"click"},S.$attrs,{role:"dialog",teleported:"",transition:`${t.unref(i).namespace.value}-zoom-in-top`,"popper-class":[`${t.unref(i).namespace.value}-picker__popper`,S.popperClass],"popper-options":t.unref(f),"fallback-placements":S.fallbackPlacements,"gpu-acceleration":!1,placement:S.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:W,onShow:A,onHide:O}),{default:t.withCtx(()=>[t.unref(We)?(t.openBlock(),t.createBlock(B_,{key:1,id:S.id,ref_key:"inputRef",ref:m,"model-value":t.unref(T),name:S.name,disabled:t.unref(E),readonly:!S.editable||S.readonly,"start-placeholder":S.startPlaceholder,"end-placeholder":S.endPlaceholder,class:t.normalizeClass(t.unref(v)),style:t.normalizeStyle(S.$attrs.style),"aria-label":S.ariaLabel,tabindex:S.tabindex,autocomplete:"off",role:"combobox",onClick:ie,onFocus:t.unref(b),onBlur:t.unref(_),onStartInput:Ze,onStartChange:Xe,onEndInput:rt,onEndChange:Yr,onMousedown:ie,onMouseenter:Ce,onMouseleave:ue,onTouchstartPassive:Ae,onKeydown:U},{prefix:t.withCtx(()=>[t.unref(ae)?(t.openBlock(),t.createBlock(t.unref(he),{key:0,class:t.normalizeClass([t.unref(l).e("icon"),t.unref(c).e("icon")])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(ae))))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)]),"range-separator":t.withCtx(()=>[t.renderSlot(S.$slots,"range-separator",{},()=>[t.createElementVNode("span",{class:t.normalizeClass(t.unref(c).b("separator"))},t.toDisplayString(S.rangeSeparator),3)])]),suffix:t.withCtx(()=>[S.clearIcon?(t.openBlock(),t.createBlock(t.unref(he),{key:0,class:t.normalizeClass(t.unref(M)),onMousedown:t.withModifiers(t.unref(Pt),["prevent"]),onClick:ne},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(S.clearIcon)))]),_:1},8,["class","onMousedown"])):t.createCommentVNode("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(t.openBlock(),t.createBlock(t.unref(It),{key:0,id:S.id,ref_key:"inputRef",ref:m,"container-role":"combobox","model-value":t.unref(T),name:S.name,size:t.unref(Ke),disabled:t.unref(E),placeholder:S.placeholder,class:t.normalizeClass([t.unref(i).b("editor"),t.unref(i).bm("editor",S.type),S.$attrs.class]),style:t.normalizeStyle(S.$attrs.style),readonly:!S.editable||S.readonly||t.unref(j)||t.unref(q)||t.unref(re)||S.type==="week","aria-label":S.ariaLabel,tabindex:S.tabindex,"validate-event":!1,onInput:be,onFocus:t.unref(b),onBlur:t.unref(_),onKeydown:U,onChange:Ne,onMousedown:ie,onMouseenter:Ce,onMouseleave:ue,onTouchstartPassive:Ae,onClick:t.withModifiers(()=>{},["stop"])},{prefix:t.withCtx(()=>[t.unref(ae)?(t.openBlock(),t.createBlock(t.unref(he),{key:0,class:t.normalizeClass(t.unref(l).e("icon")),onMousedown:t.withModifiers(ie,["prevent"]),onTouchstartPassive:Ae},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(ae))))]),_:1},8,["class","onMousedown"])):t.createCommentVNode("v-if",!0)]),suffix:t.withCtx(()=>[G.value&&S.clearIcon?(t.openBlock(),t.createBlock(t.unref(he),{key:0,class:t.normalizeClass(`${t.unref(l).e("icon")} clear-icon`),onMousedown:t.withModifiers(t.unref(Pt),["prevent"]),onClick:ne},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(S.clearIcon)))]),_:1},8,["class","onMousedown"])):t.createCommentVNode("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur","onClick"]))]),content:t.withCtx(()=>[t.renderSlot(S.$slots,"default",{visible:h.value,actualVisible:w.value,parsedValue:t.unref(N),format:S.format,dateFormat:S.dateFormat,timeFormat:S.timeFormat,unlinkPanels:S.unlinkPanels,type:S.type,defaultValue:S.defaultValue,showNow:S.showNow,onPick:L,onSelectRange:z,onSetPickerOption:bn,onCalendarChange:F,onPanelChange:ee,onMousedown:t.withModifiers(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var A_=_e(I_,[["__file","picker.vue"]]);const R_=le({...x_,datetimeRole:String,parsedValue:{type:J(Object)}}),F_=({getAvailableHours:e,getAvailableMinutes:n,getAvailableSeconds:r})=>{const a=(i,l,c,d)=>{const u={hour:e,minute:n,second:r};let f=i;return["hour","minute","second"].forEach(p=>{if(u[p]){let g;const m=u[p];switch(p){case"minute":{g=m(f.hour(),l,d);break}case"second":{g=m(f.hour(),f.minute(),l,d);break}default:{g=m(l,d);break}}if(g!=null&&g.length&&!g.includes(f[p]())){const h=c?0:g.length-1;f=f[p](g[h])}}}),f},o={};return{timePickerOptions:o,getAvailableTime:a,onSetOption:([i,l])=>{o[i]=l}}},us=e=>{const n=(a,o)=>a||o,r=a=>a!==!0;return e.map(n).filter(r)},ud=(e,n,r)=>({getHoursList:(i,l)=>fs(24,e&&(()=>e==null?void 0:e(i,l))),getMinutesList:(i,l,c)=>fs(60,n&&(()=>n==null?void 0:n(i,l,c))),getSecondsList:(i,l,c,d)=>fs(60,r&&(()=>r==null?void 0:r(i,l,c,d)))}),L_=(e,n,r)=>{const{getHoursList:a,getMinutesList:o,getSecondsList:s}=ud(e,n,r);return{getAvailableHours:(d,u)=>us(a(d,u)),getAvailableMinutes:(d,u,f)=>us(o(d,u,f)),getAvailableSeconds:(d,u,f,p)=>us(s(d,u,f,p))}},Y_=e=>{const n=t.ref(e.parsedValue);return t.watch(()=>e.visible,r=>{r||(n.value=e.parsedValue)}),n},pn=new Map;if(Fe){let e;document.addEventListener("mousedown",n=>e=n),document.addEventListener("mouseup",n=>{if(e){for(const r of pn.values())for(const{documentHandler:a}of r)a(n,e);e=void 0}})}function pd(e,n){let r=[];return ve(n.arg)?r=n.arg:Cn(n.arg)&&r.push(n.arg),function(a,o){const s=n.instance.popperRef,i=a.target,l=o==null?void 0:o.target,c=!n||!n.instance,d=!i||!l,u=e.contains(i)||e.contains(l),f=e===i,p=r.length&&r.some(m=>m==null?void 0:m.contains(i))||r.length&&r.includes(l),g=s&&(s.contains(i)||s.contains(l));c||d||u||f||p||g||n.value(a,o)}}const ps={beforeMount(e,n){pn.has(e)||pn.set(e,[]),pn.get(e).push({documentHandler:pd(e,n),bindingFn:n.value})},updated(e,n){pn.has(e)||pn.set(e,[]);const r=pn.get(e),a=r.findIndex(s=>s.bindingFn===n.oldValue),o={documentHandler:pd(e,n),bindingFn:n.value};a>=0?r.splice(a,1,o):r.push(o)},unmounted(e){pn.delete(e)}},z_=100,j_=600,md={beforeMount(e,n){const r=n.value,{interval:a=z_,delay:o=j_}=Ue(r)?{}:r;let s,i;const l=()=>Ue(r)?r():r.handler(),c=()=>{i&&(clearTimeout(i),i=void 0),s&&(clearInterval(s),s=void 0)};e.addEventListener("mousedown",d=>{d.button===0&&(c(),l(),document.addEventListener("mouseup",()=>c(),{once:!0}),i=setTimeout(()=>{s=setInterval(()=>{l()},a)},o))})}},W_=le({role:{type:String,required:!0},spinnerDate:{type:J(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:J(String),default:""},...dd});var H_=_e(t.defineComponent({__name:"basic-time-spinner",props:W_,emits:["change","select-range","set-option"],setup(e,{emit:n}){const r=e,a=t.inject("EP_PICKER_BASE"),{isRange:o}=a.props,s=me("time"),{getHoursList:i,getMinutesList:l,getSecondsList:c}=ud(r.disabledHours,r.disabledMinutes,r.disabledSeconds);let d=!1;const u=t.ref(),f=t.ref(),p=t.ref(),g=t.ref(),m={hours:f,minutes:p,seconds:g},h=t.computed(()=>r.showSeconds?td:td.slice(0,2)),w=t.computed(()=>{const{spinnerDate:T}=r,R=T.hour(),x=T.minute(),j=T.second();return{hours:R,minutes:x,seconds:j}}),y=t.computed(()=>{const{hours:T,minutes:R}=t.unref(w),{role:x,spinnerDate:j}=r,q=o?void 0:j;return{hours:i(x,q),minutes:l(T,x,q),seconds:c(T,R,x,q)}}),k=t.computed(()=>{const{hours:T,minutes:R,seconds:x}=t.unref(w);return{hours:ds(T,23),minutes:ds(R,59),seconds:ds(x,59)}}),C=Vg(T=>{d=!1,v(T)},200),b=T=>{if(!!!r.amPmMode)return"";const x=r.amPmMode==="A";let j=T<12?" am":" pm";return x&&(j=j.toUpperCase()),j},_=T=>{let R;switch(T){case"hours":R=[0,2];break;case"minutes":R=[3,5];break;case"seconds":R=[6,8];break}const[x,j]=R;n("select-range",x,j),u.value=T},v=T=>{B(T,t.unref(w)[T])},M=()=>{v("hours"),v("minutes"),v("seconds")},D=T=>T.querySelector(`.${s.namespace.value}-scrollbar__wrap`),B=(T,R)=>{if(r.arrowControl)return;const x=t.unref(m[T]);x&&x.$el&&(D(x.$el).scrollTop=Math.max(0,R*P(T)))},P=T=>{const R=t.unref(m[T]),x=R==null?void 0:R.$el.querySelector("li");return x&&Number.parseFloat(xl(x,"height"))||0},V=()=>{L(1)},z=()=>{L(-1)},L=T=>{u.value||_("hours");const R=u.value,x=t.unref(w)[R],j=u.value==="hours"?24:60,q=W(R,x,T,j);A(R,q),B(R,q),t.nextTick(()=>_(R))},W=(T,R,x,j)=>{let q=(R+x+j)%j;const re=t.unref(y)[T];for(;re[q]&&q!==R;)q=(q+x+j)%j;return q},A=(T,R)=>{if(t.unref(y)[T][R])return;const{hours:q,minutes:re,seconds:ae}=t.unref(w);let G;switch(T){case"hours":G=r.spinnerDate.hour(R).minute(re).second(ae);break;case"minutes":G=r.spinnerDate.hour(q).minute(R).second(ae);break;case"seconds":G=r.spinnerDate.hour(q).minute(re).second(R);break}n("change",G)},O=(T,{value:R,disabled:x})=>{x||(A(T,R),_(T),B(T,R))},$=T=>{const R=t.unref(m[T]);if(!R)return;d=!0,C(T);const x=Math.min(Math.round((D(R.$el).scrollTop-(I(T)*.5-10)/P(T)+3)/P(T)),T==="hours"?23:59);A(T,x)},I=T=>t.unref(m[T]).$el.offsetHeight,E=()=>{const T=R=>{const x=t.unref(m[R]);x&&x.$el&&(D(x.$el).onscroll=()=>{$(R)})};T("hours"),T("minutes"),T("seconds")};t.onMounted(()=>{t.nextTick(()=>{!r.arrowControl&&E(),M(),r.role==="start"&&_("hours")})});const N=(T,R)=>{m[R].value=T??void 0};return n("set-option",[`${r.role}_scrollDown`,L]),n("set-option",[`${r.role}_emitSelectRange`,_]),t.watch(()=>r.spinnerDate,()=>{d||M()}),(T,R)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(s).b("spinner"),{"has-seconds":T.showSeconds}])},[T.arrowControl?t.createCommentVNode("v-if",!0):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(h),x=>(t.openBlock(),t.createBlock(t.unref(a1),{key:x,ref_for:!0,ref:j=>N(j,x),class:t.normalizeClass(t.unref(s).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":t.unref(s).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:j=>_(x),onMousemove:j=>v(x)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(y)[x],(j,q)=>(t.openBlock(),t.createElementBlock("li",{key:q,class:t.normalizeClass([t.unref(s).be("spinner","item"),t.unref(s).is("active",q===t.unref(w)[x]),t.unref(s).is("disabled",j)]),onClick:re=>O(x,{value:q,disabled:j})},[x==="hours"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(("0"+(T.amPmMode?q%12||12:q)).slice(-2))+t.toDisplayString(b(q)),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(("0"+q).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),T.arrowControl?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(t.unref(h),x=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass([t.unref(s).be("spinner","wrapper"),t.unref(s).is("arrow")]),onMouseenter:j=>_(x)},[t.withDirectives((t.openBlock(),t.createBlock(t.unref(he),{class:t.normalizeClass(["arrow-up",t.unref(s).be("spinner","arrow")])},{default:t.withCtx(()=>[t.createVNode(t.unref($y))]),_:1},8,["class"])),[[t.unref(md),z]]),t.withDirectives((t.openBlock(),t.createBlock(t.unref(he),{class:t.normalizeClass(["arrow-down",t.unref(s).be("spinner","arrow")])},{default:t.withCtx(()=>[t.createVNode(t.unref(Oy))]),_:1},8,["class"])),[[t.unref(md),V]]),t.createElementVNode("ul",{class:t.normalizeClass(t.unref(s).be("spinner","list"))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(k)[x],(j,q)=>(t.openBlock(),t.createElementBlock("li",{key:q,class:t.normalizeClass([t.unref(s).be("spinner","item"),t.unref(s).is("active",j===t.unref(w)[x]),t.unref(s).is("disabled",t.unref(y)[x][j])])},[t.unref(ot)(j)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[x==="hours"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(("0"+(T.amPmMode?j%12||12:j)).slice(-2))+t.toDisplayString(b(j)),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(("0"+j).slice(-2)),1)],64))],64)):t.createCommentVNode("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):t.createCommentVNode("v-if",!0)],2))}}),[["__file","basic-time-spinner.vue"]]),ms=_e(t.defineComponent({__name:"panel-time-pick",props:R_,emits:["pick","select-range","set-picker-option"],setup(e,{emit:n}){const r=e,a=t.inject("EP_PICKER_BASE"),{arrowControl:o,disabledHours:s,disabledMinutes:i,disabledSeconds:l,defaultValue:c}=a.props,{getAvailableHours:d,getAvailableMinutes:u,getAvailableSeconds:f}=L_(s,i,l),p=me("time"),{t:g,lang:m}=it(),h=t.ref([0,2]),w=Y_(r),y=t.computed(()=>Ml(r.actualVisible)?`${p.namespace.value}-zoom-in-top`:""),k=t.computed(()=>r.format.includes("ss")),C=t.computed(()=>r.format.includes("A")?"A":r.format.includes("a")?"a":""),b=I=>{const E=X(I).locale(m.value),N=W(E);return E.isSame(N)},_=()=>{n("pick",w.value,!1)},v=(I=!1,E=!1)=>{E||n("pick",r.parsedValue,I)},M=I=>{if(!r.visible)return;const E=W(I).millisecond(0);n("pick",E,!0)},D=(I,E)=>{n("select-range",I,E),h.value=[I,E]},B=I=>{const E=[0,3].concat(k.value?[6]:[]),N=["hours","minutes"].concat(k.value?["seconds"]:[]),R=(E.indexOf(h.value[0])+I+E.length)%E.length;V.start_emitSelectRange(N[R])},P=I=>{const E=I.code,{left:N,right:T,up:R,down:x}=Pe;if([N,T].includes(E)){B(E===N?-1:1),I.preventDefault();return}if([R,x].includes(E)){const j=E===R?-1:1;V.start_scrollDown(j),I.preventDefault();return}},{timePickerOptions:V,onSetOption:z,getAvailableTime:L}=F_({getAvailableHours:d,getAvailableMinutes:u,getAvailableSeconds:f}),W=I=>L(I,r.datetimeRole||"",!0),A=I=>I?X(I,r.format).locale(m.value):null,O=I=>I?I.format(r.format):null,$=()=>X(c).locale(m.value);return n("set-picker-option",["isValidValue",b]),n("set-picker-option",["formatToString",O]),n("set-picker-option",["parseUserInput",A]),n("set-picker-option",["handleKeydownInput",P]),n("set-picker-option",["getRangeAvailableTime",W]),n("set-picker-option",["getDefaultValue",$]),(I,E)=>(t.openBlock(),t.createBlock(t.Transition,{name:t.unref(y)},{default:t.withCtx(()=>[I.actualVisible||I.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(p).b("panel"))},[t.createElementVNode("div",{class:t.normalizeClass([t.unref(p).be("panel","content"),{"has-seconds":t.unref(k)}])},[t.createVNode(H_,{ref:"spinner",role:I.datetimeRole||"start","arrow-control":t.unref(o),"show-seconds":t.unref(k),"am-pm-mode":t.unref(C),"spinner-date":I.parsedValue,"disabled-hours":t.unref(s),"disabled-minutes":t.unref(i),"disabled-seconds":t.unref(l),onChange:M,onSetOption:t.unref(z),onSelectRange:D},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),t.createElementVNode("div",{class:t.normalizeClass(t.unref(p).be("panel","footer"))},[t.createElementVNode("button",{type:"button",class:t.normalizeClass([t.unref(p).be("panel","btn"),"cancel"]),onClick:_},t.toDisplayString(t.unref(g)("el.datepicker.cancel")),3),t.createElementVNode("button",{type:"button",class:t.normalizeClass([t.unref(p).be("panel","btn"),"confirm"]),onClick:N=>v()},t.toDisplayString(t.unref(g)("el.datepicker.confirm")),11,["onClick"])],2)],2)):t.createCommentVNode("v-if",!0)]),_:1},8,["name"]))}}),[["__file","panel-time-pick.vue"]]),hd={exports:{}};(function(e,n){(function(r,a){e.exports=a()})(Kt,function(){return function(r,a,o){var s=a.prototype,i=function(f){return f&&(f.indexOf?f:f.s)},l=function(f,p,g,m,h){var w=f.name?f:f.$locale(),y=i(w[p]),k=i(w[g]),C=y||k.map(function(_){return _.slice(0,m)});if(!h)return C;var b=w.weekStart;return C.map(function(_,v){return C[(v+(b||0))%7]})},c=function(){return o.Ls[o.locale()]},d=function(f,p){return f.formats[p]||function(g){return g.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(m,h,w){return h||w.slice(1)})}(f.formats[p.toUpperCase()])},u=function(){var f=this;return{months:function(p){return p?p.format("MMMM"):l(f,"months")},monthsShort:function(p){return p?p.format("MMM"):l(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(p){return p?p.format("dddd"):l(f,"weekdays")},weekdaysMin:function(p){return p?p.format("dd"):l(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(p){return p?p.format("ddd"):l(f,"weekdaysShort","weekdays",3)},longDateFormat:function(p){return d(f.$locale(),p)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};s.localeData=function(){return u.bind(this)()},o.localeData=function(){var f=c();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return o.weekdays()},weekdaysShort:function(){return o.weekdaysShort()},weekdaysMin:function(){return o.weekdaysMin()},months:function(){return o.months()},monthsShort:function(){return o.monthsShort()},longDateFormat:function(p){return d(f,p)},meridiem:f.meridiem,ordinal:f.ordinal}},o.months=function(){return l(c(),"months")},o.monthsShort=function(){return l(c(),"monthsShort","months",3)},o.weekdays=function(f){return l(c(),"weekdays",null,null,f)},o.weekdaysShort=function(f){return l(c(),"weekdaysShort","weekdays",3,f)},o.weekdaysMin=function(f){return l(c(),"weekdaysMin","weekdays",2,f)}}})})(hd);var U_=hd.exports;const q_=Zt(U_);var gd={exports:{}};(function(e,n){(function(r,a){e.exports=a()})(Kt,function(){return function(r,a){var o=a.prototype,s=o.format;o.format=function(i){var l=this,c=this.$locale();if(!this.isValid())return s.bind(this)(i);var d=this.$utils(),u=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(f){switch(f){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return c.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return c.ordinal(l.week(),"W");case"w":case"ww":return d.s(l.week(),f==="w"?1:2,"0");case"W":case"WW":return d.s(l.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return d.s(String(l.$H===0?24:l.$H),f==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return f}});return s.bind(this)(u)}}})})(gd);var G_=gd.exports;const K_=Zt(G_);var yd={exports:{}};(function(e,n){(function(r,a){e.exports=a()})(Kt,function(){var r="week",a="year";return function(o,s,i){var l=s.prototype;l.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 u=i(this).startOf(a).add(1,a).date(d),f=i(this).endOf(r);if(u.isBefore(f))return 1}var p=i(this).startOf(a).date(d).startOf(r).subtract(1,"millisecond"),g=this.diff(p,r,!0);return g<0?i(this).startOf("week").week():Math.ceil(g)},l.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(yd);var Z_=yd.exports;const J_=Zt(Z_);var bd={exports:{}};(function(e,n){(function(r,a){e.exports=a()})(Kt,function(){return function(r,a){a.prototype.weekYear=function(){var o=this.month(),s=this.week(),i=this.year();return s===1&&o===11?i+1:o===0&&s>=52?i-1:i}}})})(bd);var X_=bd.exports;const Q_=Zt(X_);var wd={exports:{}};(function(e,n){(function(r,a){e.exports=a()})(Kt,function(){return function(r,a,o){a.prototype.dayOfYear=function(s){var i=Math.round((o(this).startOf("day")-o(this).startOf("year"))/864e5)+1;return s==null?i:this.add(s-i,"day")}}})})(wd);var ek=wd.exports;const tk=Zt(ek);var _d={exports:{}};(function(e,n){(function(r,a){e.exports=a()})(Kt,function(){return function(r,a){a.prototype.isSameOrAfter=function(o,s){return this.isSame(o,s)||this.isAfter(o,s)}}})})(_d);var nk=_d.exports;const rk=Zt(nk);var kd={exports:{}};(function(e,n){(function(r,a){e.exports=a()})(Kt,function(){return function(r,a){a.prototype.isSameOrBefore=function(o,s){return this.isSame(o,s)||this.isBefore(o,s)}}})})(kd);var ak=kd.exports;const ok=Zt(ak),Ma=Symbol(),sk=le({...fd,type:{type:J(String),default:"date"}}),ik=["date","dates","year","years","month","months","week","range"],hs=le({disabledDate:{type:J(Function)},date:{type:J(Object),required:!0},minDate:{type:J(Object)},maxDate:{type:J(Object)},parsedValue:{type:J([Object,Array])},rangeState:{type:J(Object),default:()=>({endDate:null,selecting:!1})}}),Sd=le({type:{type:J(String),required:!0,values:e0},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0}}),gs=le({unlinkPanels:Boolean,parsedValue:{type:J(Array)}}),ys=e=>({type:String,values:ik,default:e}),lk=le({...Sd,parsedValue:{type:J([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),Xn=e=>{if(!ve(e))return!1;const[n,r]=e;return X.isDayjs(n)&&X.isDayjs(r)&&n.isSameOrBefore(r)},bs=(e,{lang:n,unit:r,unlinkPanels:a})=>{let o;if(ve(e)){let[s,i]=e.map(l=>X(l).locale(n));return a||(i=s.add(1,r)),[s,i]}else e?o=X(e):o=X();return o=o.locale(n),[o,o.add(1,r)]},ck=(e,n,{columnIndexOffset:r,startDate:a,nextEndDate:o,now:s,unit:i,relativeDateGetter:l,setCellMetadata:c,setRowMetadata:d})=>{for(let u=0;u<e.row;u++){const f=n[u];for(let p=0;p<e.column;p++){let g=f[p+r];g||(g={row:u,column:p,type:"normal",inRange:!1,start:!1,end:!1});const m=u*e.column+p,h=l(m);g.dayjs=h,g.date=h.toDate(),g.timestamp=h.valueOf(),g.type="normal",g.inRange=!!(a&&h.isSameOrAfter(a,i)&&o&&h.isSameOrBefore(o,i))||!!(a&&h.isSameOrBefore(a,i)&&o&&h.isSameOrAfter(o,i)),a!=null&&a.isSameOrAfter(o)?(g.start=!!o&&h.isSame(o,i),g.end=a&&h.isSame(a,i)):(g.start=!!a&&h.isSame(a,i),g.end=!!o&&h.isSame(o,i)),h.isSame(s,i)&&(g.type="today"),c==null||c(g,{rowIndex:u,columnIndex:p}),f[p+r]=g}d==null||d(f)}},Ta=(e,n,r)=>{const a=X().locale(r).startOf("month").month(n).year(e),o=a.daysInMonth();return rd(o).map(s=>a.add(s,"day").toDate())},Or=(e,n,r,a)=>{const o=X().year(e).month(n).startOf("month"),s=Ta(e,n,r).find(i=>!(a!=null&&a(i)));return s?X(s).locale(r):o.locale(r)},ws=(e,n,r)=>{const a=e.year();if(!(r!=null&&r(e.toDate())))return e.locale(n);const o=e.month();if(!Ta(a,o,n).every(r))return Or(a,o,n,r);for(let s=0;s<12;s++)if(!Ta(a,s,n).every(r))return Or(a,s,n,r);return e},dk=le({...hs,cellClassName:{type:J(Function)},showWeekNumber:Boolean,selectionMode:ys("date")}),fk=["changerange","pick","select"],_s=(e="")=>["normal","today"].includes(e),uk=(e,n)=>{const{lang:r}=it(),a=t.ref(),o=t.ref(),s=t.ref(),i=t.ref(),l=t.ref([[],[],[],[],[],[]]);let c=!1;const d=e.date.$locale().weekStart||7,u=e.date.locale("en").localeData().weekdaysShort().map(E=>E.toLowerCase()),f=t.computed(()=>d>3?7-d:-d),p=t.computed(()=>{const E=e.date.startOf("month");return E.subtract(E.day()||7,"day")}),g=t.computed(()=>u.concat(u).slice(d,d+7)),m=t.computed(()=>$i(t.unref(b)).some(E=>E.isCurrent)),h=t.computed(()=>{const E=e.date.startOf("month"),N=E.day()||7,T=E.daysInMonth(),R=E.subtract(1,"month").daysInMonth();return{startOfMonthDay:N,dateCountOfMonth:T,dateCountOfLastMonth:R}}),w=t.computed(()=>e.selectionMode==="dates"?st(e.parsedValue):[]),y=(E,{count:N,rowIndex:T,columnIndex:R})=>{const{startOfMonthDay:x,dateCountOfMonth:j,dateCountOfLastMonth:q}=t.unref(h),re=t.unref(f);if(T>=0&&T<=1){const ae=x+re<0?7+x+re:x+re;if(R+T*7>=ae)return E.text=N,!0;E.text=q-(ae-R%7)+1+T*7,E.type="prev-month"}else return N<=j?E.text=N:(E.text=N-j,E.type="next-month"),!0;return!1},k=(E,{columnIndex:N,rowIndex:T},R)=>{const{disabledDate:x,cellClassName:j}=e,q=t.unref(w),re=y(E,{count:R,rowIndex:T,columnIndex:N}),ae=E.dayjs.toDate();return E.selected=q.find(G=>G.isSame(E.dayjs,"day")),E.isSelected=!!E.selected,E.isCurrent=v(E),E.disabled=x==null?void 0:x(ae),E.customClass=j==null?void 0:j(ae),re},C=E=>{if(e.selectionMode==="week"){const[N,T]=e.showWeekNumber?[1,7]:[0,6],R=I(E[N+1]);E[N].inRange=R,E[N].start=R,E[T].inRange=R,E[T].end=R}},b=t.computed(()=>{const{minDate:E,maxDate:N,rangeState:T,showWeekNumber:R}=e,x=t.unref(f),j=t.unref(l),q="day";let re=1;if(R)for(let ae=0;ae<6;ae++)j[ae][0]||(j[ae][0]={type:"week",text:t.unref(p).add(ae*7+1,q).week()});return ck({row:6,column:7},j,{startDate:E,columnIndexOffset:R?1:0,nextEndDate:T.endDate||N||T.selecting&&E||null,now:X().locale(t.unref(r)).startOf(q),unit:q,relativeDateGetter:ae=>t.unref(p).add(ae-x,q),setCellMetadata:(...ae)=>{k(...ae,re)&&(re+=1)},setRowMetadata:C}),j});t.watch(()=>e.date,async()=>{var E;(E=t.unref(a))!=null&&E.contains(document.activeElement)&&(await t.nextTick(),await _())});const _=async()=>{var E;return(E=t.unref(o))==null?void 0:E.focus()},v=E=>e.selectionMode==="date"&&_s(E.type)&&M(E,e.parsedValue),M=(E,N)=>N?X(N).locale(t.unref(r)).isSame(e.date.date(Number(E.text)),"day"):!1,D=(E,N)=>{const T=E*7+(N-(e.showWeekNumber?1:0))-t.unref(f);return t.unref(p).add(T,"day")},B=E=>{var N;if(!e.rangeState.selecting)return;let T=E.target;if(T.tagName==="SPAN"&&(T=(N=T.parentNode)==null?void 0:N.parentNode),T.tagName==="DIV"&&(T=T.parentNode),T.tagName!=="TD")return;const R=T.parentNode.rowIndex-1,x=T.cellIndex;t.unref(b)[R][x].disabled||(R!==t.unref(s)||x!==t.unref(i))&&(s.value=R,i.value=x,n("changerange",{selecting:!0,endDate:D(R,x)}))},P=E=>!t.unref(m)&&(E==null?void 0:E.text)===1&&E.type==="normal"||E.isCurrent,V=E=>{c||t.unref(m)||e.selectionMode!=="date"||$(E,!0)},z=E=>{E.target.closest("td")&&(c=!0)},L=E=>{E.target.closest("td")&&(c=!1)},W=E=>{!e.rangeState.selecting||!e.minDate?(n("pick",{minDate:E,maxDate:null}),n("select",!0)):(E>=e.minDate?n("pick",{minDate:e.minDate,maxDate:E}):n("pick",{minDate:E,maxDate:e.minDate}),n("select",!1))},A=E=>{const N=E.week(),T=`${E.year()}w${N}`;n("pick",{year:E.year(),week:N,value:T,date:E.startOf("week")})},O=(E,N)=>{const T=N?st(e.parsedValue).filter(R=>(R==null?void 0:R.valueOf())!==E.valueOf()):st(e.parsedValue).concat([E]);n("pick",T)},$=(E,N=!1)=>{const T=E.target.closest("td");if(!T)return;const R=T.parentNode.rowIndex-1,x=T.cellIndex,j=t.unref(b)[R][x];if(j.disabled||j.type==="week")return;const q=D(R,x);switch(e.selectionMode){case"range":{W(q);break}case"date":{n("pick",q,N);break}case"week":{A(q);break}case"dates":{O(q,!!j.selected);break}}},I=E=>{if(e.selectionMode!=="week")return!1;let N=e.date.startOf("day");if(E.type==="prev-month"&&(N=N.subtract(1,"month")),E.type==="next-month"&&(N=N.add(1,"month")),N=N.date(Number.parseInt(E.text,10)),e.parsedValue&&!ve(e.parsedValue)){const T=(e.parsedValue.day()-d+7)%7-1;return e.parsedValue.subtract(T,"day").isSame(N,"day")}return!1};return{WEEKS:g,rows:b,tbodyRef:a,currentCellRef:o,focus:_,isCurrent:v,isWeekActive:I,isSelectedCell:P,handlePickDate:$,handleMouseUp:L,handleMouseDown:z,handleMouseMove:B,handleFocus:V}},pk=(e,{isCurrent:n,isWeekActive:r})=>{const a=me("date-table"),{t:o}=it(),s=t.computed(()=>[a.b(),{"is-week-mode":e.selectionMode==="week"}]),i=t.computed(()=>o("el.datepicker.dateTablePrompt")),l=t.computed(()=>o("el.datepicker.week"));return{tableKls:s,tableLabel:i,weekLabel:l,getCellClasses:u=>{const f=[];return _s(u.type)&&!u.disabled?(f.push("available"),u.type==="today"&&f.push("today")):f.push(u.type),n(u)&&f.push("current"),u.inRange&&(_s(u.type)||e.selectionMode==="week")&&(f.push("in-range"),u.start&&f.push("start-date"),u.end&&f.push("end-date")),u.disabled&&f.push("disabled"),u.selected&&f.push("selected"),u.customClass&&f.push(u.customClass),f.join(" ")},getRowKls:u=>[a.e("row"),{current:r(u)}],t:o}},mk=le({cell:{type:J(Object)}});var ks=t.defineComponent({name:"ElDatePickerCell",props:mk,setup(e){const n=me("date-table-cell"),{slots:r}=t.inject(Ma);return()=>{const{cell:a}=e;return t.renderSlot(r,"default",{...a},()=>{var o;return[t.createVNode("div",{class:n.b()},[t.createVNode("span",{class:n.e("text")},[(o=a==null?void 0:a.renderText)!=null?o:a==null?void 0:a.text])])]})}}}),Ss=_e(t.defineComponent({__name:"basic-date-table",props:dk,emits:fk,setup(e,{expose:n,emit:r}){const a=e,{WEEKS:o,rows:s,tbodyRef:i,currentCellRef:l,focus:c,isCurrent:d,isWeekActive:u,isSelectedCell:f,handlePickDate:p,handleMouseUp:g,handleMouseDown:m,handleMouseMove:h,handleFocus:w}=uk(a,r),{tableLabel:y,tableKls:k,weekLabel:C,getCellClasses:b,getRowKls:_,t:v}=pk(a,{isCurrent:d,isWeekActive:u});return n({focus:c}),(M,D)=>(t.openBlock(),t.createElementBlock("table",{"aria-label":t.unref(y),class:t.normalizeClass(t.unref(k)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:t.unref(p),onMousemove:t.unref(h),onMousedown:t.withModifiers(t.unref(m),["prevent"]),onMouseup:t.unref(g)},[t.createElementVNode("tbody",{ref_key:"tbodyRef",ref:i},[t.createElementVNode("tr",null,[M.showWeekNumber?(t.openBlock(),t.createElementBlock("th",{key:0,scope:"col"},t.toDisplayString(t.unref(C)),1)):t.createCommentVNode("v-if",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o),(B,P)=>(t.openBlock(),t.createElementBlock("th",{key:P,"aria-label":t.unref(v)("el.datepicker.weeksFull."+B),scope:"col"},t.toDisplayString(t.unref(v)("el.datepicker.weeks."+B)),9,["aria-label"]))),128))]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),(B,P)=>(t.openBlock(),t.createElementBlock("tr",{key:P,class:t.normalizeClass(t.unref(_)(B[1]))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(B,(V,z)=>(t.openBlock(),t.createElementBlock("td",{key:`${P}.${z}`,ref_for:!0,ref:L=>t.unref(f)(V)&&(l.value=L),class:t.normalizeClass(t.unref(b)(V)),"aria-current":V.isCurrent?"date":void 0,"aria-selected":V.isCurrent,tabindex:t.unref(f)(V)?0:-1,onFocus:t.unref(w)},[t.createVNode(t.unref(ks),{cell:V},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}}),[["__file","basic-date-table.vue"]]);const hk=le({...hs,selectionMode:ys("month")});var Cs=_e(t.defineComponent({__name:"basic-month-table",props:hk,emits:["changerange","pick","select"],setup(e,{expose:n,emit:r}){const a=e,o=me("month-table"),{t:s,lang:i}=it(),l=t.ref(),c=t.ref(),d=t.ref(a.date.locale("en").localeData().monthsShort().map(C=>C.toLowerCase())),u=t.ref([[],[],[]]),f=t.ref(),p=t.ref(),g=t.computed(()=>{var C,b;const _=u.value,v=X().locale(i.value).startOf("month");for(let M=0;M<3;M++){const D=_[M];for(let B=0;B<4;B++){const P=D[B]||(D[B]={row:M,column:B,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});P.type="normal";const V=M*4+B,z=a.date.startOf("year").month(V),L=a.rangeState.endDate||a.maxDate||a.rangeState.selecting&&a.minDate||null;P.inRange=!!(a.minDate&&z.isSameOrAfter(a.minDate,"month")&&L&&z.isSameOrBefore(L,"month"))||!!(a.minDate&&z.isSameOrBefore(a.minDate,"month")&&L&&z.isSameOrAfter(L,"month")),(C=a.minDate)!=null&&C.isSameOrAfter(L)?(P.start=!!(L&&z.isSame(L,"month")),P.end=a.minDate&&z.isSame(a.minDate,"month")):(P.start=!!(a.minDate&&z.isSame(a.minDate,"month")),P.end=!!(L&&z.isSame(L,"month"))),v.isSame(z)&&(P.type="today"),P.text=V,P.disabled=((b=a.disabledDate)==null?void 0:b.call(a,z.toDate()))||!1}}return _}),m=()=>{var C;(C=c.value)==null||C.focus()},h=C=>{const b={},_=a.date.year(),v=new Date,M=C.text;return b.disabled=a.disabledDate?Ta(_,M,i.value).every(a.disabledDate):!1,b.current=st(a.parsedValue).findIndex(D=>X.isDayjs(D)&&D.year()===_&&D.month()===M)>=0,b.today=v.getFullYear()===_&&v.getMonth()===M,C.inRange&&(b["in-range"]=!0,C.start&&(b["start-date"]=!0),C.end&&(b["end-date"]=!0)),b},w=C=>{const b=a.date.year(),_=C.text;return st(a.date).findIndex(v=>v.year()===b&&v.month()===_)>=0},y=C=>{var b;if(!a.rangeState.selecting)return;let _=C.target;if(_.tagName==="SPAN"&&(_=(b=_.parentNode)==null?void 0:b.parentNode),_.tagName==="DIV"&&(_=_.parentNode),_.tagName!=="TD")return;const v=_.parentNode.rowIndex,M=_.cellIndex;g.value[v][M].disabled||(v!==f.value||M!==p.value)&&(f.value=v,p.value=M,r("changerange",{selecting:!0,endDate:a.date.startOf("year").month(v*4+M)}))},k=C=>{var b;const _=(b=C.target)==null?void 0:b.closest("td");if((_==null?void 0:_.tagName)!=="TD"||Rn(_,"disabled"))return;const v=_.cellIndex,D=_.parentNode.rowIndex*4+v,B=a.date.startOf("year").month(D);if(a.selectionMode==="months"){if(C.type==="keydown"){r("pick",st(a.parsedValue),!1);return}const P=Or(a.date.year(),D,i.value,a.disabledDate),V=Rn(_,"current")?st(a.parsedValue).filter(z=>(z==null?void 0:z.month())!==P.month()):st(a.parsedValue).concat([X(P)]);r("pick",V)}else a.selectionMode==="range"?a.rangeState.selecting?(a.minDate&&B>=a.minDate?r("pick",{minDate:a.minDate,maxDate:B}):r("pick",{minDate:B,maxDate:a.minDate}),r("select",!1)):(r("pick",{minDate:B,maxDate:null}),r("select",!0)):r("pick",D)};return t.watch(()=>a.date,async()=>{var C,b;(C=l.value)!=null&&C.contains(document.activeElement)&&(await t.nextTick(),(b=c.value)==null||b.focus())}),n({focus:m}),(C,b)=>(t.openBlock(),t.createElementBlock("table",{role:"grid","aria-label":t.unref(s)("el.datepicker.monthTablePrompt"),class:t.normalizeClass(t.unref(o).b()),onClick:k,onMousemove:y},[t.createElementVNode("tbody",{ref_key:"tbodyRef",ref:l},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),(_,v)=>(t.openBlock(),t.createElementBlock("tr",{key:v},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_,(M,D)=>(t.openBlock(),t.createElementBlock("td",{key:D,ref_for:!0,ref:B=>w(M)&&(c.value=B),class:t.normalizeClass(h(M)),"aria-selected":`${w(M)}`,"aria-label":t.unref(s)(`el.datepicker.month${+M.text+1}`),tabindex:w(M)?0:-1,onKeydown:[t.withKeys(t.withModifiers(k,["prevent","stop"]),["space"]),t.withKeys(t.withModifiers(k,["prevent","stop"]),["enter"])]},[t.createVNode(t.unref(ks),{cell:{...M,renderText:t.unref(s)("el.datepicker.months."+d.value[M.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}}),[["__file","basic-month-table.vue"]]);const gk=le({...hs,selectionMode:ys("year")});var vs=_e(t.defineComponent({__name:"basic-year-table",props:gk,emits:["changerange","pick","select"],setup(e,{expose:n,emit:r}){const a=e,o=(b,_)=>{const v=X(String(b)).locale(_).startOf("year"),D=v.endOf("year").dayOfYear();return rd(D).map(B=>v.add(B,"day").toDate())},s=me("year-table"),{t:i,lang:l}=it(),c=t.ref(),d=t.ref(),u=t.computed(()=>Math.floor(a.date.year()/10)*10),f=t.ref([[],[],[]]),p=t.ref(),g=t.ref(),m=t.computed(()=>{var b;const _=f.value,v=X().locale(l.value).startOf("year");for(let M=0;M<3;M++){const D=_[M];for(let B=0;B<4&&!(M*4+B>=10);B++){let P=D[B];P||(P={row:M,column:B,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),P.type="normal";const V=M*4+B+u.value,z=X().year(V),L=a.rangeState.endDate||a.maxDate||a.rangeState.selecting&&a.minDate||null;P.inRange=!!(a.minDate&&z.isSameOrAfter(a.minDate,"year")&&L&&z.isSameOrBefore(L,"year"))||!!(a.minDate&&z.isSameOrBefore(a.minDate,"year")&&L&&z.isSameOrAfter(L,"year")),(b=a.minDate)!=null&&b.isSameOrAfter(L)?(P.start=!!(L&&z.isSame(L,"year")),P.end=!!(a.minDate&&z.isSame(a.minDate,"year"))):(P.start=!!(a.minDate&&z.isSame(a.minDate,"year")),P.end=!!(L&&z.isSame(L,"year"))),v.isSame(z)&&(P.type="today"),P.text=V;const A=z.toDate();P.disabled=a.disabledDate&&a.disabledDate(A)||!1,D[B]=P}}return _}),h=()=>{var b;(b=d.value)==null||b.focus()},w=b=>{const _={},v=X().locale(l.value),M=b.text;return _.disabled=a.disabledDate?o(M,l.value).every(a.disabledDate):!1,_.today=v.year()===M,_.current=st(a.parsedValue).findIndex(D=>D.year()===M)>=0,b.inRange&&(_["in-range"]=!0,b.start&&(_["start-date"]=!0),b.end&&(_["end-date"]=!0)),_},y=b=>{const _=b.text;return st(a.date).findIndex(v=>v.year()===_)>=0},k=b=>{var _;const v=(_=b.target)==null?void 0:_.closest("td");if(!v||!v.textContent||Rn(v,"disabled"))return;const M=v.cellIndex,B=v.parentNode.rowIndex*4+M+u.value,P=X().year(B);if(a.selectionMode==="range")a.rangeState.selecting?(a.minDate&&P>=a.minDate?r("pick",{minDate:a.minDate,maxDate:P}):r("pick",{minDate:P,maxDate:a.minDate}),r("select",!1)):(r("pick",{minDate:P,maxDate:null}),r("select",!0));else if(a.selectionMode==="years"){if(b.type==="keydown"){r("pick",st(a.parsedValue),!1);return}const V=ws(P.startOf("year"),l.value,a.disabledDate),z=Rn(v,"current")?st(a.parsedValue).filter(L=>(L==null?void 0:L.year())!==B):st(a.parsedValue).concat([V]);r("pick",z)}else r("pick",B)},C=b=>{var _;if(!a.rangeState.selecting)return;const v=(_=b.target)==null?void 0:_.closest("td");if(!v)return;const M=v.parentNode.rowIndex,D=v.cellIndex;m.value[M][D].disabled||(M!==p.value||D!==g.value)&&(p.value=M,g.value=D,r("changerange",{selecting:!0,endDate:X().year(u.value).add(M*4+D,"year")}))};return t.watch(()=>a.date,async()=>{var b,_;(b=c.value)!=null&&b.contains(document.activeElement)&&(await t.nextTick(),(_=d.value)==null||_.focus())}),n({focus:h}),(b,_)=>(t.openBlock(),t.createElementBlock("table",{role:"grid","aria-label":t.unref(i)("el.datepicker.yearTablePrompt"),class:t.normalizeClass(t.unref(s).b()),onClick:k,onMousemove:C},[t.createElementVNode("tbody",{ref_key:"tbodyRef",ref:c},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(m),(v,M)=>(t.openBlock(),t.createElementBlock("tr",{key:M},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v,(D,B)=>(t.openBlock(),t.createElementBlock("td",{key:`${M}_${B}`,ref_for:!0,ref:P=>y(D)&&(d.value=P),class:t.normalizeClass(["available",w(D)]),"aria-selected":y(D),"aria-label":String(D.text),tabindex:y(D)?0:-1,onKeydown:[t.withKeys(t.withModifiers(k,["prevent","stop"]),["space"]),t.withKeys(t.withModifiers(k,["prevent","stop"]),["enter"])]},[t.createVNode(t.unref(ks),{cell:D},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}}),[["__file","basic-year-table.vue"]]),yk=_e(t.defineComponent({__name:"panel-date-pick",props:lk,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:n}){const r=e,a=(F,ee,Y)=>!0,o=me("picker-panel"),s=me("date-picker"),i=t.useAttrs(),l=t.useSlots(),{t:c,lang:d}=it(),u=t.inject("EP_PICKER_BASE"),f=t.inject(Ca),{shortcuts:p,disabledDate:g,cellClassName:m,defaultTime:h}=u.props,w=t.toRef(u.props,"defaultValue"),y=t.ref(),k=t.ref(X().locale(d.value)),C=t.ref(!1);let b=!1;const _=t.computed(()=>X(h).locale(d.value)),v=t.computed(()=>k.value.month()),M=t.computed(()=>k.value.year()),D=t.ref([]),B=t.ref(null),P=t.ref(null),V=F=>D.value.length>0?a(F,D.value,r.format||"HH:mm:ss"):!0,z=F=>h&&!We.value&&!C.value&&!b?_.value.year(F.year()).month(F.month()).date(F.date()):ae.value?F.millisecond(0):F.startOf("day"),L=(F,...ee)=>{if(!F)n("pick",F,...ee);else if(ve(F)){const Y=F.map(z);n("pick",Y,...ee)}else n("pick",z(F),...ee);B.value=null,P.value=null,C.value=!1,b=!1},W=async(F,ee)=>{if(N.value==="date"){F=F;let Y=r.parsedValue?r.parsedValue.year(F.year()).month(F.month()).date(F.date()):F;V(Y)||(Y=D.value[0][0].year(F.year()).month(F.month()).date(F.date())),k.value=Y,L(Y,ae.value||ee),r.type==="datetime"&&(await t.nextTick(),Xe())}else N.value==="week"?L(F.date):N.value==="dates"&&L(F,!0)},A=F=>{const ee=F?"add":"subtract";k.value=k.value[ee](1,"month"),bn("month")},O=F=>{const ee=k.value,Y=F?"add":"subtract";k.value=$.value==="year"?ee[Y](10,"year"):ee[Y](1,"year"),bn("year")},$=t.ref("date"),I=t.computed(()=>{const F=c("el.datepicker.year");if($.value==="year"){const ee=Math.floor(M.value/10)*10;return F?`${ee} ${F} - ${ee+9} ${F}`:`${ee} - ${ee+9}`}return`${M.value} ${F}`}),E=F=>{const ee=Ue(F.value)?F.value():F.value;if(ee){b=!0,L(X(ee).locale(d.value));return}F.onClick&&F.onClick({attrs:i,slots:l,emit:n})},N=t.computed(()=>{const{type:F}=r;return["week","month","months","year","years","dates"].includes(F)?F:"date"}),T=t.computed(()=>N.value==="dates"||N.value==="months"||N.value==="years"),R=t.computed(()=>N.value==="date"?$.value:N.value),x=t.computed(()=>!!p.length),j=async(F,ee)=>{N.value==="month"?(k.value=Or(k.value.year(),F,d.value,g),L(k.value,!1)):N.value==="months"?L(F,ee??!0):(k.value=Or(k.value.year(),F,d.value,g),$.value="date",["month","year","date","week"].includes(N.value)&&(L(k.value,!0),await t.nextTick(),Xe())),bn("month")},q=async(F,ee)=>{if(N.value==="year"){const Y=k.value.startOf("year").year(F);k.value=ws(Y,d.value,g),L(k.value,!1)}else if(N.value==="years")L(F,ee??!0);else{const Y=k.value.year(F);k.value=ws(Y,d.value,g),$.value="month",["month","year","date","week"].includes(N.value)&&(L(k.value,!0),await t.nextTick(),Xe())}bn("year")},re=async F=>{$.value=F,await t.nextTick(),Xe()},ae=t.computed(()=>r.type==="datetime"||r.type==="datetimerange"),G=t.computed(()=>{const F=ae.value||N.value==="dates",ee=N.value==="years",Y=N.value==="months",oe=$.value==="date",S=$.value==="year",K=$.value==="month";return F&&oe||ee&&S||Y&&K}),ne=t.computed(()=>g?r.parsedValue?ve(r.parsedValue)?g(r.parsedValue[0].toDate()):g(r.parsedValue.toDate()):!0:!1),se=()=>{if(T.value)L(r.parsedValue);else{let F=r.parsedValue;if(!F){const ee=X(h).locale(d.value),Y=rt();F=ee.year(Y.year()).month(Y.month()).date(Y.date())}k.value=F,L(F)}},ie=t.computed(()=>g?g(X().locale(d.value).toDate()):!1),Ce=()=>{const ee=X().locale(d.value).toDate();C.value=!0,(!g||!g(ee))&&V(ee)&&(k.value=X().locale(d.value),L(k.value))},ue=t.computed(()=>r.timeFormat||od(r.format)),Ae=t.computed(()=>r.dateFormat||ad(r.format)),We=t.computed(()=>{if(P.value)return P.value;if(!(!r.parsedValue&&!w.value))return(r.parsedValue||k.value).format(ue.value)}),Ke=t.computed(()=>{if(B.value)return B.value;if(!(!r.parsedValue&&!w.value))return(r.parsedValue||k.value).format(Ae.value)}),Ve=t.ref(!1),Je=()=>{Ve.value=!0},ce=()=>{Ve.value=!1},Ne=F=>({hour:F.hour(),minute:F.minute(),second:F.second(),year:F.year(),month:F.month(),date:F.date()}),Re=(F,ee,Y)=>{const{hour:oe,minute:S,second:K}=Ne(F),fe=r.parsedValue?r.parsedValue.hour(oe).minute(S).second(K):F;k.value=fe,L(k.value,!0),Y||(Ve.value=ee)},wt=F=>{const ee=X(F,ue.value).locale(d.value);if(ee.isValid()&&V(ee)){const{year:Y,month:oe,date:S}=Ne(k.value);k.value=ee.year(Y).month(oe).date(S),P.value=null,Ve.value=!1,L(k.value,!0)}},nt=F=>{const ee=X(F,Ae.value).locale(d.value);if(ee.isValid()){if(g&&g(ee.toDate()))return;const{hour:Y,minute:oe,second:S}=Ne(k.value);k.value=ee.hour(Y).minute(oe).second(S),B.value=null,L(k.value,!0)}},U=F=>X.isDayjs(F)&&F.isValid()&&(g?!g(F.toDate()):!0),be=F=>ve(F)?F.map(ee=>ee.format(r.format)):F.format(r.format),Ze=F=>X(F,r.format).locale(d.value),rt=()=>{const F=X(w.value).locale(d.value);if(!w.value){const ee=_.value;return X().hour(ee.hour()).minute(ee.minute()).second(ee.second()).locale(d.value)}return F},Xe=async()=>{var F;["week","month","year","date"].includes(N.value)&&((F=y.value)==null||F.focus(),N.value==="week"&&Be(Pe.down))},Yr=F=>{const{code:ee}=F;[Pe.up,Pe.down,Pe.left,Pe.right,Pe.home,Pe.end,Pe.pageUp,Pe.pageDown].includes(ee)&&(Be(ee),F.stopPropagation(),F.preventDefault()),[Pe.enter,Pe.space,Pe.numpadEnter].includes(ee)&&B.value===null&&P.value===null&&(F.preventDefault(),L(k.value,!1))},Be=F=>{var ee;const{up:Y,down:oe,left:S,right:K,home:fe,end:Ye,pageUp:Vn,pageDown:HE}=Pe,UE={year:{[Y]:-4,[oe]:4,[S]:-1,[K]:1,offset:(Me,Yt)=>Me.setFullYear(Me.getFullYear()+Yt)},month:{[Y]:-4,[oe]:4,[S]:-1,[K]:1,offset:(Me,Yt)=>Me.setMonth(Me.getMonth()+Yt)},week:{[Y]:-1,[oe]:1,[S]:-1,[K]:1,offset:(Me,Yt)=>Me.setDate(Me.getDate()+Yt*7)},date:{[Y]:-7,[oe]:7,[S]:-1,[K]:1,[fe]:Me=>-Me.getDay(),[Ye]:Me=>-Me.getDay()+6,[Vn]:Me=>-new Date(Me.getFullYear(),Me.getMonth(),0).getDate(),[HE]:Me=>new Date(Me.getFullYear(),Me.getMonth()+1,0).getDate(),offset:(Me,Yt)=>Me.setDate(Me.getDate()+Yt)}},zr=k.value.toDate();for(;Math.abs(k.value.diff(zr,"year",!0))<1;){const Me=UE[R.value];if(!Me)return;if(Me.offset(zr,Ue(Me[F])?Me[F](zr):(ee=Me[F])!=null?ee:0),g&&g(zr))break;const Yt=X(zr).locale(d.value);k.value=Yt,n("pick",Yt,!0);break}},bn=F=>{n("panel-change",k.value.toDate(),F,$.value)};return t.watch(()=>N.value,F=>{if(["month","year"].includes(F)){$.value=F;return}else if(F==="years"){$.value="year";return}else if(F==="months"){$.value="month";return}$.value="date"},{immediate:!0}),t.watch(()=>$.value,()=>{f==null||f.updatePopper()}),t.watch(()=>w.value,F=>{F&&(k.value=rt())},{immediate:!0}),t.watch(()=>r.parsedValue,F=>{if(F){if(T.value||ve(F))return;k.value=F}else k.value=rt()},{immediate:!0}),n("set-picker-option",["isValidValue",U]),n("set-picker-option",["formatToString",be]),n("set-picker-option",["parseUserInput",Ze]),n("set-picker-option",["handleFocusPicker",Xe]),(F,ee)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(o).b(),t.unref(s).b(),{"has-sidebar":F.$slots.sidebar||t.unref(x),"has-time":t.unref(ae)}])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(o).e("body-wrapper"))},[t.renderSlot(F.$slots,"sidebar",{class:t.normalizeClass(t.unref(o).e("sidebar"))}),t.unref(x)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(o).e("sidebar"))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(p),(Y,oe)=>(t.openBlock(),t.createElementBlock("button",{key:oe,type:"button",class:t.normalizeClass(t.unref(o).e("shortcut")),onClick:S=>E(Y)},t.toDisplayString(Y.text),11,["onClick"]))),128))],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{class:t.normalizeClass(t.unref(o).e("body"))},[t.unref(ae)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(s).e("time-header"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(s).e("editor-wrap"))},[t.createVNode(t.unref(It),{placeholder:t.unref(c)("el.datepicker.selectDate"),"model-value":t.unref(Ke),size:"small","validate-event":!1,onInput:Y=>B.value=Y,onChange:nt},null,8,["placeholder","model-value","onInput"])],2),t.withDirectives((t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(t.unref(s).e("editor-wrap"))},[t.createVNode(t.unref(It),{placeholder:t.unref(c)("el.datepicker.selectTime"),"model-value":t.unref(We),size:"small","validate-event":!1,onFocus:Je,onInput:Y=>P.value=Y,onChange:wt},null,8,["placeholder","model-value","onInput"]),t.createVNode(t.unref(ms),{visible:Ve.value,format:t.unref(ue),"parsed-value":k.value,onPick:Re},null,8,["visible","format","parsed-value"])],2)),[[t.unref(ps),ce]])],2)):t.createCommentVNode("v-if",!0),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass([t.unref(s).e("header"),($.value==="year"||$.value==="month")&&t.unref(s).e("header--bordered")])},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(s).e("prev-btn"))},[t.createElementVNode("button",{type:"button","aria-label":t.unref(c)("el.datepicker.prevYear"),class:t.normalizeClass(["d-arrow-left",t.unref(o).e("icon-btn")]),onClick:Y=>O(!1)},[t.renderSlot(F.$slots,"prev-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(vn))]),_:1})])],10,["aria-label","onClick"]),t.withDirectives(t.createElementVNode("button",{type:"button","aria-label":t.unref(c)("el.datepicker.prevMonth"),class:t.normalizeClass([t.unref(o).e("icon-btn"),"arrow-left"]),onClick:Y=>A(!1)},[t.renderSlot(F.$slots,"prev-month",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Mo))]),_:1})])],10,["aria-label","onClick"]),[[t.vShow,$.value==="date"]])],2),t.createElementVNode("span",{role:"button",class:t.normalizeClass(t.unref(s).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:t.withKeys(Y=>re("year"),["enter"]),onClick:Y=>re("year")},t.toDisplayString(t.unref(I)),43,["onKeydown","onClick"]),t.withDirectives(t.createElementVNode("span",{role:"button","aria-live":"polite",tabindex:"0",class:t.normalizeClass([t.unref(s).e("header-label"),{active:$.value==="month"}]),onKeydown:t.withKeys(Y=>re("month"),["enter"]),onClick:Y=>re("month")},t.toDisplayString(t.unref(c)(`el.datepicker.month${t.unref(v)+1}`)),43,["onKeydown","onClick"]),[[t.vShow,$.value==="date"]]),t.createElementVNode("span",{class:t.normalizeClass(t.unref(s).e("next-btn"))},[t.withDirectives(t.createElementVNode("button",{type:"button","aria-label":t.unref(c)("el.datepicker.nextMonth"),class:t.normalizeClass([t.unref(o).e("icon-btn"),"arrow-right"]),onClick:Y=>A(!0)},[t.renderSlot(F.$slots,"next-month",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(sa))]),_:1})])],10,["aria-label","onClick"]),[[t.vShow,$.value==="date"]]),t.createElementVNode("button",{type:"button","aria-label":t.unref(c)("el.datepicker.nextYear"),class:t.normalizeClass([t.unref(o).e("icon-btn"),"d-arrow-right"]),onClick:Y=>O(!0)},[t.renderSlot(F.$slots,"next-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(En))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[t.vShow,$.value!=="time"]]),t.createElementVNode("div",{class:t.normalizeClass(t.unref(o).e("content")),onKeydown:Yr},[$.value==="date"?(t.openBlock(),t.createBlock(Ss,{key:0,ref_key:"currentViewRef",ref:y,"selection-mode":t.unref(N),date:k.value,"parsed-value":F.parsedValue,"disabled-date":t.unref(g),"cell-class-name":t.unref(m),onPick:W},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):t.createCommentVNode("v-if",!0),$.value==="year"?(t.openBlock(),t.createBlock(vs,{key:1,ref_key:"currentViewRef",ref:y,"selection-mode":t.unref(N),date:k.value,"disabled-date":t.unref(g),"parsed-value":F.parsedValue,onPick:q},null,8,["selection-mode","date","disabled-date","parsed-value"])):t.createCommentVNode("v-if",!0),$.value==="month"?(t.openBlock(),t.createBlock(Cs,{key:2,ref_key:"currentViewRef",ref:y,"selection-mode":t.unref(N),date:k.value,"parsed-value":F.parsedValue,"disabled-date":t.unref(g),onPick:j},null,8,["selection-mode","date","parsed-value","disabled-date"])):t.createCommentVNode("v-if",!0)],34)],2)],2),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(t.unref(o).e("footer"))},[t.withDirectives(t.createVNode(t.unref(Zn),{text:"",size:"small",class:t.normalizeClass(t.unref(o).e("link-btn")),disabled:t.unref(ie),onClick:Ce},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[t.vShow,!t.unref(T)&&F.showNow]]),t.createVNode(t.unref(Zn),{plain:"",size:"small",class:t.normalizeClass(t.unref(o).e("link-btn")),disabled:t.unref(ne),onClick:se},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[t.vShow,t.unref(G)]])],2))}}),[["__file","panel-date-pick.vue"]]);const bk=le({...Sd,...gs,visible:Boolean}),Cd=e=>{const{emit:n}=t.getCurrentInstance(),r=t.useAttrs(),a=t.useSlots();return s=>{const i=Ue(s.value)?s.value():s.value;if(i){n("pick",[X(i[0]).locale(e.value),X(i[1]).locale(e.value)]);return}s.onClick&&s.onClick({attrs:r,slots:a,emit:n})}},vd=(e,{defaultValue:n,leftDate:r,rightDate:a,unit:o,onParsedValueChanged:s})=>{const{emit:i}=t.getCurrentInstance(),{pickerNs:l}=t.inject(Ma),c=me("date-range-picker"),{t:d,lang:u}=it(),f=Cd(u),p=t.ref(),g=t.ref(),m=t.ref({endDate:null,selecting:!1}),h=b=>{m.value=b},w=(b=!1)=>{const _=t.unref(p),v=t.unref(g);Xn([_,v])&&i("pick",[_,v],b)},y=b=>{m.value.selecting=b,b||(m.value.endDate=null)},k=b=>{if(ve(b)&&b.length===2){const[_,v]=b;p.value=_,r.value=_,g.value=v,s(t.unref(p),t.unref(g))}else C()},C=()=>{const[b,_]=bs(t.unref(n),{lang:t.unref(u),unit:o,unlinkPanels:e.unlinkPanels});p.value=void 0,g.value=void 0,r.value=b,a.value=_};return t.watch(n,b=>{b&&C()},{immediate:!0}),t.watch(()=>e.parsedValue,k,{immediate:!0}),{minDate:p,maxDate:g,rangeState:m,lang:u,ppNs:l,drpNs:c,handleChangeRange:h,handleRangeConfirm:w,handleShortcutClick:f,onSelect:y,onReset:k,t:d}},Da="month";var wk=_e(t.defineComponent({__name:"panel-date-range",props:bk,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(e,{emit:n}){const r=e,a=t.inject("EP_PICKER_BASE"),{disabledDate:o,cellClassName:s,defaultTime:i,clearable:l}=a.props,c=t.toRef(a.props,"format"),d=t.toRef(a.props,"shortcuts"),u=t.toRef(a.props,"defaultValue"),{lang:f}=it(),p=t.ref(X().locale(f.value)),g=t.ref(X().locale(f.value).add(1,Da)),{minDate:m,maxDate:h,rangeState:w,ppNs:y,drpNs:k,handleChangeRange:C,handleRangeConfirm:b,handleShortcutClick:_,onSelect:v,onReset:M,t:D}=vd(r,{defaultValue:u,leftDate:p,rightDate:g,unit:Da,onParsedValueChanged:ee});t.watch(()=>r.visible,Y=>{!Y&&w.value.selecting&&(M(r.parsedValue),v(!1))});const B=t.ref({min:null,max:null}),P=t.ref({min:null,max:null}),V=t.computed(()=>`${p.value.year()} ${D("el.datepicker.year")} ${D(`el.datepicker.month${p.value.month()+1}`)}`),z=t.computed(()=>`${g.value.year()} ${D("el.datepicker.year")} ${D(`el.datepicker.month${g.value.month()+1}`)}`),L=t.computed(()=>p.value.year()),W=t.computed(()=>p.value.month()),A=t.computed(()=>g.value.year()),O=t.computed(()=>g.value.month()),$=t.computed(()=>!!d.value.length),I=t.computed(()=>B.value.min!==null?B.value.min:m.value?m.value.format(x.value):""),E=t.computed(()=>B.value.max!==null?B.value.max:h.value||m.value?(h.value||m.value).format(x.value):""),N=t.computed(()=>P.value.min!==null?P.value.min:m.value?m.value.format(R.value):""),T=t.computed(()=>P.value.max!==null?P.value.max:h.value||m.value?(h.value||m.value).format(R.value):""),R=t.computed(()=>r.timeFormat||od(c.value)),x=t.computed(()=>r.dateFormat||ad(c.value)),j=Y=>Xn(Y)&&(o?!o(Y[0].toDate())&&!o(Y[1].toDate()):!0),q=()=>{p.value=p.value.subtract(1,"year"),r.unlinkPanels||(g.value=p.value.add(1,"month")),ue("year")},re=()=>{p.value=p.value.subtract(1,"month"),r.unlinkPanels||(g.value=p.value.add(1,"month")),ue("month")},ae=()=>{r.unlinkPanels?g.value=g.value.add(1,"year"):(p.value=p.value.add(1,"year"),g.value=p.value.add(1,"month")),ue("year")},G=()=>{r.unlinkPanels?g.value=g.value.add(1,"month"):(p.value=p.value.add(1,"month"),g.value=p.value.add(1,"month")),ue("month")},ne=()=>{p.value=p.value.add(1,"year"),ue("year")},se=()=>{p.value=p.value.add(1,"month"),ue("month")},ie=()=>{g.value=g.value.subtract(1,"year"),ue("year")},Ce=()=>{g.value=g.value.subtract(1,"month"),ue("month")},ue=Y=>{n("panel-change",[p.value.toDate(),g.value.toDate()],Y)},Ae=t.computed(()=>{const Y=(W.value+1)%12,oe=W.value+1>=12?1:0;return r.unlinkPanels&&new Date(L.value+oe,Y)<new Date(A.value,O.value)}),We=t.computed(()=>r.unlinkPanels&&A.value*12+O.value-(L.value*12+W.value+1)>=12),Ke=t.computed(()=>!(m.value&&h.value&&!w.value.selecting&&Xn([m.value,h.value]))),Ve=t.computed(()=>r.type==="datetime"||r.type==="datetimerange"),Je=(Y,oe)=>{if(Y)return i?X(i[oe]||i).locale(f.value).year(Y.year()).month(Y.month()).date(Y.date()):Y},ce=(Y,oe=!0)=>{const S=Y.minDate,K=Y.maxDate,fe=Je(S,0),Ye=Je(K,1);h.value===Ye&&m.value===fe||(n("calendar-change",[S.toDate(),K&&K.toDate()]),h.value=Ye,m.value=fe,!(!oe||Ve.value)&&b())},Ne=t.ref(!1),Re=t.ref(!1),wt=()=>{Ne.value=!1},nt=()=>{Re.value=!1},U=(Y,oe)=>{B.value[oe]=Y;const S=X(Y,x.value).locale(f.value);if(S.isValid()){if(o&&o(S.toDate()))return;oe==="min"?(p.value=S,m.value=(m.value||p.value).year(S.year()).month(S.month()).date(S.date()),!r.unlinkPanels&&(!h.value||h.value.isBefore(m.value))&&(g.value=S.add(1,"month"),h.value=m.value.add(1,"month"))):(g.value=S,h.value=(h.value||g.value).year(S.year()).month(S.month()).date(S.date()),!r.unlinkPanels&&(!m.value||m.value.isAfter(h.value))&&(p.value=S.subtract(1,"month"),m.value=h.value.subtract(1,"month")))}},be=(Y,oe)=>{B.value[oe]=null},Ze=(Y,oe)=>{P.value[oe]=Y;const S=X(Y,R.value).locale(f.value);S.isValid()&&(oe==="min"?(Ne.value=!0,m.value=(m.value||p.value).hour(S.hour()).minute(S.minute()).second(S.second())):(Re.value=!0,h.value=(h.value||g.value).hour(S.hour()).minute(S.minute()).second(S.second()),g.value=h.value))},rt=(Y,oe)=>{P.value[oe]=null,oe==="min"?(p.value=m.value,Ne.value=!1,(!h.value||h.value.isBefore(m.value))&&(h.value=m.value)):(g.value=h.value,Re.value=!1,h.value&&h.value.isBefore(m.value)&&(m.value=h.value))},Xe=(Y,oe,S)=>{P.value.min||(Y&&(p.value=Y,m.value=(m.value||p.value).hour(Y.hour()).minute(Y.minute()).second(Y.second())),S||(Ne.value=oe),(!h.value||h.value.isBefore(m.value))&&(h.value=m.value,g.value=Y))},Yr=(Y,oe,S)=>{P.value.max||(Y&&(g.value=Y,h.value=(h.value||g.value).hour(Y.hour()).minute(Y.minute()).second(Y.second())),S||(Re.value=oe),h.value&&h.value.isBefore(m.value)&&(m.value=h.value))},Be=()=>{p.value=bs(t.unref(u),{lang:t.unref(f),unit:"month",unlinkPanels:r.unlinkPanels})[0],g.value=p.value.add(1,"month"),h.value=void 0,m.value=void 0,n("pick",null)},bn=Y=>ve(Y)?Y.map(oe=>oe.format(c.value)):Y.format(c.value),F=Y=>ve(Y)?Y.map(oe=>X(oe,c.value).locale(f.value)):X(Y,c.value).locale(f.value);function ee(Y,oe){if(r.unlinkPanels&&oe){const S=(Y==null?void 0:Y.year())||0,K=(Y==null?void 0:Y.month())||0,fe=oe.year(),Ye=oe.month();g.value=S===fe&&K===Ye?oe.add(1,Da):oe}else g.value=p.value.add(1,Da),oe&&(g.value=g.value.hour(oe.hour()).minute(oe.minute()).second(oe.second()))}return n("set-picker-option",["isValidValue",j]),n("set-picker-option",["parseUserInput",F]),n("set-picker-option",["formatToString",bn]),n("set-picker-option",["handleClear",Be]),(Y,oe)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(y).b(),t.unref(k).b(),{"has-sidebar":Y.$slots.sidebar||t.unref($),"has-time":t.unref(Ve)}])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(y).e("body-wrapper"))},[t.renderSlot(Y.$slots,"sidebar",{class:t.normalizeClass(t.unref(y).e("sidebar"))}),t.unref($)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(y).e("sidebar"))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(d),(S,K)=>(t.openBlock(),t.createElementBlock("button",{key:K,type:"button",class:t.normalizeClass(t.unref(y).e("shortcut")),onClick:fe=>t.unref(_)(S)},t.toDisplayString(S.text),11,["onClick"]))),128))],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{class:t.normalizeClass(t.unref(y).e("body"))},[t.unref(Ve)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(k).e("time-header"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(k).e("editors-wrap"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(k).e("time-picker-wrap"))},[t.createVNode(t.unref(It),{size:"small",disabled:t.unref(w).selecting,placeholder:t.unref(D)("el.datepicker.startDate"),class:t.normalizeClass(t.unref(k).e("editor")),"model-value":t.unref(I),"validate-event":!1,onInput:S=>U(S,"min"),onChange:S=>be(S,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),t.withDirectives((t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(t.unref(k).e("time-picker-wrap"))},[t.createVNode(t.unref(It),{size:"small",class:t.normalizeClass(t.unref(k).e("editor")),disabled:t.unref(w).selecting,placeholder:t.unref(D)("el.datepicker.startTime"),"model-value":t.unref(N),"validate-event":!1,onFocus:S=>Ne.value=!0,onInput:S=>Ze(S,"min"),onChange:S=>rt(S,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),t.createVNode(t.unref(ms),{visible:Ne.value,format:t.unref(R),"datetime-role":"start","parsed-value":p.value,onPick:Xe},null,8,["visible","format","parsed-value"])],2)),[[t.unref(ps),wt]])],2),t.createElementVNode("span",null,[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(sa))]),_:1})]),t.createElementVNode("span",{class:t.normalizeClass([t.unref(k).e("editors-wrap"),"is-right"])},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(k).e("time-picker-wrap"))},[t.createVNode(t.unref(It),{size:"small",class:t.normalizeClass(t.unref(k).e("editor")),disabled:t.unref(w).selecting,placeholder:t.unref(D)("el.datepicker.endDate"),"model-value":t.unref(E),readonly:!t.unref(m),"validate-event":!1,onInput:S=>U(S,"max"),onChange:S=>be(S,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),t.withDirectives((t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(t.unref(k).e("time-picker-wrap"))},[t.createVNode(t.unref(It),{size:"small",class:t.normalizeClass(t.unref(k).e("editor")),disabled:t.unref(w).selecting,placeholder:t.unref(D)("el.datepicker.endTime"),"model-value":t.unref(T),readonly:!t.unref(m),"validate-event":!1,onFocus:S=>t.unref(m)&&(Re.value=!0),onInput:S=>Ze(S,"max"),onChange:S=>rt(S,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),t.createVNode(t.unref(ms),{"datetime-role":"end",visible:Re.value,format:t.unref(R),"parsed-value":g.value,onPick:Yr},null,8,["visible","format","parsed-value"])],2)),[[t.unref(ps),nt]])],2)],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{class:t.normalizeClass([[t.unref(y).e("content"),t.unref(k).e("content")],"is-left"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(k).e("header"))},[t.createElementVNode("button",{type:"button",class:t.normalizeClass([t.unref(y).e("icon-btn"),"d-arrow-left"]),"aria-label":t.unref(D)("el.datepicker.prevYear"),onClick:q},[t.renderSlot(Y.$slots,"prev-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(vn))]),_:1})])],10,["aria-label"]),t.createElementVNode("button",{type:"button",class:t.normalizeClass([t.unref(y).e("icon-btn"),"arrow-left"]),"aria-label":t.unref(D)("el.datepicker.prevMonth"),onClick:re},[t.renderSlot(Y.$slots,"prev-month",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Mo))]),_:1})])],10,["aria-label"]),Y.unlinkPanels?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",disabled:!t.unref(We),class:t.normalizeClass([[t.unref(y).e("icon-btn"),{"is-disabled":!t.unref(We)}],"d-arrow-right"]),"aria-label":t.unref(D)("el.datepicker.nextYear"),onClick:ne},[t.renderSlot(Y.$slots,"next-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(En))]),_:1})])],10,["disabled","aria-label"])):t.createCommentVNode("v-if",!0),Y.unlinkPanels?(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",disabled:!t.unref(Ae),class:t.normalizeClass([[t.unref(y).e("icon-btn"),{"is-disabled":!t.unref(Ae)}],"arrow-right"]),"aria-label":t.unref(D)("el.datepicker.nextMonth"),onClick:se},[t.renderSlot(Y.$slots,"next-month",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(sa))]),_:1})])],10,["disabled","aria-label"])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",null,t.toDisplayString(t.unref(V)),1)],2),t.createVNode(Ss,{"selection-mode":"range",date:p.value,"min-date":t.unref(m),"max-date":t.unref(h),"range-state":t.unref(w),"disabled-date":t.unref(o),"cell-class-name":t.unref(s),onChangerange:t.unref(C),onPick:ce,onSelect:t.unref(v)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),t.createElementVNode("div",{class:t.normalizeClass([[t.unref(y).e("content"),t.unref(k).e("content")],"is-right"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(k).e("header"))},[Y.unlinkPanels?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",disabled:!t.unref(We),class:t.normalizeClass([[t.unref(y).e("icon-btn"),{"is-disabled":!t.unref(We)}],"d-arrow-left"]),"aria-label":t.unref(D)("el.datepicker.prevYear"),onClick:ie},[t.renderSlot(Y.$slots,"prev-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(vn))]),_:1})])],10,["disabled","aria-label"])):t.createCommentVNode("v-if",!0),Y.unlinkPanels?(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",disabled:!t.unref(Ae),class:t.normalizeClass([[t.unref(y).e("icon-btn"),{"is-disabled":!t.unref(Ae)}],"arrow-left"]),"aria-label":t.unref(D)("el.datepicker.prevMonth"),onClick:Ce},[t.renderSlot(Y.$slots,"prev-month",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Mo))]),_:1})])],10,["disabled","aria-label"])):t.createCommentVNode("v-if",!0),t.createElementVNode("button",{type:"button","aria-label":t.unref(D)("el.datepicker.nextYear"),class:t.normalizeClass([t.unref(y).e("icon-btn"),"d-arrow-right"]),onClick:ae},[t.renderSlot(Y.$slots,"next-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(En))]),_:1})])],10,["aria-label"]),t.createElementVNode("button",{type:"button",class:t.normalizeClass([t.unref(y).e("icon-btn"),"arrow-right"]),"aria-label":t.unref(D)("el.datepicker.nextMonth"),onClick:G},[t.renderSlot(Y.$slots,"next-month",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(sa))]),_:1})])],10,["aria-label"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(z)),1)],2),t.createVNode(Ss,{"selection-mode":"range",date:g.value,"min-date":t.unref(m),"max-date":t.unref(h),"range-state":t.unref(w),"disabled-date":t.unref(o),"cell-class-name":t.unref(s),onChangerange:t.unref(C),onPick:ce,onSelect:t.unref(v)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),t.unref(Ve)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(y).e("footer"))},[t.unref(l)?(t.openBlock(),t.createBlock(t.unref(Zn),{key:0,text:"",size:"small",class:t.normalizeClass(t.unref(y).e("link-btn")),onClick:Be},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(D)("el.datepicker.clear")),1)]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),t.createVNode(t.unref(Zn),{plain:"",size:"small",class:t.normalizeClass(t.unref(y).e("link-btn")),disabled:t.unref(Ke),onClick:S=>t.unref(b)(!1)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(D)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):t.createCommentVNode("v-if",!0)],2))}}),[["__file","panel-date-range.vue"]]);const _k=le({...gs}),kk=["pick","set-picker-option","calendar-change"],Sk=({unlinkPanels:e,leftDate:n,rightDate:r})=>{const{t:a}=it(),o=()=>{n.value=n.value.subtract(1,"year"),e.value||(r.value=r.value.subtract(1,"year"))},s=()=>{e.value||(n.value=n.value.add(1,"year")),r.value=r.value.add(1,"year")},i=()=>{n.value=n.value.add(1,"year")},l=()=>{r.value=r.value.subtract(1,"year")},c=t.computed(()=>`${n.value.year()} ${a("el.datepicker.year")}`),d=t.computed(()=>`${r.value.year()} ${a("el.datepicker.year")}`),u=t.computed(()=>n.value.year()),f=t.computed(()=>r.value.year()===n.value.year()?n.value.year()+1:r.value.year());return{leftPrevYear:o,rightNextYear:s,leftNextYear:i,rightPrevYear:l,leftLabel:c,rightLabel:d,leftYear:u,rightYear:f}},Oa="year",Ck=t.defineComponent({name:"DatePickerMonthRange"}),vk=t.defineComponent({...Ck,props:_k,emits:kk,setup(e,{emit:n}){const r=e,{lang:a}=it(),o=t.inject("EP_PICKER_BASE"),{shortcuts:s,disabledDate:i}=o.props,l=t.toRef(o.props,"format"),c=t.toRef(o.props,"defaultValue"),d=t.ref(X().locale(a.value)),u=t.ref(X().locale(a.value).add(1,Oa)),{minDate:f,maxDate:p,rangeState:g,ppNs:m,drpNs:h,handleChangeRange:w,handleRangeConfirm:y,handleShortcutClick:k,onSelect:C}=vd(r,{defaultValue:c,leftDate:d,rightDate:u,unit:Oa,onParsedValueChanged:I}),b=t.computed(()=>!!s.length),{leftPrevYear:_,rightNextYear:v,leftNextYear:M,rightPrevYear:D,leftLabel:B,rightLabel:P,leftYear:V,rightYear:z}=Sk({unlinkPanels:t.toRef(r,"unlinkPanels"),leftDate:d,rightDate:u}),L=t.computed(()=>r.unlinkPanels&&z.value>V.value+1),W=(E,N=!0)=>{const T=E.minDate,R=E.maxDate;p.value===R&&f.value===T||(n("calendar-change",[T.toDate(),R&&R.toDate()]),p.value=R,f.value=T,N&&y())},A=()=>{d.value=bs(t.unref(c),{lang:t.unref(a),unit:"year",unlinkPanels:r.unlinkPanels})[0],u.value=d.value.add(1,"year"),n("pick",null)},O=E=>ve(E)?E.map(N=>N.format(l.value)):E.format(l.value),$=E=>ve(E)?E.map(N=>X(N,l.value).locale(a.value)):X(E,l.value).locale(a.value);function I(E,N){if(r.unlinkPanels&&N){const T=(E==null?void 0:E.year())||0,R=N.year();u.value=T===R?N.add(1,Oa):N}else u.value=d.value.add(1,Oa)}return n("set-picker-option",["isValidValue",Xn]),n("set-picker-option",["formatToString",O]),n("set-picker-option",["parseUserInput",$]),n("set-picker-option",["handleClear",A]),(E,N)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(m).b(),t.unref(h).b(),{"has-sidebar":!!E.$slots.sidebar||t.unref(b)}])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(m).e("body-wrapper"))},[t.renderSlot(E.$slots,"sidebar",{class:t.normalizeClass(t.unref(m).e("sidebar"))}),t.unref(b)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(m).e("sidebar"))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),(T,R)=>(t.openBlock(),t.createElementBlock("button",{key:R,type:"button",class:t.normalizeClass(t.unref(m).e("shortcut")),onClick:x=>t.unref(k)(T)},t.toDisplayString(T.text),11,["onClick"]))),128))],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{class:t.normalizeClass(t.unref(m).e("body"))},[t.createElementVNode("div",{class:t.normalizeClass([[t.unref(m).e("content"),t.unref(h).e("content")],"is-left"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(h).e("header"))},[t.createElementVNode("button",{type:"button",class:t.normalizeClass([t.unref(m).e("icon-btn"),"d-arrow-left"]),onClick:t.unref(_)},[t.renderSlot(E.$slots,"prev-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(vn))]),_:1})])],10,["onClick"]),E.unlinkPanels?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",disabled:!t.unref(L),class:t.normalizeClass([[t.unref(m).e("icon-btn"),{[t.unref(m).is("disabled")]:!t.unref(L)}],"d-arrow-right"]),onClick:t.unref(M)},[t.renderSlot(E.$slots,"next-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(En))]),_:1})])],10,["disabled","onClick"])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",null,t.toDisplayString(t.unref(B)),1)],2),t.createVNode(Cs,{"selection-mode":"range",date:d.value,"min-date":t.unref(f),"max-date":t.unref(p),"range-state":t.unref(g),"disabled-date":t.unref(i),onChangerange:t.unref(w),onPick:W,onSelect:t.unref(C)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),t.createElementVNode("div",{class:t.normalizeClass([[t.unref(m).e("content"),t.unref(h).e("content")],"is-right"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(h).e("header"))},[E.unlinkPanels?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",disabled:!t.unref(L),class:t.normalizeClass([[t.unref(m).e("icon-btn"),{"is-disabled":!t.unref(L)}],"d-arrow-left"]),onClick:t.unref(D)},[t.renderSlot(E.$slots,"prev-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(vn))]),_:1})])],10,["disabled","onClick"])):t.createCommentVNode("v-if",!0),t.createElementVNode("button",{type:"button",class:t.normalizeClass([t.unref(m).e("icon-btn"),"d-arrow-right"]),onClick:t.unref(v)},[t.renderSlot(E.$slots,"next-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(En))]),_:1})])],10,["onClick"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(P)),1)],2),t.createVNode(Cs,{"selection-mode":"range",date:u.value,"min-date":t.unref(f),"max-date":t.unref(p),"range-state":t.unref(g),"disabled-date":t.unref(i),onChangerange:t.unref(w),onPick:W,onSelect:t.unref(C)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var Ek=_e(vk,[["__file","panel-month-range.vue"]]);const Mk=le({...gs}),Tk=["pick","set-picker-option","calendar-change"],Dk=({unlinkPanels:e,leftDate:n,rightDate:r})=>{const a=()=>{n.value=n.value.subtract(10,"year"),e.value||(r.value=r.value.subtract(10,"year"))},o=()=>{e.value||(n.value=n.value.add(10,"year")),r.value=r.value.add(10,"year")},s=()=>{n.value=n.value.add(10,"year")},i=()=>{r.value=r.value.subtract(10,"year")},l=t.computed(()=>{const f=Math.floor(n.value.year()/10)*10;return`${f}-${f+9}`}),c=t.computed(()=>{const f=Math.floor(r.value.year()/10)*10;return`${f}-${f+9}`}),d=t.computed(()=>Math.floor(n.value.year()/10)*10+9),u=t.computed(()=>Math.floor(r.value.year()/10)*10);return{leftPrevYear:a,rightNextYear:o,leftNextYear:s,rightPrevYear:i,leftLabel:l,rightLabel:c,leftYear:d,rightYear:u}},Ed="year",Ok=t.defineComponent({name:"DatePickerYearRange"}),xk=t.defineComponent({...Ok,props:Mk,emits:Tk,setup(e,{emit:n}){const r=e,{lang:a}=it(),o=t.ref(X().locale(a.value)),s=t.ref(o.value.add(10,"year")),{pickerNs:i}=t.inject(Ma),l=me("date-range-picker"),c=t.computed(()=>!!W.length),d=t.computed(()=>[i.b(),l.b(),{"has-sidebar":!!t.useSlots().sidebar||c.value}]),u=t.computed(()=>({content:[i.e("content"),l.e("content"),"is-left"],arrowLeftBtn:[i.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[i.e("icon-btn"),{[i.is("disabled")]:!_.value},"d-arrow-right"]})),f=t.computed(()=>({content:[i.e("content"),l.e("content"),"is-right"],arrowLeftBtn:[i.e("icon-btn"),{"is-disabled":!_.value},"d-arrow-left"],arrowRightBtn:[i.e("icon-btn"),"d-arrow-right"]})),p=Cd(a),{leftPrevYear:g,rightNextYear:m,leftNextYear:h,rightPrevYear:w,leftLabel:y,rightLabel:k,leftYear:C,rightYear:b}=Dk({unlinkPanels:t.toRef(r,"unlinkPanels"),leftDate:o,rightDate:s}),_=t.computed(()=>r.unlinkPanels&&b.value>C.value+1),v=t.ref(),M=t.ref(),D=t.ref({endDate:null,selecting:!1}),B=x=>{D.value=x},P=(x,j=!0)=>{const q=x.minDate,re=x.maxDate;M.value===re&&v.value===q||(n("calendar-change",[q.toDate(),re&&re.toDate()]),M.value=re,v.value=q,j&&V())},V=(x=!1)=>{Xn([v.value,M.value])&&n("pick",[v.value,M.value],x)},z=x=>{D.value.selecting=x,x||(D.value.endDate=null)},L=t.inject("EP_PICKER_BASE"),{shortcuts:W,disabledDate:A}=L.props,O=t.toRef(L.props,"format"),$=t.toRef(L.props,"defaultValue"),I=()=>{let x;if(ve($.value)){const j=X($.value[0]);let q=X($.value[1]);return r.unlinkPanels||(q=j.add(10,Ed)),[j,q]}else $.value?x=X($.value):x=X();return x=x.locale(a.value),[x,x.add(10,Ed)]};t.watch(()=>$.value,x=>{if(x){const j=I();o.value=j[0],s.value=j[1]}},{immediate:!0}),t.watch(()=>r.parsedValue,x=>{if(x&&x.length===2)if(v.value=x[0],M.value=x[1],o.value=v.value,r.unlinkPanels&&M.value){const j=v.value.year(),q=M.value.year();s.value=j===q?M.value.add(10,"year"):M.value}else s.value=o.value.add(10,"year");else{const j=I();v.value=void 0,M.value=void 0,o.value=j[0],s.value=j[1]}},{immediate:!0});const E=x=>ve(x)?x.map(j=>X(j,O.value).locale(a.value)):X(x,O.value).locale(a.value),N=x=>ve(x)?x.map(j=>j.format(O.value)):x.format(O.value),T=x=>Xn(x)&&(A?!A(x[0].toDate())&&!A(x[1].toDate()):!0),R=()=>{const x=I();o.value=x[0],s.value=x[1],M.value=void 0,v.value=void 0,n("pick",null)};return n("set-picker-option",["isValidValue",T]),n("set-picker-option",["parseUserInput",E]),n("set-picker-option",["formatToString",N]),n("set-picker-option",["handleClear",R]),(x,j)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(d))},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(i).e("body-wrapper"))},[t.renderSlot(x.$slots,"sidebar",{class:t.normalizeClass(t.unref(i).e("sidebar"))}),t.unref(c)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(i).e("sidebar"))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(W),(q,re)=>(t.openBlock(),t.createElementBlock("button",{key:re,type:"button",class:t.normalizeClass(t.unref(i).e("shortcut")),onClick:ae=>t.unref(p)(q)},t.toDisplayString(q.text),11,["onClick"]))),128))],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{class:t.normalizeClass(t.unref(i).e("body"))},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(u).content)},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(l).e("header"))},[t.createElementVNode("button",{type:"button",class:t.normalizeClass(t.unref(u).arrowLeftBtn),onClick:t.unref(g)},[t.renderSlot(x.$slots,"prev-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(vn))]),_:1})])],10,["onClick"]),x.unlinkPanels?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",disabled:!t.unref(_),class:t.normalizeClass(t.unref(u).arrowRightBtn),onClick:t.unref(h)},[t.renderSlot(x.$slots,"next-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(En))]),_:1})])],10,["disabled","onClick"])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",null,t.toDisplayString(t.unref(y)),1)],2),t.createVNode(vs,{"selection-mode":"range",date:o.value,"min-date":v.value,"max-date":M.value,"range-state":D.value,"disabled-date":t.unref(A),onChangerange:B,onPick:P,onSelect:z},null,8,["date","min-date","max-date","range-state","disabled-date"])],2),t.createElementVNode("div",{class:t.normalizeClass(t.unref(f).content)},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(l).e("header"))},[x.unlinkPanels?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",disabled:!t.unref(_),class:t.normalizeClass(t.unref(f).arrowLeftBtn),onClick:t.unref(w)},[t.renderSlot(x.$slots,"prev-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(vn))]),_:1})])],10,["disabled","onClick"])):t.createCommentVNode("v-if",!0),t.createElementVNode("button",{type:"button",class:t.normalizeClass(t.unref(f).arrowRightBtn),onClick:t.unref(m)},[t.renderSlot(x.$slots,"next-year",{},()=>[t.createVNode(t.unref(he),null,{default:t.withCtx(()=>[t.createVNode(t.unref(En))]),_:1})])],10,["onClick"]),t.createElementVNode("div",null,t.toDisplayString(t.unref(k)),1)],2),t.createVNode(vs,{"selection-mode":"range",date:s.value,"min-date":v.value,"max-date":M.value,"range-state":D.value,"disabled-date":t.unref(A),onChangerange:B,onPick:P,onSelect:z},null,8,["date","min-date","max-date","range-state","disabled-date"])],2)],2)],2)],2))}});var Nk=_e(xk,[["__file","panel-year-range.vue"]]);const Pk=function(e){switch(e){case"daterange":case"datetimerange":return wk;case"monthrange":return Ek;case"yearrange":return Nk;default:return yk}};X.extend(q_),X.extend(K_),X.extend(D_),X.extend(J_),X.extend(Q_),X.extend(tk),X.extend(rk),X.extend(ok);var $k=t.defineComponent({name:"ElDatePicker",install:null,props:sk,emits:["update:modelValue"],setup(e,{expose:n,emit:r,slots:a}){const o=me("picker-panel");t.provide("ElPopperOptions",t.reactive(t.toRef(e,"popperOptions"))),t.provide(Ma,{slots:a,pickerNs:o});const s=t.ref();n({focus:()=>{var c;(c=s.value)==null||c.focus()},blur:()=>{var c;(c=s.value)==null||c.blur()},handleOpen:()=>{var c;(c=s.value)==null||c.handleOpen()},handleClose:()=>{var c;(c=s.value)==null||c.handleClose()}});const l=c=>{r("update:modelValue",c)};return()=>{var c;const d=(c=e.format)!=null?c:O_[e.type]||Jn,u=Pk(e.type);return t.createVNode(A_,t.mergeProps(e,{format:d,type:e.type,ref:s,"onUpdate:modelValue":l}),{default:f=>t.createVNode(u,f,{"prev-month":a["prev-month"],"next-month":a["next-month"],"prev-year":a["prev-year"],"next-year":a["next-year"]}),"range-separator":a["range-separator"]})}}});const Bk=Ct($k),Vk=le({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:J([String,Array,Object])},zIndex:{type:J([String,Number])}}),Ik={click:e=>e instanceof MouseEvent},Ak="overlay";var Rk=t.defineComponent({name:"ElOverlay",props:Vk,emits:Ik,setup(e,{slots:n,emit:r}){const a=me(Ak),o=c=>{r("click",c)},{onClick:s,onMousedown:i,onMouseup:l}=rc(e.customMaskEvent?void 0:o);return()=>e.mask?t.createVNode("div",{class:[a.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:s,onMousedown:i,onMouseup:l},[t.renderSlot(n,"default")],la.STYLE|la.CLASS|la.PROPS,["onClick","onMouseup","onMousedown"]):t.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[t.renderSlot(n,"default")])}});const Fk=Rk,Md=Symbol("dialogInjectionKey"),Td=le({center:Boolean,alignCenter:Boolean,closeIcon:{type:Fn},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),Lk={close:()=>!0},Yk=t.defineComponent({name:"ElDialogContent"}),zk=t.defineComponent({...Yk,props:Td,emits:Lk,setup(e,{expose:n}){const r=e,{t:a}=it(),{Close:o}=Jy,{dialogRef:s,headerRef:i,bodyId:l,ns:c,style:d}=t.inject(Md),{focusTrapRef:u}=t.inject(Vc),f=t.computed(()=>[c.b(),c.is("fullscreen",r.fullscreen),c.is("draggable",r.draggable),c.is("align-center",r.alignCenter),{[c.m("center")]:r.center}]),p=Qy(u,s),g=t.computed(()=>r.draggable),m=t.computed(()=>r.overflow),{resetPosition:h}=o0(s,i,g,m);return n({resetPosition:h}),(w,y)=>(t.openBlock(),t.createElementBlock("div",{ref:t.unref(p),class:t.normalizeClass(t.unref(f)),style:t.normalizeStyle(t.unref(d)),tabindex:"-1"},[t.createElementVNode("header",{ref_key:"headerRef",ref:i,class:t.normalizeClass([t.unref(c).e("header"),{"show-close":w.showClose}])},[t.renderSlot(w.$slots,"header",{},()=>[t.createElementVNode("span",{role:"heading","aria-level":w.ariaLevel,class:t.normalizeClass(t.unref(c).e("title"))},t.toDisplayString(w.title),11,["aria-level"])]),w.showClose?(t.openBlock(),t.createElementBlock("button",{key:0,"aria-label":t.unref(a)("el.dialog.close"),class:t.normalizeClass(t.unref(c).e("headerbtn")),type:"button",onClick:k=>w.$emit("close")},[t.createVNode(t.unref(he),{class:t.normalizeClass(t.unref(c).e("close"))},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(w.closeIcon||t.unref(o))))]),_:1},8,["class"])],10,["aria-label","onClick"])):t.createCommentVNode("v-if",!0)],2),t.createElementVNode("div",{id:t.unref(l),class:t.normalizeClass(t.unref(c).e("body"))},[t.renderSlot(w.$slots,"default")],10,["id"]),w.$slots.footer?(t.openBlock(),t.createElementBlock("footer",{key:0,class:t.normalizeClass(t.unref(c).e("footer"))},[t.renderSlot(w.$slots,"footer")],2)):t.createCommentVNode("v-if",!0)],6))}});var jk=_e(zk,[["__file","dialog-content.vue"]]);const Wk=le({...Td,appendToBody:Boolean,appendTo:{type:J([String,Object]),default:"body"},beforeClose:{type:J(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),Hk={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[mr]:e=>pr(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},Uk=(e,n)=>{var r;const o=t.getCurrentInstance().emit,{nextZIndex:s}=uc();let i="";const l=Sr(),c=Sr(),d=t.ref(!1),u=t.ref(!1),f=t.ref(!1),p=t.ref((r=e.zIndex)!=null?r:s());let g,m;const h=mc("namespace",ca),w=t.computed(()=>{const A={},O=`--${h.value}-dialog`;return e.fullscreen||(e.top&&(A[`${O}-margin-top`]=e.top),e.width&&(A[`${O}-width`]=ln(e.width))),A}),y=t.computed(()=>e.alignCenter?{display:"flex"}:{});function k(){o("opened")}function C(){o("closed"),o(mr,!1),e.destroyOnClose&&(f.value=!1)}function b(){o("close")}function _(){m==null||m(),g==null||g(),e.openDelay&&e.openDelay>0?{stop:g}=hl(()=>B(),e.openDelay):B()}function v(){g==null||g(),m==null||m(),e.closeDelay&&e.closeDelay>0?{stop:m}=hl(()=>P(),e.closeDelay):P()}function M(){function A(O){O||(u.value=!0,d.value=!1)}e.beforeClose?e.beforeClose(A):v()}function D(){e.closeOnClickModal&&M()}function B(){Fe&&(d.value=!0)}function P(){d.value=!1}function V(){o("openAutoFocus")}function z(){o("closeAutoFocus")}function L(A){var O;((O=A.detail)==null?void 0:O.focusReason)==="pointer"&&A.preventDefault()}e.lockScroll&&p0(d);function W(){e.closeOnPressEscape&&M()}return t.watch(()=>e.modelValue,A=>{A?(u.value=!1,_(),f.value=!0,p.value=ll(e.zIndex)?s():p.value++,t.nextTick(()=>{o("open"),n.value&&(n.value.scrollTop=0)})):d.value&&v()}),t.watch(()=>e.fullscreen,A=>{n.value&&(A?(i=n.value.style.transform,n.value.style.transform=""):n.value.style.transform=i)}),t.onMounted(()=>{e.modelValue&&(d.value=!0,f.value=!0,_())}),{afterEnter:k,afterLeave:C,beforeLeave:b,handleClose:M,onModalClick:D,close:v,doClose:P,onOpenAutoFocus:V,onCloseAutoFocus:z,onCloseRequested:W,onFocusoutPrevented:L,titleId:l,bodyId:c,closed:u,style:w,overlayDialogStyle:y,rendered:f,visible:d,zIndex:p}},qk=t.defineComponent({name:"ElDialog",inheritAttrs:!1}),Gk=t.defineComponent({...qk,props:Wk,emits:Hk,setup(e,{expose:n}){const r=e,a=t.useSlots();Vl({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},t.computed(()=>!!a.title));const o=me("dialog"),s=t.ref(),i=t.ref(),l=t.ref(),{visible:c,titleId:d,bodyId:u,style:f,overlayDialogStyle:p,rendered:g,zIndex:m,afterEnter:h,afterLeave:w,beforeLeave:y,handleClose:k,onModalClick:C,onOpenAutoFocus:b,onCloseAutoFocus:_,onCloseRequested:v,onFocusoutPrevented:M}=Uk(r,s);t.provide(Md,{dialogRef:s,headerRef:i,bodyId:u,ns:o,rendered:g,style:f});const D=rc(C),B=t.computed(()=>r.draggable&&!r.fullscreen);return n({visible:c,dialogContentRef:l,resetPosition:()=>{var V;(V=l.value)==null||V.resetPosition()}}),(V,z)=>(t.openBlock(),t.createBlock(t.unref(Hc),{to:V.appendTo,disabled:V.appendTo!=="body"?!1:!V.appendToBody},{default:t.withCtx(()=>[t.createVNode(t.Transition,{name:"dialog-fade",onAfterEnter:t.unref(h),onAfterLeave:t.unref(w),onBeforeLeave:t.unref(y),persisted:""},{default:t.withCtx(()=>[t.withDirectives(t.createVNode(t.unref(Fk),{"custom-mask-event":"",mask:V.modal,"overlay-class":V.modalClass,"z-index":t.unref(m)},{default:t.withCtx(()=>[t.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":V.title||void 0,"aria-labelledby":V.title?void 0:t.unref(d),"aria-describedby":t.unref(u),class:t.normalizeClass(`${t.unref(o).namespace.value}-overlay-dialog`),style:t.normalizeStyle(t.unref(p)),onClick:t.unref(D).onClick,onMousedown:t.unref(D).onMousedown,onMouseup:t.unref(D).onMouseup},[t.createVNode(t.unref(Yc),{loop:"",trapped:t.unref(c),"focus-start-el":"container",onFocusAfterTrapped:t.unref(b),onFocusAfterReleased:t.unref(_),onFocusoutPrevented:t.unref(M),onReleaseRequested:t.unref(v)},{default:t.withCtx(()=>[t.unref(g)?(t.openBlock(),t.createBlock(jk,t.mergeProps({key:0,ref_key:"dialogContentRef",ref:l},V.$attrs,{center:V.center,"align-center":V.alignCenter,"close-icon":V.closeIcon,draggable:t.unref(B),overflow:V.overflow,fullscreen:V.fullscreen,"show-close":V.showClose,title:V.title,"aria-level":V.headerAriaLevel,onClose:t.unref(k)}),t.createSlots({header:t.withCtx(()=>[V.$slots.title?t.renderSlot(V.$slots,"title",{key:1}):t.renderSlot(V.$slots,"header",{key:0,close:t.unref(k),titleId:t.unref(d),titleClass:t.unref(o).e("title")})]),default:t.withCtx(()=>[t.renderSlot(V.$slots,"default")]),_:2},[V.$slots.footer?{name:"footer",fn:t.withCtx(()=>[t.renderSlot(V.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):t.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[t.vShow,t.unref(c)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var Kk=_e(Gk,[["__file","dialog.vue"]]);const Zk=Ct(Kk),Jk=le({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:Fn}}),Xk={click:e=>e instanceof MouseEvent},Qk=t.defineComponent({name:"ElLink"}),eS=t.defineComponent({...Qk,props:Jk,emits:Xk,setup(e,{emit:n}){const r=e,a=me("link"),o=t.computed(()=>[a.b(),a.m(r.type),a.is("disabled",r.disabled),a.is("underline",r.underline&&!r.disabled)]);function s(i){r.disabled||n("click",i)}return(i,l)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass(t.unref(o)),href:i.disabled||!i.href?void 0:i.href,target:i.disabled||!i.href?void 0:i.target,onClick:s},[i.icon?(t.openBlock(),t.createBlock(t.unref(he),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.icon)))]),_:1})):t.createCommentVNode("v-if",!0),i.$slots.default?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(t.unref(a).e("inner"))},[t.renderSlot(i.$slots,"default")],2)):t.createCommentVNode("v-if",!0),i.$slots.icon?t.renderSlot(i.$slots,"icon",{key:2}):t.createCommentVNode("v-if",!0)],10,["href","target"]))}});var tS=_e(eS,[["__file","link.vue"]]);const nS=Ct(tS);//! moment.js
|
|
31
|
+
`,CONTEXT_STYLE=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function calculateNodeStyling(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),r=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),i=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:CONTEXT_STYLE.map(o=>`${o}:${e.getPropertyValue(o)}`).join(";"),paddingSize:r,borderSize:i,boxSizing:n}}function calcTextareaHeight(t,e=1,n){var r;hiddenTextarea||(hiddenTextarea=document.createElement("textarea"),document.body.appendChild(hiddenTextarea));const{paddingSize:i,borderSize:s,boxSizing:o,contextStyle:a}=calculateNodeStyling(t);hiddenTextarea.setAttribute("style",`${a};${HIDDEN_STYLE}`),hiddenTextarea.value=t.value||t.placeholder||"";let l=hiddenTextarea.scrollHeight;const u={};o==="border-box"?l=l+s:o==="content-box"&&(l=l-i),hiddenTextarea.value="";const c=hiddenTextarea.scrollHeight-i;if(isNumber$1(e)){let d=c*e;o==="border-box"&&(d=d+i+s),l=Math.max(d,l),u.minHeight=`${d}px`}if(isNumber$1(n)){let d=c*n;o==="border-box"&&(d=d+i+s),l=Math.min(d,l)}return u.height=`${l}px`,(r=hiddenTextarea.parentNode)==null||r.removeChild(hiddenTextarea),hiddenTextarea=void 0,u}const inputProps=buildProps({id:{type:String,default:void 0},size:useSizeProp,disabled:Boolean,modelValue:{type:definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:iconPropType},prefixIcon:{type:iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:definePropType([Object,Array,String]),default:()=>mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...useAriaProps(["ariaLabel"])}),inputEmits={[UPDATE_MODEL_EVENT]:t=>isString$1(t),input:t=>isString$1(t),change:t=>isString$1(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},__default__$i=vue.defineComponent({name:"ElInput",inheritAttrs:!1}),_sfc_main$V=vue.defineComponent({...__default__$i,props:inputProps,emits:inputEmits,setup(t,{expose:e,emit:n}){const r=t,i=vue.useAttrs(),s=useAttrs(),o=vue.useSlots(),a=vue.computed(()=>[r.type==="textarea"?g.b():p.b(),p.m(h.value),p.is("disabled",f.value),p.is("exceed",le.value),{[p.b("group")]:o.prepend||o.append,[p.m("prefix")]:o.prefix||r.prefixIcon,[p.m("suffix")]:o.suffix||r.suffixIcon||r.clearable||r.showPassword,[p.bm("suffix","password-clear")]:oe.value&&A.value,[p.b("hidden")]:r.type==="hidden"},i.class]),l=vue.computed(()=>[p.e("wrapper"),p.is("focus",w.value)]),{form:u,formItem:c}=useFormItem(),{inputId:d}=useFormItemInputId(r,{formItemContext:c}),h=useFormSize(),f=useFormDisabled(),p=useNamespace("input"),g=useNamespace("textarea"),v=vue.shallowRef(),m=vue.shallowRef(),y=vue.ref(!1),b=vue.ref(!1),_=vue.ref(),T=vue.shallowRef(r.inputStyle),x=vue.computed(()=>v.value||m.value),{wrapperRef:k,isFocused:w,handleFocus:O,handleBlur:S}=useFocusController(x,{beforeFocus(){return f.value},afterBlur(){var Ce;r.validateEvent&&((Ce=c==null?void 0:c.validate)==null||Ce.call(c,"blur").catch(qe=>debugWarn(qe)))}}),F=vue.computed(()=>{var Ce;return(Ce=u==null?void 0:u.statusIcon)!=null?Ce:!1}),z=vue.computed(()=>(c==null?void 0:c.validateState)||""),Y=vue.computed(()=>z.value&&ValidateComponentsMap[z.value]),ae=vue.computed(()=>b.value?view_default:hide_default),j=vue.computed(()=>[i.style]),M=vue.computed(()=>[r.inputStyle,T.value,{resize:r.resize}]),$=vue.computed(()=>isNil(r.modelValue)?"":String(r.modelValue)),oe=vue.computed(()=>r.clearable&&!f.value&&!r.readonly&&!!$.value&&(w.value||y.value)),A=vue.computed(()=>r.showPassword&&!f.value&&!!$.value&&(!!$.value||w.value)),V=vue.computed(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!f.value&&!r.readonly&&!r.showPassword),D=vue.computed(()=>$.value.length),le=vue.computed(()=>!!V.value&&D.value>Number(r.maxlength)),ie=vue.computed(()=>!!o.suffix||!!r.suffixIcon||oe.value||r.showPassword||V.value||!!z.value&&F.value),[re,pe]=useCursor(v);useResizeObserver(m,Ce=>{if(_e(),!V.value||r.resize!=="both")return;const qe=Ce[0],{width:wn}=qe.contentRect;_.value={right:`calc(100% - ${wn+15+6}px)`}});const xe=()=>{const{type:Ce,autosize:qe}=r;if(!(!isClient||Ce!=="textarea"||!m.value))if(qe){const wn=isObject$1(qe)?qe.minRows:void 0,In=isObject$1(qe)?qe.maxRows:void 0,Rn=calcTextareaHeight(m.value,wn,In);T.value={overflowY:"hidden",...Rn},vue.nextTick(()=>{m.value.offsetHeight,T.value=Rn})}else T.value={minHeight:calcTextareaHeight(m.value).minHeight}},_e=(Ce=>{let qe=!1;return()=>{var wn;if(qe||!r.autosize)return;((wn=m.value)==null?void 0:wn.offsetParent)===null||(Ce(),qe=!0)}})(xe),Ne=()=>{const Ce=x.value,qe=r.formatter?r.formatter($.value):$.value;!Ce||Ce.value===qe||(Ce.value=qe)},$e=async Ce=>{re();let{value:qe}=Ce.target;if(r.formatter&&(qe=r.parser?r.parser(qe):qe),!At.value){if(qe===$.value){Ne();return}n(UPDATE_MODEL_EVENT,qe),n("input",qe),await vue.nextTick(),Ne(),pe()}},Ue=Ce=>{n("change",Ce.target.value)},{isComposing:At,handleCompositionStart:kt,handleCompositionUpdate:En,handleCompositionEnd:Tn}=useComposition({emit:n,afterComposition:$e}),bn=()=>{b.value=!b.value,Lt()},Lt=async()=>{var Ce;await vue.nextTick(),(Ce=x.value)==null||Ce.focus()},vn=()=>{var Ce;return(Ce=x.value)==null?void 0:Ce.blur()},Et=Ce=>{y.value=!1,n("mouseleave",Ce)},jt=Ce=>{y.value=!0,n("mouseenter",Ce)},_n=Ce=>{n("keydown",Ce)},kn=()=>{var Ce;(Ce=x.value)==null||Ce.select()},Pn=()=>{n(UPDATE_MODEL_EVENT,""),n("change",""),n("clear"),n("input","")};return vue.watch(()=>r.modelValue,()=>{var Ce;vue.nextTick(()=>xe()),r.validateEvent&&((Ce=c==null?void 0:c.validate)==null||Ce.call(c,"change").catch(qe=>debugWarn(qe)))}),vue.watch($,()=>Ne()),vue.watch(()=>r.type,async()=>{await vue.nextTick(),Ne(),xe()}),vue.onMounted(()=>{!r.formatter&&r.parser&&debugWarn("ElInput","If you set the parser, you also need to set the formatter."),Ne(),vue.nextTick(xe)}),e({input:v,textarea:m,ref:x,textareaStyle:M,autosize:vue.toRef(r,"autosize"),isComposing:At,focus:Lt,blur:vn,select:kn,clear:Pn,resizeTextarea:xe}),(Ce,qe)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(a),{[vue.unref(p).bm("group","append")]:Ce.$slots.append,[vue.unref(p).bm("group","prepend")]:Ce.$slots.prepend}]),style:vue.normalizeStyle(vue.unref(j)),onMouseenter:jt,onMouseleave:Et},[vue.createCommentVNode(" input "),Ce.type!=="textarea"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createCommentVNode(" prepend slot "),Ce.$slots.prepend?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(p).be("group","prepend"))},[vue.renderSlot(Ce.$slots,"prepend")],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{ref_key:"wrapperRef",ref:k,class:vue.normalizeClass(vue.unref(l))},[vue.createCommentVNode(" prefix slot "),Ce.$slots.prefix||Ce.prefixIcon?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(vue.unref(p).e("prefix"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(p).e("prefix-inner"))},[vue.renderSlot(Ce.$slots,"prefix"),Ce.prefixIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(p).e("icon"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(Ce.prefixIcon)))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)],2)],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("input",vue.mergeProps({id:vue.unref(d),ref_key:"input",ref:v,class:vue.unref(p).e("inner")},vue.unref(s),{minlength:Ce.minlength,maxlength:Ce.maxlength,type:Ce.showPassword?b.value?"text":"password":Ce.type,disabled:vue.unref(f),readonly:Ce.readonly,autocomplete:Ce.autocomplete,tabindex:Ce.tabindex,"aria-label":Ce.ariaLabel,placeholder:Ce.placeholder,style:Ce.inputStyle,form:Ce.form,autofocus:Ce.autofocus,role:Ce.containerRole,onCompositionstart:vue.unref(kt),onCompositionupdate:vue.unref(En),onCompositionend:vue.unref(Tn),onInput:$e,onChange:Ue,onKeydown:_n}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","onCompositionstart","onCompositionupdate","onCompositionend"]),vue.createCommentVNode(" suffix slot "),vue.unref(ie)?(vue.openBlock(),vue.createElementBlock("span",{key:1,class:vue.normalizeClass(vue.unref(p).e("suffix"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(p).e("suffix-inner"))},[!vue.unref(oe)||!vue.unref(A)||!vue.unref(V)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.renderSlot(Ce.$slots,"suffix"),Ce.suffixIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(p).e("icon"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(Ce.suffixIcon)))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)],64)):vue.createCommentVNode("v-if",!0),vue.unref(oe)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:1,class:vue.normalizeClass([vue.unref(p).e("icon"),vue.unref(p).e("clear")]),onMousedown:vue.withModifiers(vue.unref(NOOP),["prevent"]),onClick:Pn},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(circle_close_default))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0),vue.unref(A)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:2,class:vue.normalizeClass([vue.unref(p).e("icon"),vue.unref(p).e("password")]),onClick:bn},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(ae))))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0),vue.unref(V)?(vue.openBlock(),vue.createElementBlock("span",{key:3,class:vue.normalizeClass(vue.unref(p).e("count"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(p).e("count-inner"))},vue.toDisplayString(vue.unref(D))+" / "+vue.toDisplayString(Ce.maxlength),3)],2)):vue.createCommentVNode("v-if",!0),vue.unref(z)&&vue.unref(Y)&&vue.unref(F)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:4,class:vue.normalizeClass([vue.unref(p).e("icon"),vue.unref(p).e("validateIcon"),vue.unref(p).is("loading",vue.unref(z)==="validating")])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(Y))))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)],2)],2)):vue.createCommentVNode("v-if",!0)],2),vue.createCommentVNode(" append slot "),Ce.$slots.append?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(vue.unref(p).be("group","append"))},[vue.renderSlot(Ce.$slots,"append")],2)):vue.createCommentVNode("v-if",!0)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createCommentVNode(" textarea "),vue.createElementVNode("textarea",vue.mergeProps({id:vue.unref(d),ref_key:"textarea",ref:m,class:[vue.unref(g).e("inner"),vue.unref(p).is("focus",vue.unref(w))]},vue.unref(s),{minlength:Ce.minlength,maxlength:Ce.maxlength,tabindex:Ce.tabindex,disabled:vue.unref(f),readonly:Ce.readonly,autocomplete:Ce.autocomplete,style:vue.unref(M),"aria-label":Ce.ariaLabel,placeholder:Ce.placeholder,form:Ce.form,autofocus:Ce.autofocus,rows:Ce.rows,role:Ce.containerRole,onCompositionstart:vue.unref(kt),onCompositionupdate:vue.unref(En),onCompositionend:vue.unref(Tn),onInput:$e,onFocus:vue.unref(O),onBlur:vue.unref(S),onChange:Ue,onKeydown:_n}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),vue.unref(V)?(vue.openBlock(),vue.createElementBlock("span",{key:0,style:vue.normalizeStyle(_.value),class:vue.normalizeClass(vue.unref(p).e("count"))},vue.toDisplayString(vue.unref(D))+" / "+vue.toDisplayString(Ce.maxlength),7)):vue.createCommentVNode("v-if",!0)],64))],38))}});var Input$1=_export_sfc$1(_sfc_main$V,[["__file","input.vue"]]);const ElInput=withInstall(Input$1),GAP=4,BAR_MAP={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},renderThumbStyle=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),scrollbarContextKey=Symbol("scrollbarContextKey"),thumbProps=buildProps({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),COMPONENT_NAME$2="Thumb",_sfc_main$U=vue.defineComponent({__name:"thumb",props:thumbProps,setup(t){const e=t,n=vue.inject(scrollbarContextKey),r=useNamespace("scrollbar");n||throwError(COMPONENT_NAME$2,"can not inject scrollbar context");const i=vue.ref(),s=vue.ref(),o=vue.ref({}),a=vue.ref(!1);let l=!1,u=!1,c=isClient?document.onselectstart:null;const d=vue.computed(()=>BAR_MAP[e.vertical?"vertical":"horizontal"]),h=vue.computed(()=>renderThumbStyle({size:e.size,move:e.move,bar:d.value})),f=vue.computed(()=>i.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/e.ratio/s.value[d.value.offset]),p=x=>{var k;if(x.stopPropagation(),x.ctrlKey||[1,2].includes(x.button))return;(k=window.getSelection())==null||k.removeAllRanges(),v(x);const w=x.currentTarget;w&&(o.value[d.value.axis]=w[d.value.offset]-(x[d.value.client]-w.getBoundingClientRect()[d.value.direction]))},g=x=>{if(!s.value||!i.value||!n.wrapElement)return;const k=Math.abs(x.target.getBoundingClientRect()[d.value.direction]-x[d.value.client]),w=s.value[d.value.offset]/2,O=(k-w)*100*f.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=O*n.wrapElement[d.value.scrollSize]/100},v=x=>{x.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",m),document.addEventListener("mouseup",y),c=document.onselectstart,document.onselectstart=()=>!1},m=x=>{if(!i.value||!s.value||l===!1)return;const k=o.value[d.value.axis];if(!k)return;const w=(i.value.getBoundingClientRect()[d.value.direction]-x[d.value.client])*-1,O=s.value[d.value.offset]-k,S=(w-O)*100*f.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=S*n.wrapElement[d.value.scrollSize]/100},y=()=>{l=!1,o.value[d.value.axis]=0,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y),T(),u&&(a.value=!1)},b=()=>{u=!1,a.value=!!e.size},_=()=>{u=!0,a.value=l};vue.onBeforeUnmount(()=>{T(),document.removeEventListener("mouseup",y)});const T=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return useEventListener(vue.toRef(n,"scrollbarElement"),"mousemove",b),useEventListener(vue.toRef(n,"scrollbarElement"),"mouseleave",_),(x,k)=>(vue.openBlock(),vue.createBlock(vue.Transition,{name:vue.unref(r).b("fade"),persisted:""},{default:vue.withCtx(()=>[vue.withDirectives(vue.createElementVNode("div",{ref_key:"instance",ref:i,class:vue.normalizeClass([vue.unref(r).e("bar"),vue.unref(r).is(vue.unref(d).key)]),onMousedown:g},[vue.createElementVNode("div",{ref_key:"thumb",ref:s,class:vue.normalizeClass(vue.unref(r).e("thumb")),style:vue.normalizeStyle(vue.unref(h)),onMousedown:p},null,38)],34),[[vue.vShow,x.always||a.value]])]),_:1},8,["name"]))}});var Thumb=_export_sfc$1(_sfc_main$U,[["__file","thumb.vue"]]);const barProps=buildProps({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),_sfc_main$T=vue.defineComponent({__name:"bar",props:barProps,setup(t,{expose:e}){const n=t,r=vue.inject(scrollbarContextKey),i=vue.ref(0),s=vue.ref(0),o=vue.ref(""),a=vue.ref(""),l=vue.ref(1),u=vue.ref(1);return e({handleScroll:h=>{if(h){const f=h.offsetHeight-GAP,p=h.offsetWidth-GAP;s.value=h.scrollTop*100/f*l.value,i.value=h.scrollLeft*100/p*u.value}},update:()=>{const h=r==null?void 0:r.wrapElement;if(!h)return;const f=h.offsetHeight-GAP,p=h.offsetWidth-GAP,g=f**2/h.scrollHeight,v=p**2/h.scrollWidth,m=Math.max(g,n.minSize),y=Math.max(v,n.minSize);l.value=g/(f-g)/(m/(f-m)),u.value=v/(p-v)/(y/(p-y)),a.value=m+GAP<f?`${m}px`:"",o.value=y+GAP<p?`${y}px`:""}}),(h,f)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(Thumb,{move:i.value,ratio:u.value,size:o.value,always:h.always},null,8,["move","ratio","size","always"]),vue.createVNode(Thumb,{move:s.value,ratio:l.value,size:a.value,vertical:"",always:h.always},null,8,["move","ratio","size","always"])],64))}});var Bar=_export_sfc$1(_sfc_main$T,[["__file","bar.vue"]]);const scrollbarProps=buildProps({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:definePropType([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...useAriaProps(["ariaLabel","ariaOrientation"])}),scrollbarEmits={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(isNumber$1)},COMPONENT_NAME$1="ElScrollbar",__default__$h=vue.defineComponent({name:COMPONENT_NAME$1}),_sfc_main$S=vue.defineComponent({...__default__$h,props:scrollbarProps,emits:scrollbarEmits,setup(t,{expose:e,emit:n}){const r=t,i=useNamespace("scrollbar");let s,o,a=0,l=0;const u=vue.ref(),c=vue.ref(),d=vue.ref(),h=vue.ref(),f=vue.computed(()=>{const T={};return r.height&&(T.height=addUnit(r.height)),r.maxHeight&&(T.maxHeight=addUnit(r.maxHeight)),[r.wrapStyle,T]}),p=vue.computed(()=>[r.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!r.native}]),g=vue.computed(()=>[i.e("view"),r.viewClass]),v=()=>{var T;c.value&&((T=h.value)==null||T.handleScroll(c.value),a=c.value.scrollTop,l=c.value.scrollLeft,n("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};function m(T,x){isObject$1(T)?c.value.scrollTo(T):isNumber$1(T)&&isNumber$1(x)&&c.value.scrollTo(T,x)}const y=T=>{if(!isNumber$1(T)){debugWarn(COMPONENT_NAME$1,"value must be a number");return}c.value.scrollTop=T},b=T=>{if(!isNumber$1(T)){debugWarn(COMPONENT_NAME$1,"value must be a number");return}c.value.scrollLeft=T},_=()=>{var T;(T=h.value)==null||T.update()};return vue.watch(()=>r.noresize,T=>{T?(s==null||s(),o==null||o()):({stop:s}=useResizeObserver(d,_),o=useEventListener("resize",_))},{immediate:!0}),vue.watch(()=>[r.maxHeight,r.height],()=>{r.native||vue.nextTick(()=>{var T;_(),c.value&&((T=h.value)==null||T.handleScroll(c.value))})}),vue.provide(scrollbarContextKey,vue.reactive({scrollbarElement:u,wrapElement:c})),vue.onActivated(()=>{c.value&&(c.value.scrollTop=a,c.value.scrollLeft=l)}),vue.onMounted(()=>{r.native||vue.nextTick(()=>{_()})}),vue.onUpdated(()=>_()),e({wrapRef:c,update:_,scrollTo:m,setScrollTop:y,setScrollLeft:b,handleScroll:v}),(T,x)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"scrollbarRef",ref:u,class:vue.normalizeClass(vue.unref(i).b())},[vue.createElementVNode("div",{ref_key:"wrapRef",ref:c,class:vue.normalizeClass(vue.unref(p)),style:vue.normalizeStyle(vue.unref(f)),tabindex:T.tabindex,onScroll:v},[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(T.tag),{id:T.id,ref_key:"resizeRef",ref:d,class:vue.normalizeClass(vue.unref(g)),style:vue.normalizeStyle(T.viewStyle),role:T.role,"aria-label":T.ariaLabel,"aria-orientation":T.ariaOrientation},{default:vue.withCtx(()=>[vue.renderSlot(T.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),T.native?vue.createCommentVNode("v-if",!0):(vue.openBlock(),vue.createBlock(Bar,{key:0,ref_key:"barRef",ref:h,always:T.always,"min-size":T.minSize},null,8,["always","min-size"]))],2))}});var Scrollbar=_export_sfc$1(_sfc_main$S,[["__file","scrollbar.vue"]]);const ElScrollbar=withInstall(Scrollbar),POPPER_INJECTION_KEY=Symbol("popper"),POPPER_CONTENT_INJECTION_KEY=Symbol("popperContent"),roleTypes=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],popperProps=buildProps({role:{type:String,values:roleTypes,default:"tooltip"}}),__default__$g=vue.defineComponent({name:"ElPopper",inheritAttrs:!1}),_sfc_main$R=vue.defineComponent({...__default__$g,props:popperProps,setup(t,{expose:e}){const n=t,r=vue.ref(),i=vue.ref(),s=vue.ref(),o=vue.ref(),a=vue.computed(()=>n.role),l={triggerRef:r,popperInstanceRef:i,contentRef:s,referenceRef:o,role:a};return e(l),vue.provide(POPPER_INJECTION_KEY,l),(u,c)=>vue.renderSlot(u.$slots,"default")}});var Popper=_export_sfc$1(_sfc_main$R,[["__file","popper.vue"]]);const popperArrowProps=buildProps({arrowOffset:{type:Number,default:5}}),__default__$f=vue.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),_sfc_main$Q=vue.defineComponent({...__default__$f,props:popperArrowProps,setup(t,{expose:e}){const n=t,r=useNamespace("popper"),{arrowOffset:i,arrowRef:s,arrowStyle:o}=vue.inject(POPPER_CONTENT_INJECTION_KEY,void 0);return vue.watch(()=>n.arrowOffset,a=>{i.value=a}),vue.onBeforeUnmount(()=>{s.value=void 0}),e({arrowRef:s}),(a,l)=>(vue.openBlock(),vue.createElementBlock("span",{ref_key:"arrowRef",ref:s,class:vue.normalizeClass(vue.unref(r).e("arrow")),style:vue.normalizeStyle(vue.unref(o)),"data-popper-arrow":""},null,6))}});var ElPopperArrow=_export_sfc$1(_sfc_main$Q,[["__file","arrow.vue"]]);const NAME="ElOnlyChild",OnlyChild=vue.defineComponent({name:NAME,setup(t,{slots:e,attrs:n}){var r;const i=vue.inject(FORWARD_REF_INJECTION_KEY),s=useForwardRefDirective((r=i==null?void 0:i.setForwardRef)!=null?r:NOOP);return()=>{var o;const a=(o=e.default)==null?void 0:o.call(e,n);if(!a)return null;if(a.length>1)return debugWarn(NAME,"requires exact only one valid child."),null;const l=findFirstLegitChild(a);return l?vue.withDirectives(vue.cloneVNode(l,n),[[s]]):(debugWarn(NAME,"no valid child node found"),null)}}});function findFirstLegitChild(t){if(!t)return null;const e=t;for(const n of e){if(isObject$1(n))switch(n.type){case vue.Comment:continue;case vue.Text:case"svg":return wrapTextContent(n);case vue.Fragment:return findFirstLegitChild(n.children);default:return n}return wrapTextContent(n)}return null}function wrapTextContent(t){const e=useNamespace("only-child");return vue.createVNode("span",{class:e.e("content")},[t])}const popperTriggerProps=buildProps({virtualRef:{type:definePropType(Object)},virtualTriggering:Boolean,onMouseenter:{type:definePropType(Function)},onMouseleave:{type:definePropType(Function)},onClick:{type:definePropType(Function)},onKeydown:{type:definePropType(Function)},onFocus:{type:definePropType(Function)},onBlur:{type:definePropType(Function)},onContextmenu:{type:definePropType(Function)},id:String,open:Boolean}),__default__$e=vue.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),_sfc_main$P=vue.defineComponent({...__default__$e,props:popperTriggerProps,setup(t,{expose:e}){const n=t,{role:r,triggerRef:i}=vue.inject(POPPER_INJECTION_KEY,void 0);useForwardRef(i);const s=vue.computed(()=>a.value?n.id:void 0),o=vue.computed(()=>{if(r&&r.value==="tooltip")return n.open&&n.id?n.id:void 0}),a=vue.computed(()=>{if(r&&r.value!=="tooltip")return r.value}),l=vue.computed(()=>a.value?`${n.open}`:void 0);let u;const c=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return vue.onMounted(()=>{vue.watch(()=>n.virtualRef,d=>{d&&(i.value=unrefElement(d))},{immediate:!0}),vue.watch(i,(d,h)=>{u==null||u(),u=void 0,isElement(d)&&(c.forEach(f=>{var p;const g=n[f];g&&(d.addEventListener(f.slice(2).toLowerCase(),g),(p=h==null?void 0:h.removeEventListener)==null||p.call(h,f.slice(2).toLowerCase(),g))}),isFocusable(d)&&(u=vue.watch([s,o,a,l],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,g)=>{isNil(f[g])?d.removeAttribute(p):d.setAttribute(p,f[g])})},{immediate:!0}))),isElement(h)&&isFocusable(h)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>h.removeAttribute(f))},{immediate:!0})}),vue.onBeforeUnmount(()=>{if(u==null||u(),u=void 0,i.value&&isElement(i.value)){const d=i.value;c.forEach(h=>{const f=n[h];f&&d.removeEventListener(h.slice(2).toLowerCase(),f)}),i.value=void 0}}),e({triggerRef:i}),(d,h)=>d.virtualTriggering?vue.createCommentVNode("v-if",!0):(vue.openBlock(),vue.createBlock(vue.unref(OnlyChild),vue.mergeProps({key:0},d.$attrs,{"aria-controls":vue.unref(s),"aria-describedby":vue.unref(o),"aria-expanded":vue.unref(l),"aria-haspopup":vue.unref(a)}),{default:vue.withCtx(()=>[vue.renderSlot(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var ElPopperTrigger=_export_sfc$1(_sfc_main$P,[["__file","trigger.vue"]]);const FOCUS_AFTER_TRAPPED="focus-trap.focus-after-trapped",FOCUS_AFTER_RELEASED="focus-trap.focus-after-released",FOCUSOUT_PREVENTED="focus-trap.focusout-prevented",FOCUS_AFTER_TRAPPED_OPTS={cancelable:!0,bubbles:!1},FOCUSOUT_PREVENTED_OPTS={cancelable:!0,bubbles:!1},ON_TRAP_FOCUS_EVT="focusAfterTrapped",ON_RELEASE_FOCUS_EVT="focusAfterReleased",FOCUS_TRAP_INJECTION_KEY=Symbol("elFocusTrap"),focusReason=vue.ref(),lastUserFocusTimestamp=vue.ref(0),lastAutomatedFocusTimestamp=vue.ref(0);let focusReasonUserCount=0;const obtainAllFocusableElements=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},getVisibleElement=(t,e)=>{for(const n of t)if(!isHidden(n,e))return n},isHidden=(t,e)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},getEdges=t=>{const e=obtainAllFocusableElements(t),n=getVisibleElement(e,t),r=getVisibleElement(e.reverse(),t);return[n,r]},isSelectable=t=>t instanceof HTMLInputElement&&"select"in t,tryFocus=(t,e)=>{if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),lastAutomatedFocusTimestamp.value=window.performance.now(),t!==n&&isSelectable(t)&&e&&t.select()}};function removeFromStack(t,e){const n=[...t],r=t.indexOf(e);return r!==-1&&n.splice(r,1),n}const createFocusableStack=()=>{let t=[];return{push:r=>{const i=t[0];i&&r!==i&&i.pause(),t=removeFromStack(t,r),t.unshift(r)},remove:r=>{var i,s;t=removeFromStack(t,r),(s=(i=t[0])==null?void 0:i.resume)==null||s.call(i)}}},focusFirstDescendant=(t,e=!1)=>{const n=document.activeElement;for(const r of t)if(tryFocus(r,e),document.activeElement!==n)return},focusableStack=createFocusableStack(),isFocusCausedByUserEvent=()=>lastUserFocusTimestamp.value>lastAutomatedFocusTimestamp.value,notifyFocusReasonPointer=()=>{focusReason.value="pointer",lastUserFocusTimestamp.value=window.performance.now()},notifyFocusReasonKeydown=()=>{focusReason.value="keyboard",lastUserFocusTimestamp.value=window.performance.now()},useFocusReason=()=>(vue.onMounted(()=>{focusReasonUserCount===0&&(document.addEventListener("mousedown",notifyFocusReasonPointer),document.addEventListener("touchstart",notifyFocusReasonPointer),document.addEventListener("keydown",notifyFocusReasonKeydown)),focusReasonUserCount++}),vue.onBeforeUnmount(()=>{focusReasonUserCount--,focusReasonUserCount<=0&&(document.removeEventListener("mousedown",notifyFocusReasonPointer),document.removeEventListener("touchstart",notifyFocusReasonPointer),document.removeEventListener("keydown",notifyFocusReasonKeydown))}),{focusReason,lastUserFocusTimestamp,lastAutomatedFocusTimestamp}),createFocusOutPreventedEvent=t=>new CustomEvent(FOCUSOUT_PREVENTED,{...FOCUSOUT_PREVENTED_OPTS,detail:t}),_sfc_main$O=vue.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[ON_TRAP_FOCUS_EVT,ON_RELEASE_FOCUS_EVT,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=vue.ref();let r,i;const{focusReason:s}=useFocusReason();useEscapeKeydown(p=>{t.trapped&&!o.paused&&e("release-requested",p)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},a=p=>{if(!t.loop&&!t.trapped||o.paused)return;const{code:g,altKey:v,ctrlKey:m,metaKey:y,currentTarget:b,shiftKey:_}=p,{loop:T}=t,x=g===EVENT_CODE.tab&&!v&&!m&&!y,k=document.activeElement;if(x&&k){const w=b,[O,S]=getEdges(w);if(O&&S){if(!_&&k===S){const z=createFocusOutPreventedEvent({focusReason:s.value});e("focusout-prevented",z),z.defaultPrevented||(p.preventDefault(),T&&tryFocus(O,!0))}else if(_&&[O,w].includes(k)){const z=createFocusOutPreventedEvent({focusReason:s.value});e("focusout-prevented",z),z.defaultPrevented||(p.preventDefault(),T&&tryFocus(S,!0))}}else if(k===w){const z=createFocusOutPreventedEvent({focusReason:s.value});e("focusout-prevented",z),z.defaultPrevented||p.preventDefault()}}};vue.provide(FOCUS_TRAP_INJECTION_KEY,{focusTrapRef:n,onKeydown:a}),vue.watch(()=>t.focusTrapEl,p=>{p&&(n.value=p)},{immediate:!0}),vue.watch([n],([p],[g])=>{p&&(p.addEventListener("keydown",a),p.addEventListener("focusin",c),p.addEventListener("focusout",d)),g&&(g.removeEventListener("keydown",a),g.removeEventListener("focusin",c),g.removeEventListener("focusout",d))});const l=p=>{e(ON_TRAP_FOCUS_EVT,p)},u=p=>e(ON_RELEASE_FOCUS_EVT,p),c=p=>{const g=vue.unref(n);if(!g)return;const v=p.target,m=p.relatedTarget,y=v&&g.contains(v);t.trapped||m&&g.contains(m)||(r=m),y&&e("focusin",p),!o.paused&&t.trapped&&(y?i=v:tryFocus(i,!0))},d=p=>{const g=vue.unref(n);if(!(o.paused||!g))if(t.trapped){const v=p.relatedTarget;!isNil(v)&&!g.contains(v)&&setTimeout(()=>{if(!o.paused&&t.trapped){const m=createFocusOutPreventedEvent({focusReason:s.value});e("focusout-prevented",m),m.defaultPrevented||tryFocus(i,!0)}},0)}else{const v=p.target;v&&g.contains(v)||e("focusout",p)}};async function h(){await vue.nextTick();const p=vue.unref(n);if(p){focusableStack.push(o);const g=p.contains(document.activeElement)?r:document.activeElement;if(r=g,!p.contains(g)){const m=new Event(FOCUS_AFTER_TRAPPED,FOCUS_AFTER_TRAPPED_OPTS);p.addEventListener(FOCUS_AFTER_TRAPPED,l),p.dispatchEvent(m),m.defaultPrevented||vue.nextTick(()=>{let y=t.focusStartEl;isString$1(y)||(tryFocus(y),document.activeElement!==y&&(y="first")),y==="first"&&focusFirstDescendant(obtainAllFocusableElements(p),!0),(document.activeElement===g||y==="container")&&tryFocus(p)})}}}function f(){const p=vue.unref(n);if(p){p.removeEventListener(FOCUS_AFTER_TRAPPED,l);const g=new CustomEvent(FOCUS_AFTER_RELEASED,{...FOCUS_AFTER_TRAPPED_OPTS,detail:{focusReason:s.value}});p.addEventListener(FOCUS_AFTER_RELEASED,u),p.dispatchEvent(g),!g.defaultPrevented&&(s.value=="keyboard"||!isFocusCausedByUserEvent()||p.contains(document.activeElement))&&tryFocus(r??document.body),p.removeEventListener(FOCUS_AFTER_RELEASED,u),focusableStack.remove(o)}}return vue.onMounted(()=>{t.trapped&&h(),vue.watch(()=>t.trapped,p=>{p?h():f()})}),vue.onBeforeUnmount(()=>{t.trapped&&f(),n.value&&(n.value.removeEventListener("keydown",a),n.value.removeEventListener("focusin",c),n.value.removeEventListener("focusout",d),n.value=void 0)}),{onKeydown:a}}});function _sfc_render$4(t,e,n,r,i,s){return vue.renderSlot(t.$slots,"default",{handleKeydown:t.onKeydown})}var ElFocusTrap=_export_sfc$1(_sfc_main$O,[["render",_sfc_render$4],["__file","focus-trap.vue"]]);const POSITIONING_STRATEGIES=["fixed","absolute"],popperCoreConfigProps=buildProps({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:definePropType(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Ee,default:"bottom"},popperOptions:{type:definePropType(Object),default:()=>({})},strategy:{type:String,values:POSITIONING_STRATEGIES,default:"absolute"}}),popperContentProps=buildProps({...popperCoreConfigProps,id:String,style:{type:definePropType([String,Array,Object])},className:{type:definePropType([String,Array,Object])},effect:{type:definePropType(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:definePropType([String,Array,Object])},popperStyle:{type:definePropType([String,Array,Object])},referenceEl:{type:definePropType(Object)},triggerTargetEl:{type:definePropType(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...useAriaProps(["ariaLabel"])}),popperContentEmits={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},buildPopperOptions=(t,e=[])=>{const{placement:n,strategy:r,popperOptions:i}=t,s={placement:n,strategy:r,...i,modifiers:[...genModifiers(t),...e]};return deriveExtraModifiers(s,i==null?void 0:i.modifiers),s},unwrapMeasurableEl=t=>{if(isClient)return unrefElement(t)};function genModifiers(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:r}=t;return[{name:"offset",options:{offset:[0,e??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function deriveExtraModifiers(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const DEFAULT_ARROW_OFFSET=0,usePopperContent=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:r,role:i}=vue.inject(POPPER_INJECTION_KEY,void 0),s=vue.ref(),o=vue.ref(),a=vue.computed(()=>({name:"eventListeners",enabled:!!t.visible})),l=vue.computed(()=>{var m;const y=vue.unref(s),b=(m=vue.unref(o))!=null?m:DEFAULT_ARROW_OFFSET;return{name:"arrow",enabled:!isUndefined$2(y),options:{element:y,padding:b}}}),u=vue.computed(()=>({onFirstUpdate:()=>{p()},...buildPopperOptions(t,[vue.unref(l),vue.unref(a)])})),c=vue.computed(()=>unwrapMeasurableEl(t.referenceEl)||vue.unref(r)),{attributes:d,state:h,styles:f,update:p,forceUpdate:g,instanceRef:v}=usePopper(c,n,u);return vue.watch(v,m=>e.value=m),vue.onMounted(()=>{vue.watch(()=>{var m;return(m=vue.unref(c))==null?void 0:m.getBoundingClientRect()},()=>{p()})}),{attributes:d,arrowRef:s,contentRef:n,instanceRef:v,state:h,styles:f,role:i,forceUpdate:g,update:p}},usePopperContentDOM=(t,{attributes:e,styles:n,role:r})=>{const{nextZIndex:i}=useZIndex(),s=useNamespace("popper"),o=vue.computed(()=>vue.unref(e).popper),a=vue.ref(isNumber$1(t.zIndex)?t.zIndex:i()),l=vue.computed(()=>[s.b(),s.is("pure",t.pure),s.is(t.effect),t.popperClass]),u=vue.computed(()=>[{zIndex:vue.unref(a)},vue.unref(n).popper,t.popperStyle||{}]),c=vue.computed(()=>r.value==="dialog"?"false":void 0),d=vue.computed(()=>vue.unref(n).arrow||{});return{ariaModal:c,arrowStyle:d,contentAttrs:o,contentClass:l,contentStyle:u,contentZIndex:a,updateZIndex:()=>{a.value=isNumber$1(t.zIndex)?t.zIndex:i()}}},usePopperContentFocusTrap=(t,e)=>{const n=vue.ref(!1),r=vue.ref();return{focusStartRef:r,trapped:n,onFocusAfterReleased:u=>{var c;((c=u.detail)==null?void 0:c.focusReason)!=="pointer"&&(r.value="first",e("blur"))},onFocusAfterTrapped:()=>{e("focus")},onFocusInTrap:u=>{t.visible&&!n.value&&(u.target&&(r.value=u.target),n.value=!0)},onFocusoutPrevented:u=>{t.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,e("close")}}},__default__$d=vue.defineComponent({name:"ElPopperContent"}),_sfc_main$N=vue.defineComponent({...__default__$d,props:popperContentProps,emits:popperContentEmits,setup(t,{expose:e,emit:n}){const r=t,{focusStartRef:i,trapped:s,onFocusAfterReleased:o,onFocusAfterTrapped:a,onFocusInTrap:l,onFocusoutPrevented:u,onReleaseRequested:c}=usePopperContentFocusTrap(r,n),{attributes:d,arrowRef:h,contentRef:f,styles:p,instanceRef:g,role:v,update:m}=usePopperContent(r),{ariaModal:y,arrowStyle:b,contentAttrs:_,contentClass:T,contentStyle:x,updateZIndex:k}=usePopperContentDOM(r,{styles:p,attributes:d,role:v}),w=vue.inject(formItemContextKey,void 0),O=vue.ref();vue.provide(POPPER_CONTENT_INJECTION_KEY,{arrowStyle:b,arrowRef:h,arrowOffset:O}),w&&vue.provide(formItemContextKey,{...w,addInputId:NOOP,removeInputId:NOOP});let S;const F=(Y=!0)=>{m(),Y&&k()},z=()=>{F(!1),r.visible&&r.focusOnShow?s.value=!0:r.visible===!1&&(s.value=!1)};return vue.onMounted(()=>{vue.watch(()=>r.triggerTargetEl,(Y,ae)=>{S==null||S(),S=void 0;const j=vue.unref(Y||f.value),M=vue.unref(ae||f.value);isElement(j)&&(S=vue.watch([v,()=>r.ariaLabel,y,()=>r.id],$=>{["role","aria-label","aria-modal","id"].forEach((oe,A)=>{isNil($[A])?j.removeAttribute(oe):j.setAttribute(oe,$[A])})},{immediate:!0})),M!==j&&isElement(M)&&["role","aria-label","aria-modal","id"].forEach($=>{M.removeAttribute($)})},{immediate:!0}),vue.watch(()=>r.visible,z,{immediate:!0})}),vue.onBeforeUnmount(()=>{S==null||S(),S=void 0}),e({popperContentRef:f,popperInstanceRef:g,updatePopper:F,contentStyle:x}),(Y,ae)=>(vue.openBlock(),vue.createElementBlock("div",vue.mergeProps({ref_key:"contentRef",ref:f},vue.unref(_),{style:vue.unref(x),class:vue.unref(T),tabindex:"-1",onMouseenter:j=>Y.$emit("mouseenter",j),onMouseleave:j=>Y.$emit("mouseleave",j)}),[vue.createVNode(vue.unref(ElFocusTrap),{trapped:vue.unref(s),"trap-on-focus-in":!0,"focus-trap-el":vue.unref(f),"focus-start-el":vue.unref(i),onFocusAfterTrapped:vue.unref(a),onFocusAfterReleased:vue.unref(o),onFocusin:vue.unref(l),onFocusoutPrevented:vue.unref(u),onReleaseRequested:vue.unref(c)},{default:vue.withCtx(()=>[vue.renderSlot(Y.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var ElPopperContent=_export_sfc$1(_sfc_main$N,[["__file","content.vue"]]);const ElPopper=withInstall(Popper),TOOLTIP_INJECTION_KEY=Symbol("elTooltip"),useTooltipContentProps=buildProps({...useDelayedToggleProps,...popperContentProps,appendTo:{type:definePropType([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:definePropType(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...useAriaProps(["ariaLabel"])}),useTooltipTriggerProps=buildProps({...popperTriggerProps,disabled:Boolean,trigger:{type:definePropType([String,Array]),default:"hover"},triggerKeys:{type:definePropType(Array),default:()=>[EVENT_CODE.enter,EVENT_CODE.numpadEnter,EVENT_CODE.space]}}),{useModelToggleProps:useTooltipModelToggleProps,useModelToggleEmits:useTooltipModelToggleEmits,useModelToggle:useTooltipModelToggle}=createModelToggleComposable("visible"),useTooltipProps=buildProps({...popperProps,...useTooltipModelToggleProps,...useTooltipContentProps,...useTooltipTriggerProps,...popperArrowProps,showArrow:{type:Boolean,default:!0}}),tooltipEmits=[...useTooltipModelToggleEmits,"before-show","before-hide","show","hide","open","close"],isTriggerType=(t,e)=>isArray$1(t)?t.includes(e):t===e,whenTrigger=(t,e,n)=>r=>{isTriggerType(vue.unref(t),e)&&n(r)},__default__$c=vue.defineComponent({name:"ElTooltipTrigger"}),_sfc_main$M=vue.defineComponent({...__default__$c,props:useTooltipTriggerProps,setup(t,{expose:e}){const n=t,r=useNamespace("tooltip"),{controlled:i,id:s,open:o,onOpen:a,onClose:l,onToggle:u}=vue.inject(TOOLTIP_INJECTION_KEY,void 0),c=vue.ref(null),d=()=>{if(vue.unref(i)||n.disabled)return!0},h=vue.toRef(n,"trigger"),f=composeEventHandlers(d,whenTrigger(h,"hover",a)),p=composeEventHandlers(d,whenTrigger(h,"hover",l)),g=composeEventHandlers(d,whenTrigger(h,"click",_=>{_.button===0&&u(_)})),v=composeEventHandlers(d,whenTrigger(h,"focus",a)),m=composeEventHandlers(d,whenTrigger(h,"focus",l)),y=composeEventHandlers(d,whenTrigger(h,"contextmenu",_=>{_.preventDefault(),u(_)})),b=composeEventHandlers(d,_=>{const{code:T}=_;n.triggerKeys.includes(T)&&(_.preventDefault(),u(_))});return e({triggerRef:c}),(_,T)=>(vue.openBlock(),vue.createBlock(vue.unref(ElPopperTrigger),{id:vue.unref(s),"virtual-ref":_.virtualRef,open:vue.unref(o),"virtual-triggering":_.virtualTriggering,class:vue.normalizeClass(vue.unref(r).e("trigger")),onBlur:vue.unref(m),onClick:vue.unref(g),onContextmenu:vue.unref(y),onFocus:vue.unref(v),onMouseenter:vue.unref(f),onMouseleave:vue.unref(p),onKeydown:vue.unref(b)},{default:vue.withCtx(()=>[vue.renderSlot(_.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var ElTooltipTrigger=_export_sfc$1(_sfc_main$M,[["__file","trigger.vue"]]);const teleportProps=buildProps({to:{type:definePropType([String,Object]),required:!0},disabled:Boolean}),_sfc_main$L=vue.defineComponent({__name:"teleport",props:teleportProps,setup(t){return(e,n)=>e.disabled?vue.renderSlot(e.$slots,"default",{key:0}):(vue.openBlock(),vue.createBlock(vue.Teleport,{key:1,to:e.to},[vue.renderSlot(e.$slots,"default")],8,["to"]))}});var Teleport=_export_sfc$1(_sfc_main$L,[["__file","teleport.vue"]]);const ElTeleport=withInstall(Teleport),__default__$b=vue.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),_sfc_main$K=vue.defineComponent({...__default__$b,props:useTooltipContentProps,setup(t,{expose:e}){const n=t,{selector:r}=usePopperContainerId(),i=useNamespace("tooltip"),s=vue.ref(null);let o;const{controlled:a,id:l,open:u,trigger:c,onClose:d,onOpen:h,onShow:f,onHide:p,onBeforeShow:g,onBeforeHide:v}=vue.inject(TOOLTIP_INJECTION_KEY,void 0),m=vue.computed(()=>n.transition||`${i.namespace.value}-fade-in-linear`),y=vue.computed(()=>process.env.NODE_ENV==="test"?!0:n.persistent);vue.onBeforeUnmount(()=>{o==null||o()});const b=vue.computed(()=>vue.unref(y)?!0:vue.unref(u)),_=vue.computed(()=>n.disabled?!1:vue.unref(u)),T=vue.computed(()=>n.appendTo||r.value),x=vue.computed(()=>{var M;return(M=n.style)!=null?M:{}}),k=vue.ref(!0),w=()=>{p(),k.value=!0},O=()=>{if(vue.unref(a))return!0},S=composeEventHandlers(O,()=>{n.enterable&&vue.unref(c)==="hover"&&h()}),F=composeEventHandlers(O,()=>{vue.unref(c)==="hover"&&d()}),z=()=>{var M,$;($=(M=s.value)==null?void 0:M.updatePopper)==null||$.call(M),g==null||g()},Y=()=>{v==null||v()},ae=()=>{f(),o=onClickOutside(vue.computed(()=>{var M;return(M=s.value)==null?void 0:M.popperContentRef}),()=>{if(vue.unref(a))return;vue.unref(c)!=="hover"&&d()})},j=()=>{n.virtualTriggering||d()};return vue.watch(()=>vue.unref(u),M=>{M?k.value=!1:o==null||o()},{flush:"post"}),vue.watch(()=>n.content,()=>{var M,$;($=(M=s.value)==null?void 0:M.updatePopper)==null||$.call(M)}),e({contentRef:s}),(M,$)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTeleport),{disabled:!M.teleported,to:vue.unref(T)},{default:vue.withCtx(()=>[vue.createVNode(vue.Transition,{name:vue.unref(m),onAfterLeave:w,onBeforeEnter:z,onAfterEnter:ae,onBeforeLeave:Y},{default:vue.withCtx(()=>[vue.unref(b)?vue.withDirectives((vue.openBlock(),vue.createBlock(vue.unref(ElPopperContent),vue.mergeProps({key:0,id:vue.unref(l),ref_key:"contentRef",ref:s},M.$attrs,{"aria-label":M.ariaLabel,"aria-hidden":k.value,"boundaries-padding":M.boundariesPadding,"fallback-placements":M.fallbackPlacements,"gpu-acceleration":M.gpuAcceleration,offset:M.offset,placement:M.placement,"popper-options":M.popperOptions,strategy:M.strategy,effect:M.effect,enterable:M.enterable,pure:M.pure,"popper-class":M.popperClass,"popper-style":[M.popperStyle,vue.unref(x)],"reference-el":M.referenceEl,"trigger-target-el":M.triggerTargetEl,visible:vue.unref(_),"z-index":M.zIndex,onMouseenter:vue.unref(S),onMouseleave:vue.unref(F),onBlur:j,onClose:vue.unref(d)}),{default:vue.withCtx(()=>[vue.renderSlot(M.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[vue.vShow,vue.unref(_)]]):vue.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var ElTooltipContent=_export_sfc$1(_sfc_main$K,[["__file","content.vue"]]);const __default__$a=vue.defineComponent({name:"ElTooltip"}),_sfc_main$J=vue.defineComponent({...__default__$a,props:useTooltipProps,emits:tooltipEmits,setup(t,{expose:e,emit:n}){const r=t;usePopperContainer();const i=useId(),s=vue.ref(),o=vue.ref(),a=()=>{var m;const y=vue.unref(s);y&&((m=y.popperInstanceRef)==null||m.update())},l=vue.ref(!1),u=vue.ref(),{show:c,hide:d,hasUpdateHandler:h}=useTooltipModelToggle({indicator:l,toggleReason:u}),{onOpen:f,onClose:p}=useDelayedToggle({showAfter:vue.toRef(r,"showAfter"),hideAfter:vue.toRef(r,"hideAfter"),autoClose:vue.toRef(r,"autoClose"),open:c,close:d}),g=vue.computed(()=>isBoolean(r.visible)&&!h.value);vue.provide(TOOLTIP_INJECTION_KEY,{controlled:g,id:i,open:vue.readonly(l),trigger:vue.toRef(r,"trigger"),onOpen:m=>{f(m)},onClose:m=>{p(m)},onToggle:m=>{vue.unref(l)?p(m):f(m)},onShow:()=>{n("show",u.value)},onHide:()=>{n("hide",u.value)},onBeforeShow:()=>{n("before-show",u.value)},onBeforeHide:()=>{n("before-hide",u.value)},updatePopper:a}),vue.watch(()=>r.disabled,m=>{m&&l.value&&(l.value=!1)});const v=m=>{var y,b;const _=(b=(y=o.value)==null?void 0:y.contentRef)==null?void 0:b.popperContentRef,T=(m==null?void 0:m.relatedTarget)||document.activeElement;return _&&_.contains(T)};return vue.onDeactivated(()=>l.value&&d()),e({popperRef:s,contentRef:o,isFocusInsideContent:v,updatePopper:a,onOpen:f,onClose:p,hide:d}),(m,y)=>(vue.openBlock(),vue.createBlock(vue.unref(ElPopper),{ref_key:"popperRef",ref:s,role:m.role},{default:vue.withCtx(()=>[vue.createVNode(ElTooltipTrigger,{disabled:m.disabled,trigger:m.trigger,"trigger-keys":m.triggerKeys,"virtual-ref":m.virtualRef,"virtual-triggering":m.virtualTriggering},{default:vue.withCtx(()=>[m.$slots.default?vue.renderSlot(m.$slots,"default",{key:0}):vue.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),vue.createVNode(ElTooltipContent,{ref_key:"contentRef",ref:o,"aria-label":m.ariaLabel,"boundaries-padding":m.boundariesPadding,content:m.content,disabled:m.disabled,effect:m.effect,enterable:m.enterable,"fallback-placements":m.fallbackPlacements,"hide-after":m.hideAfter,"gpu-acceleration":m.gpuAcceleration,offset:m.offset,persistent:m.persistent,"popper-class":m.popperClass,"popper-style":m.popperStyle,placement:m.placement,"popper-options":m.popperOptions,pure:m.pure,"raw-content":m.rawContent,"reference-el":m.referenceEl,"trigger-target-el":m.triggerTargetEl,"show-after":m.showAfter,strategy:m.strategy,teleported:m.teleported,transition:m.transition,"virtual-triggering":m.virtualTriggering,"z-index":m.zIndex,"append-to":m.appendTo},{default:vue.withCtx(()=>[vue.renderSlot(m.$slots,"content",{},()=>[m.rawContent?(vue.openBlock(),vue.createElementBlock("span",{key:0,innerHTML:m.content},null,8,["innerHTML"])):(vue.openBlock(),vue.createElementBlock("span",{key:1},vue.toDisplayString(m.content),1))]),m.showArrow?(vue.openBlock(),vue.createBlock(vue.unref(ElPopperArrow),{key:0,"arrow-offset":m.arrowOffset},null,8,["arrow-offset"])):vue.createCommentVNode("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var Tooltip=_export_sfc$1(_sfc_main$J,[["__file","tooltip.vue"]]);const ElTooltip=withInstall(Tooltip),buttonGroupContextKey=Symbol("buttonGroupContextKey"),useButton=(t,e)=>{useDeprecated({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},vue.computed(()=>t.type==="text"));const n=vue.inject(buttonGroupContextKey,void 0),r=useGlobalConfig("button"),{form:i}=useFormItem(),s=useFormSize(vue.computed(()=>n==null?void 0:n.size)),o=useFormDisabled(),a=vue.ref(),l=vue.useSlots(),u=vue.computed(()=>t.type||(n==null?void 0:n.type)||""),c=vue.computed(()=>{var p,g,v;return(v=(g=t.autoInsertSpace)!=null?g:(p=r.value)==null?void 0:p.autoInsertSpace)!=null?v:!1}),d=vue.computed(()=>t.tag==="button"?{ariaDisabled:o.value||t.loading,disabled:o.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),h=vue.computed(()=>{var p;const g=(p=l.default)==null?void 0:p.call(l);if(c.value&&(g==null?void 0:g.length)===1){const v=g[0];if((v==null?void 0:v.type)===vue.Text){const m=v.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(m.trim())}}return!1});return{_disabled:o,_size:s,_type:u,_ref:a,_props:d,shouldAddSpace:h,handleClick:p=>{if(o.value||t.loading){p.stopPropagation();return}t.nativeType==="reset"&&(i==null||i.resetFields()),e("click",p)}}},buttonTypes=["default","primary","success","warning","info","danger","text",""],buttonNativeTypes=["button","submit","reset"],buttonProps=buildProps({size:useSizeProp,disabled:Boolean,type:{type:String,values:buttonTypes,default:""},icon:{type:iconPropType},nativeType:{type:String,values:buttonNativeTypes,default:"button"},loading:Boolean,loadingIcon:{type:iconPropType,default:()=>loading_default},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:definePropType([String,Object]),default:"button"}}),buttonEmits={click:t=>t instanceof MouseEvent};function bound01(t,e){isOnePointZero(t)&&(t="100%");var n=isPercentage(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function clamp01(t){return Math.min(1,Math.max(0,t))}function isOnePointZero(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function isPercentage(t){return typeof t=="string"&&t.indexOf("%")!==-1}function boundAlpha(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function convertToPercentage(t){return t<=1?"".concat(Number(t)*100,"%"):t}function pad2(t){return t.length===1?"0"+t:String(t)}function rgbToRgb(t,e,n){return{r:bound01(t,255)*255,g:bound01(e,255)*255,b:bound01(n,255)*255}}function rgbToHsl(t,e,n){t=bound01(t,255),e=bound01(e,255),n=bound01(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),s=0,o=0,a=(r+i)/2;if(r===i)o=0,s=0;else{var l=r-i;switch(o=a>.5?l/(2-r-i):l/(r+i),r){case t:s=(e-n)/l+(e<n?6:0);break;case e:s=(n-t)/l+2;break;case n:s=(t-e)/l+4;break}s/=6}return{h:s,s:o,l:a}}function hue2rgb(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function hslToRgb(t,e,n){var r,i,s;if(t=bound01(t,360),e=bound01(e,100),n=bound01(n,100),e===0)i=n,s=n,r=n;else{var o=n<.5?n*(1+e):n+e-n*e,a=2*n-o;r=hue2rgb(a,o,t+1/3),i=hue2rgb(a,o,t),s=hue2rgb(a,o,t-1/3)}return{r:r*255,g:i*255,b:s*255}}function rgbToHsv(t,e,n){t=bound01(t,255),e=bound01(e,255),n=bound01(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),s=0,o=r,a=r-i,l=r===0?0:a/r;if(r===i)s=0;else{switch(r){case t:s=(e-n)/a+(e<n?6:0);break;case e:s=(n-t)/a+2;break;case n:s=(t-e)/a+4;break}s/=6}return{h:s,s:l,v:o}}function hsvToRgb(t,e,n){t=bound01(t,360)*6,e=bound01(e,100),n=bound01(n,100);var r=Math.floor(t),i=t-r,s=n*(1-e),o=n*(1-i*e),a=n*(1-(1-i)*e),l=r%6,u=[n,o,s,s,a,n][l],c=[a,n,n,o,s,s][l],d=[s,s,a,n,n,o][l];return{r:u*255,g:c*255,b:d*255}}function rgbToHex(t,e,n,r){var i=[pad2(Math.round(t).toString(16)),pad2(Math.round(e).toString(16)),pad2(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function rgbaToHex(t,e,n,r,i){var s=[pad2(Math.round(t).toString(16)),pad2(Math.round(e).toString(16)),pad2(Math.round(n).toString(16)),pad2(convertDecimalToHex(r))];return i&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function convertDecimalToHex(t){return Math.round(parseFloat(t)*255).toString(16)}function convertHexToDecimal(t){return parseIntFromHex(t)/255}function parseIntFromHex(t){return parseInt(t,16)}function numberInputToObject(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var names$1={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function inputToRGB(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,s=null,o=!1,a=!1;return typeof t=="string"&&(t=stringInputToObject(t)),typeof t=="object"&&(isValidCSSUnit(t.r)&&isValidCSSUnit(t.g)&&isValidCSSUnit(t.b)?(e=rgbToRgb(t.r,t.g,t.b),o=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(t.h)&&isValidCSSUnit(t.s)&&isValidCSSUnit(t.v)?(r=convertToPercentage(t.s),i=convertToPercentage(t.v),e=hsvToRgb(t.h,r,i),o=!0,a="hsv"):isValidCSSUnit(t.h)&&isValidCSSUnit(t.s)&&isValidCSSUnit(t.l)&&(r=convertToPercentage(t.s),s=convertToPercentage(t.l),e=hslToRgb(t.h,r,s),o=!0,a="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=boundAlpha(n),{ok:o,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var CSS_INTEGER="[-\\+]?\\d+%?",CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?",CSS_UNIT="(?:".concat(CSS_NUMBER,")|(?:").concat(CSS_INTEGER,")"),PERMISSIVE_MATCH3="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),PERMISSIVE_MATCH4="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function stringInputToObject(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(names$1[t])t=names$1[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=matchers.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=matchers.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=matchers.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=matchers.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=matchers.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=matchers.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=matchers.hex8.exec(t),n?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),a:convertHexToDecimal(n[4]),format:e?"name":"hex8"}:(n=matchers.hex6.exec(t),n?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),format:e?"name":"hex"}:(n=matchers.hex4.exec(t),n?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),a:convertHexToDecimal(n[4]+n[4]),format:e?"name":"hex8"}:(n=matchers.hex3.exec(t),n?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function isValidCSSUnit(t){return!!matchers.CSS_UNIT.exec(String(t))}var TinyColor=function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var r;if(e instanceof t)return e;typeof e=="number"&&(e=numberInputToObject(e)),this.originalInput=e;var i=inputToRGB(e);this.originalInput=e,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,r,i,s=e.r/255,o=e.g/255,a=e.b/255;return s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=boundAlpha(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=rgbToHsv(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=rgbToHsv(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=rgbToHsl(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=rgbToHsl(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),rgbToHex(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),rgbaToHex(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(r,")"):"rgba(".concat(e,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(bound01(n,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(n){return Math.round(bound01(n,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+rgbToHex(this.r,this.g,this.b,!1),n=0,r=Object.entries(names$1);n<r.length;n++){var i=r[n],s=i[0],o=i[1];if(e===o)return s}return!1},t.prototype.toString=function(e){var n=!!e;e=e??this.format;var r=!1,i=this.a<1&&this.a>=0,s=!n&&i&&(e.startsWith("hex")||e==="name");return s?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=clamp01(n.l),new t(n)},t.prototype.brighten=function(e){e===void 0&&(e=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new t(n)},t.prototype.darken=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l-=e/100,n.l=clamp01(n.l),new t(n)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s-=e/100,n.s=clamp01(n.s),new t(n)},t.prototype.saturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s+=e/100,n.s=clamp01(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var r=this.toRgb(),i=new t(e).toRgb(),s=n/100,o={r:(i.r-r.r)*s+r.r,g:(i.g-r.g)*s+r.g,b:(i.b-r.b)*s+r.b,a:(i.a-r.a)*s+r.a};return new t(o)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,s=[this];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,s.push(new t(r));return s},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),r=n.h,i=n.s,s=n.v,o=[],a=1/e;e--;)o.push(new t({h:r,s:i,v:s})),s=(s+a)%1;return o},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),r=new t(e).toRgb(),i=n.a+r.a*(1-n.a);return new t({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),r=n.h,i=[this],s=360/e,o=1;o<e;o++)i.push(new t({h:(r+o*s)%360,s:n.s,l:n.l}));return i},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function darken(t,e=20){return t.mix("#141414",e).toString()}function useButtonCustomStyle(t){const e=useFormDisabled(),n=useNamespace("button");return vue.computed(()=>{let r={},i=t.color;if(i){const s=i.match(/var\((.*?)\)/);s&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(s[1]));const o=new TinyColor(i),a=t.dark?o.tint(20).toString():darken(o,20);if(t.plain)r=n.cssVarBlock({"bg-color":t.dark?darken(o,90):o.tint(90).toString(),"text-color":i,"border-color":t.dark?darken(o,50):o.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":a,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":a}),e.value&&(r[n.cssVarBlockName("disabled-bg-color")]=t.dark?darken(o,90):o.tint(90).toString(),r[n.cssVarBlockName("disabled-text-color")]=t.dark?darken(o,50):o.tint(50).toString(),r[n.cssVarBlockName("disabled-border-color")]=t.dark?darken(o,80):o.tint(80).toString());else{const l=t.dark?darken(o,30):o.tint(30).toString(),u=o.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(r=n.cssVarBlock({"bg-color":i,"text-color":u,"border-color":i,"hover-bg-color":l,"hover-text-color":u,"hover-border-color":l,"active-bg-color":a,"active-border-color":a}),e.value){const c=t.dark?darken(o,50):o.tint(50).toString();r[n.cssVarBlockName("disabled-bg-color")]=c,r[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,r[n.cssVarBlockName("disabled-border-color")]=c}}}return r})}const __default__$9=vue.defineComponent({name:"ElButton"}),_sfc_main$I=vue.defineComponent({...__default__$9,props:buttonProps,emits:buttonEmits,setup(t,{expose:e,emit:n}){const r=t,i=useButtonCustomStyle(r),s=useNamespace("button"),{_ref:o,_size:a,_type:l,_disabled:u,_props:c,shouldAddSpace:d,handleClick:h}=useButton(r,n),f=vue.computed(()=>[s.b(),s.m(l.value),s.m(a.value),s.is("disabled",u.value),s.is("loading",r.loading),s.is("plain",r.plain),s.is("round",r.round),s.is("circle",r.circle),s.is("text",r.text),s.is("link",r.link),s.is("has-bg",r.bg)]);return e({ref:o,size:a,type:l,disabled:u,shouldAddSpace:d}),(p,g)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(p.tag),vue.mergeProps({ref_key:"_ref",ref:o},vue.unref(c),{class:vue.unref(f),style:vue.unref(i),onClick:vue.unref(h)}),{default:vue.withCtx(()=>[p.loading?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[p.$slots.loading?vue.renderSlot(p.$slots,"loading",{key:0}):(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:1,class:vue.normalizeClass(vue.unref(s).is("loading"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(p.loadingIcon)))]),_:1},8,["class"]))],64)):p.icon||p.$slots.icon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:1},{default:vue.withCtx(()=>[p.icon?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(p.icon),{key:0})):vue.renderSlot(p.$slots,"icon",{key:1})]),_:3})):vue.createCommentVNode("v-if",!0),p.$slots.default?(vue.openBlock(),vue.createElementBlock("span",{key:2,class:vue.normalizeClass({[vue.unref(s).em("text","expand")]:vue.unref(d)})},[vue.renderSlot(p.$slots,"default")],2)):vue.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Button$1=_export_sfc$1(_sfc_main$I,[["__file","button.vue"]]);const buttonGroupProps={size:buttonProps.size,type:buttonProps.type},__default__$8=vue.defineComponent({name:"ElButtonGroup"}),_sfc_main$H=vue.defineComponent({...__default__$8,props:buttonGroupProps,setup(t){const e=t;vue.provide(buttonGroupContextKey,vue.reactive({size:vue.toRef(e,"size"),type:vue.toRef(e,"type")}));const n=useNamespace("button");return(r,i)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(vue.unref(n).b("group"))},[vue.renderSlot(r.$slots,"default")],2))}});var ButtonGroup=_export_sfc$1(_sfc_main$H,[["__file","button-group.vue"]]);const ElButton=withInstall(Button$1,{ButtonGroup});withNoopInstall(ButtonGroup);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dayjs_min={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(commonjsGlobal,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",a="minute",l="hour",u="day",c="week",d="month",h="quarter",f="year",p="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,y={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("_"),ordinal:function(ae){var j=["th","st","nd","rd"],M=ae%100;return"["+ae+(j[(M-20)%10]||j[M]||j[0])+"]"}},b=function(ae,j,M){var $=String(ae);return!$||$.length>=j?ae:""+Array(j+1-$.length).join(M)+ae},_={s:b,z:function(ae){var j=-ae.utcOffset(),M=Math.abs(j),$=Math.floor(M/60),oe=M%60;return(j<=0?"+":"-")+b($,2,"0")+":"+b(oe,2,"0")},m:function ae(j,M){if(j.date()<M.date())return-ae(M,j);var $=12*(M.year()-j.year())+(M.month()-j.month()),oe=j.clone().add($,d),A=M-oe<0,V=j.clone().add($+(A?-1:1),d);return+(-($+(M-oe)/(A?oe-V:V-oe))||0)},a:function(ae){return ae<0?Math.ceil(ae)||0:Math.floor(ae)},p:function(ae){return{M:d,y:f,w:c,d:u,D:p,h:l,m:a,s:o,ms:s,Q:h}[ae]||String(ae||"").toLowerCase().replace(/s$/,"")},u:function(ae){return ae===void 0}},T="en",x={};x[T]=y;var k="$isDayjsObject",w=function(ae){return ae instanceof z||!(!ae||!ae[k])},O=function ae(j,M,$){var oe;if(!j)return T;if(typeof j=="string"){var A=j.toLowerCase();x[A]&&(oe=A),M&&(x[A]=M,oe=A);var V=j.split("-");if(!oe&&V.length>1)return ae(V[0])}else{var D=j.name;x[D]=j,oe=D}return!$&&oe&&(T=oe),oe||!$&&T},S=function(ae,j){if(w(ae))return ae.clone();var M=typeof j=="object"?j:{};return M.date=ae,M.args=arguments,new z(M)},F=_;F.l=O,F.i=w,F.w=function(ae,j){return S(ae,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var z=function(){function ae(M){this.$L=O(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[k]=!0}var j=ae.prototype;return j.parse=function(M){this.$d=function($){var oe=$.date,A=$.utc;if(oe===null)return new Date(NaN);if(F.u(oe))return new Date;if(oe instanceof Date)return new Date(oe);if(typeof oe=="string"&&!/Z$/i.test(oe)){var V=oe.match(v);if(V){var D=V[2]-1||0,le=(V[7]||"0").substring(0,3);return A?new Date(Date.UTC(V[1],D,V[3]||1,V[4]||0,V[5]||0,V[6]||0,le)):new Date(V[1],D,V[3]||1,V[4]||0,V[5]||0,V[6]||0,le)}}return new Date(oe)}(M),this.init()},j.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},j.$utils=function(){return F},j.isValid=function(){return this.$d.toString()!==g},j.isSame=function(M,$){var oe=S(M);return this.startOf($)<=oe&&oe<=this.endOf($)},j.isAfter=function(M,$){return S(M)<this.startOf($)},j.isBefore=function(M,$){return this.endOf($)<S(M)},j.$g=function(M,$,oe){return F.u(M)?this[$]:this.set(oe,M)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(M,$){var oe=this,A=!!F.u($)||$,V=F.p(M),D=function(Ne,$e){var Ue=F.w(oe.$u?Date.UTC(oe.$y,$e,Ne):new Date(oe.$y,$e,Ne),oe);return A?Ue:Ue.endOf(u)},le=function(Ne,$e){return F.w(oe.toDate()[Ne].apply(oe.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice($e)),oe)},ie=this.$W,re=this.$M,pe=this.$D,xe="set"+(this.$u?"UTC":"");switch(V){case f:return A?D(1,0):D(31,11);case d:return A?D(1,re):D(0,re+1);case c:var Ie=this.$locale().weekStart||0,_e=(ie<Ie?ie+7:ie)-Ie;return D(A?pe-_e:pe+(6-_e),re);case u:case p:return le(xe+"Hours",0);case l:return le(xe+"Minutes",1);case a:return le(xe+"Seconds",2);case o:return le(xe+"Milliseconds",3);default:return this.clone()}},j.endOf=function(M){return this.startOf(M,!1)},j.$set=function(M,$){var oe,A=F.p(M),V="set"+(this.$u?"UTC":""),D=(oe={},oe[u]=V+"Date",oe[p]=V+"Date",oe[d]=V+"Month",oe[f]=V+"FullYear",oe[l]=V+"Hours",oe[a]=V+"Minutes",oe[o]=V+"Seconds",oe[s]=V+"Milliseconds",oe)[A],le=A===u?this.$D+($-this.$W):$;if(A===d||A===f){var ie=this.clone().set(p,1);ie.$d[D](le),ie.init(),this.$d=ie.set(p,Math.min(this.$D,ie.daysInMonth())).$d}else D&&this.$d[D](le);return this.init(),this},j.set=function(M,$){return this.clone().$set(M,$)},j.get=function(M){return this[F.p(M)]()},j.add=function(M,$){var oe,A=this;M=Number(M);var V=F.p($),D=function(re){var pe=S(A);return F.w(pe.date(pe.date()+Math.round(re*M)),A)};if(V===d)return this.set(d,this.$M+M);if(V===f)return this.set(f,this.$y+M);if(V===u)return D(1);if(V===c)return D(7);var le=(oe={},oe[a]=r,oe[l]=i,oe[o]=n,oe)[V]||1,ie=this.$d.getTime()+M*le;return F.w(ie,this)},j.subtract=function(M,$){return this.add(-1*M,$)},j.format=function(M){var $=this,oe=this.$locale();if(!this.isValid())return oe.invalidDate||g;var A=M||"YYYY-MM-DDTHH:mm:ssZ",V=F.z(this),D=this.$H,le=this.$m,ie=this.$M,re=oe.weekdays,pe=oe.months,xe=oe.meridiem,Ie=function($e,Ue,At,kt){return $e&&($e[Ue]||$e($,A))||At[Ue].slice(0,kt)},_e=function($e){return F.s(D%12||12,$e,"0")},Ne=xe||function($e,Ue,At){var kt=$e<12?"AM":"PM";return At?kt.toLowerCase():kt};return A.replace(m,function($e,Ue){return Ue||function(At){switch(At){case"YY":return String($.$y).slice(-2);case"YYYY":return F.s($.$y,4,"0");case"M":return ie+1;case"MM":return F.s(ie+1,2,"0");case"MMM":return Ie(oe.monthsShort,ie,pe,3);case"MMMM":return Ie(pe,ie);case"D":return $.$D;case"DD":return F.s($.$D,2,"0");case"d":return String($.$W);case"dd":return Ie(oe.weekdaysMin,$.$W,re,2);case"ddd":return Ie(oe.weekdaysShort,$.$W,re,3);case"dddd":return re[$.$W];case"H":return String(D);case"HH":return F.s(D,2,"0");case"h":return _e(1);case"hh":return _e(2);case"a":return Ne(D,le,!0);case"A":return Ne(D,le,!1);case"m":return String(le);case"mm":return F.s(le,2,"0");case"s":return String($.$s);case"ss":return F.s($.$s,2,"0");case"SSS":return F.s($.$ms,3,"0");case"Z":return V}return null}($e)||V.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(M,$,oe){var A,V=this,D=F.p($),le=S(M),ie=(le.utcOffset()-this.utcOffset())*r,re=this-le,pe=function(){return F.m(V,le)};switch(D){case f:A=pe()/12;break;case d:A=pe();break;case h:A=pe()/3;break;case c:A=(re-ie)/6048e5;break;case u:A=(re-ie)/864e5;break;case l:A=re/i;break;case a:A=re/r;break;case o:A=re/n;break;default:A=re}return oe?A:F.a(A)},j.daysInMonth=function(){return this.endOf(d).$D},j.$locale=function(){return x[this.$L]},j.locale=function(M,$){if(!M)return this.$L;var oe=this.clone(),A=O(M,$,!0);return A&&(oe.$L=A),oe},j.clone=function(){return F.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},ae}(),Y=z.prototype;return S.prototype=Y,[["$ms",s],["$s",o],["$m",a],["$H",l],["$W",u],["$M",d],["$y",f],["$D",p]].forEach(function(ae){Y[ae[1]]=function(j){return this.$g(j,ae[0],ae[1])}}),S.extend=function(ae,j){return ae.$i||(ae(j,z,S),ae.$i=!0),S},S.locale=O,S.isDayjs=w,S.unix=function(ae){return S(1e3*ae)},S.en=x[T],S.Ls=x,S.p={},S})})(dayjs_min);var dayjs_minExports=dayjs_min.exports;const dayjs=getDefaultExportFromCjs(dayjs_minExports);var customParseFormat$1={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(commonjsGlobal,function(){var n={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"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,o=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},u=function(v){return(v=+v)+(v>68?1900:2e3)},c=function(v){return function(m){this[v]=+m}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(m){if(!m||m==="Z")return 0;var y=m.match(/([+-]|\d\d)/g),b=60*y[1]+(+y[2]||0);return b===0?0:y[0]==="+"?-b:b}(v)}],h=function(v){var m=l[v];return m&&(m.indexOf?m:m.s.concat(m.f))},f=function(v,m){var y,b=l.meridiem;if(b){for(var _=1;_<=24;_+=1)if(v.indexOf(b(_,0,m))>-1){y=_>12;break}}else y=v===(m?"pm":"PM");return y},p={A:[a,function(v){this.afternoon=f(v,!1)}],a:[a,function(v){this.afternoon=f(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[o,c("seconds")],ss:[o,c("seconds")],m:[o,c("minutes")],mm:[o,c("minutes")],H:[o,c("hours")],h:[o,c("hours")],HH:[o,c("hours")],hh:[o,c("hours")],D:[o,c("day")],DD:[s,c("day")],Do:[a,function(v){var m=l.ordinal,y=v.match(/\d+/);if(this.day=y[0],m)for(var b=1;b<=31;b+=1)m(b).replace(/\[|\]/g,"")===v&&(this.day=b)}],w:[o,c("week")],ww:[s,c("week")],M:[o,c("month")],MM:[s,c("month")],MMM:[a,function(v){var m=h("months"),y=(h("monthsShort")||m.map(function(b){return b.slice(0,3)})).indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[a,function(v){var m=h("months").indexOf(v)+1;if(m<1)throw new Error;this.month=m%12||m}],Y:[/[+-]?\d+/,c("year")],YY:[s,function(v){this.year=u(v)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function g(v){var m,y;m=v,y=l&&l.formats;for(var b=(v=m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,F,z){var Y=z&&z.toUpperCase();return F||y[z]||n[z]||y[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ae,j,M){return j||M.slice(1)})})).match(r),_=b.length,T=0;T<_;T+=1){var x=b[T],k=p[x],w=k&&k[0],O=k&&k[1];b[T]=O?{regex:w,parser:O}:x.replace(/^\[|\]$/g,"")}return function(S){for(var F={},z=0,Y=0;z<_;z+=1){var ae=b[z];if(typeof ae=="string")Y+=ae.length;else{var j=ae.regex,M=ae.parser,$=S.slice(Y),oe=j.exec($)[0];M.call(F,oe),S=S.replace(oe,"")}}return function(A){var V=A.afternoon;if(V!==void 0){var D=A.hours;V?D<12&&(A.hours+=12):D===12&&(A.hours=0),delete A.afternoon}}(F),F}}return function(v,m,y){y.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var b=m.prototype,_=b.parse;b.parse=function(T){var x=T.date,k=T.utc,w=T.args;this.$u=k;var O=w[1];if(typeof O=="string"){var S=w[2]===!0,F=w[3]===!0,z=S||F,Y=w[2];F&&(Y=w[2]),l=this.$locale(),!S&&Y&&(l=y.Ls[Y]),this.$d=function($,oe,A,V){try{if(["x","X"].indexOf(oe)>-1)return new Date((oe==="X"?1e3:1)*$);var D=g(oe)($),le=D.year,ie=D.month,re=D.day,pe=D.hours,xe=D.minutes,Ie=D.seconds,_e=D.milliseconds,Ne=D.zone,$e=D.week,Ue=new Date,At=re||(le||ie?1:Ue.getDate()),kt=le||Ue.getFullYear(),En=0;le&&!ie||(En=ie>0?ie-1:Ue.getMonth());var Tn,bn=pe||0,Lt=xe||0,vn=Ie||0,Et=_e||0;return Ne?new Date(Date.UTC(kt,En,At,bn,Lt,vn,Et+60*Ne.offset*1e3)):A?new Date(Date.UTC(kt,En,At,bn,Lt,vn,Et)):(Tn=new Date(kt,En,At,bn,Lt,vn,Et),$e&&(Tn=V(Tn).week($e).toDate()),Tn)}catch{return new Date("")}}(x,O,k,y),this.init(),Y&&Y!==!0&&(this.$L=this.locale(Y).$L),z&&x!=this.format(O)&&(this.$d=new Date("")),l={}}else if(O instanceof Array)for(var ae=O.length,j=1;j<=ae;j+=1){w[1]=O[j-1];var M=y.apply(this,w);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}j===ae&&(this.$d=new Date(""))}else _.call(this,T)}}})})(customParseFormat$1);var customParseFormatExports=customParseFormat$1.exports;const customParseFormat=getDefaultExportFromCjs(customParseFormatExports),timeUnits=["hours","minutes","seconds"],DEFAULT_FORMATS_TIME="HH:mm:ss",DEFAULT_FORMATS_DATE="YYYY-MM-DD",DEFAULT_FORMATS_DATEPICKER={date:DEFAULT_FORMATS_DATE,dates:DEFAULT_FORMATS_DATE,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:DEFAULT_FORMATS_DATE,datetimerange:`${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`},buildTimeList=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],rangeArr=t=>Array.from(Array.from({length:t}).keys()),extractDateFormat=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),extractTimeFormat=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),dateEquals=function(t,e){const n=isDate$1(t),r=isDate$1(e);return n&&r?t.getTime()===e.getTime():!n&&!r?t===e:!1},valueEquals=function(t,e){const n=isArray$1(t),r=isArray$1(e);return n&&r?t.length!==e.length?!1:t.every((i,s)=>dateEquals(i,e[s])):!n&&!r?dateEquals(t,e):!1},parseDate=function(t,e,n){const r=isEmpty$2(e)||e==="x"?dayjs(t).locale(n):dayjs(t,e).locale(n);return r.isValid()?r:void 0},formatter=function(t,e,n){return isEmpty$2(e)?t:e==="x"?+t:dayjs(t).locale(n).format(e)},makeList=(t,e)=>{var n;const r=[],i=e==null?void 0:e();for(let s=0;s<t;s++)r.push((n=i==null?void 0:i.includes(s))!=null?n:!1);return r},disabledTimeListsProps=buildProps({disabledHours:{type:definePropType(Function)},disabledMinutes:{type:definePropType(Function)},disabledSeconds:{type:definePropType(Function)}}),timePanelSharedProps=buildProps({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),timePickerDefaultProps=buildProps({id:{type:definePropType([Array,String])},name:{type:definePropType([Array,String])},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:definePropType([String,Object]),default:circle_close_default},editable:{type:Boolean,default:!0},prefixIcon:{type:definePropType([String,Object]),default:""},size:useSizeProp,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:definePropType(Object),default:()=>({})},modelValue:{type:definePropType([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:definePropType([Date,Array])},defaultTime:{type:definePropType([Date,Array])},isRange:Boolean,...disabledTimeListsProps,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:definePropType([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:definePropType(String),values:Ee,default:"bottom"},fallbackPlacements:{type:definePropType(Array),default:["bottom","top","right","left"]},...useEmptyValuesProps,...useAriaProps(["ariaLabel"]),showNow:{type:Boolean,default:!0}}),timePickerRngeTriggerProps=buildProps({id:{type:definePropType(Array)},name:{type:definePropType(Array)},modelValue:{type:definePropType([Array,String])},startPlaceholder:String,endPlaceholder:String}),__default__$7=vue.defineComponent({name:"PickerRangeTrigger",inheritAttrs:!1}),_sfc_main$G=vue.defineComponent({...__default__$7,props:timePickerRngeTriggerProps,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(t,{expose:e,emit:n}){const r=useAttrs(),i=useNamespace("date"),s=useNamespace("range"),o=vue.ref(),a=vue.ref(),{wrapperRef:l,isFocused:u}=useFocusController(o),c=_=>{n("click",_)},d=_=>{n("mouseenter",_)},h=_=>{n("mouseleave",_)},f=_=>{n("mouseenter",_)},p=_=>{n("startInput",_)},g=_=>{n("endInput",_)},v=_=>{n("startChange",_)},m=_=>{n("endChange",_)};return e({focus:()=>{var _;(_=o.value)==null||_.focus()},blur:()=>{var _,T;(_=o.value)==null||_.blur(),(T=a.value)==null||T.blur()}}),(_,T)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"wrapperRef",ref:l,class:vue.normalizeClass([vue.unref(i).is("active",vue.unref(u)),_.$attrs.class]),style:vue.normalizeStyle(_.$attrs.style),onClick:c,onMouseenter:d,onMouseleave:h,onTouchstart:f},[vue.renderSlot(_.$slots,"prefix"),vue.createElementVNode("input",vue.mergeProps(vue.unref(r),{id:_.id&&_.id[0],ref_key:"inputRef",ref:o,name:_.name&&_.name[0],placeholder:_.startPlaceholder,value:_.modelValue&&_.modelValue[0],class:vue.unref(s).b("input"),onInput:p,onChange:v}),null,16,["id","name","placeholder","value"]),vue.renderSlot(_.$slots,"range-separator"),vue.createElementVNode("input",vue.mergeProps(vue.unref(r),{id:_.id&&_.id[1],ref_key:"endInputRef",ref:a,name:_.name&&_.name[1],placeholder:_.endPlaceholder,value:_.modelValue&&_.modelValue[1],class:vue.unref(s).b("input"),onInput:g,onChange:m}),null,16,["id","name","placeholder","value"]),vue.renderSlot(_.$slots,"suffix")],38))}});var PickerRangeTrigger=_export_sfc$1(_sfc_main$G,[["__file","picker-range-trigger.vue"]]);const __default__$6=vue.defineComponent({name:"Picker"}),_sfc_main$F=vue.defineComponent({...__default__$6,props:timePickerDefaultProps,emits:["update:modelValue","change","focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const r=t,i=vue.useAttrs(),{lang:s}=useLocale(),o=useNamespace("date"),a=useNamespace("input"),l=useNamespace("range"),{form:u,formItem:c}=useFormItem(),d=vue.inject("ElPopperOptions",{}),{valueOnClear:h}=useEmptyValues(r,null),f=vue.ref(),p=vue.ref(),g=vue.ref(!1),v=vue.ref(!1),m=vue.ref(null);let y=!1;const{isFocused:b,handleFocus:_,handleBlur:T}=useFocusController(p,{beforeFocus(){return r.readonly||A.value},afterFocus(){g.value=!0},beforeBlur(L){var Fe;return!y&&((Fe=f.value)==null?void 0:Fe.isFocusInsideContent(L))},afterBlur(){jt(),g.value=!1,y=!1,r.validateEvent&&(c==null||c.validate("blur").catch(L=>debugWarn(L)))}}),x=vue.computed(()=>[o.b("editor"),o.bm("editor",r.type),a.e("wrapper"),o.is("disabled",A.value),o.is("active",g.value),l.b("editor"),bn?l.bm("editor",bn.value):"",i.class]),k=vue.computed(()=>[a.e("icon"),l.e("close-icon"),_e.value?"":l.e("close-icon--hidden")]);vue.watch(g,L=>{L?vue.nextTick(()=>{L&&(m.value=r.modelValue)}):(Et.value=null,vue.nextTick(()=>{w(r.modelValue)}))});const w=(L,Fe)=>{(Fe||!valueEquals(L,m.value))&&(n("change",L),r.validateEvent&&(c==null||c.validate("change").catch(Pt=>debugWarn(Pt))))},O=L=>{if(!valueEquals(r.modelValue,L)){let Fe;isArray$1(L)?Fe=L.map(Pt=>formatter(Pt,r.valueFormat,s.value)):L&&(Fe=formatter(L,r.valueFormat,s.value)),n("update:modelValue",L&&Fe,s.value)}},S=L=>{n("keydown",L)},F=vue.computed(()=>p.value?Array.from(p.value.$el.querySelectorAll("input")):[]),z=(L,Fe,Pt)=>{const xn=F.value;xn.length&&(!Pt||Pt==="min"?(xn[0].setSelectionRange(L,Fe),xn[0].focus()):Pt==="max"&&(xn[1].setSelectionRange(L,Fe),xn[1].focus()))},Y=(L="",Fe=!1)=>{g.value=Fe;let Pt;isArray$1(L)?Pt=L.map(xn=>xn.toDate()):Pt=L&&L.toDate(),Et.value=null,O(Pt)},ae=()=>{v.value=!0},j=()=>{n("visible-change",!0)},M=()=>{v.value=!1,g.value=!1,n("visible-change",!1)},$=()=>{g.value=!0},oe=()=>{g.value=!1},A=vue.computed(()=>r.disabled||(u==null?void 0:u.disabled)),V=vue.computed(()=>{let L;if($e.value?Cn.value.getDefaultValue&&(L=Cn.value.getDefaultValue()):isArray$1(r.modelValue)?L=r.modelValue.map(Fe=>parseDate(Fe,r.valueFormat,s.value)):L=parseDate(r.modelValue,r.valueFormat,s.value),Cn.value.getRangeAvailableTime){const Fe=Cn.value.getRangeAvailableTime(L);isEqual(Fe,L)||(L=Fe,$e.value||O(isArray$1(L)?L.map(Pt=>Pt.toDate()):L.toDate()))}return isArray$1(L)&&L.some(Fe=>!Fe)&&(L=[]),L}),D=vue.computed(()=>{if(!Cn.value.panelReady)return"";const L=kn(V.value);return isArray$1(Et.value)?[Et.value[0]||L&&L[0]||"",Et.value[1]||L&&L[1]||""]:Et.value!==null?Et.value:!ie.value&&$e.value||!g.value&&$e.value?"":L?re.value||pe.value||xe.value?L.join(", "):L:""}),le=vue.computed(()=>r.type.includes("time")),ie=vue.computed(()=>r.type.startsWith("time")),re=vue.computed(()=>r.type==="dates"),pe=vue.computed(()=>r.type==="months"),xe=vue.computed(()=>r.type==="years"),Ie=vue.computed(()=>r.prefixIcon||(le.value?clock_default:calendar_default)),_e=vue.ref(!1),Ne=L=>{r.readonly||A.value||(_e.value&&(L.stopPropagation(),Cn.value.handleClear?Cn.value.handleClear():O(h.value),w(h.value,!0),_e.value=!1,M()),n("clear"))},$e=vue.computed(()=>{const{modelValue:L}=r;return!L||isArray$1(L)&&!L.filter(Boolean).length}),Ue=async L=>{var Fe;r.readonly||A.value||(((Fe=L.target)==null?void 0:Fe.tagName)!=="INPUT"||b.value)&&(g.value=!0)},At=()=>{r.readonly||A.value||!$e.value&&r.clearable&&(_e.value=!0)},kt=()=>{_e.value=!1},En=L=>{var Fe;r.readonly||A.value||(((Fe=L.touches[0].target)==null?void 0:Fe.tagName)!=="INPUT"||b.value)&&(g.value=!0)},Tn=vue.computed(()=>r.type.includes("range")),bn=useFormSize(),Lt=vue.computed(()=>{var L,Fe;return(Fe=(L=vue.unref(f))==null?void 0:L.popperRef)==null?void 0:Fe.contentRef}),vn=onClickOutside(p,L=>{const Fe=vue.unref(Lt),Pt=unrefElement(p);Fe&&(L.target===Fe||L.composedPath().includes(Fe))||L.target===Pt||Pt&&L.composedPath().includes(Pt)||(g.value=!1)});vue.onBeforeUnmount(()=>{vn==null||vn()});const Et=vue.ref(null),jt=()=>{if(Et.value){const L=_n(D.value);L&&Pn(L)&&(O(isArray$1(L)?L.map(Fe=>Fe.toDate()):L.toDate()),Et.value=null)}Et.value===""&&(O(h.value),w(h.value),Et.value=null)},_n=L=>L?Cn.value.parseUserInput(L):null,kn=L=>L?Cn.value.formatToString(L):null,Pn=L=>Cn.value.isValidValue(L),Ce=async L=>{if(r.readonly||A.value)return;const{code:Fe}=L;if(S(L),Fe===EVENT_CODE.esc){g.value===!0&&(g.value=!1,L.preventDefault(),L.stopPropagation());return}if(Fe===EVENT_CODE.down&&(Cn.value.handleFocusPicker&&(L.preventDefault(),L.stopPropagation()),g.value===!1&&(g.value=!0,await vue.nextTick()),Cn.value.handleFocusPicker)){Cn.value.handleFocusPicker();return}if(Fe===EVENT_CODE.tab){y=!0;return}if(Fe===EVENT_CODE.enter||Fe===EVENT_CODE.numpadEnter){(Et.value===null||Et.value===""||Pn(_n(D.value)))&&(jt(),g.value=!1),L.stopPropagation();return}if(Et.value){L.stopPropagation();return}Cn.value.handleKeydownInput&&Cn.value.handleKeydownInput(L)},qe=L=>{Et.value=L,g.value||(g.value=!0)},wn=L=>{const Fe=L.target;Et.value?Et.value=[Fe.value,Et.value[1]]:Et.value=[Fe.value,null]},In=L=>{const Fe=L.target;Et.value?Et.value=[Et.value[0],Fe.value]:Et.value=[null,Fe.value]},Rn=()=>{var L;const Fe=Et.value,Pt=_n(Fe&&Fe[0]),xn=vue.unref(V);if(Pt&&Pt.isValid()){Et.value=[kn(Pt),((L=D.value)==null?void 0:L[1])||null];const zn=[Pt,xn&&(xn[1]||null)];Pn(zn)&&(O(zn),Et.value=null)}},Un=()=>{var L;const Fe=vue.unref(Et),Pt=_n(Fe&&Fe[1]),xn=vue.unref(V);if(Pt&&Pt.isValid()){Et.value=[((L=vue.unref(D))==null?void 0:L[0])||null,kn(Pt)];const zn=[xn&&xn[0],Pt];Pn(zn)&&(O(zn),Et.value=null)}},Cn=vue.ref({}),Mn=L=>{Cn.value[L[0]]=L[1],Cn.value.panelReady=!0},de=L=>{n("calendar-change",L)},Ve=(L,Fe,Pt)=>{n("panel-change",L,Fe,Pt)},he=()=>{var L;(L=p.value)==null||L.focus()},ze=()=>{var L;(L=p.value)==null||L.blur()};return vue.provide("EP_PICKER_BASE",{props:r}),e({focus:he,blur:ze,handleOpen:$,handleClose:oe,onPick:Y}),(L,Fe)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),vue.mergeProps({ref_key:"refPopper",ref:f,visible:g.value,effect:"light",pure:"",trigger:"click"},L.$attrs,{role:"dialog",teleported:"",transition:`${vue.unref(o).namespace.value}-zoom-in-top`,"popper-class":[`${vue.unref(o).namespace.value}-picker__popper`,L.popperClass],"popper-options":vue.unref(d),"fallback-placements":L.fallbackPlacements,"gpu-acceleration":!1,placement:L.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:ae,onShow:j,onHide:M}),{default:vue.withCtx(()=>[vue.unref(Tn)?(vue.openBlock(),vue.createBlock(PickerRangeTrigger,{key:1,id:L.id,ref_key:"inputRef",ref:p,"model-value":vue.unref(D),name:L.name,disabled:vue.unref(A),readonly:!L.editable||L.readonly,"start-placeholder":L.startPlaceholder,"end-placeholder":L.endPlaceholder,class:vue.normalizeClass(vue.unref(x)),style:vue.normalizeStyle(L.$attrs.style),"aria-label":L.ariaLabel,tabindex:L.tabindex,autocomplete:"off",role:"combobox",onClick:Ue,onFocus:vue.unref(_),onBlur:vue.unref(T),onStartInput:wn,onStartChange:Rn,onEndInput:In,onEndChange:Un,onMousedown:Ue,onMouseenter:At,onMouseleave:kt,onTouchstartPassive:En,onKeydown:Ce},{prefix:vue.withCtx(()=>[vue.unref(Ie)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass([vue.unref(a).e("icon"),vue.unref(l).e("icon")])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(Ie))))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)]),"range-separator":vue.withCtx(()=>[vue.renderSlot(L.$slots,"range-separator",{},()=>[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(l).b("separator"))},vue.toDisplayString(L.rangeSeparator),3)])]),suffix:vue.withCtx(()=>[L.clearIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(k)),onMousedown:vue.withModifiers(vue.unref(NOOP),["prevent"]),onClick:Ne},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(L.clearIcon)))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(vue.openBlock(),vue.createBlock(vue.unref(ElInput),{key:0,id:L.id,ref_key:"inputRef",ref:p,"container-role":"combobox","model-value":vue.unref(D),name:L.name,size:vue.unref(bn),disabled:vue.unref(A),placeholder:L.placeholder,class:vue.normalizeClass([vue.unref(o).b("editor"),vue.unref(o).bm("editor",L.type),L.$attrs.class]),style:vue.normalizeStyle(L.$attrs.style),readonly:!L.editable||L.readonly||vue.unref(re)||vue.unref(pe)||vue.unref(xe)||L.type==="week","aria-label":L.ariaLabel,tabindex:L.tabindex,"validate-event":!1,onInput:qe,onFocus:vue.unref(_),onBlur:vue.unref(T),onKeydown:Ce,onChange:jt,onMousedown:Ue,onMouseenter:At,onMouseleave:kt,onTouchstartPassive:En,onClick:vue.withModifiers(()=>{},["stop"])},{prefix:vue.withCtx(()=>[vue.unref(Ie)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(a).e("icon")),onMousedown:vue.withModifiers(Ue,["prevent"]),onTouchstartPassive:En},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(Ie))))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0)]),suffix:vue.withCtx(()=>[_e.value&&L.clearIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(`${vue.unref(a).e("icon")} clear-icon`),onMousedown:vue.withModifiers(vue.unref(NOOP),["prevent"]),onClick:Ne},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(L.clearIcon)))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur","onClick"]))]),content:vue.withCtx(()=>[vue.renderSlot(L.$slots,"default",{visible:g.value,actualVisible:v.value,parsedValue:vue.unref(V),format:L.format,dateFormat:L.dateFormat,timeFormat:L.timeFormat,unlinkPanels:L.unlinkPanels,type:L.type,defaultValue:L.defaultValue,showNow:L.showNow,onPick:Y,onSelectRange:z,onSetPickerOption:Mn,onCalendarChange:de,onPanelChange:Ve,onMousedown:vue.withModifiers(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var CommonPicker=_export_sfc$1(_sfc_main$F,[["__file","picker.vue"]]);const panelTimePickerProps=buildProps({...timePanelSharedProps,datetimeRole:String,parsedValue:{type:definePropType(Object)}}),useTimePanel=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const r=(o,a,l,u)=>{const c={hour:t,minute:e,second:n};let d=o;return["hour","minute","second"].forEach(h=>{if(c[h]){let f;const p=c[h];switch(h){case"minute":{f=p(d.hour(),a,u);break}case"second":{f=p(d.hour(),d.minute(),a,u);break}default:{f=p(a,u);break}}if(f!=null&&f.length&&!f.includes(d[h]())){const g=l?0:f.length-1;d=d[h](f[g])}}}),d},i={};return{timePickerOptions:i,getAvailableTime:r,onSetOption:([o,a])=>{i[o]=a}}},makeAvailableArr=t=>{const e=(r,i)=>r||i,n=r=>r!==!0;return t.map(e).filter(n)},getTimeLists=(t,e,n)=>({getHoursList:(o,a)=>makeList(24,t&&(()=>t==null?void 0:t(o,a))),getMinutesList:(o,a,l)=>makeList(60,e&&(()=>e==null?void 0:e(o,a,l))),getSecondsList:(o,a,l,u)=>makeList(60,n&&(()=>n==null?void 0:n(o,a,l,u)))}),buildAvailableTimeSlotGetter=(t,e,n)=>{const{getHoursList:r,getMinutesList:i,getSecondsList:s}=getTimeLists(t,e,n);return{getAvailableHours:(u,c)=>makeAvailableArr(r(u,c)),getAvailableMinutes:(u,c,d)=>makeAvailableArr(i(u,c,d)),getAvailableSeconds:(u,c,d,h)=>makeAvailableArr(s(u,c,d,h))}},useOldValue=t=>{const e=vue.ref(t.parsedValue);return vue.watch(()=>t.visible,n=>{n||(e.value=t.parsedValue)}),e},nodeList=new Map;if(isClient){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of nodeList.values())for(const{documentHandler:r}of n)r(e,t);t=void 0}})}function createDocumentHandler(t,e){let n=[];return isArray$1(e.arg)?n=e.arg:isElement(e.arg)&&n.push(e.arg),function(r,i){const s=e.instance.popperRef,o=r.target,a=i==null?void 0:i.target,l=!e||!e.instance,u=!o||!a,c=t.contains(o)||t.contains(a),d=t===o,h=n.length&&n.some(p=>p==null?void 0:p.contains(o))||n.length&&n.includes(a),f=s&&(s.contains(o)||s.contains(a));l||u||c||d||h||f||e.value(r,i)}}const ClickOutside={beforeMount(t,e){nodeList.has(t)||nodeList.set(t,[]),nodeList.get(t).push({documentHandler:createDocumentHandler(t,e),bindingFn:e.value})},updated(t,e){nodeList.has(t)||nodeList.set(t,[]);const n=nodeList.get(t),r=n.findIndex(s=>s.bindingFn===e.oldValue),i={documentHandler:createDocumentHandler(t,e),bindingFn:e.value};r>=0?n.splice(r,1,i):n.push(i)},unmounted(t){nodeList.delete(t)}},REPEAT_INTERVAL=100,REPEAT_DELAY=600,vRepeatClick={beforeMount(t,e){const n=e.value,{interval:r=REPEAT_INTERVAL,delay:i=REPEAT_DELAY}=isFunction$1(n)?{}:n;let s,o;const a=()=>isFunction$1(n)?n():n.handler(),l=()=>{o&&(clearTimeout(o),o=void 0),s&&(clearInterval(s),s=void 0)};t.addEventListener("mousedown",u=>{u.button===0&&(l(),a(),document.addEventListener("mouseup",()=>l(),{once:!0}),o=setTimeout(()=>{s=setInterval(()=>{a()},r)},i))})}},basicTimeSpinnerProps=buildProps({role:{type:String,required:!0},spinnerDate:{type:definePropType(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:definePropType(String),default:""},...disabledTimeListsProps}),_sfc_main$E=vue.defineComponent({__name:"basic-time-spinner",props:basicTimeSpinnerProps,emits:["change","select-range","set-option"],setup(t,{emit:e}){const n=t,r=vue.inject("EP_PICKER_BASE"),{isRange:i}=r.props,s=useNamespace("time"),{getHoursList:o,getMinutesList:a,getSecondsList:l}=getTimeLists(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let u=!1;const c=vue.ref(),d=vue.ref(),h=vue.ref(),f=vue.ref(),p={hours:d,minutes:h,seconds:f},g=vue.computed(()=>n.showSeconds?timeUnits:timeUnits.slice(0,2)),v=vue.computed(()=>{const{spinnerDate:D}=n,le=D.hour(),ie=D.minute(),re=D.second();return{hours:le,minutes:ie,seconds:re}}),m=vue.computed(()=>{const{hours:D,minutes:le}=vue.unref(v),{role:ie,spinnerDate:re}=n,pe=i?void 0:re;return{hours:o(ie,pe),minutes:a(D,ie,pe),seconds:l(D,le,ie,pe)}}),y=vue.computed(()=>{const{hours:D,minutes:le,seconds:ie}=vue.unref(v);return{hours:buildTimeList(D,23),minutes:buildTimeList(le,59),seconds:buildTimeList(ie,59)}}),b=debounce(D=>{u=!1,x(D)},200),_=D=>{if(!!!n.amPmMode)return"";const ie=n.amPmMode==="A";let re=D<12?" am":" pm";return ie&&(re=re.toUpperCase()),re},T=D=>{let le;switch(D){case"hours":le=[0,2];break;case"minutes":le=[3,5];break;case"seconds":le=[6,8];break}const[ie,re]=le;e("select-range",ie,re),c.value=D},x=D=>{O(D,vue.unref(v)[D])},k=()=>{x("hours"),x("minutes"),x("seconds")},w=D=>D.querySelector(`.${s.namespace.value}-scrollbar__wrap`),O=(D,le)=>{if(n.arrowControl)return;const ie=vue.unref(p[D]);ie&&ie.$el&&(w(ie.$el).scrollTop=Math.max(0,le*S(D)))},S=D=>{const le=vue.unref(p[D]),ie=le==null?void 0:le.$el.querySelector("li");return ie&&Number.parseFloat(getStyle(ie,"height"))||0},F=()=>{Y(1)},z=()=>{Y(-1)},Y=D=>{c.value||T("hours");const le=c.value,ie=vue.unref(v)[le],re=c.value==="hours"?24:60,pe=ae(le,ie,D,re);j(le,pe),O(le,pe),vue.nextTick(()=>T(le))},ae=(D,le,ie,re)=>{let pe=(le+ie+re)%re;const xe=vue.unref(m)[D];for(;xe[pe]&&pe!==le;)pe=(pe+ie+re)%re;return pe},j=(D,le)=>{if(vue.unref(m)[D][le])return;const{hours:pe,minutes:xe,seconds:Ie}=vue.unref(v);let _e;switch(D){case"hours":_e=n.spinnerDate.hour(le).minute(xe).second(Ie);break;case"minutes":_e=n.spinnerDate.hour(pe).minute(le).second(Ie);break;case"seconds":_e=n.spinnerDate.hour(pe).minute(xe).second(le);break}e("change",_e)},M=(D,{value:le,disabled:ie})=>{ie||(j(D,le),T(D),O(D,le))},$=D=>{const le=vue.unref(p[D]);if(!le)return;u=!0,b(D);const ie=Math.min(Math.round((w(le.$el).scrollTop-(oe(D)*.5-10)/S(D)+3)/S(D)),D==="hours"?23:59);j(D,ie)},oe=D=>vue.unref(p[D]).$el.offsetHeight,A=()=>{const D=le=>{const ie=vue.unref(p[le]);ie&&ie.$el&&(w(ie.$el).onscroll=()=>{$(le)})};D("hours"),D("minutes"),D("seconds")};vue.onMounted(()=>{vue.nextTick(()=>{!n.arrowControl&&A(),k(),n.role==="start"&&T("hours")})});const V=(D,le)=>{p[le].value=D??void 0};return e("set-option",[`${n.role}_scrollDown`,Y]),e("set-option",[`${n.role}_emitSelectRange`,T]),vue.watch(()=>n.spinnerDate,()=>{u||k()}),(D,le)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(s).b("spinner"),{"has-seconds":D.showSeconds}])},[D.arrowControl?vue.createCommentVNode("v-if",!0):(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:0},vue.renderList(vue.unref(g),ie=>(vue.openBlock(),vue.createBlock(vue.unref(ElScrollbar),{key:ie,ref_for:!0,ref:re=>V(re,ie),class:vue.normalizeClass(vue.unref(s).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":vue.unref(s).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:re=>T(ie),onMousemove:re=>x(ie)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(m)[ie],(re,pe)=>(vue.openBlock(),vue.createElementBlock("li",{key:pe,class:vue.normalizeClass([vue.unref(s).be("spinner","item"),vue.unref(s).is("active",pe===vue.unref(v)[ie]),vue.unref(s).is("disabled",re)]),onClick:xe=>M(ie,{value:pe,disabled:re})},[ie==="hours"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(("0"+(D.amPmMode?pe%12||12:pe)).slice(-2))+vue.toDisplayString(_(pe)),1)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(vue.toDisplayString(("0"+pe).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),D.arrowControl?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(vue.unref(g),ie=>(vue.openBlock(),vue.createElementBlock("div",{key:ie,class:vue.normalizeClass([vue.unref(s).be("spinner","wrapper"),vue.unref(s).is("arrow")]),onMouseenter:re=>T(ie)},[vue.withDirectives((vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{class:vue.normalizeClass(["arrow-up",vue.unref(s).be("spinner","arrow")])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_up_default))]),_:1},8,["class"])),[[vue.unref(vRepeatClick),z]]),vue.withDirectives((vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{class:vue.normalizeClass(["arrow-down",vue.unref(s).be("spinner","arrow")])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_down_default))]),_:1},8,["class"])),[[vue.unref(vRepeatClick),F]]),vue.createElementVNode("ul",{class:vue.normalizeClass(vue.unref(s).be("spinner","list"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(y)[ie],(re,pe)=>(vue.openBlock(),vue.createElementBlock("li",{key:pe,class:vue.normalizeClass([vue.unref(s).be("spinner","item"),vue.unref(s).is("active",re===vue.unref(v)[ie]),vue.unref(s).is("disabled",vue.unref(m)[ie][re])])},[vue.unref(isNumber$1)(re)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[ie==="hours"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(("0"+(D.amPmMode?re%12||12:re)).slice(-2))+vue.toDisplayString(_(re)),1)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(vue.toDisplayString(("0"+re).slice(-2)),1)],64))],64)):vue.createCommentVNode("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):vue.createCommentVNode("v-if",!0)],2))}});var TimeSpinner=_export_sfc$1(_sfc_main$E,[["__file","basic-time-spinner.vue"]]);const _sfc_main$D=vue.defineComponent({__name:"panel-time-pick",props:panelTimePickerProps,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,r=vue.inject("EP_PICKER_BASE"),{arrowControl:i,disabledHours:s,disabledMinutes:o,disabledSeconds:a,defaultValue:l}=r.props,{getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}=buildAvailableTimeSlotGetter(s,o,a),h=useNamespace("time"),{t:f,lang:p}=useLocale(),g=vue.ref([0,2]),v=useOldValue(n),m=vue.computed(()=>isUndefined$1(n.actualVisible)?`${h.namespace.value}-zoom-in-top`:""),y=vue.computed(()=>n.format.includes("ss")),b=vue.computed(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),_=oe=>{const A=dayjs(oe).locale(p.value),V=ae(A);return A.isSame(V)},T=()=>{e("pick",v.value,!1)},x=(oe=!1,A=!1)=>{A||e("pick",n.parsedValue,oe)},k=oe=>{if(!n.visible)return;const A=ae(oe).millisecond(0);e("pick",A,!0)},w=(oe,A)=>{e("select-range",oe,A),g.value=[oe,A]},O=oe=>{const A=[0,3].concat(y.value?[6]:[]),V=["hours","minutes"].concat(y.value?["seconds"]:[]),le=(A.indexOf(g.value[0])+oe+A.length)%A.length;F.start_emitSelectRange(V[le])},S=oe=>{const A=oe.code,{left:V,right:D,up:le,down:ie}=EVENT_CODE;if([V,D].includes(A)){O(A===V?-1:1),oe.preventDefault();return}if([le,ie].includes(A)){const re=A===le?-1:1;F.start_scrollDown(re),oe.preventDefault();return}},{timePickerOptions:F,onSetOption:z,getAvailableTime:Y}=useTimePanel({getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}),ae=oe=>Y(oe,n.datetimeRole||"",!0),j=oe=>oe?dayjs(oe,n.format).locale(p.value):null,M=oe=>oe?oe.format(n.format):null,$=()=>dayjs(l).locale(p.value);return e("set-picker-option",["isValidValue",_]),e("set-picker-option",["formatToString",M]),e("set-picker-option",["parseUserInput",j]),e("set-picker-option",["handleKeydownInput",S]),e("set-picker-option",["getRangeAvailableTime",ae]),e("set-picker-option",["getDefaultValue",$]),(oe,A)=>(vue.openBlock(),vue.createBlock(vue.Transition,{name:vue.unref(m)},{default:vue.withCtx(()=>[oe.actualVisible||oe.visible?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(h).b("panel"))},[vue.createElementVNode("div",{class:vue.normalizeClass([vue.unref(h).be("panel","content"),{"has-seconds":vue.unref(y)}])},[vue.createVNode(TimeSpinner,{ref:"spinner",role:oe.datetimeRole||"start","arrow-control":vue.unref(i),"show-seconds":vue.unref(y),"am-pm-mode":vue.unref(b),"spinner-date":oe.parsedValue,"disabled-hours":vue.unref(s),"disabled-minutes":vue.unref(o),"disabled-seconds":vue.unref(a),onChange:k,onSetOption:vue.unref(z),onSelectRange:w},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(h).be("panel","footer"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(h).be("panel","btn"),"cancel"]),onClick:T},vue.toDisplayString(vue.unref(f)("el.datepicker.cancel")),3),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(h).be("panel","btn"),"confirm"]),onClick:V=>x()},vue.toDisplayString(vue.unref(f)("el.datepicker.confirm")),11,["onClick"])],2)],2)):vue.createCommentVNode("v-if",!0)]),_:1},8,["name"]))}});var TimePickPanel=_export_sfc$1(_sfc_main$D,[["__file","panel-time-pick.vue"]]),localeData$2={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(commonjsGlobal,function(){return function(n,r,i){var s=r.prototype,o=function(d){return d&&(d.indexOf?d:d.s)},a=function(d,h,f,p,g){var v=d.name?d:d.$locale(),m=o(v[h]),y=o(v[f]),b=m||y.map(function(T){return T.slice(0,p)});if(!g)return b;var _=v.weekStart;return b.map(function(T,x){return b[(x+(_||0))%7]})},l=function(){return i.Ls[i.locale()]},u=function(d,h){return d.formats[h]||function(f){return f.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(p,g,v){return g||v.slice(1)})}(d.formats[h.toUpperCase()])},c=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):a(d,"months")},monthsShort:function(h){return h?h.format("MMM"):a(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):a(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):a(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):a(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return u(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};s.localeData=function(){return c.bind(this)()},i.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(h){return u(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},i.months=function(){return a(l(),"months")},i.monthsShort=function(){return a(l(),"monthsShort","months",3)},i.weekdays=function(d){return a(l(),"weekdays",null,null,d)},i.weekdaysShort=function(d){return a(l(),"weekdaysShort","weekdays",3,d)},i.weekdaysMin=function(d){return a(l(),"weekdaysMin","weekdays",2,d)}}})})(localeData$2);var localeDataExports=localeData$2.exports;const localeData$1=getDefaultExportFromCjs(localeDataExports),tagProps=buildProps({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:componentSizes},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),tagEmits={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},__default__$5=vue.defineComponent({name:"ElTag"}),_sfc_main$C=vue.defineComponent({...__default__$5,props:tagProps,emits:tagEmits,setup(t,{emit:e}){const n=t,r=useFormSize(),i=useNamespace("tag"),s=vue.computed(()=>{const{type:u,hit:c,effect:d,closable:h,round:f}=n;return[i.b(),i.is("closable",h),i.m(u||"primary"),i.m(r.value),i.m(d),i.is("hit",c),i.is("round",f)]}),o=u=>{e("close",u)},a=u=>{e("click",u)},l=u=>{u.component.subTree.component.bum=null};return(u,c)=>u.disableTransitions?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(vue.unref(s)),style:vue.normalizeStyle({backgroundColor:u.color}),onClick:a},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(i).e("content"))},[vue.renderSlot(u.$slots,"default")],2),u.closable?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(i).e("close")),onClick:vue.withModifiers(o,["stop"])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(close_default))]),_:1},8,["class","onClick"])):vue.createCommentVNode("v-if",!0)],6)):(vue.openBlock(),vue.createBlock(vue.Transition,{key:1,name:`${vue.unref(i).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(s)),style:vue.normalizeStyle({backgroundColor:u.color}),onClick:a},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(i).e("content"))},[vue.renderSlot(u.$slots,"default")],2),u.closable?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(i).e("close")),onClick:vue.withModifiers(o,["stop"])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(close_default))]),_:1},8,["class","onClick"])):vue.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var Tag=_export_sfc$1(_sfc_main$C,[["__file","tag.vue"]]);const ElTag=withInstall(Tag);var advancedFormat$1={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(commonjsGlobal,function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(o){var a=this,l=this.$locale();if(!this.isValid())return s.bind(this)(o);var u=this.$utils(),c=(o||"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(d){switch(d){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return u.s(a.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(a.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(a.$H===0?24:a.$H),d==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return d}});return s.bind(this)(c)}}})})(advancedFormat$1);var advancedFormatExports=advancedFormat$1.exports;const advancedFormat=getDefaultExportFromCjs(advancedFormatExports);var weekOfYear$2={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(commonjsGlobal,function(){var n="week",r="year";return function(i,s,o){var a=s.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var c=o(this).startOf(r).add(1,r).date(u),d=o(this).endOf(n);if(c.isBefore(d))return 1}var h=o(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),f=this.diff(h,n,!0);return f<0?o(this).startOf("week").week():Math.ceil(f)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(weekOfYear$2);var weekOfYearExports=weekOfYear$2.exports;const weekOfYear$1=getDefaultExportFromCjs(weekOfYearExports);var weekYear$1={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(commonjsGlobal,function(){return function(n,r){r.prototype.weekYear=function(){var i=this.month(),s=this.week(),o=this.year();return s===1&&i===11?o+1:i===0&&s>=52?o-1:o}}})})(weekYear$1);var weekYearExports=weekYear$1.exports;const weekYear=getDefaultExportFromCjs(weekYearExports);var dayOfYear$1={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(commonjsGlobal,function(){return function(n,r,i){r.prototype.dayOfYear=function(s){var o=Math.round((i(this).startOf("day")-i(this).startOf("year"))/864e5)+1;return s==null?o:this.add(s-o,"day")}}})})(dayOfYear$1);var dayOfYearExports=dayOfYear$1.exports;const dayOfYear=getDefaultExportFromCjs(dayOfYearExports);var isSameOrAfter$2={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(commonjsGlobal,function(){return function(n,r){r.prototype.isSameOrAfter=function(i,s){return this.isSame(i,s)||this.isAfter(i,s)}}})})(isSameOrAfter$2);var isSameOrAfterExports=isSameOrAfter$2.exports;const isSameOrAfter$1=getDefaultExportFromCjs(isSameOrAfterExports);var isSameOrBefore$2={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(commonjsGlobal,function(){return function(n,r){r.prototype.isSameOrBefore=function(i,s){return this.isSame(i,s)||this.isBefore(i,s)}}})})(isSameOrBefore$2);var isSameOrBeforeExports=isSameOrBefore$2.exports;const isSameOrBefore$1=getDefaultExportFromCjs(isSameOrBeforeExports),ROOT_PICKER_INJECTION_KEY=Symbol(),datePickerProps=buildProps({...timePickerDefaultProps,type:{type:definePropType(String),default:"date"}}),selectionModes=["date","dates","year","years","month","months","week","range"],datePickerSharedProps=buildProps({disabledDate:{type:definePropType(Function)},date:{type:definePropType(Object),required:!0},minDate:{type:definePropType(Object)},maxDate:{type:definePropType(Object)},parsedValue:{type:definePropType([Object,Array])},rangeState:{type:definePropType(Object),default:()=>({endDate:null,selecting:!1})}}),panelSharedProps=buildProps({type:{type:definePropType(String),required:!0,values:datePickTypes},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0}}),panelRangeSharedProps=buildProps({unlinkPanels:Boolean,parsedValue:{type:definePropType(Array)}}),selectionModeWithDefault=t=>({type:String,values:selectionModes,default:t}),panelDatePickProps=buildProps({...panelSharedProps,parsedValue:{type:definePropType([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),isValidRange=t=>{if(!isArray$1(t))return!1;const[e,n]=t;return dayjs.isDayjs(e)&&dayjs.isDayjs(n)&&e.isSameOrBefore(n)},getDefaultValue=(t,{lang:e,unit:n,unlinkPanels:r})=>{let i;if(isArray$1(t)){let[s,o]=t.map(a=>dayjs(a).locale(e));return r||(o=s.add(1,n)),[s,o]}else t?i=dayjs(t):i=dayjs();return i=i.locale(e),[i,i.add(1,n)]},buildPickerTable=(t,e,{columnIndexOffset:n,startDate:r,nextEndDate:i,now:s,unit:o,relativeDateGetter:a,setCellMetadata:l,setRowMetadata:u})=>{for(let c=0;c<t.row;c++){const d=e[c];for(let h=0;h<t.column;h++){let f=d[h+n];f||(f={row:c,column:h,type:"normal",inRange:!1,start:!1,end:!1});const p=c*t.column+h,g=a(p);f.dayjs=g,f.date=g.toDate(),f.timestamp=g.valueOf(),f.type="normal",f.inRange=!!(r&&g.isSameOrAfter(r,o)&&i&&g.isSameOrBefore(i,o))||!!(r&&g.isSameOrBefore(r,o)&&i&&g.isSameOrAfter(i,o)),r!=null&&r.isSameOrAfter(i)?(f.start=!!i&&g.isSame(i,o),f.end=r&&g.isSame(r,o)):(f.start=!!r&&g.isSame(r,o),f.end=!!i&&g.isSame(i,o)),g.isSame(s,o)&&(f.type="today"),l==null||l(f,{rowIndex:c,columnIndex:h}),d[h+n]=f}u==null||u(d)}},datesInMonth=(t,e,n)=>{const r=dayjs().locale(n).startOf("month").month(e).year(t),i=r.daysInMonth();return rangeArr(i).map(s=>r.add(s,"day").toDate())},getValidDateOfMonth=(t,e,n,r)=>{const i=dayjs().year(t).month(e).startOf("month"),s=datesInMonth(t,e,n).find(o=>!(r!=null&&r(o)));return s?dayjs(s).locale(n):i.locale(n)},getValidDateOfYear=(t,e,n)=>{const r=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const i=t.month();if(!datesInMonth(r,i,e).every(n))return getValidDateOfMonth(r,i,e,n);for(let s=0;s<12;s++)if(!datesInMonth(r,s,e).every(n))return getValidDateOfMonth(r,s,e,n);return t},basicDateTableProps=buildProps({...datePickerSharedProps,cellClassName:{type:definePropType(Function)},showWeekNumber:Boolean,selectionMode:selectionModeWithDefault("date")}),basicDateTableEmits=["changerange","pick","select"],isNormalDay=(t="")=>["normal","today"].includes(t),useBasicDateTable=(t,e)=>{const{lang:n}=useLocale(),r=vue.ref(),i=vue.ref(),s=vue.ref(),o=vue.ref(),a=vue.ref([[],[],[],[],[],[]]);let l=!1;const u=t.date.$locale().weekStart||7,c=t.date.locale("en").localeData().weekdaysShort().map(A=>A.toLowerCase()),d=vue.computed(()=>u>3?7-u:-u),h=vue.computed(()=>{const A=t.date.startOf("month");return A.subtract(A.day()||7,"day")}),f=vue.computed(()=>c.concat(c).slice(u,u+7)),p=vue.computed(()=>flatten(vue.unref(_)).some(A=>A.isCurrent)),g=vue.computed(()=>{const A=t.date.startOf("month"),V=A.day()||7,D=A.daysInMonth(),le=A.subtract(1,"month").daysInMonth();return{startOfMonthDay:V,dateCountOfMonth:D,dateCountOfLastMonth:le}}),v=vue.computed(()=>t.selectionMode==="dates"?castArray(t.parsedValue):[]),m=(A,{count:V,rowIndex:D,columnIndex:le})=>{const{startOfMonthDay:ie,dateCountOfMonth:re,dateCountOfLastMonth:pe}=vue.unref(g),xe=vue.unref(d);if(D>=0&&D<=1){const Ie=ie+xe<0?7+ie+xe:ie+xe;if(le+D*7>=Ie)return A.text=V,!0;A.text=pe-(Ie-le%7)+1+D*7,A.type="prev-month"}else return V<=re?A.text=V:(A.text=V-re,A.type="next-month"),!0;return!1},y=(A,{columnIndex:V,rowIndex:D},le)=>{const{disabledDate:ie,cellClassName:re}=t,pe=vue.unref(v),xe=m(A,{count:le,rowIndex:D,columnIndex:V}),Ie=A.dayjs.toDate();return A.selected=pe.find(_e=>_e.isSame(A.dayjs,"day")),A.isSelected=!!A.selected,A.isCurrent=x(A),A.disabled=ie==null?void 0:ie(Ie),A.customClass=re==null?void 0:re(Ie),xe},b=A=>{if(t.selectionMode==="week"){const[V,D]=t.showWeekNumber?[1,7]:[0,6],le=oe(A[V+1]);A[V].inRange=le,A[V].start=le,A[D].inRange=le,A[D].end=le}},_=vue.computed(()=>{const{minDate:A,maxDate:V,rangeState:D,showWeekNumber:le}=t,ie=vue.unref(d),re=vue.unref(a),pe="day";let xe=1;if(le)for(let Ie=0;Ie<6;Ie++)re[Ie][0]||(re[Ie][0]={type:"week",text:vue.unref(h).add(Ie*7+1,pe).week()});return buildPickerTable({row:6,column:7},re,{startDate:A,columnIndexOffset:le?1:0,nextEndDate:D.endDate||V||D.selecting&&A||null,now:dayjs().locale(vue.unref(n)).startOf(pe),unit:pe,relativeDateGetter:Ie=>vue.unref(h).add(Ie-ie,pe),setCellMetadata:(...Ie)=>{y(...Ie,xe)&&(xe+=1)},setRowMetadata:b}),re});vue.watch(()=>t.date,async()=>{var A;(A=vue.unref(r))!=null&&A.contains(document.activeElement)&&(await vue.nextTick(),await T())});const T=async()=>{var A;return(A=vue.unref(i))==null?void 0:A.focus()},x=A=>t.selectionMode==="date"&&isNormalDay(A.type)&&k(A,t.parsedValue),k=(A,V)=>V?dayjs(V).locale(vue.unref(n)).isSame(t.date.date(Number(A.text)),"day"):!1,w=(A,V)=>{const D=A*7+(V-(t.showWeekNumber?1:0))-vue.unref(d);return vue.unref(h).add(D,"day")},O=A=>{var V;if(!t.rangeState.selecting)return;let D=A.target;if(D.tagName==="SPAN"&&(D=(V=D.parentNode)==null?void 0:V.parentNode),D.tagName==="DIV"&&(D=D.parentNode),D.tagName!=="TD")return;const le=D.parentNode.rowIndex-1,ie=D.cellIndex;vue.unref(_)[le][ie].disabled||(le!==vue.unref(s)||ie!==vue.unref(o))&&(s.value=le,o.value=ie,e("changerange",{selecting:!0,endDate:w(le,ie)}))},S=A=>!vue.unref(p)&&(A==null?void 0:A.text)===1&&A.type==="normal"||A.isCurrent,F=A=>{l||vue.unref(p)||t.selectionMode!=="date"||$(A,!0)},z=A=>{A.target.closest("td")&&(l=!0)},Y=A=>{A.target.closest("td")&&(l=!1)},ae=A=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:A,maxDate:null}),e("select",!0)):(A>=t.minDate?e("pick",{minDate:t.minDate,maxDate:A}):e("pick",{minDate:A,maxDate:t.minDate}),e("select",!1))},j=A=>{const V=A.week(),D=`${A.year()}w${V}`;e("pick",{year:A.year(),week:V,value:D,date:A.startOf("week")})},M=(A,V)=>{const D=V?castArray(t.parsedValue).filter(le=>(le==null?void 0:le.valueOf())!==A.valueOf()):castArray(t.parsedValue).concat([A]);e("pick",D)},$=(A,V=!1)=>{const D=A.target.closest("td");if(!D)return;const le=D.parentNode.rowIndex-1,ie=D.cellIndex,re=vue.unref(_)[le][ie];if(re.disabled||re.type==="week")return;const pe=w(le,ie);switch(t.selectionMode){case"range":{ae(pe);break}case"date":{e("pick",pe,V);break}case"week":{j(pe);break}case"dates":{M(pe,!!re.selected);break}}},oe=A=>{if(t.selectionMode!=="week")return!1;let V=t.date.startOf("day");if(A.type==="prev-month"&&(V=V.subtract(1,"month")),A.type==="next-month"&&(V=V.add(1,"month")),V=V.date(Number.parseInt(A.text,10)),t.parsedValue&&!isArray$1(t.parsedValue)){const D=(t.parsedValue.day()-u+7)%7-1;return t.parsedValue.subtract(D,"day").isSame(V,"day")}return!1};return{WEEKS:f,rows:_,tbodyRef:r,currentCellRef:i,focus:T,isCurrent:x,isWeekActive:oe,isSelectedCell:S,handlePickDate:$,handleMouseUp:Y,handleMouseDown:z,handleMouseMove:O,handleFocus:F}},useBasicDateTableDOM=(t,{isCurrent:e,isWeekActive:n})=>{const r=useNamespace("date-table"),{t:i}=useLocale(),s=vue.computed(()=>[r.b(),{"is-week-mode":t.selectionMode==="week"}]),o=vue.computed(()=>i("el.datepicker.dateTablePrompt")),a=vue.computed(()=>i("el.datepicker.week"));return{tableKls:s,tableLabel:o,weekLabel:a,getCellClasses:c=>{const d=[];return isNormalDay(c.type)&&!c.disabled?(d.push("available"),c.type==="today"&&d.push("today")):d.push(c.type),e(c)&&d.push("current"),c.inRange&&(isNormalDay(c.type)||t.selectionMode==="week")&&(d.push("in-range"),c.start&&d.push("start-date"),c.end&&d.push("end-date")),c.disabled&&d.push("disabled"),c.selected&&d.push("selected"),c.customClass&&d.push(c.customClass),d.join(" ")},getRowKls:c=>[r.e("row"),{current:n(c)}],t:i}},basicCellProps=buildProps({cell:{type:definePropType(Object)}});var ElDatePickerCell=vue.defineComponent({name:"ElDatePickerCell",props:basicCellProps,setup(t){const e=useNamespace("date-table-cell"),{slots:n}=vue.inject(ROOT_PICKER_INJECTION_KEY);return()=>{const{cell:r}=t;return vue.renderSlot(n,"default",{...r},()=>{var i;return[vue.createVNode("div",{class:e.b()},[vue.createVNode("span",{class:e.e("text")},[(i=r==null?void 0:r.renderText)!=null?i:r==null?void 0:r.text])])]})}}});const _sfc_main$B=vue.defineComponent({__name:"basic-date-table",props:basicDateTableProps,emits:basicDateTableEmits,setup(t,{expose:e,emit:n}){const r=t,{WEEKS:i,rows:s,tbodyRef:o,currentCellRef:a,focus:l,isCurrent:u,isWeekActive:c,isSelectedCell:d,handlePickDate:h,handleMouseUp:f,handleMouseDown:p,handleMouseMove:g,handleFocus:v}=useBasicDateTable(r,n),{tableLabel:m,tableKls:y,weekLabel:b,getCellClasses:_,getRowKls:T,t:x}=useBasicDateTableDOM(r,{isCurrent:u,isWeekActive:c});return e({focus:l}),(k,w)=>(vue.openBlock(),vue.createElementBlock("table",{"aria-label":vue.unref(m),class:vue.normalizeClass(vue.unref(y)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:vue.unref(h),onMousemove:vue.unref(g),onMousedown:vue.withModifiers(vue.unref(p),["prevent"]),onMouseup:vue.unref(f)},[vue.createElementVNode("tbody",{ref_key:"tbodyRef",ref:o},[vue.createElementVNode("tr",null,[k.showWeekNumber?(vue.openBlock(),vue.createElementBlock("th",{key:0,scope:"col"},vue.toDisplayString(vue.unref(b)),1)):vue.createCommentVNode("v-if",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(i),(O,S)=>(vue.openBlock(),vue.createElementBlock("th",{key:S,"aria-label":vue.unref(x)("el.datepicker.weeksFull."+O),scope:"col"},vue.toDisplayString(vue.unref(x)("el.datepicker.weeks."+O)),9,["aria-label"]))),128))]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(s),(O,S)=>(vue.openBlock(),vue.createElementBlock("tr",{key:S,class:vue.normalizeClass(vue.unref(T)(O[1]))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(O,(F,z)=>(vue.openBlock(),vue.createElementBlock("td",{key:`${S}.${z}`,ref_for:!0,ref:Y=>vue.unref(d)(F)&&(a.value=Y),class:vue.normalizeClass(vue.unref(_)(F)),"aria-current":F.isCurrent?"date":void 0,"aria-selected":F.isCurrent,tabindex:vue.unref(d)(F)?0:-1,onFocus:vue.unref(v)},[vue.createVNode(vue.unref(ElDatePickerCell),{cell:F},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var DateTable=_export_sfc$1(_sfc_main$B,[["__file","basic-date-table.vue"]]);const basicMonthTableProps=buildProps({...datePickerSharedProps,selectionMode:selectionModeWithDefault("month")}),_sfc_main$A=vue.defineComponent({__name:"basic-month-table",props:basicMonthTableProps,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const r=t,i=useNamespace("month-table"),{t:s,lang:o}=useLocale(),a=vue.ref(),l=vue.ref(),u=vue.ref(r.date.locale("en").localeData().monthsShort().map(b=>b.toLowerCase())),c=vue.ref([[],[],[]]),d=vue.ref(),h=vue.ref(),f=vue.computed(()=>{var b,_;const T=c.value,x=dayjs().locale(o.value).startOf("month");for(let k=0;k<3;k++){const w=T[k];for(let O=0;O<4;O++){const S=w[O]||(w[O]={row:k,column:O,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});S.type="normal";const F=k*4+O,z=r.date.startOf("year").month(F),Y=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;S.inRange=!!(r.minDate&&z.isSameOrAfter(r.minDate,"month")&&Y&&z.isSameOrBefore(Y,"month"))||!!(r.minDate&&z.isSameOrBefore(r.minDate,"month")&&Y&&z.isSameOrAfter(Y,"month")),(b=r.minDate)!=null&&b.isSameOrAfter(Y)?(S.start=!!(Y&&z.isSame(Y,"month")),S.end=r.minDate&&z.isSame(r.minDate,"month")):(S.start=!!(r.minDate&&z.isSame(r.minDate,"month")),S.end=!!(Y&&z.isSame(Y,"month"))),x.isSame(z)&&(S.type="today"),S.text=F,S.disabled=((_=r.disabledDate)==null?void 0:_.call(r,z.toDate()))||!1}}return T}),p=()=>{var b;(b=l.value)==null||b.focus()},g=b=>{const _={},T=r.date.year(),x=new Date,k=b.text;return _.disabled=r.disabledDate?datesInMonth(T,k,o.value).every(r.disabledDate):!1,_.current=castArray(r.parsedValue).findIndex(w=>dayjs.isDayjs(w)&&w.year()===T&&w.month()===k)>=0,_.today=x.getFullYear()===T&&x.getMonth()===k,b.inRange&&(_["in-range"]=!0,b.start&&(_["start-date"]=!0),b.end&&(_["end-date"]=!0)),_},v=b=>{const _=r.date.year(),T=b.text;return castArray(r.date).findIndex(x=>x.year()===_&&x.month()===T)>=0},m=b=>{var _;if(!r.rangeState.selecting)return;let T=b.target;if(T.tagName==="SPAN"&&(T=(_=T.parentNode)==null?void 0:_.parentNode),T.tagName==="DIV"&&(T=T.parentNode),T.tagName!=="TD")return;const x=T.parentNode.rowIndex,k=T.cellIndex;f.value[x][k].disabled||(x!==d.value||k!==h.value)&&(d.value=x,h.value=k,n("changerange",{selecting:!0,endDate:r.date.startOf("year").month(x*4+k)}))},y=b=>{var _;const T=(_=b.target)==null?void 0:_.closest("td");if((T==null?void 0:T.tagName)!=="TD"||hasClass(T,"disabled"))return;const x=T.cellIndex,w=T.parentNode.rowIndex*4+x,O=r.date.startOf("year").month(w);if(r.selectionMode==="months"){if(b.type==="keydown"){n("pick",castArray(r.parsedValue),!1);return}const S=getValidDateOfMonth(r.date.year(),w,o.value,r.disabledDate),F=hasClass(T,"current")?castArray(r.parsedValue).filter(z=>(z==null?void 0:z.month())!==S.month()):castArray(r.parsedValue).concat([dayjs(S)]);n("pick",F)}else r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&O>=r.minDate?n("pick",{minDate:r.minDate,maxDate:O}):n("pick",{minDate:O,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:O,maxDate:null}),n("select",!0)):n("pick",w)};return vue.watch(()=>r.date,async()=>{var b,_;(b=a.value)!=null&&b.contains(document.activeElement)&&(await vue.nextTick(),(_=l.value)==null||_.focus())}),e({focus:p}),(b,_)=>(vue.openBlock(),vue.createElementBlock("table",{role:"grid","aria-label":vue.unref(s)("el.datepicker.monthTablePrompt"),class:vue.normalizeClass(vue.unref(i).b()),onClick:y,onMousemove:m},[vue.createElementVNode("tbody",{ref_key:"tbodyRef",ref:a},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(f),(T,x)=>(vue.openBlock(),vue.createElementBlock("tr",{key:x},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(T,(k,w)=>(vue.openBlock(),vue.createElementBlock("td",{key:w,ref_for:!0,ref:O=>v(k)&&(l.value=O),class:vue.normalizeClass(g(k)),"aria-selected":`${v(k)}`,"aria-label":vue.unref(s)(`el.datepicker.month${+k.text+1}`),tabindex:v(k)?0:-1,onKeydown:[vue.withKeys(vue.withModifiers(y,["prevent","stop"]),["space"]),vue.withKeys(vue.withModifiers(y,["prevent","stop"]),["enter"])]},[vue.createVNode(vue.unref(ElDatePickerCell),{cell:{...k,renderText:vue.unref(s)("el.datepicker.months."+u.value[k.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var MonthTable=_export_sfc$1(_sfc_main$A,[["__file","basic-month-table.vue"]]);const basicYearTableProps=buildProps({...datePickerSharedProps,selectionMode:selectionModeWithDefault("year")}),_sfc_main$z=vue.defineComponent({__name:"basic-year-table",props:basicYearTableProps,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const r=t,i=(_,T)=>{const x=dayjs(String(_)).locale(T).startOf("year"),w=x.endOf("year").dayOfYear();return rangeArr(w).map(O=>x.add(O,"day").toDate())},s=useNamespace("year-table"),{t:o,lang:a}=useLocale(),l=vue.ref(),u=vue.ref(),c=vue.computed(()=>Math.floor(r.date.year()/10)*10),d=vue.ref([[],[],[]]),h=vue.ref(),f=vue.ref(),p=vue.computed(()=>{var _;const T=d.value,x=dayjs().locale(a.value).startOf("year");for(let k=0;k<3;k++){const w=T[k];for(let O=0;O<4&&!(k*4+O>=10);O++){let S=w[O];S||(S={row:k,column:O,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),S.type="normal";const F=k*4+O+c.value,z=dayjs().year(F),Y=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;S.inRange=!!(r.minDate&&z.isSameOrAfter(r.minDate,"year")&&Y&&z.isSameOrBefore(Y,"year"))||!!(r.minDate&&z.isSameOrBefore(r.minDate,"year")&&Y&&z.isSameOrAfter(Y,"year")),(_=r.minDate)!=null&&_.isSameOrAfter(Y)?(S.start=!!(Y&&z.isSame(Y,"year")),S.end=!!(r.minDate&&z.isSame(r.minDate,"year"))):(S.start=!!(r.minDate&&z.isSame(r.minDate,"year")),S.end=!!(Y&&z.isSame(Y,"year"))),x.isSame(z)&&(S.type="today"),S.text=F;const j=z.toDate();S.disabled=r.disabledDate&&r.disabledDate(j)||!1,w[O]=S}}return T}),g=()=>{var _;(_=u.value)==null||_.focus()},v=_=>{const T={},x=dayjs().locale(a.value),k=_.text;return T.disabled=r.disabledDate?i(k,a.value).every(r.disabledDate):!1,T.today=x.year()===k,T.current=castArray(r.parsedValue).findIndex(w=>w.year()===k)>=0,_.inRange&&(T["in-range"]=!0,_.start&&(T["start-date"]=!0),_.end&&(T["end-date"]=!0)),T},m=_=>{const T=_.text;return castArray(r.date).findIndex(x=>x.year()===T)>=0},y=_=>{var T;const x=(T=_.target)==null?void 0:T.closest("td");if(!x||!x.textContent||hasClass(x,"disabled"))return;const k=x.cellIndex,O=x.parentNode.rowIndex*4+k+c.value,S=dayjs().year(O);if(r.selectionMode==="range")r.rangeState.selecting?(r.minDate&&S>=r.minDate?n("pick",{minDate:r.minDate,maxDate:S}):n("pick",{minDate:S,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:S,maxDate:null}),n("select",!0));else if(r.selectionMode==="years"){if(_.type==="keydown"){n("pick",castArray(r.parsedValue),!1);return}const F=getValidDateOfYear(S.startOf("year"),a.value,r.disabledDate),z=hasClass(x,"current")?castArray(r.parsedValue).filter(Y=>(Y==null?void 0:Y.year())!==O):castArray(r.parsedValue).concat([F]);n("pick",z)}else n("pick",O)},b=_=>{var T;if(!r.rangeState.selecting)return;const x=(T=_.target)==null?void 0:T.closest("td");if(!x)return;const k=x.parentNode.rowIndex,w=x.cellIndex;p.value[k][w].disabled||(k!==h.value||w!==f.value)&&(h.value=k,f.value=w,n("changerange",{selecting:!0,endDate:dayjs().year(c.value).add(k*4+w,"year")}))};return vue.watch(()=>r.date,async()=>{var _,T;(_=l.value)!=null&&_.contains(document.activeElement)&&(await vue.nextTick(),(T=u.value)==null||T.focus())}),e({focus:g}),(_,T)=>(vue.openBlock(),vue.createElementBlock("table",{role:"grid","aria-label":vue.unref(o)("el.datepicker.yearTablePrompt"),class:vue.normalizeClass(vue.unref(s).b()),onClick:y,onMousemove:b},[vue.createElementVNode("tbody",{ref_key:"tbodyRef",ref:l},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),(x,k)=>(vue.openBlock(),vue.createElementBlock("tr",{key:k},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(x,(w,O)=>(vue.openBlock(),vue.createElementBlock("td",{key:`${k}_${O}`,ref_for:!0,ref:S=>m(w)&&(u.value=S),class:vue.normalizeClass(["available",v(w)]),"aria-selected":m(w),"aria-label":String(w.text),tabindex:m(w)?0:-1,onKeydown:[vue.withKeys(vue.withModifiers(y,["prevent","stop"]),["space"]),vue.withKeys(vue.withModifiers(y,["prevent","stop"]),["enter"])]},[vue.createVNode(vue.unref(ElDatePickerCell),{cell:w},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var YearTable=_export_sfc$1(_sfc_main$z,[["__file","basic-year-table.vue"]]);const _sfc_main$y=vue.defineComponent({__name:"panel-date-pick",props:panelDatePickProps,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=t,r=(de,Ve,he)=>!0,i=useNamespace("picker-panel"),s=useNamespace("date-picker"),o=vue.useAttrs(),a=vue.useSlots(),{t:l,lang:u}=useLocale(),c=vue.inject("EP_PICKER_BASE"),d=vue.inject(TOOLTIP_INJECTION_KEY),{shortcuts:h,disabledDate:f,cellClassName:p,defaultTime:g}=c.props,v=vue.toRef(c.props,"defaultValue"),m=vue.ref(),y=vue.ref(dayjs().locale(u.value)),b=vue.ref(!1);let _=!1;const T=vue.computed(()=>dayjs(g).locale(u.value)),x=vue.computed(()=>y.value.month()),k=vue.computed(()=>y.value.year()),w=vue.ref([]),O=vue.ref(null),S=vue.ref(null),F=de=>w.value.length>0?r(de,w.value,n.format||"HH:mm:ss"):!0,z=de=>g&&!Tn.value&&!b.value&&!_?T.value.year(de.year()).month(de.month()).date(de.date()):Ie.value?de.millisecond(0):de.startOf("day"),Y=(de,...Ve)=>{if(!de)e("pick",de,...Ve);else if(isArray$1(de)){const he=de.map(z);e("pick",he,...Ve)}else e("pick",z(de),...Ve);O.value=null,S.value=null,b.value=!1,_=!1},ae=async(de,Ve)=>{if(V.value==="date"){de=de;let he=n.parsedValue?n.parsedValue.year(de.year()).month(de.month()).date(de.date()):de;F(he)||(he=w.value[0][0].year(de.year()).month(de.month()).date(de.date())),y.value=he,Y(he,Ie.value||Ve),n.type==="datetime"&&(await vue.nextTick(),Rn())}else V.value==="week"?Y(de.date):V.value==="dates"&&Y(de,!0)},j=de=>{const Ve=de?"add":"subtract";y.value=y.value[Ve](1,"month"),Mn("month")},M=de=>{const Ve=y.value,he=de?"add":"subtract";y.value=$.value==="year"?Ve[he](10,"year"):Ve[he](1,"year"),Mn("year")},$=vue.ref("date"),oe=vue.computed(()=>{const de=l("el.datepicker.year");if($.value==="year"){const Ve=Math.floor(k.value/10)*10;return de?`${Ve} ${de} - ${Ve+9} ${de}`:`${Ve} - ${Ve+9}`}return`${k.value} ${de}`}),A=de=>{const Ve=isFunction$1(de.value)?de.value():de.value;if(Ve){_=!0,Y(dayjs(Ve).locale(u.value));return}de.onClick&&de.onClick({attrs:o,slots:a,emit:e})},V=vue.computed(()=>{const{type:de}=n;return["week","month","months","year","years","dates"].includes(de)?de:"date"}),D=vue.computed(()=>V.value==="dates"||V.value==="months"||V.value==="years"),le=vue.computed(()=>V.value==="date"?$.value:V.value),ie=vue.computed(()=>!!h.length),re=async(de,Ve)=>{V.value==="month"?(y.value=getValidDateOfMonth(y.value.year(),de,u.value,f),Y(y.value,!1)):V.value==="months"?Y(de,Ve??!0):(y.value=getValidDateOfMonth(y.value.year(),de,u.value,f),$.value="date",["month","year","date","week"].includes(V.value)&&(Y(y.value,!0),await vue.nextTick(),Rn())),Mn("month")},pe=async(de,Ve)=>{if(V.value==="year"){const he=y.value.startOf("year").year(de);y.value=getValidDateOfYear(he,u.value,f),Y(y.value,!1)}else if(V.value==="years")Y(de,Ve??!0);else{const he=y.value.year(de);y.value=getValidDateOfYear(he,u.value,f),$.value="month",["month","year","date","week"].includes(V.value)&&(Y(y.value,!0),await vue.nextTick(),Rn())}Mn("year")},xe=async de=>{$.value=de,await vue.nextTick(),Rn()},Ie=vue.computed(()=>n.type==="datetime"||n.type==="datetimerange"),_e=vue.computed(()=>{const de=Ie.value||V.value==="dates",Ve=V.value==="years",he=V.value==="months",ze=$.value==="date",L=$.value==="year",Fe=$.value==="month";return de&&ze||Ve&&L||he&&Fe}),Ne=vue.computed(()=>f?n.parsedValue?isArray$1(n.parsedValue)?f(n.parsedValue[0].toDate()):f(n.parsedValue.toDate()):!0:!1),$e=()=>{if(D.value)Y(n.parsedValue);else{let de=n.parsedValue;if(!de){const Ve=dayjs(g).locale(u.value),he=In();de=Ve.year(he.year()).month(he.month()).date(he.date())}y.value=de,Y(de)}},Ue=vue.computed(()=>f?f(dayjs().locale(u.value).toDate()):!1),At=()=>{const Ve=dayjs().locale(u.value).toDate();b.value=!0,(!f||!f(Ve))&&F(Ve)&&(y.value=dayjs().locale(u.value),Y(y.value))},kt=vue.computed(()=>n.timeFormat||extractTimeFormat(n.format)),En=vue.computed(()=>n.dateFormat||extractDateFormat(n.format)),Tn=vue.computed(()=>{if(S.value)return S.value;if(!(!n.parsedValue&&!v.value))return(n.parsedValue||y.value).format(kt.value)}),bn=vue.computed(()=>{if(O.value)return O.value;if(!(!n.parsedValue&&!v.value))return(n.parsedValue||y.value).format(En.value)}),Lt=vue.ref(!1),vn=()=>{Lt.value=!0},Et=()=>{Lt.value=!1},jt=de=>({hour:de.hour(),minute:de.minute(),second:de.second(),year:de.year(),month:de.month(),date:de.date()}),_n=(de,Ve,he)=>{const{hour:ze,minute:L,second:Fe}=jt(de),Pt=n.parsedValue?n.parsedValue.hour(ze).minute(L).second(Fe):de;y.value=Pt,Y(y.value,!0),he||(Lt.value=Ve)},kn=de=>{const Ve=dayjs(de,kt.value).locale(u.value);if(Ve.isValid()&&F(Ve)){const{year:he,month:ze,date:L}=jt(y.value);y.value=Ve.year(he).month(ze).date(L),S.value=null,Lt.value=!1,Y(y.value,!0)}},Pn=de=>{const Ve=dayjs(de,En.value).locale(u.value);if(Ve.isValid()){if(f&&f(Ve.toDate()))return;const{hour:he,minute:ze,second:L}=jt(y.value);y.value=Ve.hour(he).minute(ze).second(L),O.value=null,Y(y.value,!0)}},Ce=de=>dayjs.isDayjs(de)&&de.isValid()&&(f?!f(de.toDate()):!0),qe=de=>isArray$1(de)?de.map(Ve=>Ve.format(n.format)):de.format(n.format),wn=de=>dayjs(de,n.format).locale(u.value),In=()=>{const de=dayjs(v.value).locale(u.value);if(!v.value){const Ve=T.value;return dayjs().hour(Ve.hour()).minute(Ve.minute()).second(Ve.second()).locale(u.value)}return de},Rn=async()=>{var de;["week","month","year","date"].includes(V.value)&&((de=m.value)==null||de.focus(),V.value==="week"&&Cn(EVENT_CODE.down))},Un=de=>{const{code:Ve}=de;[EVENT_CODE.up,EVENT_CODE.down,EVENT_CODE.left,EVENT_CODE.right,EVENT_CODE.home,EVENT_CODE.end,EVENT_CODE.pageUp,EVENT_CODE.pageDown].includes(Ve)&&(Cn(Ve),de.stopPropagation(),de.preventDefault()),[EVENT_CODE.enter,EVENT_CODE.space,EVENT_CODE.numpadEnter].includes(Ve)&&O.value===null&&S.value===null&&(de.preventDefault(),Y(y.value,!1))},Cn=de=>{var Ve;const{up:he,down:ze,left:L,right:Fe,home:Pt,end:xn,pageUp:zn,pageDown:Zn}=EVENT_CODE,Kn={year:{[he]:-4,[ze]:4,[L]:-1,[Fe]:1,offset:(hn,Fn)=>hn.setFullYear(hn.getFullYear()+Fn)},month:{[he]:-4,[ze]:4,[L]:-1,[Fe]:1,offset:(hn,Fn)=>hn.setMonth(hn.getMonth()+Fn)},week:{[he]:-1,[ze]:1,[L]:-1,[Fe]:1,offset:(hn,Fn)=>hn.setDate(hn.getDate()+Fn*7)},date:{[he]:-7,[ze]:7,[L]:-1,[Fe]:1,[Pt]:hn=>-hn.getDay(),[xn]:hn=>-hn.getDay()+6,[zn]:hn=>-new Date(hn.getFullYear(),hn.getMonth(),0).getDate(),[Zn]:hn=>new Date(hn.getFullYear(),hn.getMonth()+1,0).getDate(),offset:(hn,Fn)=>hn.setDate(hn.getDate()+Fn)}},Ln=y.value.toDate();for(;Math.abs(y.value.diff(Ln,"year",!0))<1;){const hn=Kn[le.value];if(!hn)return;if(hn.offset(Ln,isFunction$1(hn[de])?hn[de](Ln):(Ve=hn[de])!=null?Ve:0),f&&f(Ln))break;const Fn=dayjs(Ln).locale(u.value);y.value=Fn,e("pick",Fn,!0);break}},Mn=de=>{e("panel-change",y.value.toDate(),de,$.value)};return vue.watch(()=>V.value,de=>{if(["month","year"].includes(de)){$.value=de;return}else if(de==="years"){$.value="year";return}else if(de==="months"){$.value="month";return}$.value="date"},{immediate:!0}),vue.watch(()=>$.value,()=>{d==null||d.updatePopper()}),vue.watch(()=>v.value,de=>{de&&(y.value=In())},{immediate:!0}),vue.watch(()=>n.parsedValue,de=>{if(de){if(D.value||isArray$1(de))return;y.value=de}else y.value=In()},{immediate:!0}),e("set-picker-option",["isValidValue",Ce]),e("set-picker-option",["formatToString",qe]),e("set-picker-option",["parseUserInput",wn]),e("set-picker-option",["handleFocusPicker",Rn]),(de,Ve)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(i).b(),vue.unref(s).b(),{"has-sidebar":de.$slots.sidebar||vue.unref(ie),"has-time":vue.unref(Ie)}])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("body-wrapper"))},[vue.renderSlot(de.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(i).e("sidebar"))}),vue.unref(ie)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(i).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(h),(he,ze)=>(vue.openBlock(),vue.createElementBlock("button",{key:ze,type:"button",class:vue.normalizeClass(vue.unref(i).e("shortcut")),onClick:L=>A(he)},vue.toDisplayString(he.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("body"))},[vue.unref(Ie)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(s).e("time-header"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(s).e("editor-wrap"))},[vue.createVNode(vue.unref(ElInput),{placeholder:vue.unref(l)("el.datepicker.selectDate"),"model-value":vue.unref(bn),size:"small","validate-event":!1,onInput:he=>O.value=he,onChange:Pn},null,8,["placeholder","model-value","onInput"])],2),vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{class:vue.normalizeClass(vue.unref(s).e("editor-wrap"))},[vue.createVNode(vue.unref(ElInput),{placeholder:vue.unref(l)("el.datepicker.selectTime"),"model-value":vue.unref(Tn),size:"small","validate-event":!1,onFocus:vn,onInput:he=>S.value=he,onChange:kn},null,8,["placeholder","model-value","onInput"]),vue.createVNode(vue.unref(TimePickPanel),{visible:Lt.value,format:vue.unref(kt),"parsed-value":y.value,onPick:_n},null,8,["visible","format","parsed-value"])],2)),[[vue.unref(ClickOutside),Et]])],2)):vue.createCommentVNode("v-if",!0),vue.withDirectives(vue.createElementVNode("div",{class:vue.normalizeClass([vue.unref(s).e("header"),($.value==="year"||$.value==="month")&&vue.unref(s).e("header--bordered")])},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(s).e("prev-btn"))},[vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.prevYear"),class:vue.normalizeClass(["d-arrow-left",vue.unref(i).e("icon-btn")]),onClick:he=>M(!1)},[vue.renderSlot(de.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["aria-label","onClick"]),vue.withDirectives(vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.prevMonth"),class:vue.normalizeClass([vue.unref(i).e("icon-btn"),"arrow-left"]),onClick:he=>j(!1)},[vue.renderSlot(de.$slots,"prev-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_left_default))]),_:1})])],10,["aria-label","onClick"]),[[vue.vShow,$.value==="date"]])],2),vue.createElementVNode("span",{role:"button",class:vue.normalizeClass(vue.unref(s).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:vue.withKeys(he=>xe("year"),["enter"]),onClick:he=>xe("year")},vue.toDisplayString(vue.unref(oe)),43,["onKeydown","onClick"]),vue.withDirectives(vue.createElementVNode("span",{role:"button","aria-live":"polite",tabindex:"0",class:vue.normalizeClass([vue.unref(s).e("header-label"),{active:$.value==="month"}]),onKeydown:vue.withKeys(he=>xe("month"),["enter"]),onClick:he=>xe("month")},vue.toDisplayString(vue.unref(l)(`el.datepicker.month${vue.unref(x)+1}`)),43,["onKeydown","onClick"]),[[vue.vShow,$.value==="date"]]),vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(s).e("next-btn"))},[vue.withDirectives(vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.nextMonth"),class:vue.normalizeClass([vue.unref(i).e("icon-btn"),"arrow-right"]),onClick:he=>j(!0)},[vue.renderSlot(de.$slots,"next-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})])],10,["aria-label","onClick"]),[[vue.vShow,$.value==="date"]]),vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.nextYear"),class:vue.normalizeClass([vue.unref(i).e("icon-btn"),"d-arrow-right"]),onClick:he=>M(!0)},[vue.renderSlot(de.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[vue.vShow,$.value!=="time"]]),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("content")),onKeydown:Un},[$.value==="date"?(vue.openBlock(),vue.createBlock(DateTable,{key:0,ref_key:"currentViewRef",ref:m,"selection-mode":vue.unref(V),date:y.value,"parsed-value":de.parsedValue,"disabled-date":vue.unref(f),"cell-class-name":vue.unref(p),onPick:ae},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):vue.createCommentVNode("v-if",!0),$.value==="year"?(vue.openBlock(),vue.createBlock(YearTable,{key:1,ref_key:"currentViewRef",ref:m,"selection-mode":vue.unref(V),date:y.value,"disabled-date":vue.unref(f),"parsed-value":de.parsedValue,onPick:pe},null,8,["selection-mode","date","disabled-date","parsed-value"])):vue.createCommentVNode("v-if",!0),$.value==="month"?(vue.openBlock(),vue.createBlock(MonthTable,{key:2,ref_key:"currentViewRef",ref:m,"selection-mode":vue.unref(V),date:y.value,"parsed-value":de.parsedValue,"disabled-date":vue.unref(f),onPick:re},null,8,["selection-mode","date","parsed-value","disabled-date"])):vue.createCommentVNode("v-if",!0)],34)],2)],2),vue.withDirectives(vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("footer"))},[vue.withDirectives(vue.createVNode(vue.unref(ElButton),{text:"",size:"small",class:vue.normalizeClass(vue.unref(i).e("link-btn")),disabled:vue.unref(Ue),onClick:At},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[vue.vShow,!vue.unref(D)&&de.showNow]]),vue.createVNode(vue.unref(ElButton),{plain:"",size:"small",class:vue.normalizeClass(vue.unref(i).e("link-btn")),disabled:vue.unref(Ne),onClick:$e},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[vue.vShow,vue.unref(_e)]])],2))}});var DatePickPanel=_export_sfc$1(_sfc_main$y,[["__file","panel-date-pick.vue"]]);const panelDateRangeProps=buildProps({...panelSharedProps,...panelRangeSharedProps,visible:Boolean}),useShortcut=t=>{const{emit:e}=vue.getCurrentInstance(),n=vue.useAttrs(),r=vue.useSlots();return s=>{const o=isFunction$1(s.value)?s.value():s.value;if(o){e("pick",[dayjs(o[0]).locale(t.value),dayjs(o[1]).locale(t.value)]);return}s.onClick&&s.onClick({attrs:n,slots:r,emit:e})}},useRangePicker=(t,{defaultValue:e,leftDate:n,rightDate:r,unit:i,onParsedValueChanged:s})=>{const{emit:o}=vue.getCurrentInstance(),{pickerNs:a}=vue.inject(ROOT_PICKER_INJECTION_KEY),l=useNamespace("date-range-picker"),{t:u,lang:c}=useLocale(),d=useShortcut(c),h=vue.ref(),f=vue.ref(),p=vue.ref({endDate:null,selecting:!1}),g=_=>{p.value=_},v=(_=!1)=>{const T=vue.unref(h),x=vue.unref(f);isValidRange([T,x])&&o("pick",[T,x],_)},m=_=>{p.value.selecting=_,_||(p.value.endDate=null)},y=_=>{if(isArray$1(_)&&_.length===2){const[T,x]=_;h.value=T,n.value=T,f.value=x,s(vue.unref(h),vue.unref(f))}else b()},b=()=>{const[_,T]=getDefaultValue(vue.unref(e),{lang:vue.unref(c),unit:i,unlinkPanels:t.unlinkPanels});h.value=void 0,f.value=void 0,n.value=_,r.value=T};return vue.watch(e,_=>{_&&b()},{immediate:!0}),vue.watch(()=>t.parsedValue,y,{immediate:!0}),{minDate:h,maxDate:f,rangeState:p,lang:c,ppNs:a,drpNs:l,handleChangeRange:g,handleRangeConfirm:v,handleShortcutClick:d,onSelect:m,onReset:y,t:u}},unit$2="month",_sfc_main$x=vue.defineComponent({__name:"panel-date-range",props:panelDateRangeProps,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(t,{emit:e}){const n=t,r=vue.inject("EP_PICKER_BASE"),{disabledDate:i,cellClassName:s,defaultTime:o,clearable:a}=r.props,l=vue.toRef(r.props,"format"),u=vue.toRef(r.props,"shortcuts"),c=vue.toRef(r.props,"defaultValue"),{lang:d}=useLocale(),h=vue.ref(dayjs().locale(d.value)),f=vue.ref(dayjs().locale(d.value).add(1,unit$2)),{minDate:p,maxDate:g,rangeState:v,ppNs:m,drpNs:y,handleChangeRange:b,handleRangeConfirm:_,handleShortcutClick:T,onSelect:x,onReset:k,t:w}=useRangePicker(n,{defaultValue:c,leftDate:h,rightDate:f,unit:unit$2,onParsedValueChanged:Ve});vue.watch(()=>n.visible,he=>{!he&&v.value.selecting&&(k(n.parsedValue),x(!1))});const O=vue.ref({min:null,max:null}),S=vue.ref({min:null,max:null}),F=vue.computed(()=>`${h.value.year()} ${w("el.datepicker.year")} ${w(`el.datepicker.month${h.value.month()+1}`)}`),z=vue.computed(()=>`${f.value.year()} ${w("el.datepicker.year")} ${w(`el.datepicker.month${f.value.month()+1}`)}`),Y=vue.computed(()=>h.value.year()),ae=vue.computed(()=>h.value.month()),j=vue.computed(()=>f.value.year()),M=vue.computed(()=>f.value.month()),$=vue.computed(()=>!!u.value.length),oe=vue.computed(()=>O.value.min!==null?O.value.min:p.value?p.value.format(ie.value):""),A=vue.computed(()=>O.value.max!==null?O.value.max:g.value||p.value?(g.value||p.value).format(ie.value):""),V=vue.computed(()=>S.value.min!==null?S.value.min:p.value?p.value.format(le.value):""),D=vue.computed(()=>S.value.max!==null?S.value.max:g.value||p.value?(g.value||p.value).format(le.value):""),le=vue.computed(()=>n.timeFormat||extractTimeFormat(l.value)),ie=vue.computed(()=>n.dateFormat||extractDateFormat(l.value)),re=he=>isValidRange(he)&&(i?!i(he[0].toDate())&&!i(he[1].toDate()):!0),pe=()=>{h.value=h.value.subtract(1,"year"),n.unlinkPanels||(f.value=h.value.add(1,"month")),kt("year")},xe=()=>{h.value=h.value.subtract(1,"month"),n.unlinkPanels||(f.value=h.value.add(1,"month")),kt("month")},Ie=()=>{n.unlinkPanels?f.value=f.value.add(1,"year"):(h.value=h.value.add(1,"year"),f.value=h.value.add(1,"month")),kt("year")},_e=()=>{n.unlinkPanels?f.value=f.value.add(1,"month"):(h.value=h.value.add(1,"month"),f.value=h.value.add(1,"month")),kt("month")},Ne=()=>{h.value=h.value.add(1,"year"),kt("year")},$e=()=>{h.value=h.value.add(1,"month"),kt("month")},Ue=()=>{f.value=f.value.subtract(1,"year"),kt("year")},At=()=>{f.value=f.value.subtract(1,"month"),kt("month")},kt=he=>{e("panel-change",[h.value.toDate(),f.value.toDate()],he)},En=vue.computed(()=>{const he=(ae.value+1)%12,ze=ae.value+1>=12?1:0;return n.unlinkPanels&&new Date(Y.value+ze,he)<new Date(j.value,M.value)}),Tn=vue.computed(()=>n.unlinkPanels&&j.value*12+M.value-(Y.value*12+ae.value+1)>=12),bn=vue.computed(()=>!(p.value&&g.value&&!v.value.selecting&&isValidRange([p.value,g.value]))),Lt=vue.computed(()=>n.type==="datetime"||n.type==="datetimerange"),vn=(he,ze)=>{if(he)return o?dayjs(o[ze]||o).locale(d.value).year(he.year()).month(he.month()).date(he.date()):he},Et=(he,ze=!0)=>{const L=he.minDate,Fe=he.maxDate,Pt=vn(L,0),xn=vn(Fe,1);g.value===xn&&p.value===Pt||(e("calendar-change",[L.toDate(),Fe&&Fe.toDate()]),g.value=xn,p.value=Pt,!(!ze||Lt.value)&&_())},jt=vue.ref(!1),_n=vue.ref(!1),kn=()=>{jt.value=!1},Pn=()=>{_n.value=!1},Ce=(he,ze)=>{O.value[ze]=he;const L=dayjs(he,ie.value).locale(d.value);if(L.isValid()){if(i&&i(L.toDate()))return;ze==="min"?(h.value=L,p.value=(p.value||h.value).year(L.year()).month(L.month()).date(L.date()),!n.unlinkPanels&&(!g.value||g.value.isBefore(p.value))&&(f.value=L.add(1,"month"),g.value=p.value.add(1,"month"))):(f.value=L,g.value=(g.value||f.value).year(L.year()).month(L.month()).date(L.date()),!n.unlinkPanels&&(!p.value||p.value.isAfter(g.value))&&(h.value=L.subtract(1,"month"),p.value=g.value.subtract(1,"month")))}},qe=(he,ze)=>{O.value[ze]=null},wn=(he,ze)=>{S.value[ze]=he;const L=dayjs(he,le.value).locale(d.value);L.isValid()&&(ze==="min"?(jt.value=!0,p.value=(p.value||h.value).hour(L.hour()).minute(L.minute()).second(L.second())):(_n.value=!0,g.value=(g.value||f.value).hour(L.hour()).minute(L.minute()).second(L.second()),f.value=g.value))},In=(he,ze)=>{S.value[ze]=null,ze==="min"?(h.value=p.value,jt.value=!1,(!g.value||g.value.isBefore(p.value))&&(g.value=p.value)):(f.value=g.value,_n.value=!1,g.value&&g.value.isBefore(p.value)&&(p.value=g.value))},Rn=(he,ze,L)=>{S.value.min||(he&&(h.value=he,p.value=(p.value||h.value).hour(he.hour()).minute(he.minute()).second(he.second())),L||(jt.value=ze),(!g.value||g.value.isBefore(p.value))&&(g.value=p.value,f.value=he))},Un=(he,ze,L)=>{S.value.max||(he&&(f.value=he,g.value=(g.value||f.value).hour(he.hour()).minute(he.minute()).second(he.second())),L||(_n.value=ze),g.value&&g.value.isBefore(p.value)&&(p.value=g.value))},Cn=()=>{h.value=getDefaultValue(vue.unref(c),{lang:vue.unref(d),unit:"month",unlinkPanels:n.unlinkPanels})[0],f.value=h.value.add(1,"month"),g.value=void 0,p.value=void 0,e("pick",null)},Mn=he=>isArray$1(he)?he.map(ze=>ze.format(l.value)):he.format(l.value),de=he=>isArray$1(he)?he.map(ze=>dayjs(ze,l.value).locale(d.value)):dayjs(he,l.value).locale(d.value);function Ve(he,ze){if(n.unlinkPanels&&ze){const L=(he==null?void 0:he.year())||0,Fe=(he==null?void 0:he.month())||0,Pt=ze.year(),xn=ze.month();f.value=L===Pt&&Fe===xn?ze.add(1,unit$2):ze}else f.value=h.value.add(1,unit$2),ze&&(f.value=f.value.hour(ze.hour()).minute(ze.minute()).second(ze.second()))}return e("set-picker-option",["isValidValue",re]),e("set-picker-option",["parseUserInput",de]),e("set-picker-option",["formatToString",Mn]),e("set-picker-option",["handleClear",Cn]),(he,ze)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(m).b(),vue.unref(y).b(),{"has-sidebar":he.$slots.sidebar||vue.unref($),"has-time":vue.unref(Lt)}])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(m).e("body-wrapper"))},[vue.renderSlot(he.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(m).e("sidebar"))}),vue.unref($)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(m).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(u),(L,Fe)=>(vue.openBlock(),vue.createElementBlock("button",{key:Fe,type:"button",class:vue.normalizeClass(vue.unref(m).e("shortcut")),onClick:Pt=>vue.unref(T)(L)},vue.toDisplayString(L.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(m).e("body"))},[vue.unref(Lt)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(y).e("time-header"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(y).e("editors-wrap"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(y).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",disabled:vue.unref(v).selecting,placeholder:vue.unref(w)("el.datepicker.startDate"),class:vue.normalizeClass(vue.unref(y).e("editor")),"model-value":vue.unref(oe),"validate-event":!1,onInput:L=>Ce(L,"min"),onChange:L=>qe(L,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{class:vue.normalizeClass(vue.unref(y).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",class:vue.normalizeClass(vue.unref(y).e("editor")),disabled:vue.unref(v).selecting,placeholder:vue.unref(w)("el.datepicker.startTime"),"model-value":vue.unref(V),"validate-event":!1,onFocus:L=>jt.value=!0,onInput:L=>wn(L,"min"),onChange:L=>In(L,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),vue.createVNode(vue.unref(TimePickPanel),{visible:jt.value,format:vue.unref(le),"datetime-role":"start","parsed-value":h.value,onPick:Rn},null,8,["visible","format","parsed-value"])],2)),[[vue.unref(ClickOutside),kn]])],2),vue.createElementVNode("span",null,[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})]),vue.createElementVNode("span",{class:vue.normalizeClass([vue.unref(y).e("editors-wrap"),"is-right"])},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(y).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",class:vue.normalizeClass(vue.unref(y).e("editor")),disabled:vue.unref(v).selecting,placeholder:vue.unref(w)("el.datepicker.endDate"),"model-value":vue.unref(A),readonly:!vue.unref(p),"validate-event":!1,onInput:L=>Ce(L,"max"),onChange:L=>qe(L,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{class:vue.normalizeClass(vue.unref(y).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",class:vue.normalizeClass(vue.unref(y).e("editor")),disabled:vue.unref(v).selecting,placeholder:vue.unref(w)("el.datepicker.endTime"),"model-value":vue.unref(D),readonly:!vue.unref(p),"validate-event":!1,onFocus:L=>vue.unref(p)&&(_n.value=!0),onInput:L=>wn(L,"max"),onChange:L=>In(L,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),vue.createVNode(vue.unref(TimePickPanel),{"datetime-role":"end",visible:_n.value,format:vue.unref(le),"parsed-value":f.value,onPick:Un},null,8,["visible","format","parsed-value"])],2)),[[vue.unref(ClickOutside),Pn]])],2)],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(m).e("content"),vue.unref(y).e("content")],"is-left"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(y).e("header"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(m).e("icon-btn"),"d-arrow-left"]),"aria-label":vue.unref(w)("el.datepicker.prevYear"),onClick:pe},[vue.renderSlot(he.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["aria-label"]),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(m).e("icon-btn"),"arrow-left"]),"aria-label":vue.unref(w)("el.datepicker.prevMonth"),onClick:xe},[vue.renderSlot(he.$slots,"prev-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_left_default))]),_:1})])],10,["aria-label"]),he.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(Tn),class:vue.normalizeClass([[vue.unref(m).e("icon-btn"),{"is-disabled":!vue.unref(Tn)}],"d-arrow-right"]),"aria-label":vue.unref(w)("el.datepicker.nextYear"),onClick:Ne},[vue.renderSlot(he.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),he.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:1,type:"button",disabled:!vue.unref(En),class:vue.normalizeClass([[vue.unref(m).e("icon-btn"),{"is-disabled":!vue.unref(En)}],"arrow-right"]),"aria-label":vue.unref(w)("el.datepicker.nextMonth"),onClick:$e},[vue.renderSlot(he.$slots,"next-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(F)),1)],2),vue.createVNode(DateTable,{"selection-mode":"range",date:h.value,"min-date":vue.unref(p),"max-date":vue.unref(g),"range-state":vue.unref(v),"disabled-date":vue.unref(i),"cell-class-name":vue.unref(s),onChangerange:vue.unref(b),onPick:Et,onSelect:vue.unref(x)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(m).e("content"),vue.unref(y).e("content")],"is-right"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(y).e("header"))},[he.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(Tn),class:vue.normalizeClass([[vue.unref(m).e("icon-btn"),{"is-disabled":!vue.unref(Tn)}],"d-arrow-left"]),"aria-label":vue.unref(w)("el.datepicker.prevYear"),onClick:Ue},[vue.renderSlot(he.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),he.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:1,type:"button",disabled:!vue.unref(En),class:vue.normalizeClass([[vue.unref(m).e("icon-btn"),{"is-disabled":!vue.unref(En)}],"arrow-left"]),"aria-label":vue.unref(w)("el.datepicker.prevMonth"),onClick:At},[vue.renderSlot(he.$slots,"prev-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_left_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("button",{type:"button","aria-label":vue.unref(w)("el.datepicker.nextYear"),class:vue.normalizeClass([vue.unref(m).e("icon-btn"),"d-arrow-right"]),onClick:Ie},[vue.renderSlot(he.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["aria-label"]),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(m).e("icon-btn"),"arrow-right"]),"aria-label":vue.unref(w)("el.datepicker.nextMonth"),onClick:_e},[vue.renderSlot(he.$slots,"next-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})])],10,["aria-label"]),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(z)),1)],2),vue.createVNode(DateTable,{"selection-mode":"range",date:f.value,"min-date":vue.unref(p),"max-date":vue.unref(g),"range-state":vue.unref(v),"disabled-date":vue.unref(i),"cell-class-name":vue.unref(s),onChangerange:vue.unref(b),onPick:Et,onSelect:vue.unref(x)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),vue.unref(Lt)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(m).e("footer"))},[vue.unref(a)?(vue.openBlock(),vue.createBlock(vue.unref(ElButton),{key:0,text:"",size:"small",class:vue.normalizeClass(vue.unref(m).e("link-btn")),onClick:Cn},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(w)("el.datepicker.clear")),1)]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0),vue.createVNode(vue.unref(ElButton),{plain:"",size:"small",class:vue.normalizeClass(vue.unref(m).e("link-btn")),disabled:vue.unref(bn),onClick:L=>vue.unref(_)(!1)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(w)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):vue.createCommentVNode("v-if",!0)],2))}});var DateRangePickPanel=_export_sfc$1(_sfc_main$x,[["__file","panel-date-range.vue"]]);const panelMonthRangeProps=buildProps({...panelRangeSharedProps}),panelMonthRangeEmits=["pick","set-picker-option","calendar-change"],useMonthRangeHeader=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:r}=useLocale(),i=()=>{e.value=e.value.subtract(1,"year"),t.value||(n.value=n.value.subtract(1,"year"))},s=()=>{t.value||(e.value=e.value.add(1,"year")),n.value=n.value.add(1,"year")},o=()=>{e.value=e.value.add(1,"year")},a=()=>{n.value=n.value.subtract(1,"year")},l=vue.computed(()=>`${e.value.year()} ${r("el.datepicker.year")}`),u=vue.computed(()=>`${n.value.year()} ${r("el.datepicker.year")}`),c=vue.computed(()=>e.value.year()),d=vue.computed(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year());return{leftPrevYear:i,rightNextYear:s,leftNextYear:o,rightPrevYear:a,leftLabel:l,rightLabel:u,leftYear:c,rightYear:d}},unit$1="year",__default__$4=vue.defineComponent({name:"DatePickerMonthRange"}),_sfc_main$w=vue.defineComponent({...__default__$4,props:panelMonthRangeProps,emits:panelMonthRangeEmits,setup(t,{emit:e}){const n=t,{lang:r}=useLocale(),i=vue.inject("EP_PICKER_BASE"),{shortcuts:s,disabledDate:o}=i.props,a=vue.toRef(i.props,"format"),l=vue.toRef(i.props,"defaultValue"),u=vue.ref(dayjs().locale(r.value)),c=vue.ref(dayjs().locale(r.value).add(1,unit$1)),{minDate:d,maxDate:h,rangeState:f,ppNs:p,drpNs:g,handleChangeRange:v,handleRangeConfirm:m,handleShortcutClick:y,onSelect:b}=useRangePicker(n,{defaultValue:l,leftDate:u,rightDate:c,unit:unit$1,onParsedValueChanged:oe}),_=vue.computed(()=>!!s.length),{leftPrevYear:T,rightNextYear:x,leftNextYear:k,rightPrevYear:w,leftLabel:O,rightLabel:S,leftYear:F,rightYear:z}=useMonthRangeHeader({unlinkPanels:vue.toRef(n,"unlinkPanels"),leftDate:u,rightDate:c}),Y=vue.computed(()=>n.unlinkPanels&&z.value>F.value+1),ae=(A,V=!0)=>{const D=A.minDate,le=A.maxDate;h.value===le&&d.value===D||(e("calendar-change",[D.toDate(),le&&le.toDate()]),h.value=le,d.value=D,V&&m())},j=()=>{u.value=getDefaultValue(vue.unref(l),{lang:vue.unref(r),unit:"year",unlinkPanels:n.unlinkPanels})[0],c.value=u.value.add(1,"year"),e("pick",null)},M=A=>isArray$1(A)?A.map(V=>V.format(a.value)):A.format(a.value),$=A=>isArray$1(A)?A.map(V=>dayjs(V,a.value).locale(r.value)):dayjs(A,a.value).locale(r.value);function oe(A,V){if(n.unlinkPanels&&V){const D=(A==null?void 0:A.year())||0,le=V.year();c.value=D===le?V.add(1,unit$1):V}else c.value=u.value.add(1,unit$1)}return e("set-picker-option",["isValidValue",isValidRange]),e("set-picker-option",["formatToString",M]),e("set-picker-option",["parseUserInput",$]),e("set-picker-option",["handleClear",j]),(A,V)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(p).b(),vue.unref(g).b(),{"has-sidebar":!!A.$slots.sidebar||vue.unref(_)}])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(p).e("body-wrapper"))},[vue.renderSlot(A.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(p).e("sidebar"))}),vue.unref(_)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(p).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(s),(D,le)=>(vue.openBlock(),vue.createElementBlock("button",{key:le,type:"button",class:vue.normalizeClass(vue.unref(p).e("shortcut")),onClick:ie=>vue.unref(y)(D)},vue.toDisplayString(D.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(p).e("body"))},[vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(p).e("content"),vue.unref(g).e("content")],"is-left"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(g).e("header"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(p).e("icon-btn"),"d-arrow-left"]),onClick:vue.unref(T)},[vue.renderSlot(A.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["onClick"]),A.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(Y),class:vue.normalizeClass([[vue.unref(p).e("icon-btn"),{[vue.unref(p).is("disabled")]:!vue.unref(Y)}],"d-arrow-right"]),onClick:vue.unref(k)},[vue.renderSlot(A.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(O)),1)],2),vue.createVNode(MonthTable,{"selection-mode":"range",date:u.value,"min-date":vue.unref(d),"max-date":vue.unref(h),"range-state":vue.unref(f),"disabled-date":vue.unref(o),onChangerange:vue.unref(v),onPick:ae,onSelect:vue.unref(b)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(p).e("content"),vue.unref(g).e("content")],"is-right"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(g).e("header"))},[A.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(Y),class:vue.normalizeClass([[vue.unref(p).e("icon-btn"),{"is-disabled":!vue.unref(Y)}],"d-arrow-left"]),onClick:vue.unref(w)},[vue.renderSlot(A.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(p).e("icon-btn"),"d-arrow-right"]),onClick:vue.unref(x)},[vue.renderSlot(A.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["onClick"]),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(S)),1)],2),vue.createVNode(MonthTable,{"selection-mode":"range",date:c.value,"min-date":vue.unref(d),"max-date":vue.unref(h),"range-state":vue.unref(f),"disabled-date":vue.unref(o),onChangerange:vue.unref(v),onPick:ae,onSelect:vue.unref(b)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var MonthRangePickPanel=_export_sfc$1(_sfc_main$w,[["__file","panel-month-range.vue"]]);const panelYearRangeProps=buildProps({...panelRangeSharedProps}),panelYearRangeEmits=["pick","set-picker-option","calendar-change"],useYearRangeHeader=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const r=()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},i=()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},s=()=>{e.value=e.value.add(10,"year")},o=()=>{n.value=n.value.subtract(10,"year")},a=vue.computed(()=>{const d=Math.floor(e.value.year()/10)*10;return`${d}-${d+9}`}),l=vue.computed(()=>{const d=Math.floor(n.value.year()/10)*10;return`${d}-${d+9}`}),u=vue.computed(()=>Math.floor(e.value.year()/10)*10+9),c=vue.computed(()=>Math.floor(n.value.year()/10)*10);return{leftPrevYear:r,rightNextYear:i,leftNextYear:s,rightPrevYear:o,leftLabel:a,rightLabel:l,leftYear:u,rightYear:c}},unit="year",__default__$3=vue.defineComponent({name:"DatePickerYearRange"}),_sfc_main$v=vue.defineComponent({...__default__$3,props:panelYearRangeProps,emits:panelYearRangeEmits,setup(t,{emit:e}){const n=t,{lang:r}=useLocale(),i=vue.ref(dayjs().locale(r.value)),s=vue.ref(i.value.add(10,"year")),{pickerNs:o}=vue.inject(ROOT_PICKER_INJECTION_KEY),a=useNamespace("date-range-picker"),l=vue.computed(()=>!!ae.length),u=vue.computed(()=>[o.b(),a.b(),{"has-sidebar":!!vue.useSlots().sidebar||l.value}]),c=vue.computed(()=>({content:[o.e("content"),a.e("content"),"is-left"],arrowLeftBtn:[o.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[o.e("icon-btn"),{[o.is("disabled")]:!T.value},"d-arrow-right"]})),d=vue.computed(()=>({content:[o.e("content"),a.e("content"),"is-right"],arrowLeftBtn:[o.e("icon-btn"),{"is-disabled":!T.value},"d-arrow-left"],arrowRightBtn:[o.e("icon-btn"),"d-arrow-right"]})),h=useShortcut(r),{leftPrevYear:f,rightNextYear:p,leftNextYear:g,rightPrevYear:v,leftLabel:m,rightLabel:y,leftYear:b,rightYear:_}=useYearRangeHeader({unlinkPanels:vue.toRef(n,"unlinkPanels"),leftDate:i,rightDate:s}),T=vue.computed(()=>n.unlinkPanels&&_.value>b.value+1),x=vue.ref(),k=vue.ref(),w=vue.ref({endDate:null,selecting:!1}),O=ie=>{w.value=ie},S=(ie,re=!0)=>{const pe=ie.minDate,xe=ie.maxDate;k.value===xe&&x.value===pe||(e("calendar-change",[pe.toDate(),xe&&xe.toDate()]),k.value=xe,x.value=pe,re&&F())},F=(ie=!1)=>{isValidRange([x.value,k.value])&&e("pick",[x.value,k.value],ie)},z=ie=>{w.value.selecting=ie,ie||(w.value.endDate=null)},Y=vue.inject("EP_PICKER_BASE"),{shortcuts:ae,disabledDate:j}=Y.props,M=vue.toRef(Y.props,"format"),$=vue.toRef(Y.props,"defaultValue"),oe=()=>{let ie;if(isArray$1($.value)){const re=dayjs($.value[0]);let pe=dayjs($.value[1]);return n.unlinkPanels||(pe=re.add(10,unit)),[re,pe]}else $.value?ie=dayjs($.value):ie=dayjs();return ie=ie.locale(r.value),[ie,ie.add(10,unit)]};vue.watch(()=>$.value,ie=>{if(ie){const re=oe();i.value=re[0],s.value=re[1]}},{immediate:!0}),vue.watch(()=>n.parsedValue,ie=>{if(ie&&ie.length===2)if(x.value=ie[0],k.value=ie[1],i.value=x.value,n.unlinkPanels&&k.value){const re=x.value.year(),pe=k.value.year();s.value=re===pe?k.value.add(10,"year"):k.value}else s.value=i.value.add(10,"year");else{const re=oe();x.value=void 0,k.value=void 0,i.value=re[0],s.value=re[1]}},{immediate:!0});const A=ie=>isArray$1(ie)?ie.map(re=>dayjs(re,M.value).locale(r.value)):dayjs(ie,M.value).locale(r.value),V=ie=>isArray$1(ie)?ie.map(re=>re.format(M.value)):ie.format(M.value),D=ie=>isValidRange(ie)&&(j?!j(ie[0].toDate())&&!j(ie[1].toDate()):!0),le=()=>{const ie=oe();i.value=ie[0],s.value=ie[1],k.value=void 0,x.value=void 0,e("pick",null)};return e("set-picker-option",["isValidValue",D]),e("set-picker-option",["parseUserInput",A]),e("set-picker-option",["formatToString",V]),e("set-picker-option",["handleClear",le]),(ie,re)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(vue.unref(u))},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(o).e("body-wrapper"))},[vue.renderSlot(ie.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(o).e("sidebar"))}),vue.unref(l)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(o).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(ae),(pe,xe)=>(vue.openBlock(),vue.createElementBlock("button",{key:xe,type:"button",class:vue.normalizeClass(vue.unref(o).e("shortcut")),onClick:Ie=>vue.unref(h)(pe)},vue.toDisplayString(pe.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(o).e("body"))},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(c).content)},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(a).e("header"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass(vue.unref(c).arrowLeftBtn),onClick:vue.unref(f)},[vue.renderSlot(ie.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["onClick"]),ie.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(T),class:vue.normalizeClass(vue.unref(c).arrowRightBtn),onClick:vue.unref(g)},[vue.renderSlot(ie.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(m)),1)],2),vue.createVNode(YearTable,{"selection-mode":"range",date:i.value,"min-date":x.value,"max-date":k.value,"range-state":w.value,"disabled-date":vue.unref(j),onChangerange:O,onPick:S,onSelect:z},null,8,["date","min-date","max-date","range-state","disabled-date"])],2),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(d).content)},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(a).e("header"))},[ie.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(T),class:vue.normalizeClass(vue.unref(d).arrowLeftBtn),onClick:vue.unref(v)},[vue.renderSlot(ie.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass(vue.unref(d).arrowRightBtn),onClick:vue.unref(p)},[vue.renderSlot(ie.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["onClick"]),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(y)),1)],2),vue.createVNode(YearTable,{"selection-mode":"range",date:s.value,"min-date":x.value,"max-date":k.value,"range-state":w.value,"disabled-date":vue.unref(j),onChangerange:O,onPick:S,onSelect:z},null,8,["date","min-date","max-date","range-state","disabled-date"])],2)],2)],2)],2))}});var YearRangePickPanel=_export_sfc$1(_sfc_main$v,[["__file","panel-year-range.vue"]]);const getPanel=function(t){switch(t){case"daterange":case"datetimerange":return DateRangePickPanel;case"monthrange":return MonthRangePickPanel;case"yearrange":return YearRangePickPanel;default:return DatePickPanel}};dayjs.extend(localeData$1),dayjs.extend(advancedFormat),dayjs.extend(customParseFormat),dayjs.extend(weekOfYear$1),dayjs.extend(weekYear),dayjs.extend(dayOfYear),dayjs.extend(isSameOrAfter$1),dayjs.extend(isSameOrBefore$1);var DatePicker=vue.defineComponent({name:"ElDatePicker",install:null,props:datePickerProps,emits:["update:modelValue"],setup(t,{expose:e,emit:n,slots:r}){const i=useNamespace("picker-panel");vue.provide("ElPopperOptions",vue.reactive(vue.toRef(t,"popperOptions"))),vue.provide(ROOT_PICKER_INJECTION_KEY,{slots:r,pickerNs:i});const s=vue.ref();e({focus:()=>{var l;(l=s.value)==null||l.focus()},blur:()=>{var l;(l=s.value)==null||l.blur()},handleOpen:()=>{var l;(l=s.value)==null||l.handleOpen()},handleClose:()=>{var l;(l=s.value)==null||l.handleClose()}});const a=l=>{n("update:modelValue",l)};return()=>{var l;const u=(l=t.format)!=null?l:DEFAULT_FORMATS_DATEPICKER[t.type]||DEFAULT_FORMATS_DATE,c=getPanel(t.type);return vue.createVNode(CommonPicker,vue.mergeProps(t,{format:u,type:t.type,ref:s,"onUpdate:modelValue":a}),{default:d=>vue.createVNode(c,d,{"prev-month":r["prev-month"],"next-month":r["next-month"],"prev-year":r["prev-year"],"next-year":r["next-year"]}),"range-separator":r["range-separator"]})}}});const ElDatePicker=withInstall(DatePicker),overlayProps=buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:definePropType([String,Array,Object])},zIndex:{type:definePropType([String,Number])}}),overlayEmits={click:t=>t instanceof MouseEvent},BLOCK="overlay";var Overlay$1=vue.defineComponent({name:"ElOverlay",props:overlayProps,emits:overlayEmits,setup(t,{slots:e,emit:n}){const r=useNamespace(BLOCK),i=l=>{n("click",l)},{onClick:s,onMousedown:o,onMouseup:a}=useSameTarget(t.customMaskEvent?void 0:i);return()=>t.mask?vue.createVNode("div",{class:[r.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:s,onMousedown:o,onMouseup:a},[vue.renderSlot(e,"default")],PatchFlags.STYLE|PatchFlags.CLASS|PatchFlags.PROPS,["onClick","onMouseup","onMousedown"]):vue.h("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[vue.renderSlot(e,"default")])}});const ElOverlay=Overlay$1,dialogInjectionKey=Symbol("dialogInjectionKey"),dialogContentProps=buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:iconPropType},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),dialogContentEmits={close:()=>!0},__default__$2=vue.defineComponent({name:"ElDialogContent"}),_sfc_main$u=vue.defineComponent({...__default__$2,props:dialogContentProps,emits:dialogContentEmits,setup(t,{expose:e}){const n=t,{t:r}=useLocale(),{Close:i}=CloseComponents,{dialogRef:s,headerRef:o,bodyId:a,ns:l,style:u}=vue.inject(dialogInjectionKey),{focusTrapRef:c}=vue.inject(FOCUS_TRAP_INJECTION_KEY),d=vue.computed(()=>[l.b(),l.is("fullscreen",n.fullscreen),l.is("draggable",n.draggable),l.is("align-center",n.alignCenter),{[l.m("center")]:n.center}]),h=composeRefs(c,s),f=vue.computed(()=>n.draggable),p=vue.computed(()=>n.overflow),{resetPosition:g}=useDraggable(s,o,f,p);return e({resetPosition:g}),(v,m)=>(vue.openBlock(),vue.createElementBlock("div",{ref:vue.unref(h),class:vue.normalizeClass(vue.unref(d)),style:vue.normalizeStyle(vue.unref(u)),tabindex:"-1"},[vue.createElementVNode("header",{ref_key:"headerRef",ref:o,class:vue.normalizeClass([vue.unref(l).e("header"),{"show-close":v.showClose}])},[vue.renderSlot(v.$slots,"header",{},()=>[vue.createElementVNode("span",{role:"heading","aria-level":v.ariaLevel,class:vue.normalizeClass(vue.unref(l).e("title"))},vue.toDisplayString(v.title),11,["aria-level"])]),v.showClose?(vue.openBlock(),vue.createElementBlock("button",{key:0,"aria-label":vue.unref(r)("el.dialog.close"),class:vue.normalizeClass(vue.unref(l).e("headerbtn")),type:"button",onClick:y=>v.$emit("close")},[vue.createVNode(vue.unref(ElIcon),{class:vue.normalizeClass(vue.unref(l).e("close"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(v.closeIcon||vue.unref(i))))]),_:1},8,["class"])],10,["aria-label","onClick"])):vue.createCommentVNode("v-if",!0)],2),vue.createElementVNode("div",{id:vue.unref(a),class:vue.normalizeClass(vue.unref(l).e("body"))},[vue.renderSlot(v.$slots,"default")],10,["id"]),v.$slots.footer?(vue.openBlock(),vue.createElementBlock("footer",{key:0,class:vue.normalizeClass(vue.unref(l).e("footer"))},[vue.renderSlot(v.$slots,"footer")],2)):vue.createCommentVNode("v-if",!0)],6))}});var ElDialogContent=_export_sfc$1(_sfc_main$u,[["__file","dialog-content.vue"]]);const dialogProps=buildProps({...dialogContentProps,appendToBody:Boolean,appendTo:{type:definePropType([String,Object]),default:"body"},beforeClose:{type:definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),dialogEmits={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[UPDATE_MODEL_EVENT]:t=>isBoolean(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},useDialog=(t,e)=>{var n;const i=vue.getCurrentInstance().emit,{nextZIndex:s}=useZIndex();let o="";const a=useId(),l=useId(),u=vue.ref(!1),c=vue.ref(!1),d=vue.ref(!1),h=vue.ref((n=t.zIndex)!=null?n:s());let f,p;const g=useGlobalConfig("namespace",defaultNamespace),v=vue.computed(()=>{const j={},M=`--${g.value}-dialog`;return t.fullscreen||(t.top&&(j[`${M}-margin-top`]=t.top),t.width&&(j[`${M}-width`]=addUnit(t.width))),j}),m=vue.computed(()=>t.alignCenter?{display:"flex"}:{});function y(){i("opened")}function b(){i("closed"),i(UPDATE_MODEL_EVENT,!1),t.destroyOnClose&&(d.value=!1)}function _(){i("close")}function T(){p==null||p(),f==null||f(),t.openDelay&&t.openDelay>0?{stop:f}=useTimeoutFn(()=>O(),t.openDelay):O()}function x(){f==null||f(),p==null||p(),t.closeDelay&&t.closeDelay>0?{stop:p}=useTimeoutFn(()=>S(),t.closeDelay):S()}function k(){function j(M){M||(c.value=!0,u.value=!1)}t.beforeClose?t.beforeClose(j):x()}function w(){t.closeOnClickModal&&k()}function O(){isClient&&(u.value=!0)}function S(){u.value=!1}function F(){i("openAutoFocus")}function z(){i("closeAutoFocus")}function Y(j){var M;((M=j.detail)==null?void 0:M.focusReason)==="pointer"&&j.preventDefault()}t.lockScroll&&useLockscreen(u);function ae(){t.closeOnPressEscape&&k()}return vue.watch(()=>t.modelValue,j=>{j?(c.value=!1,T(),d.value=!0,h.value=isUndefined$2(t.zIndex)?s():h.value++,vue.nextTick(()=>{i("open"),e.value&&(e.value.scrollTop=0)})):u.value&&x()}),vue.watch(()=>t.fullscreen,j=>{e.value&&(j?(o=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=o)}),vue.onMounted(()=>{t.modelValue&&(u.value=!0,d.value=!0,T())}),{afterEnter:y,afterLeave:b,beforeLeave:_,handleClose:k,onModalClick:w,close:x,doClose:S,onOpenAutoFocus:F,onCloseAutoFocus:z,onCloseRequested:ae,onFocusoutPrevented:Y,titleId:a,bodyId:l,closed:c,style:v,overlayDialogStyle:m,rendered:d,visible:u,zIndex:h}},__default__$1=vue.defineComponent({name:"ElDialog",inheritAttrs:!1}),_sfc_main$t=vue.defineComponent({...__default__$1,props:dialogProps,emits:dialogEmits,setup(t,{expose:e}){const n=t,r=vue.useSlots();useDeprecated({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},vue.computed(()=>!!r.title));const i=useNamespace("dialog"),s=vue.ref(),o=vue.ref(),a=vue.ref(),{visible:l,titleId:u,bodyId:c,style:d,overlayDialogStyle:h,rendered:f,zIndex:p,afterEnter:g,afterLeave:v,beforeLeave:m,handleClose:y,onModalClick:b,onOpenAutoFocus:_,onCloseAutoFocus:T,onCloseRequested:x,onFocusoutPrevented:k}=useDialog(n,s);vue.provide(dialogInjectionKey,{dialogRef:s,headerRef:o,bodyId:c,ns:i,rendered:f,style:d});const w=useSameTarget(b),O=vue.computed(()=>n.draggable&&!n.fullscreen);return e({visible:l,dialogContentRef:a,resetPosition:()=>{var F;(F=a.value)==null||F.resetPosition()}}),(F,z)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTeleport),{to:F.appendTo,disabled:F.appendTo!=="body"?!1:!F.appendToBody},{default:vue.withCtx(()=>[vue.createVNode(vue.Transition,{name:"dialog-fade",onAfterEnter:vue.unref(g),onAfterLeave:vue.unref(v),onBeforeLeave:vue.unref(m),persisted:""},{default:vue.withCtx(()=>[vue.withDirectives(vue.createVNode(vue.unref(ElOverlay),{"custom-mask-event":"",mask:F.modal,"overlay-class":F.modalClass,"z-index":vue.unref(p)},{default:vue.withCtx(()=>[vue.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":F.title||void 0,"aria-labelledby":F.title?void 0:vue.unref(u),"aria-describedby":vue.unref(c),class:vue.normalizeClass(`${vue.unref(i).namespace.value}-overlay-dialog`),style:vue.normalizeStyle(vue.unref(h)),onClick:vue.unref(w).onClick,onMousedown:vue.unref(w).onMousedown,onMouseup:vue.unref(w).onMouseup},[vue.createVNode(vue.unref(ElFocusTrap),{loop:"",trapped:vue.unref(l),"focus-start-el":"container",onFocusAfterTrapped:vue.unref(_),onFocusAfterReleased:vue.unref(T),onFocusoutPrevented:vue.unref(k),onReleaseRequested:vue.unref(x)},{default:vue.withCtx(()=>[vue.unref(f)?(vue.openBlock(),vue.createBlock(ElDialogContent,vue.mergeProps({key:0,ref_key:"dialogContentRef",ref:a},F.$attrs,{center:F.center,"align-center":F.alignCenter,"close-icon":F.closeIcon,draggable:vue.unref(O),overflow:F.overflow,fullscreen:F.fullscreen,"show-close":F.showClose,title:F.title,"aria-level":F.headerAriaLevel,onClose:vue.unref(y)}),vue.createSlots({header:vue.withCtx(()=>[F.$slots.title?vue.renderSlot(F.$slots,"title",{key:1}):vue.renderSlot(F.$slots,"header",{key:0,close:vue.unref(y),titleId:vue.unref(u),titleClass:vue.unref(i).e("title")})]),default:vue.withCtx(()=>[vue.renderSlot(F.$slots,"default")]),_:2},[F.$slots.footer?{name:"footer",fn:vue.withCtx(()=>[vue.renderSlot(F.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):vue.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[vue.vShow,vue.unref(l)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var Dialog=_export_sfc$1(_sfc_main$t,[["__file","dialog.vue"]]);const ElDialog=withInstall(Dialog),linkProps=buildProps({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:iconPropType}}),linkEmits={click:t=>t instanceof MouseEvent},__default__=vue.defineComponent({name:"ElLink"}),_sfc_main$s=vue.defineComponent({...__default__,props:linkProps,emits:linkEmits,setup(t,{emit:e}){const n=t,r=useNamespace("link"),i=vue.computed(()=>[r.b(),r.m(n.type),r.is("disabled",n.disabled),r.is("underline",n.underline&&!n.disabled)]);function s(o){n.disabled||e("click",o)}return(o,a)=>(vue.openBlock(),vue.createElementBlock("a",{class:vue.normalizeClass(vue.unref(i)),href:o.disabled||!o.href?void 0:o.href,target:o.disabled||!o.href?void 0:o.target,onClick:s},[o.icon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(o.icon)))]),_:1})):vue.createCommentVNode("v-if",!0),o.$slots.default?(vue.openBlock(),vue.createElementBlock("span",{key:1,class:vue.normalizeClass(vue.unref(r).e("inner"))},[vue.renderSlot(o.$slots,"default")],2)):vue.createCommentVNode("v-if",!0),o.$slots.icon?vue.renderSlot(o.$slots,"icon",{key:2}):vue.createCommentVNode("v-if",!0)],10,["href","target"]))}});var Link=_export_sfc$1(_sfc_main$s,[["__file","link.vue"]]);const ElLink=withInstall(Link),selectGroupKey=Symbol("ElSelectGroup"),selectKey=Symbol("ElSelect");function useOption(t,e){const n=vue.inject(selectKey),r=vue.inject(selectGroupKey,{disabled:!1}),i=vue.computed(()=>c(castArray$1(n.props.modelValue),t.value)),s=vue.computed(()=>{var f;if(n.props.multiple){const p=castArray$1((f=n.props.modelValue)!=null?f:[]);return!i.value&&p.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),o=vue.computed(()=>t.label||(isObject$1(t.value)?"":t.value)),a=vue.computed(()=>t.value||t.label||""),l=vue.computed(()=>t.disabled||e.groupDisabled||s.value),u=vue.getCurrentInstance(),c=(f=[],p)=>{if(isObject$1(t.value)){const g=n.props.valueKey;return f&&f.some(v=>vue.toRaw(get$5(v,g))===get$5(p,g))}else return f&&f.includes(p)},d=()=>{!t.disabled&&!r.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(u.proxy))},h=f=>{const p=new RegExp(escapeStringRegexp(f),"i");e.visible=p.test(o.value)||t.created};return vue.watch(()=>o.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),vue.watch(()=>t.value,(f,p)=>{const{remote:g,valueKey:v}=n.props;if(f!==p&&(n.onOptionDestroy(p,u.proxy),n.onOptionCreate(u.proxy)),!t.created&&!g){if(v&&isObject$1(f)&&isObject$1(p)&&f[v]===p[v])return;n.setSelected()}}),vue.watch(()=>r.disabled,()=>{e.groupDisabled=r.disabled},{immediate:!0}),{select:n,currentLabel:o,currentValue:a,itemSelected:i,isDisabled:l,hoverItem:d,updateOption:h}}const _sfc_main$r=vue.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(t){const e=useNamespace("select"),n=useId(),r=vue.computed(()=>[e.be("dropdown","item"),e.is("disabled",vue.unref(a)),e.is("selected",vue.unref(o)),e.is("hovering",vue.unref(h))]),i=vue.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:s,itemSelected:o,isDisabled:a,select:l,hoverItem:u,updateOption:c}=useOption(t,i),{visible:d,hover:h}=vue.toRefs(i),f=vue.getCurrentInstance().proxy;l.onOptionCreate(f),vue.onBeforeUnmount(()=>{const g=f.value,{selected:v}=l.states,y=(l.props.multiple?v:[v]).some(b=>b.value===f.value);vue.nextTick(()=>{l.states.cachedOptions.get(g)===f&&!y&&l.states.cachedOptions.delete(g)}),l.onOptionDestroy(g,f)});function p(){a.value||l.handleOptionSelect(f)}return{ns:e,id:n,containerKls:r,currentLabel:s,itemSelected:o,isDisabled:a,select:l,hoverItem:u,updateOption:c,visible:d,hover:h,selectOptionClick:p,states:i}}});function _sfc_render$3(t,e,n,r,i,s){return vue.withDirectives((vue.openBlock(),vue.createElementBlock("li",{id:t.id,class:vue.normalizeClass(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMousemove:t.hoverItem,onClick:vue.withModifiers(t.selectOptionClick,["stop"])},[vue.renderSlot(t.$slots,"default",{},()=>[vue.createElementVNode("span",null,vue.toDisplayString(t.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[vue.vShow,t.visible]])}var Option=_export_sfc$1(_sfc_main$r,[["render",_sfc_render$3],["__file","option.vue"]]);const _sfc_main$q=vue.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=vue.inject(selectKey),e=useNamespace("select"),n=vue.computed(()=>t.props.popperClass),r=vue.computed(()=>t.props.multiple),i=vue.computed(()=>t.props.fitInputWidth),s=vue.ref("");function o(){var a;s.value=`${(a=t.selectRef)==null?void 0:a.offsetWidth}px`}return vue.onMounted(()=>{o(),useResizeObserver(t.selectRef,o)}),{ns:e,minWidth:s,popperClass:n,isMultiple:r,isFitInputWidth:i}}});function _sfc_render$2(t,e,n,r,i,s){return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:vue.normalizeStyle({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(t.ns.be("dropdown","header"))},[vue.renderSlot(t.$slots,"header")],2)):vue.createCommentVNode("v-if",!0),vue.renderSlot(t.$slots,"default"),t.$slots.footer?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(t.ns.be("dropdown","footer"))},[vue.renderSlot(t.$slots,"footer")],2)):vue.createCommentVNode("v-if",!0)],6)}var ElSelectMenu=_export_sfc$1(_sfc_main$q,[["render",_sfc_render$2],["__file","select-dropdown.vue"]]);const MINIMUM_INPUT_WIDTH=11,useSelect=(t,e)=>{const{t:n}=useLocale(),r=useId(),i=useNamespace("select"),s=useNamespace("input"),o=vue.reactive({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),a=vue.ref(null),l=vue.ref(null),u=vue.ref(null),c=vue.ref(null),d=vue.ref(null),h=vue.ref(null),f=vue.ref(null),p=vue.ref(null),g=vue.ref(null),v=vue.ref(null),m=vue.ref(null),y=vue.ref(null),{isComposing:b,handleCompositionStart:_,handleCompositionUpdate:T,handleCompositionEnd:x}=useComposition({afterComposition:ue=>Un(ue)}),{wrapperRef:k,isFocused:w,handleBlur:O}=useFocusController(d,{beforeFocus(){return $.value},afterFocus(){t.automaticDropdown&&!S.value&&(S.value=!0,o.menuVisibleOnFocus=!0)},beforeBlur(ue){var Oe,Dt;return((Oe=u.value)==null?void 0:Oe.isFocusInsideContent(ue))||((Dt=c.value)==null?void 0:Dt.isFocusInsideContent(ue))},afterBlur(){S.value=!1,o.menuVisibleOnFocus=!1}}),S=vue.ref(!1),F=vue.ref(),{form:z,formItem:Y}=useFormItem(),{inputId:ae}=useFormItemInputId(t,{formItemContext:Y}),{valueOnClear:j,isEmptyValue:M}=useEmptyValues(t),$=vue.computed(()=>t.disabled||(z==null?void 0:z.disabled)),oe=vue.computed(()=>isArray$1(t.modelValue)?t.modelValue.length>0:!M(t.modelValue)),A=vue.computed(()=>{var ue;return(ue=z==null?void 0:z.statusIcon)!=null?ue:!1}),V=vue.computed(()=>t.clearable&&!$.value&&o.inputHovering&&oe.value),D=vue.computed(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),le=vue.computed(()=>i.is("reverse",D.value&&S.value)),ie=vue.computed(()=>(Y==null?void 0:Y.validateState)||""),re=vue.computed(()=>ValidateComponentsMap[ie.value]),pe=vue.computed(()=>t.remote?300:0),xe=vue.computed(()=>t.loading?t.loadingText||n("el.select.loading"):t.remote&&!o.inputValue&&o.options.size===0?!1:t.filterable&&o.inputValue&&o.options.size>0&&Ie.value===0?t.noMatchText||n("el.select.noMatch"):o.options.size===0?t.noDataText||n("el.select.noData"):null),Ie=vue.computed(()=>_e.value.filter(ue=>ue.visible).length),_e=vue.computed(()=>{const ue=Array.from(o.options.values()),Oe=[];return o.optionValues.forEach(Dt=>{const An=ue.findIndex(Gn=>Gn.value===Dt);An>-1&&Oe.push(ue[An])}),Oe.length>=ue.length?Oe:ue}),Ne=vue.computed(()=>Array.from(o.cachedOptions.values())),$e=vue.computed(()=>{const ue=_e.value.filter(Oe=>!Oe.created).some(Oe=>Oe.currentLabel===o.inputValue);return t.filterable&&t.allowCreate&&o.inputValue!==""&&!ue}),Ue=()=>{t.filterable&&isFunction$1(t.filterMethod)||t.filterable&&t.remote&&isFunction$1(t.remoteMethod)||_e.value.forEach(ue=>{var Oe;(Oe=ue.updateOption)==null||Oe.call(ue,o.inputValue)})},At=useFormSize(),kt=vue.computed(()=>["small"].includes(At.value)?"small":"default"),En=vue.computed({get(){return S.value&&xe.value!==!1},set(ue){S.value=ue}}),Tn=vue.computed(()=>{if(t.multiple&&!isUndefined$1(t.modelValue))return castArray$1(t.modelValue).length===0&&!o.inputValue;const ue=isArray$1(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||isUndefined$1(ue)?!o.inputValue:!0}),bn=vue.computed(()=>{var ue;const Oe=(ue=t.placeholder)!=null?ue:n("el.select.placeholder");return t.multiple||!oe.value?Oe:o.selectedLabel}),Lt=vue.computed(()=>isIOS?null:"mouseenter");vue.watch(()=>t.modelValue,(ue,Oe)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(o.inputValue="",vn("")),jt(),!isEqual(ue,Oe)&&t.validateEvent&&(Y==null||Y.validate("change").catch(Dt=>debugWarn(Dt)))},{flush:"post",deep:!0}),vue.watch(()=>S.value,ue=>{ue?vn(o.inputValue):(o.inputValue="",o.previousQuery=null,o.isBeforeHide=!0),e("visible-change",ue)}),vue.watch(()=>o.options.entries(),()=>{var ue;if(!isClient)return;const Oe=((ue=a.value)==null?void 0:ue.querySelectorAll("input"))||[];(!t.filterable&&!t.defaultFirstOption&&!isUndefined$1(t.modelValue)||!Array.from(Oe).includes(document.activeElement))&&jt(),t.defaultFirstOption&&(t.filterable||t.remote)&&Ie.value&&Et()},{flush:"post"}),vue.watch(()=>o.hoveringIndex,ue=>{isNumber$1(ue)&&ue>-1?F.value=_e.value[ue]||{}:F.value={},_e.value.forEach(Oe=>{Oe.hover=F.value===Oe})}),vue.watchEffect(()=>{o.isBeforeHide||Ue()});const vn=ue=>{o.previousQuery===ue||b.value||(o.previousQuery=ue,t.filterable&&isFunction$1(t.filterMethod)?t.filterMethod(ue):t.filterable&&t.remote&&isFunction$1(t.remoteMethod)&&t.remoteMethod(ue),t.defaultFirstOption&&(t.filterable||t.remote)&&Ie.value?vue.nextTick(Et):vue.nextTick(kn))},Et=()=>{const ue=_e.value.filter(Gn=>Gn.visible&&!Gn.disabled&&!Gn.states.groupDisabled),Oe=ue.find(Gn=>Gn.created),Dt=ue[0],An=_e.value.map(Gn=>Gn.value);o.hoveringIndex=Fe(An,Oe||Dt)},jt=()=>{if(t.multiple)o.selectedLabel="";else{const Oe=isArray$1(t.modelValue)?t.modelValue[0]:t.modelValue,Dt=_n(Oe);o.selectedLabel=Dt.currentLabel,o.selected=[Dt];return}const ue=[];isUndefined$1(t.modelValue)||castArray$1(t.modelValue).forEach(Oe=>{ue.push(_n(Oe))}),o.selected=ue},_n=ue=>{let Oe;const Dt=isPlainObject(ue);for(let qn=o.cachedOptions.size-1;qn>=0;qn--){const Xn=Ne.value[qn];if(Dt?get$5(Xn.value,t.valueKey)===get$5(ue,t.valueKey):Xn.value===ue){Oe={value:ue,currentLabel:Xn.currentLabel,get isDisabled(){return Xn.isDisabled}};break}}if(Oe)return Oe;const An=Dt?ue.label:ue??"";return{value:ue,currentLabel:An}},kn=()=>{o.hoveringIndex=_e.value.findIndex(ue=>o.selected.some(Oe=>Nn(Oe)===Nn(ue)))},Pn=()=>{o.selectionWidth=l.value.getBoundingClientRect().width},Ce=()=>{o.calculatorWidth=h.value.getBoundingClientRect().width},qe=()=>{o.collapseItemWidth=m.value.getBoundingClientRect().width},wn=()=>{var ue,Oe;(Oe=(ue=u.value)==null?void 0:ue.updatePopper)==null||Oe.call(ue)},In=()=>{var ue,Oe;(Oe=(ue=c.value)==null?void 0:ue.updatePopper)==null||Oe.call(ue)},Rn=()=>{o.inputValue.length>0&&!S.value&&(S.value=!0),vn(o.inputValue)},Un=ue=>{if(o.inputValue=ue.target.value,t.remote)Cn();else return Rn()},Cn=debounce(()=>{Rn()},pe.value),Mn=ue=>{isEqual(t.modelValue,ue)||e(CHANGE_EVENT,ue)},de=ue=>findLastIndex(ue,Oe=>{const Dt=o.cachedOptions.get(Oe);return Dt&&!Dt.disabled&&!Dt.states.groupDisabled}),Ve=ue=>{if(t.multiple&&ue.code!==EVENT_CODE.delete&&ue.target.value.length<=0){const Oe=castArray$1(t.modelValue).slice(),Dt=de(Oe);if(Dt<0)return;const An=Oe[Dt];Oe.splice(Dt,1),e(UPDATE_MODEL_EVENT,Oe),Mn(Oe),e("remove-tag",An)}},he=(ue,Oe)=>{const Dt=o.selected.indexOf(Oe);if(Dt>-1&&!$.value){const An=castArray$1(t.modelValue).slice();An.splice(Dt,1),e(UPDATE_MODEL_EVENT,An),Mn(An),e("remove-tag",Oe.value)}ue.stopPropagation(),Ln()},ze=ue=>{ue.stopPropagation();const Oe=t.multiple?[]:j.value;if(t.multiple)for(const Dt of o.selected)Dt.isDisabled&&Oe.push(Dt.value);e(UPDATE_MODEL_EVENT,Oe),Mn(Oe),o.hoveringIndex=-1,S.value=!1,e("clear"),Ln()},L=ue=>{var Oe;if(t.multiple){const Dt=castArray$1((Oe=t.modelValue)!=null?Oe:[]).slice(),An=Fe(Dt,ue);An>-1?Dt.splice(An,1):(t.multipleLimit<=0||Dt.length<t.multipleLimit)&&Dt.push(ue.value),e(UPDATE_MODEL_EVENT,Dt),Mn(Dt),ue.created&&vn(""),t.filterable&&!t.reserveKeyword&&(o.inputValue="")}else e(UPDATE_MODEL_EVENT,ue.value),Mn(ue.value),S.value=!1;Ln(),!S.value&&vue.nextTick(()=>{Pt(ue)})},Fe=(ue=[],Oe)=>isUndefined$1(Oe)?-1:isObject$1(Oe.value)?ue.findIndex(Dt=>isEqual(get$5(Dt,t.valueKey),Nn(Oe))):ue.indexOf(Oe.value),Pt=ue=>{var Oe,Dt,An,Gn,qn;const Xn=isArray$1(ue)?ue[0]:ue;let er=null;if(Xn!=null&&Xn.value){const Jn=_e.value.filter(rr=>rr.value===Xn.value);Jn.length>0&&(er=Jn[0].$el)}if(u.value&&er){const Jn=(Gn=(An=(Dt=(Oe=u.value)==null?void 0:Oe.popperRef)==null?void 0:Dt.contentRef)==null?void 0:An.querySelector)==null?void 0:Gn.call(An,`.${i.be("dropdown","wrap")}`);Jn&&scrollIntoView(Jn,er)}(qn=y.value)==null||qn.handleScroll()},xn=ue=>{o.options.set(ue.value,ue),o.cachedOptions.set(ue.value,ue)},zn=(ue,Oe)=>{o.options.get(ue)===Oe&&o.options.delete(ue)},Zn=vue.computed(()=>{var ue,Oe;return(Oe=(ue=u.value)==null?void 0:ue.popperRef)==null?void 0:Oe.contentRef}),Kn=()=>{o.isBeforeHide=!1,vue.nextTick(()=>Pt(o.selected))},Ln=()=>{var ue;(ue=d.value)==null||ue.focus()},hn=()=>{var ue;if(S.value){S.value=!1,vue.nextTick(()=>{var Oe;return(Oe=d.value)==null?void 0:Oe.blur()});return}(ue=d.value)==null||ue.blur()},Fn=ue=>{ze(ue)},Qn=ue=>{if(S.value=!1,w.value){const Oe=new FocusEvent("focus",ue);vue.nextTick(()=>O(Oe))}},$n=()=>{o.inputValue.length>0?o.inputValue="":S.value=!1},Hn=()=>{$.value||(isIOS&&(o.inputHovering=!0),o.menuVisibleOnFocus?o.menuVisibleOnFocus=!1:S.value=!S.value)},Bn=()=>{if(!S.value)Hn();else{const ue=_e.value[o.hoveringIndex];ue&&!ue.disabled&&!ue.states.groupDisabled&&L(ue)}},Nn=ue=>isObject$1(ue.value)?get$5(ue.value,t.valueKey):ue.value,Vn=vue.computed(()=>_e.value.filter(ue=>ue.visible).every(ue=>ue.disabled)),Yn=vue.computed(()=>t.multiple?t.collapseTags?o.selected.slice(0,t.maxCollapseTags):o.selected:[]),Wn=vue.computed(()=>t.multiple?t.collapseTags?o.selected.slice(t.maxCollapseTags):[]:[]),Sn=ue=>{if(!S.value){S.value=!0;return}if(!(o.options.size===0||o.filteredOptionsCount===0||b.value)&&!Vn.value){ue==="next"?(o.hoveringIndex++,o.hoveringIndex===o.options.size&&(o.hoveringIndex=0)):ue==="prev"&&(o.hoveringIndex--,o.hoveringIndex<0&&(o.hoveringIndex=o.options.size-1));const Oe=_e.value[o.hoveringIndex];(Oe.disabled===!0||Oe.states.groupDisabled===!0||!Oe.visible)&&Sn(ue),vue.nextTick(()=>Pt(F.value))}},Dn=()=>{if(!l.value)return 0;const ue=window.getComputedStyle(l.value);return Number.parseFloat(ue.gap||"6px")},jn=vue.computed(()=>{const ue=Dn();return{maxWidth:`${m.value&&t.maxCollapseTags===1?o.selectionWidth-o.collapseItemWidth-ue:o.selectionWidth}px`}}),tr=vue.computed(()=>({maxWidth:`${o.selectionWidth}px`})),nr=vue.computed(()=>({width:`${Math.max(o.calculatorWidth,MINIMUM_INPUT_WIDTH)}px`}));return useResizeObserver(l,Pn),useResizeObserver(h,Ce),useResizeObserver(g,wn),useResizeObserver(k,wn),useResizeObserver(v,In),useResizeObserver(m,qe),vue.onMounted(()=>{jt()}),{inputId:ae,contentId:r,nsSelect:i,nsInput:s,states:o,isFocused:w,expanded:S,optionsArray:_e,hoverOption:F,selectSize:At,filteredOptionsCount:Ie,resetCalculatorWidth:Ce,updateTooltip:wn,updateTagTooltip:In,debouncedOnInputChange:Cn,onInput:Un,deletePrevTag:Ve,deleteTag:he,deleteSelected:ze,handleOptionSelect:L,scrollToOption:Pt,hasModelValue:oe,shouldShowPlaceholder:Tn,currentPlaceholder:bn,mouseEnterEventName:Lt,needStatusIcon:A,showClose:V,iconComponent:D,iconReverse:le,validateState:ie,validateIcon:re,showNewOption:$e,updateOptions:Ue,collapseTagSize:kt,setSelected:jt,selectDisabled:$,emptyText:xe,handleCompositionStart:_,handleCompositionUpdate:T,handleCompositionEnd:x,onOptionCreate:xn,onOptionDestroy:zn,handleMenuEnter:Kn,focus:Ln,blur:hn,handleClearClick:Fn,handleClickOutside:Qn,handleEsc:$n,toggleMenu:Hn,selectOption:Bn,getValueKey:Nn,navigateOptions:Sn,dropdownMenuVisible:En,showTagList:Yn,collapseTagList:Wn,tagStyle:jn,collapseTagStyle:tr,inputStyle:nr,popperRef:Zn,inputRef:d,tooltipRef:u,tagTooltipRef:c,calculatorRef:h,prefixRef:f,suffixRef:p,selectRef:a,wrapperRef:k,selectionRef:l,scrollbarRef:y,menuRef:g,tagMenuRef:v,collapseItemRef:m}};var ElOptions=vue.defineComponent({name:"ElOptions",setup(t,{slots:e}){const n=vue.inject(selectKey);let r=[];return()=>{var i,s;const o=(i=e.default)==null?void 0:i.call(e),a=[];function l(u){isArray$1(u)&&u.forEach(c=>{var d,h,f,p;const g=(d=(c==null?void 0:c.type)||{})==null?void 0:d.name;g==="ElOptionGroup"?l(!isString$1(c.children)&&!isArray$1(c.children)&&isFunction$1((h=c.children)==null?void 0:h.default)?(f=c.children)==null?void 0:f.default():c.children):g==="ElOption"?a.push((p=c.props)==null?void 0:p.value):isArray$1(c.children)&&l(c.children)})}return o.length&&l((s=o[0])==null?void 0:s.children),isEqual(a,r)||(r=a,n&&(n.states.optionValues=a)),o}}});const SelectProps=buildProps({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:useSizeProp,effect:{type:definePropType(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:definePropType(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:iconPropType,default:circle_close_default},fitInputWidth:Boolean,suffixIcon:{type:iconPropType,default:arrow_down_default},tagType:{...tagProps.type,default:"info"},tagEffect:{...tagProps.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:definePropType(String),values:Ee,default:"bottom-start"},fallbackPlacements:{type:definePropType(Array),default:["bottom-start","top-start","right","left"]},appendTo:String,...useEmptyValuesProps,...useAriaProps(["ariaLabel"])}),COMPONENT_NAME="ElSelect",_sfc_main$p=vue.defineComponent({name:COMPONENT_NAME,componentName:COMPONENT_NAME,components:{ElSelectMenu,ElOption:Option,ElOptions,ElTag,ElScrollbar,ElTooltip,ElIcon},directives:{ClickOutside},props:SelectProps,emits:[UPDATE_MODEL_EVENT,CHANGE_EVENT,"remove-tag","clear","visible-change","focus","blur"],setup(t,{emit:e}){const n=vue.computed(()=>{const{modelValue:o,multiple:a}=t,l=a?[]:void 0;return isArray$1(o)?a?o:l:a?l:o}),r=vue.reactive({...vue.toRefs(t),modelValue:n}),i=useSelect(r,e);vue.provide(selectKey,vue.reactive({props:r,states:i.states,optionsArray:i.optionsArray,handleOptionSelect:i.handleOptionSelect,onOptionCreate:i.onOptionCreate,onOptionDestroy:i.onOptionDestroy,selectRef:i.selectRef,setSelected:i.setSelected}));const s=vue.computed(()=>t.multiple?i.states.selected.map(o=>o.currentLabel):i.states.selectedLabel);return{...i,modelValue:n,selectedLabel:s}}});function _sfc_render$1(t,e,n,r,i,s){const o=vue.resolveComponent("el-tag"),a=vue.resolveComponent("el-tooltip"),l=vue.resolveComponent("el-icon"),u=vue.resolveComponent("el-option"),c=vue.resolveComponent("el-options"),d=vue.resolveComponent("el-scrollbar"),h=vue.resolveComponent("el-select-menu"),f=vue.resolveDirective("click-outside");return vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",{ref:"selectRef",class:vue.normalizeClass([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),[vue.toHandlerKey(t.mouseEnterEventName)]:p=>t.states.inputHovering=!0,onMouseleave:p=>t.states.inputHovering=!1},[vue.createVNode(a,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:p=>t.states.isBeforeHide=!1},{default:vue.withCtx(()=>{var p;return[vue.createElementVNode("div",{ref:"wrapperRef",class:vue.normalizeClass([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:vue.withModifiers(t.toggleMenu,["prevent"])},[t.$slots.prefix?(vue.openBlock(),vue.createElementBlock("div",{key:0,ref:"prefixRef",class:vue.normalizeClass(t.nsSelect.e("prefix"))},[vue.renderSlot(t.$slots,"prefix")],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{ref:"selectionRef",class:vue.normalizeClass([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?vue.renderSlot(t.$slots,"tag",{key:0},()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(t.showTagList,g=>(vue.openBlock(),vue.createElementBlock("div",{key:t.getValueKey(g),class:vue.normalizeClass(t.nsSelect.e("selected-item"))},[vue.createVNode(o,{closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:vue.normalizeStyle(t.tagStyle),onClose:v=>t.deleteTag(v,g)},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(t.nsSelect.e("tags-text"))},[vue.renderSlot(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[vue.createTextVNode(vue.toDisplayString(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(vue.openBlock(),vue.createBlock(a,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:vue.withCtx(()=>[vue.createElementVNode("div",{ref:"collapseItemRef",class:vue.normalizeClass(t.nsSelect.e("selected-item"))},[vue.createVNode(o,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:vue.normalizeStyle(t.collapseTagStyle)},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(t.nsSelect.e("tags-text"))}," + "+vue.toDisplayString(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:vue.withCtx(()=>[vue.createElementVNode("div",{ref:"tagMenuRef",class:vue.normalizeClass(t.nsSelect.e("selection"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(t.collapseTagList,g=>(vue.openBlock(),vue.createElementBlock("div",{key:t.getValueKey(g),class:vue.normalizeClass(t.nsSelect.e("selected-item"))},[vue.createVNode(o,{class:"in-tooltip",closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:v=>t.deleteTag(v,g)},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(t.nsSelect.e("tags-text"))},[vue.renderSlot(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[vue.createTextVNode(vue.toDisplayString(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):vue.createCommentVNode("v-if",!0)]):vue.createCommentVNode("v-if",!0),t.selectDisabled?vue.createCommentVNode("v-if",!0):(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[vue.withDirectives(vue.createElementVNode("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":g=>t.states.inputValue=g,type:"text",name:t.name,class:vue.normalizeClass([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:vue.normalizeStyle(t.inputStyle),role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((p=t.hoverOption)==null?void 0:p.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[vue.withKeys(vue.withModifiers(g=>t.navigateOptions("next"),["stop","prevent"]),["down"]),vue.withKeys(vue.withModifiers(g=>t.navigateOptions("prev"),["stop","prevent"]),["up"]),vue.withKeys(vue.withModifiers(t.handleEsc,["stop","prevent"]),["esc"]),vue.withKeys(vue.withModifiers(t.selectOption,["stop","prevent"]),["enter"]),vue.withKeys(vue.withModifiers(t.deletePrevTag,["stop"]),["delete"])],onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onInput:t.onInput,onClick:vue.withModifiers(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[vue.vModelText,t.states.inputValue]]),t.filterable?(vue.openBlock(),vue.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:vue.normalizeClass(t.nsSelect.e("input-calculator")),textContent:vue.toDisplayString(t.states.inputValue)},null,10,["textContent"])):vue.createCommentVNode("v-if",!0)],2)),t.shouldShowPlaceholder?(vue.openBlock(),vue.createElementBlock("div",{key:2,class:vue.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?vue.renderSlot(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[vue.createElementVNode("span",null,vue.toDisplayString(t.currentPlaceholder),1)]):(vue.openBlock(),vue.createElementBlock("span",{key:1},vue.toDisplayString(t.currentPlaceholder),1))],2)):vue.createCommentVNode("v-if",!0)],2),vue.createElementVNode("div",{ref:"suffixRef",class:vue.normalizeClass(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(vue.openBlock(),vue.createBlock(l,{key:0,class:vue.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0),t.showClose&&t.clearIcon?(vue.openBlock(),vue.createBlock(l,{key:1,class:vue.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onClick"])):vue.createCommentVNode("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(vue.openBlock(),vue.createBlock(l,{key:2,class:vue.normalizeClass([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(t.validateIcon)))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:vue.withCtx(()=>[vue.createVNode(h,{ref:"menuRef"},{default:vue.withCtx(()=>[t.$slots.header?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(t.nsSelect.be("dropdown","header")),onClick:vue.withModifiers(()=>{},["stop"])},[vue.renderSlot(t.$slots,"header")],10,["onClick"])):vue.createCommentVNode("v-if",!0),vue.withDirectives(vue.createVNode(d,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:vue.normalizeClass([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},{default:vue.withCtx(()=>[t.showNewOption?(vue.openBlock(),vue.createBlock(u,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):vue.createCommentVNode("v-if",!0),vue.createVNode(c,null,{default:vue.withCtx(()=>[vue.renderSlot(t.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[vue.vShow,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(t.nsSelect.be("dropdown","loading"))},[vue.renderSlot(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(vue.openBlock(),vue.createElementBlock("div",{key:2,class:vue.normalizeClass(t.nsSelect.be("dropdown","empty"))},[vue.renderSlot(t.$slots,"empty",{},()=>[vue.createElementVNode("span",null,vue.toDisplayString(t.emptyText),1)])],2)):vue.createCommentVNode("v-if",!0),t.$slots.footer?(vue.openBlock(),vue.createElementBlock("div",{key:3,class:vue.normalizeClass(t.nsSelect.be("dropdown","footer")),onClick:vue.withModifiers(()=>{},["stop"])},[vue.renderSlot(t.$slots,"footer")],10,["onClick"])):vue.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[f,t.handleClickOutside,t.popperRef]])}var Select=_export_sfc$1(_sfc_main$p,[["render",_sfc_render$1],["__file","select.vue"]]);const _sfc_main$o=vue.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=useNamespace("select"),n=vue.ref(null),r=vue.getCurrentInstance(),i=vue.ref([]);vue.provide(selectGroupKey,vue.reactive({...vue.toRefs(t)}));const s=vue.computed(()=>i.value.some(u=>u.visible===!0)),o=u=>{var c,d;return((c=u.type)==null?void 0:c.name)==="ElOption"&&!!((d=u.component)!=null&&d.proxy)},a=u=>{const c=castArray$1(u),d=[];return c.forEach(h=>{var f,p;o(h)?d.push(h.component.proxy):(f=h.children)!=null&&f.length?d.push(...a(h.children)):(p=h.component)!=null&&p.subTree&&d.push(...a(h.component.subTree))}),d},l=()=>{i.value=a(r.subTree)};return vue.onMounted(()=>{l()}),useMutationObserver(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:s,ns:e}}});function _sfc_render(t,e,n,r,i,s){return vue.withDirectives((vue.openBlock(),vue.createElementBlock("ul",{ref:"groupRef",class:vue.normalizeClass(t.ns.be("group","wrap"))},[vue.createElementVNode("li",{class:vue.normalizeClass(t.ns.be("group","title"))},vue.toDisplayString(t.label),3),vue.createElementVNode("li",null,[vue.createElementVNode("ul",{class:vue.normalizeClass(t.ns.b("group"))},[vue.renderSlot(t.$slots,"default")],2)])],2)),[[vue.vShow,t.visible]])}var OptionGroup=_export_sfc$1(_sfc_main$o,[["render",_sfc_render],["__file","option-group.vue"]]);withInstall(Select,{Option,OptionGroup});const ElOption=withNoopInstall(Option);withNoopInstall(OptionGroup);const _sfc_main$n=vue.defineComponent({name:"ZhButton",inheritAttrs:!1,__name:"Button",emits:["click"],setup(t,{emit:e}){const n=e,r=i=>{n("click",i)};return(i,s)=>(vue.openBlock(),vue.createBlock(vue.unref(ElButton),vue.mergeProps(i.$attrs,{class:"zh-button",onClick:r}),{default:vue.withCtx(()=>[vue.renderSlot(i.$slots,"default",{},void 0,!0)]),_:3},16))}}),_export_sfc=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},Button=_export_sfc(_sfc_main$n,[["__scopeId","data-v-59ad2ca5"]]),ZhButton=withInstall$1(Button);//! moment.js
|
|
32
32
|
//! version : 2.30.1
|
|
33
33
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
34
34
|
//! license : MIT
|
|
35
35
|
//! momentjs.com
|
|
36
|
-
var
|
|
37
|
-
[`+s+"] ";for(
|
|
38
|
-
Arguments: `+Array.prototype.slice.call(
|
|
39
|
-
`+new Error().stack),r=!1}return n.apply(this,arguments)},n)}var Pd={};function $d(e,n){Z.deprecationHandler!=null&&Z.deprecationHandler(e,n),Pd[e]||(Nd(n),Pd[e]=!0)}Z.suppressDeprecationWarnings=!1,Z.deprecationHandler=null;function Rt(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function oS(e){var n,r;for(r in e)ke(e,r)&&(n=e[r],Rt(n)?this[r]=n:this["_"+r]=n);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function xs(e,n){var r=mn({},e),a;for(a in n)ke(n,a)&&(Nn(e[a])&&Nn(n[a])?(r[a]={},mn(r[a],e[a]),mn(r[a],n[a])):n[a]!=null?r[a]=n[a]:delete r[a]);for(a in e)ke(e,a)&&!ke(n,a)&&Nn(e[a])&&(r[a]=mn({},r[a]));return r}function Ns(e){e!=null&&this.set(e)}var Ps;Object.keys?Ps=Object.keys:Ps=function(e){var n,r=[];for(n in e)ke(e,n)&&r.push(n);return r};var sS={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function iS(e,n,r){var a=this._calendar[e]||this._calendar.sameElse;return Rt(a)?a.call(n,r):a}function Ft(e,n,r){var a=""+Math.abs(e),o=n-a.length,s=e>=0;return(s?r?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+a}var $s=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Na=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Bs={},Qn={};function te(e,n,r,a){var o=a;typeof a=="string"&&(o=function(){return this[a]()}),e&&(Qn[e]=o),n&&(Qn[n[0]]=function(){return Ft(o.apply(this,arguments),n[1],n[2])}),r&&(Qn[r]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function lS(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function cS(e){var n=e.match($s),r,a;for(r=0,a=n.length;r<a;r++)Qn[n[r]]?n[r]=Qn[n[r]]:n[r]=lS(n[r]);return function(o){var s="",i;for(i=0;i<a;i++)s+=Rt(n[i])?n[i].call(o,e):n[i];return s}}function Pa(e,n){return e.isValid()?(n=Bd(n,e.localeData()),Bs[n]=Bs[n]||cS(n),Bs[n](e)):e.localeData().invalidDate()}function Bd(e,n){var r=5;function a(o){return n.longDateFormat(o)||o}for(Na.lastIndex=0;r>=0&&Na.test(e);)e=e.replace(Na,a),Na.lastIndex=0,r-=1;return e}var dS={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"};function fS(e){var n=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return n||!r?n:(this._longDateFormat[e]=r.match($s).map(function(a){return a==="MMMM"||a==="MM"||a==="DD"||a==="dddd"?a.slice(1):a}).join(""),this._longDateFormat[e])}var uS="Invalid date";function pS(){return this._invalidDate}var mS="%d",hS=/\d{1,2}/;function gS(e){return this._ordinal.replace("%d",e)}var yS={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function bS(e,n,r,a){var o=this._relativeTime[r];return Rt(o)?o(e,n,r,a):o.replace(/%d/i,e)}function wS(e,n){var r=this._relativeTime[e>0?"future":"past"];return Rt(r)?r(n):r.replace(/%s/i,n)}var Vd={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function yt(e){return typeof e=="string"?Vd[e]||Vd[e.toLowerCase()]:void 0}function Vs(e){var n={},r,a;for(a in e)ke(e,a)&&(r=yt(a),r&&(n[r]=e[a]));return n}var _S={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function kS(e){var n=[],r;for(r in e)ke(e,r)&&n.push({unit:r,priority:_S[r]});return n.sort(function(a,o){return a.priority-o.priority}),n}var Id=/\d/,dt=/\d\d/,Ad=/\d{3}/,Is=/\d{4}/,$a=/[+-]?\d{6}/,Oe=/\d\d?/,Rd=/\d\d\d\d?/,Fd=/\d\d\d\d\d\d?/,Ba=/\d{1,3}/,As=/\d{1,4}/,Va=/[+-]?\d{1,6}/,er=/\d+/,Ia=/[+-]?\d+/,SS=/Z|[+-]\d\d:?\d\d/gi,Aa=/Z|[+-]\d\d(?::?\d\d)?/gi,CS=/[+-]?\d+(\.\d{1,3})?/,Pr=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,tr=/^[1-9]\d?/,Rs=/^([1-9]\d|\d)/,Ra;Ra={};function Q(e,n,r){Ra[e]=Rt(n)?n:function(a,o){return a&&r?r:n}}function vS(e,n){return ke(Ra,e)?Ra[e](n._strict,n._locale):new RegExp(ES(e))}function ES(e){return Xt(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(n,r,a,o,s){return r||a||o||s}))}function Xt(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function bt(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ye(e){var n=+e,r=0;return n!==0&&isFinite(n)&&(r=bt(n)),r}var Fs={};function Ee(e,n){var r,a=n,o;for(typeof e=="string"&&(e=[e]),Jt(n)&&(a=function(s,i){i[n]=ye(s)}),o=e.length,r=0;r<o;r++)Fs[e[r]]=a}function $r(e,n){Ee(e,function(r,a,o,s){o._w=o._w||{},n(r,o._w,o,s)})}function MS(e,n,r){n!=null&&ke(Fs,e)&&Fs[e](n,r._a,r,e)}function Fa(e){return e%4===0&&e%100!==0||e%400===0}var Ge=0,Qt=1,Lt=2,je=3,Ot=4,en=5,Pn=6,TS=7,DS=8;te("Y",0,0,function(){var e=this.year();return e<=9999?Ft(e,4):"+"+e}),te(0,["YY",2],0,function(){return this.year()%100}),te(0,["YYYY",4],0,"year"),te(0,["YYYYY",5],0,"year"),te(0,["YYYYYY",6,!0],0,"year"),Q("Y",Ia),Q("YY",Oe,dt),Q("YYYY",As,Is),Q("YYYYY",Va,$a),Q("YYYYYY",Va,$a),Ee(["YYYYY","YYYYYY"],Ge),Ee("YYYY",function(e,n){n[Ge]=e.length===2?Z.parseTwoDigitYear(e):ye(e)}),Ee("YY",function(e,n){n[Ge]=Z.parseTwoDigitYear(e)}),Ee("Y",function(e,n){n[Ge]=parseInt(e,10)});function Br(e){return Fa(e)?366:365}Z.parseTwoDigitYear=function(e){return ye(e)+(ye(e)>68?1900:2e3)};var Ld=nr("FullYear",!0);function OS(){return Fa(this.year())}function nr(e,n){return function(r){return r!=null?(Yd(this,e,r),Z.updateOffset(this,n),this):Vr(this,e)}}function Vr(e,n){if(!e.isValid())return NaN;var r=e._d,a=e._isUTC;switch(n){case"Milliseconds":return a?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return a?r.getUTCSeconds():r.getSeconds();case"Minutes":return a?r.getUTCMinutes():r.getMinutes();case"Hours":return a?r.getUTCHours():r.getHours();case"Date":return a?r.getUTCDate():r.getDate();case"Day":return a?r.getUTCDay():r.getDay();case"Month":return a?r.getUTCMonth():r.getMonth();case"FullYear":return a?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Yd(e,n,r){var a,o,s,i,l;if(!(!e.isValid()||isNaN(r))){switch(a=e._d,o=e._isUTC,n){case"Milliseconds":return void(o?a.setUTCMilliseconds(r):a.setMilliseconds(r));case"Seconds":return void(o?a.setUTCSeconds(r):a.setSeconds(r));case"Minutes":return void(o?a.setUTCMinutes(r):a.setMinutes(r));case"Hours":return void(o?a.setUTCHours(r):a.setHours(r));case"Date":return void(o?a.setUTCDate(r):a.setDate(r));case"FullYear":break;default:return}s=r,i=e.month(),l=e.date(),l=l===29&&i===1&&!Fa(s)?28:l,o?a.setUTCFullYear(s,i,l):a.setFullYear(s,i,l)}}function xS(e){return e=yt(e),Rt(this[e])?this[e]():this}function NS(e,n){if(typeof e=="object"){e=Vs(e);var r=kS(e),a,o=r.length;for(a=0;a<o;a++)this[r[a].unit](e[r[a].unit])}else if(e=yt(e),Rt(this[e]))return this[e](n);return this}function PS(e,n){return(e%n+n)%n}var Ie;Array.prototype.indexOf?Ie=Array.prototype.indexOf:Ie=function(e){var n;for(n=0;n<this.length;++n)if(this[n]===e)return n;return-1};function Ls(e,n){if(isNaN(e)||isNaN(n))return NaN;var r=PS(n,12);return e+=(n-r)/12,r===1?Fa(e)?29:28:31-r%7%2}te("M",["MM",2],"Mo",function(){return this.month()+1}),te("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),te("MMMM",0,0,function(e){return this.localeData().months(this,e)}),Q("M",Oe,tr),Q("MM",Oe,dt),Q("MMM",function(e,n){return n.monthsShortRegex(e)}),Q("MMMM",function(e,n){return n.monthsRegex(e)}),Ee(["M","MM"],function(e,n){n[Qt]=ye(e)-1}),Ee(["MMM","MMMM"],function(e,n,r,a){var o=r._locale.monthsParse(e,a,r._strict);o!=null?n[Qt]=o:de(r).invalidMonth=e});var $S="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),zd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),jd=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,BS=Pr,VS=Pr;function IS(e,n){return e?Tt(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||jd).test(n)?"format":"standalone"][e.month()]:Tt(this._months)?this._months:this._months.standalone}function AS(e,n){return e?Tt(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[jd.test(n)?"format":"standalone"][e.month()]:Tt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function RS(e,n,r){var a,o,s,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],a=0;a<12;++a)s=At([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(s,"").toLocaleLowerCase();return r?n==="MMM"?(o=Ie.call(this._shortMonthsParse,i),o!==-1?o:null):(o=Ie.call(this._longMonthsParse,i),o!==-1?o:null):n==="MMM"?(o=Ie.call(this._shortMonthsParse,i),o!==-1?o:(o=Ie.call(this._longMonthsParse,i),o!==-1?o:null)):(o=Ie.call(this._longMonthsParse,i),o!==-1?o:(o=Ie.call(this._shortMonthsParse,i),o!==-1?o:null))}function FS(e,n,r){var a,o,s;if(this._monthsParseExact)return RS.call(this,e,n,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),a=0;a<12;a++){if(o=At([2e3,a]),r&&!this._longMonthsParse[a]&&(this._longMonthsParse[a]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[a]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),!r&&!this._monthsParse[a]&&(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[a]=new RegExp(s.replace(".",""),"i")),r&&n==="MMMM"&&this._longMonthsParse[a].test(e))return a;if(r&&n==="MMM"&&this._shortMonthsParse[a].test(e))return a;if(!r&&this._monthsParse[a].test(e))return a}}function Wd(e,n){if(!e.isValid())return e;if(typeof n=="string"){if(/^\d+$/.test(n))n=ye(n);else if(n=e.localeData().monthsParse(n),!Jt(n))return e}var r=n,a=e.date();return a=a<29?a:Math.min(a,Ls(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,a):e._d.setMonth(r,a),e}function Hd(e){return e!=null?(Wd(this,e),Z.updateOffset(this,!0),this):Vr(this,"Month")}function LS(){return Ls(this.year(),this.month())}function YS(e){return this._monthsParseExact?(ke(this,"_monthsRegex")||Ud.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(ke(this,"_monthsShortRegex")||(this._monthsShortRegex=BS),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function zS(e){return this._monthsParseExact?(ke(this,"_monthsRegex")||Ud.call(this),e?this._monthsStrictRegex:this._monthsRegex):(ke(this,"_monthsRegex")||(this._monthsRegex=VS),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Ud(){function e(c,d){return d.length-c.length}var n=[],r=[],a=[],o,s,i,l;for(o=0;o<12;o++)s=At([2e3,o]),i=Xt(this.monthsShort(s,"")),l=Xt(this.months(s,"")),n.push(i),r.push(l),a.push(l),a.push(i);n.sort(e),r.sort(e),a.sort(e),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function jS(e,n,r,a,o,s,i){var l;return e<100&&e>=0?(l=new Date(e+400,n,r,a,o,s,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,n,r,a,o,s,i),l}function Ir(e){var n,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,n=new Date(Date.UTC.apply(null,r)),isFinite(n.getUTCFullYear())&&n.setUTCFullYear(e)):n=new Date(Date.UTC.apply(null,arguments)),n}function La(e,n,r){var a=7+n-r,o=(7+Ir(e,0,a).getUTCDay()-n)%7;return-o+a-1}function qd(e,n,r,a,o){var s=(7+r-a)%7,i=La(e,a,o),l=1+7*(n-1)+s+i,c,d;return l<=0?(c=e-1,d=Br(c)+l):l>Br(e)?(c=e+1,d=l-Br(e)):(c=e,d=l),{year:c,dayOfYear:d}}function Ar(e,n,r){var a=La(e.year(),n,r),o=Math.floor((e.dayOfYear()-a-1)/7)+1,s,i;return o<1?(i=e.year()-1,s=o+tn(i,n,r)):o>tn(e.year(),n,r)?(s=o-tn(e.year(),n,r),i=e.year()+1):(i=e.year(),s=o),{week:s,year:i}}function tn(e,n,r){var a=La(e,n,r),o=La(e+1,n,r);return(Br(e)-a+o)/7}te("w",["ww",2],"wo","week"),te("W",["WW",2],"Wo","isoWeek"),Q("w",Oe,tr),Q("ww",Oe,dt),Q("W",Oe,tr),Q("WW",Oe,dt),$r(["w","ww","W","WW"],function(e,n,r,a){n[a.substr(0,1)]=ye(e)});function WS(e){return Ar(e,this._week.dow,this._week.doy).week}var HS={dow:0,doy:6};function US(){return this._week.dow}function qS(){return this._week.doy}function GS(e){var n=this.localeData().week(this);return e==null?n:this.add((e-n)*7,"d")}function KS(e){var n=Ar(this,1,4).week;return e==null?n:this.add((e-n)*7,"d")}te("d",0,"do","day"),te("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),te("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),te("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),te("e",0,0,"weekday"),te("E",0,0,"isoWeekday"),Q("d",Oe),Q("e",Oe),Q("E",Oe),Q("dd",function(e,n){return n.weekdaysMinRegex(e)}),Q("ddd",function(e,n){return n.weekdaysShortRegex(e)}),Q("dddd",function(e,n){return n.weekdaysRegex(e)}),$r(["dd","ddd","dddd"],function(e,n,r,a){var o=r._locale.weekdaysParse(e,a,r._strict);o!=null?n.d=o:de(r).invalidWeekday=e}),$r(["d","e","E"],function(e,n,r,a){n[a]=ye(e)});function ZS(e,n){return typeof e!="string"?e:isNaN(e)?(e=n.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function JS(e,n){return typeof e=="string"?n.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ys(e,n){return e.slice(n,7).concat(e.slice(0,n))}var XS="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Gd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),QS="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),e2=Pr,t2=Pr,n2=Pr;function r2(e,n){var r=Tt(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(n)?"format":"standalone"];return e===!0?Ys(r,this._week.dow):e?r[e.day()]:r}function a2(e){return e===!0?Ys(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function o2(e){return e===!0?Ys(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function s2(e,n,r){var a,o,s,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;a<7;++a)s=At([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(s,"").toLocaleLowerCase();return r?n==="dddd"?(o=Ie.call(this._weekdaysParse,i),o!==-1?o:null):n==="ddd"?(o=Ie.call(this._shortWeekdaysParse,i),o!==-1?o:null):(o=Ie.call(this._minWeekdaysParse,i),o!==-1?o:null):n==="dddd"?(o=Ie.call(this._weekdaysParse,i),o!==-1||(o=Ie.call(this._shortWeekdaysParse,i),o!==-1)?o:(o=Ie.call(this._minWeekdaysParse,i),o!==-1?o:null)):n==="ddd"?(o=Ie.call(this._shortWeekdaysParse,i),o!==-1||(o=Ie.call(this._weekdaysParse,i),o!==-1)?o:(o=Ie.call(this._minWeekdaysParse,i),o!==-1?o:null)):(o=Ie.call(this._minWeekdaysParse,i),o!==-1||(o=Ie.call(this._weekdaysParse,i),o!==-1)?o:(o=Ie.call(this._shortWeekdaysParse,i),o!==-1?o:null))}function i2(e,n,r){var a,o,s;if(this._weekdaysParseExact)return s2.call(this,e,n,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),a=0;a<7;a++){if(o=At([2e3,1]).day(a),r&&!this._fullWeekdaysParse[a]&&(this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[a]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[a]=new RegExp(s.replace(".",""),"i")),r&&n==="dddd"&&this._fullWeekdaysParse[a].test(e))return a;if(r&&n==="ddd"&&this._shortWeekdaysParse[a].test(e))return a;if(r&&n==="dd"&&this._minWeekdaysParse[a].test(e))return a;if(!r&&this._weekdaysParse[a].test(e))return a}}function l2(e){if(!this.isValid())return e!=null?this:NaN;var n=Vr(this,"Day");return e!=null?(e=ZS(e,this.localeData()),this.add(e-n,"d")):n}function c2(e){if(!this.isValid())return e!=null?this:NaN;var n=(this.day()+7-this.localeData()._week.dow)%7;return e==null?n:this.add(e-n,"d")}function d2(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var n=JS(e,this.localeData());return this.day(this.day()%7?n:n-7)}else return this.day()||7}function f2(e){return this._weekdaysParseExact?(ke(this,"_weekdaysRegex")||zs.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ke(this,"_weekdaysRegex")||(this._weekdaysRegex=e2),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function u2(e){return this._weekdaysParseExact?(ke(this,"_weekdaysRegex")||zs.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ke(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=t2),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function p2(e){return this._weekdaysParseExact?(ke(this,"_weekdaysRegex")||zs.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ke(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=n2),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function zs(){function e(u,f){return f.length-u.length}var n=[],r=[],a=[],o=[],s,i,l,c,d;for(s=0;s<7;s++)i=At([2e3,1]).day(s),l=Xt(this.weekdaysMin(i,"")),c=Xt(this.weekdaysShort(i,"")),d=Xt(this.weekdays(i,"")),n.push(l),r.push(c),a.push(d),o.push(l),o.push(c),o.push(d);n.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+n.join("|")+")","i")}function js(){return this.hours()%12||12}function m2(){return this.hours()||24}te("H",["HH",2],0,"hour"),te("h",["hh",2],0,js),te("k",["kk",2],0,m2),te("hmm",0,0,function(){return""+js.apply(this)+Ft(this.minutes(),2)}),te("hmmss",0,0,function(){return""+js.apply(this)+Ft(this.minutes(),2)+Ft(this.seconds(),2)}),te("Hmm",0,0,function(){return""+this.hours()+Ft(this.minutes(),2)}),te("Hmmss",0,0,function(){return""+this.hours()+Ft(this.minutes(),2)+Ft(this.seconds(),2)});function Kd(e,n){te(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)})}Kd("a",!0),Kd("A",!1);function Zd(e,n){return n._meridiemParse}Q("a",Zd),Q("A",Zd),Q("H",Oe,Rs),Q("h",Oe,tr),Q("k",Oe,tr),Q("HH",Oe,dt),Q("hh",Oe,dt),Q("kk",Oe,dt),Q("hmm",Rd),Q("hmmss",Fd),Q("Hmm",Rd),Q("Hmmss",Fd),Ee(["H","HH"],je),Ee(["k","kk"],function(e,n,r){var a=ye(e);n[je]=a===24?0:a}),Ee(["a","A"],function(e,n,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),Ee(["h","hh"],function(e,n,r){n[je]=ye(e),de(r).bigHour=!0}),Ee("hmm",function(e,n,r){var a=e.length-2;n[je]=ye(e.substr(0,a)),n[Ot]=ye(e.substr(a)),de(r).bigHour=!0}),Ee("hmmss",function(e,n,r){var a=e.length-4,o=e.length-2;n[je]=ye(e.substr(0,a)),n[Ot]=ye(e.substr(a,2)),n[en]=ye(e.substr(o)),de(r).bigHour=!0}),Ee("Hmm",function(e,n,r){var a=e.length-2;n[je]=ye(e.substr(0,a)),n[Ot]=ye(e.substr(a))}),Ee("Hmmss",function(e,n,r){var a=e.length-4,o=e.length-2;n[je]=ye(e.substr(0,a)),n[Ot]=ye(e.substr(a,2)),n[en]=ye(e.substr(o))});function h2(e){return(e+"").toLowerCase().charAt(0)==="p"}var g2=/[ap]\.?m?\.?/i,y2=nr("Hours",!0);function b2(e,n,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Jd={calendar:sS,longDateFormat:dS,invalidDate:uS,ordinal:mS,dayOfMonthOrdinalParse:hS,relativeTime:yS,months:$S,monthsShort:zd,week:HS,weekdays:XS,weekdaysMin:QS,weekdaysShort:Gd,meridiemParse:g2},$e={},Rr={},Fr;function w2(e,n){var r,a=Math.min(e.length,n.length);for(r=0;r<a;r+=1)if(e[r]!==n[r])return r;return a}function Xd(e){return e&&e.toLowerCase().replace("_","-")}function _2(e){for(var n=0,r,a,o,s;n<e.length;){for(s=Xd(e[n]).split("-"),r=s.length,a=Xd(e[n+1]),a=a?a.split("-"):null;r>0;){if(o=Ya(s.slice(0,r).join("-")),o)return o;if(a&&a.length>=r&&w2(s,a)>=r-1)break;r--}n++}return Fr}function k2(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ya(e){var n=null,r;if($e[e]===void 0&&typeof module<"u"&&module&&module.exports&&k2(e))try{n=Fr._abbr,r=require,r("./locale/"+e),hn(n)}catch{$e[e]=null}return $e[e]}function hn(e,n){var r;return e&&(tt(n)?r=nn(e):r=Ws(e,n),r?Fr=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Fr._abbr}function Ws(e,n){if(n!==null){var r,a=Jd;if(n.abbr=e,$e[e]!=null)$d("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),a=$e[e]._config;else if(n.parentLocale!=null)if($e[n.parentLocale]!=null)a=$e[n.parentLocale]._config;else if(r=Ya(n.parentLocale),r!=null)a=r._config;else return Rr[n.parentLocale]||(Rr[n.parentLocale]=[]),Rr[n.parentLocale].push({name:e,config:n}),null;return $e[e]=new Ns(xs(a,n)),Rr[e]&&Rr[e].forEach(function(o){Ws(o.name,o.config)}),hn(e),$e[e]}else return delete $e[e],null}function S2(e,n){if(n!=null){var r,a,o=Jd;$e[e]!=null&&$e[e].parentLocale!=null?$e[e].set(xs($e[e]._config,n)):(a=Ya(e),a!=null&&(o=a._config),n=xs(o,n),a==null&&(n.abbr=e),r=new Ns(n),r.parentLocale=$e[e],$e[e]=r),hn(e)}else $e[e]!=null&&($e[e].parentLocale!=null?($e[e]=$e[e].parentLocale,e===hn()&&hn(e)):$e[e]!=null&&delete $e[e]);return $e[e]}function nn(e){var n;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Fr;if(!Tt(e)){if(n=Ya(e),n)return n;e=[e]}return _2(e)}function C2(){return Ps($e)}function Hs(e){var n,r=e._a;return r&&de(e).overflow===-2&&(n=r[Qt]<0||r[Qt]>11?Qt:r[Lt]<1||r[Lt]>Ls(r[Ge],r[Qt])?Lt:r[je]<0||r[je]>24||r[je]===24&&(r[Ot]!==0||r[en]!==0||r[Pn]!==0)?je:r[Ot]<0||r[Ot]>59?Ot:r[en]<0||r[en]>59?en:r[Pn]<0||r[Pn]>999?Pn:-1,de(e)._overflowDayOfYear&&(n<Ge||n>Lt)&&(n=Lt),de(e)._overflowWeeks&&n===-1&&(n=TS),de(e)._overflowWeekday&&n===-1&&(n=DS),de(e).overflow=n),e}var v2=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,E2=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,M2=/Z|[+-]\d\d(?::?\d\d)?/,za=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Us=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],T2=/^\/?Date\((-?\d+)/i,D2=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,O2={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Qd(e){var n,r,a=e._i,o=v2.exec(a)||E2.exec(a),s,i,l,c,d=za.length,u=Us.length;if(o){for(de(e).iso=!0,n=0,r=d;n<r;n++)if(za[n][1].exec(o[1])){i=za[n][0],s=za[n][2]!==!1;break}if(i==null){e._isValid=!1;return}if(o[3]){for(n=0,r=u;n<r;n++)if(Us[n][1].exec(o[3])){l=(o[2]||" ")+Us[n][0];break}if(l==null){e._isValid=!1;return}}if(!s&&l!=null){e._isValid=!1;return}if(o[4])if(M2.exec(o[4]))c="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(c||""),Gs(e)}else e._isValid=!1}function x2(e,n,r,a,o,s){var i=[N2(e),zd.indexOf(n),parseInt(r,10),parseInt(a,10),parseInt(o,10)];return s&&i.push(parseInt(s,10)),i}function N2(e){var n=parseInt(e,10);return n<=49?2e3+n:n<=999?1900+n:n}function P2(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function $2(e,n,r){if(e){var a=Gd.indexOf(e),o=new Date(n[0],n[1],n[2]).getDay();if(a!==o)return de(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function B2(e,n,r){if(e)return O2[e];if(n)return 0;var a=parseInt(r,10),o=a%100,s=(a-o)/100;return s*60+o}function ef(e){var n=D2.exec(P2(e._i)),r;if(n){if(r=x2(n[4],n[3],n[2],n[5],n[6],n[7]),!$2(n[1],r,e))return;e._a=r,e._tzm=B2(n[8],n[9],n[10]),e._d=Ir.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),de(e).rfc2822=!0}else e._isValid=!1}function V2(e){var n=T2.exec(e._i);if(n!==null){e._d=new Date(+n[1]);return}if(Qd(e),e._isValid===!1)delete e._isValid;else return;if(ef(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:Z.createFromInputFallback(e)}Z.createFromInputFallback=gt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function rr(e,n,r){return e??n??r}function I2(e){var n=new Date(Z.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function qs(e){var n,r,a=[],o,s,i;if(!e._d){for(o=I2(e),e._w&&e._a[Lt]==null&&e._a[Qt]==null&&A2(e),e._dayOfYear!=null&&(i=rr(e._a[Ge],o[Ge]),(e._dayOfYear>Br(i)||e._dayOfYear===0)&&(de(e)._overflowDayOfYear=!0),r=Ir(i,0,e._dayOfYear),e._a[Qt]=r.getUTCMonth(),e._a[Lt]=r.getUTCDate()),n=0;n<3&&e._a[n]==null;++n)e._a[n]=a[n]=o[n];for(;n<7;n++)e._a[n]=a[n]=e._a[n]==null?n===2?1:0:e._a[n];e._a[je]===24&&e._a[Ot]===0&&e._a[en]===0&&e._a[Pn]===0&&(e._nextDay=!0,e._a[je]=0),e._d=(e._useUTC?Ir:jS).apply(null,a),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[je]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(de(e).weekdayMismatch=!0)}}function A2(e){var n,r,a,o,s,i,l,c,d;n=e._w,n.GG!=null||n.W!=null||n.E!=null?(s=1,i=4,r=rr(n.GG,e._a[Ge],Ar(xe(),1,4).year),a=rr(n.W,1),o=rr(n.E,1),(o<1||o>7)&&(c=!0)):(s=e._locale._week.dow,i=e._locale._week.doy,d=Ar(xe(),s,i),r=rr(n.gg,e._a[Ge],d.year),a=rr(n.w,d.week),n.d!=null?(o=n.d,(o<0||o>6)&&(c=!0)):n.e!=null?(o=n.e+s,(n.e<0||n.e>6)&&(c=!0)):o=s),a<1||a>tn(r,s,i)?de(e)._overflowWeeks=!0:c!=null?de(e)._overflowWeekday=!0:(l=qd(r,a,o,s,i),e._a[Ge]=l.year,e._dayOfYear=l.dayOfYear)}Z.ISO_8601=function(){},Z.RFC_2822=function(){};function Gs(e){if(e._f===Z.ISO_8601){Qd(e);return}if(e._f===Z.RFC_2822){ef(e);return}e._a=[],de(e).empty=!0;var n=""+e._i,r,a,o,s,i,l=n.length,c=0,d,u;for(o=Bd(e._f,e._locale).match($s)||[],u=o.length,r=0;r<u;r++)s=o[r],a=(n.match(vS(s,e))||[])[0],a&&(i=n.substr(0,n.indexOf(a)),i.length>0&&de(e).unusedInput.push(i),n=n.slice(n.indexOf(a)+a.length),c+=a.length),Qn[s]?(a?de(e).empty=!1:de(e).unusedTokens.push(s),MS(s,a,e)):e._strict&&!a&&de(e).unusedTokens.push(s);de(e).charsLeftOver=l-c,n.length>0&&de(e).unusedInput.push(n),e._a[je]<=12&&de(e).bigHour===!0&&e._a[je]>0&&(de(e).bigHour=void 0),de(e).parsedDateParts=e._a.slice(0),de(e).meridiem=e._meridiem,e._a[je]=R2(e._locale,e._a[je],e._meridiem),d=de(e).era,d!==null&&(e._a[Ge]=e._locale.erasConvertYear(d,e._a[Ge])),qs(e),Hs(e)}function R2(e,n,r){var a;return r==null?n:e.meridiemHour!=null?e.meridiemHour(n,r):(e.isPM!=null&&(a=e.isPM(r),a&&n<12&&(n+=12),!a&&n===12&&(n=0)),n)}function F2(e){var n,r,a,o,s,i,l=!1,c=e._f.length;if(c===0){de(e).invalidFormat=!0,e._d=new Date(NaN);return}for(o=0;o<c;o++)s=0,i=!1,n=Os({},e),e._useUTC!=null&&(n._useUTC=e._useUTC),n._f=e._f[o],Gs(n),Ts(n)&&(i=!0),s+=de(n).charsLeftOver,s+=de(n).unusedTokens.length*10,de(n).score=s,l?s<a&&(a=s,r=n):(a==null||s<a||i)&&(a=s,r=n,i&&(l=!0));mn(e,r||n)}function L2(e){if(!e._d){var n=Vs(e._i),r=n.day===void 0?n.date:n.day;e._a=Od([n.year,n.month,r,n.hour,n.minute,n.second,n.millisecond],function(a){return a&&parseInt(a,10)}),qs(e)}}function Y2(e){var n=new Nr(Hs(tf(e)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function tf(e){var n=e._i,r=e._f;return e._locale=e._locale||nn(e._l),n===null||r===void 0&&n===""?xa({nullInput:!0}):(typeof n=="string"&&(e._i=n=e._locale.preparse(n)),Dt(n)?new Nr(Hs(n)):(xr(n)?e._d=n:Tt(r)?F2(e):r?Gs(e):z2(e),Ts(e)||(e._d=null),e))}function z2(e){var n=e._i;tt(n)?e._d=new Date(Z.now()):xr(n)?e._d=new Date(n.valueOf()):typeof n=="string"?V2(e):Tt(n)?(e._a=Od(n.slice(0),function(r){return parseInt(r,10)}),qs(e)):Nn(n)?L2(e):Jt(n)?e._d=new Date(n):Z.createFromInputFallback(e)}function nf(e,n,r,a,o){var s={};return(n===!0||n===!1)&&(a=n,n=void 0),(r===!0||r===!1)&&(a=r,r=void 0),(Nn(e)&&Es(e)||Tt(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=r,s._i=e,s._f=n,s._strict=a,Y2(s)}function xe(e,n,r,a){return nf(e,n,r,a,!1)}var j2=gt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=xe.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:xa()}),W2=gt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=xe.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:xa()});function rf(e,n){var r,a;if(n.length===1&&Tt(n[0])&&(n=n[0]),!n.length)return xe();for(r=n[0],a=1;a<n.length;++a)(!n[a].isValid()||n[a][e](r))&&(r=n[a]);return r}function H2(){var e=[].slice.call(arguments,0);return rf("isBefore",e)}function U2(){var e=[].slice.call(arguments,0);return rf("isAfter",e)}var q2=function(){return Date.now?Date.now():+new Date},Lr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function G2(e){var n,r=!1,a,o=Lr.length;for(n in e)if(ke(e,n)&&!(Ie.call(Lr,n)!==-1&&(e[n]==null||!isNaN(e[n]))))return!1;for(a=0;a<o;++a)if(e[Lr[a]]){if(r)return!1;parseFloat(e[Lr[a]])!==ye(e[Lr[a]])&&(r=!0)}return!0}function K2(){return this._isValid}function Z2(){return xt(NaN)}function ja(e){var n=Vs(e),r=n.year||0,a=n.quarter||0,o=n.month||0,s=n.week||n.isoWeek||0,i=n.day||0,l=n.hour||0,c=n.minute||0,d=n.second||0,u=n.millisecond||0;this._isValid=G2(n),this._milliseconds=+u+d*1e3+c*6e4+l*1e3*60*60,this._days=+i+s*7,this._months=+o+a*3+r*12,this._data={},this._locale=nn(),this._bubble()}function Wa(e){return e instanceof ja}function Ks(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function J2(e,n,r){var a=Math.min(e.length,n.length),o=Math.abs(e.length-n.length),s=0,i;for(i=0;i<a;i++)ye(e[i])!==ye(n[i])&&s++;return s+o}function af(e,n){te(e,0,0,function(){var r=this.utcOffset(),a="+";return r<0&&(r=-r,a="-"),a+Ft(~~(r/60),2)+n+Ft(~~r%60,2)})}af("Z",":"),af("ZZ",""),Q("Z",Aa),Q("ZZ",Aa),Ee(["Z","ZZ"],function(e,n,r){r._useUTC=!0,r._tzm=Zs(Aa,e)});var X2=/([\+\-]|\d\d)/gi;function Zs(e,n){var r=(n||"").match(e),a,o,s;return r===null?null:(a=r[r.length-1]||[],o=(a+"").match(X2)||["-",0,0],s=+(o[1]*60)+ye(o[2]),s===0?0:o[0]==="+"?s:-s)}function Js(e,n){var r,a;return n._isUTC?(r=n.clone(),a=(Dt(e)||xr(e)?e.valueOf():xe(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+a),Z.updateOffset(r,!1),r):xe(e).local()}function Xs(e){return-Math.round(e._d.getTimezoneOffset())}Z.updateOffset=function(){};function Q2(e,n,r){var a=this._offset||0,o;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Zs(Aa,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&n&&(o=Xs(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),a!==e&&(!n||this._changeInProgress?cf(this,xt(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Z.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?a:Xs(this)}function eC(e,n){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,n),this):-this.utcOffset()}function tC(e){return this.utcOffset(0,e)}function nC(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Xs(this),"m")),this}function rC(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Zs(SS,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function aC(e){return this.isValid()?(e=e?xe(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function oC(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function sC(){if(!tt(this._isDSTShifted))return this._isDSTShifted;var e={},n;return Os(e,this),e=tf(e),e._a?(n=e._isUTC?At(e._a):xe(e._a),this._isDSTShifted=this.isValid()&&J2(e._a,n.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function iC(){return this.isValid()?!this._isUTC:!1}function lC(){return this.isValid()?this._isUTC:!1}function of(){return this.isValid()?this._isUTC&&this._offset===0:!1}var cC=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,dC=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function xt(e,n){var r=e,a=null,o,s,i;return Wa(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:Jt(e)||!isNaN(+e)?(r={},n?r[n]=+e:r.milliseconds=+e):(a=cC.exec(e))?(o=a[1]==="-"?-1:1,r={y:0,d:ye(a[Lt])*o,h:ye(a[je])*o,m:ye(a[Ot])*o,s:ye(a[en])*o,ms:ye(Ks(a[Pn]*1e3))*o}):(a=dC.exec(e))?(o=a[1]==="-"?-1:1,r={y:$n(a[2],o),M:$n(a[3],o),w:$n(a[4],o),d:$n(a[5],o),h:$n(a[6],o),m:$n(a[7],o),s:$n(a[8],o)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=fC(xe(r.from),xe(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),s=new ja(r),Wa(e)&&ke(e,"_locale")&&(s._locale=e._locale),Wa(e)&&ke(e,"_isValid")&&(s._isValid=e._isValid),s}xt.fn=ja.prototype,xt.invalid=Z2;function $n(e,n){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*n}function sf(e,n){var r={};return r.months=n.month()-e.month()+(n.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(n)&&--r.months,r.milliseconds=+n-+e.clone().add(r.months,"M"),r}function fC(e,n){var r;return e.isValid()&&n.isValid()?(n=Js(n,e),e.isBefore(n)?r=sf(e,n):(r=sf(n,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function lf(e,n){return function(r,a){var o,s;return a!==null&&!isNaN(+a)&&($d(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=r,r=a,a=s),o=xt(r,a),cf(this,o,e),this}}function cf(e,n,r,a){var o=n._milliseconds,s=Ks(n._days),i=Ks(n._months);e.isValid()&&(a=a??!0,i&&Wd(e,Vr(e,"Month")+i*r),s&&Yd(e,"Date",Vr(e,"Date")+s*r),o&&e._d.setTime(e._d.valueOf()+o*r),a&&Z.updateOffset(e,s||i))}var uC=lf(1,"add"),pC=lf(-1,"subtract");function df(e){return typeof e=="string"||e instanceof String}function mC(e){return Dt(e)||xr(e)||df(e)||Jt(e)||gC(e)||hC(e)||e===null||e===void 0}function hC(e){var n=Nn(e)&&!Es(e),r=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o,s,i=a.length;for(o=0;o<i;o+=1)s=a[o],r=r||ke(e,s);return n&&r}function gC(e){var n=Tt(e),r=!1;return n&&(r=e.filter(function(a){return!Jt(a)&&df(e)}).length===0),n&&r}function yC(e){var n=Nn(e)&&!Es(e),r=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],o,s;for(o=0;o<a.length;o+=1)s=a[o],r=r||ke(e,s);return n&&r}function bC(e,n){var r=e.diff(n,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function wC(e,n){arguments.length===1&&(arguments[0]?mC(arguments[0])?(e=arguments[0],n=void 0):yC(arguments[0])&&(n=arguments[0],e=void 0):(e=void 0,n=void 0));var r=e||xe(),a=Js(r,this).startOf("day"),o=Z.calendarFormat(this,a)||"sameElse",s=n&&(Rt(n[o])?n[o].call(this,r):n[o]);return this.format(s||this.localeData().calendar(o,this,xe(r)))}function _C(){return new Nr(this)}function kC(e,n){var r=Dt(e)?e:xe(e);return this.isValid()&&r.isValid()?(n=yt(n)||"millisecond",n==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(n).valueOf()):!1}function SC(e,n){var r=Dt(e)?e:xe(e);return this.isValid()&&r.isValid()?(n=yt(n)||"millisecond",n==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(n).valueOf()<r.valueOf()):!1}function CC(e,n,r,a){var o=Dt(e)?e:xe(e),s=Dt(n)?n:xe(n);return this.isValid()&&o.isValid()&&s.isValid()?(a=a||"()",(a[0]==="("?this.isAfter(o,r):!this.isBefore(o,r))&&(a[1]===")"?this.isBefore(s,r):!this.isAfter(s,r))):!1}function vC(e,n){var r=Dt(e)?e:xe(e),a;return this.isValid()&&r.isValid()?(n=yt(n)||"millisecond",n==="millisecond"?this.valueOf()===r.valueOf():(a=r.valueOf(),this.clone().startOf(n).valueOf()<=a&&a<=this.clone().endOf(n).valueOf())):!1}function EC(e,n){return this.isSame(e,n)||this.isAfter(e,n)}function MC(e,n){return this.isSame(e,n)||this.isBefore(e,n)}function TC(e,n,r){var a,o,s;if(!this.isValid())return NaN;if(a=Js(e,this),!a.isValid())return NaN;switch(o=(a.utcOffset()-this.utcOffset())*6e4,n=yt(n),n){case"year":s=Ha(this,a)/12;break;case"month":s=Ha(this,a);break;case"quarter":s=Ha(this,a)/3;break;case"second":s=(this-a)/1e3;break;case"minute":s=(this-a)/6e4;break;case"hour":s=(this-a)/36e5;break;case"day":s=(this-a-o)/864e5;break;case"week":s=(this-a-o)/6048e5;break;default:s=this-a}return r?s:bt(s)}function Ha(e,n){if(e.date()<n.date())return-Ha(n,e);var r=(n.year()-e.year())*12+(n.month()-e.month()),a=e.clone().add(r,"months"),o,s;return n-a<0?(o=e.clone().add(r-1,"months"),s=(n-a)/(a-o)):(o=e.clone().add(r+1,"months"),s=(n-a)/(o-a)),-(r+s)||0}Z.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",Z.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function DC(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function OC(e){if(!this.isValid())return null;var n=e!==!0,r=n?this.clone().utc():this;return r.year()<0||r.year()>9999?Pa(r,n?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Rt(Date.prototype.toISOString)?n?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Pa(r,"Z")):Pa(r,n?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function xC(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",n="",r,a,o,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",n="Z"),r="["+e+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o="-MM-DD[T]HH:mm:ss.SSS",s=n+'[")]',this.format(r+a+o+s)}function NC(e){e||(e=this.isUtc()?Z.defaultFormatUtc:Z.defaultFormat);var n=Pa(this,e);return this.localeData().postformat(n)}function PC(e,n){return this.isValid()&&(Dt(e)&&e.isValid()||xe(e).isValid())?xt({to:this,from:e}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function $C(e){return this.from(xe(),e)}function BC(e,n){return this.isValid()&&(Dt(e)&&e.isValid()||xe(e).isValid())?xt({from:this,to:e}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function VC(e){return this.to(xe(),e)}function ff(e){var n;return e===void 0?this._locale._abbr:(n=nn(e),n!=null&&(this._locale=n),this)}var uf=gt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function pf(){return this._locale}var Ua=1e3,ar=60*Ua,qa=60*ar,mf=(365*400+97)*24*qa;function or(e,n){return(e%n+n)%n}function hf(e,n,r){return e<100&&e>=0?new Date(e+400,n,r)-mf:new Date(e,n,r).valueOf()}function gf(e,n,r){return e<100&&e>=0?Date.UTC(e+400,n,r)-mf:Date.UTC(e,n,r)}function IC(e){var n,r;if(e=yt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?gf:hf,e){case"year":n=r(this.year(),0,1);break;case"quarter":n=r(this.year(),this.month()-this.month()%3,1);break;case"month":n=r(this.year(),this.month(),1);break;case"week":n=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":n=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":n=r(this.year(),this.month(),this.date());break;case"hour":n=this._d.valueOf(),n-=or(n+(this._isUTC?0:this.utcOffset()*ar),qa);break;case"minute":n=this._d.valueOf(),n-=or(n,ar);break;case"second":n=this._d.valueOf(),n-=or(n,Ua);break}return this._d.setTime(n),Z.updateOffset(this,!0),this}function AC(e){var n,r;if(e=yt(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?gf:hf,e){case"year":n=r(this.year()+1,0,1)-1;break;case"quarter":n=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":n=r(this.year(),this.month()+1,1)-1;break;case"week":n=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":n=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":n=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":n=this._d.valueOf(),n+=qa-or(n+(this._isUTC?0:this.utcOffset()*ar),qa)-1;break;case"minute":n=this._d.valueOf(),n+=ar-or(n,ar)-1;break;case"second":n=this._d.valueOf(),n+=Ua-or(n,Ua)-1;break}return this._d.setTime(n),Z.updateOffset(this,!0),this}function RC(){return this._d.valueOf()-(this._offset||0)*6e4}function FC(){return Math.floor(this.valueOf()/1e3)}function LC(){return new Date(this.valueOf())}function YC(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zC(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function jC(){return this.isValid()?this.toISOString():null}function WC(){return Ts(this)}function HC(){return mn({},de(this))}function UC(){return de(this).overflow}function qC(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}te("N",0,0,"eraAbbr"),te("NN",0,0,"eraAbbr"),te("NNN",0,0,"eraAbbr"),te("NNNN",0,0,"eraName"),te("NNNNN",0,0,"eraNarrow"),te("y",["y",1],"yo","eraYear"),te("y",["yy",2],0,"eraYear"),te("y",["yyy",3],0,"eraYear"),te("y",["yyyy",4],0,"eraYear"),Q("N",Qs),Q("NN",Qs),Q("NNN",Qs),Q("NNNN",av),Q("NNNNN",ov),Ee(["N","NN","NNN","NNNN","NNNNN"],function(e,n,r,a){var o=r._locale.erasParse(e,a,r._strict);o?de(r).era=o:de(r).invalidEra=e}),Q("y",er),Q("yy",er),Q("yyy",er),Q("yyyy",er),Q("yo",sv),Ee(["y","yy","yyy","yyyy"],Ge),Ee(["yo"],function(e,n,r,a){var o;r._locale._eraYearOrdinalRegex&&(o=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?n[Ge]=r._locale.eraYearOrdinalParse(e,o):n[Ge]=parseInt(e,10)});function GC(e,n){var r,a,o,s=this._eras||nn("en")._eras;for(r=0,a=s.length;r<a;++r){switch(typeof s[r].since){case"string":o=Z(s[r].since).startOf("day"),s[r].since=o.valueOf();break}switch(typeof s[r].until){case"undefined":s[r].until=1/0;break;case"string":o=Z(s[r].until).startOf("day").valueOf(),s[r].until=o.valueOf();break}}return s}function KC(e,n,r){var a,o,s=this.eras(),i,l,c;for(e=e.toUpperCase(),a=0,o=s.length;a<o;++a)if(i=s[a].name.toUpperCase(),l=s[a].abbr.toUpperCase(),c=s[a].narrow.toUpperCase(),r)switch(n){case"N":case"NN":case"NNN":if(l===e)return s[a];break;case"NNNN":if(i===e)return s[a];break;case"NNNNN":if(c===e)return s[a];break}else if([i,l,c].indexOf(e)>=0)return s[a]}function ZC(e,n){var r=e.since<=e.until?1:-1;return n===void 0?Z(e.since).year():Z(e.since).year()+(n-e.offset)*r}function JC(){var e,n,r,a=this.localeData().eras();for(e=0,n=a.length;e<n;++e)if(r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return a[e].name;return""}function XC(){var e,n,r,a=this.localeData().eras();for(e=0,n=a.length;e<n;++e)if(r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return a[e].narrow;return""}function QC(){var e,n,r,a=this.localeData().eras();for(e=0,n=a.length;e<n;++e)if(r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return a[e].abbr;return""}function ev(){var e,n,r,a,o=this.localeData().eras();for(e=0,n=o.length;e<n;++e)if(r=o[e].since<=o[e].until?1:-1,a=this.clone().startOf("day").valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return(this.year()-Z(o[e].since).year())*r+o[e].offset;return this.year()}function tv(e){return ke(this,"_erasNameRegex")||ei.call(this),e?this._erasNameRegex:this._erasRegex}function nv(e){return ke(this,"_erasAbbrRegex")||ei.call(this),e?this._erasAbbrRegex:this._erasRegex}function rv(e){return ke(this,"_erasNarrowRegex")||ei.call(this),e?this._erasNarrowRegex:this._erasRegex}function Qs(e,n){return n.erasAbbrRegex(e)}function av(e,n){return n.erasNameRegex(e)}function ov(e,n){return n.erasNarrowRegex(e)}function sv(e,n){return n._eraYearOrdinalRegex||er}function ei(){var e=[],n=[],r=[],a=[],o,s,i,l,c,d=this.eras();for(o=0,s=d.length;o<s;++o)i=Xt(d[o].name),l=Xt(d[o].abbr),c=Xt(d[o].narrow),n.push(i),e.push(l),r.push(c),a.push(i),a.push(l),a.push(c);this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+n.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}te(0,["gg",2],0,function(){return this.weekYear()%100}),te(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Ga(e,n){te(0,[e,e.length],0,n)}Ga("gggg","weekYear"),Ga("ggggg","weekYear"),Ga("GGGG","isoWeekYear"),Ga("GGGGG","isoWeekYear"),Q("G",Ia),Q("g",Ia),Q("GG",Oe,dt),Q("gg",Oe,dt),Q("GGGG",As,Is),Q("gggg",As,Is),Q("GGGGG",Va,$a),Q("ggggg",Va,$a),$r(["gggg","ggggg","GGGG","GGGGG"],function(e,n,r,a){n[a.substr(0,2)]=ye(e)}),$r(["gg","GG"],function(e,n,r,a){n[a]=Z.parseTwoDigitYear(e)});function iv(e){return yf.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function lv(e){return yf.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function cv(){return tn(this.year(),1,4)}function dv(){return tn(this.isoWeekYear(),1,4)}function fv(){var e=this.localeData()._week;return tn(this.year(),e.dow,e.doy)}function uv(){var e=this.localeData()._week;return tn(this.weekYear(),e.dow,e.doy)}function yf(e,n,r,a,o){var s;return e==null?Ar(this,a,o).year:(s=tn(e,a,o),n>s&&(n=s),pv.call(this,e,n,r,a,o))}function pv(e,n,r,a,o){var s=qd(e,n,r,a,o),i=Ir(s.year,0,s.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}te("Q",0,"Qo","quarter"),Q("Q",Id),Ee("Q",function(e,n){n[Qt]=(ye(e)-1)*3});function mv(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}te("D",["DD",2],"Do","date"),Q("D",Oe,tr),Q("DD",Oe,dt),Q("Do",function(e,n){return e?n._dayOfMonthOrdinalParse||n._ordinalParse:n._dayOfMonthOrdinalParseLenient}),Ee(["D","DD"],Lt),Ee("Do",function(e,n){n[Lt]=ye(e.match(Oe)[0])});var bf=nr("Date",!0);te("DDD",["DDDD",3],"DDDo","dayOfYear"),Q("DDD",Ba),Q("DDDD",Ad),Ee(["DDD","DDDD"],function(e,n,r){r._dayOfYear=ye(e)});function hv(e){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?n:this.add(e-n,"d")}te("m",["mm",2],0,"minute"),Q("m",Oe,Rs),Q("mm",Oe,dt),Ee(["m","mm"],Ot);var gv=nr("Minutes",!1);te("s",["ss",2],0,"second"),Q("s",Oe,Rs),Q("ss",Oe,dt),Ee(["s","ss"],en);var yv=nr("Seconds",!1);te("S",0,0,function(){return~~(this.millisecond()/100)}),te(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),te(0,["SSS",3],0,"millisecond"),te(0,["SSSS",4],0,function(){return this.millisecond()*10}),te(0,["SSSSS",5],0,function(){return this.millisecond()*100}),te(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),te(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),te(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),te(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Q("S",Ba,Id),Q("SS",Ba,dt),Q("SSS",Ba,Ad);var gn,wf;for(gn="SSSS";gn.length<=9;gn+="S")Q(gn,er);function bv(e,n){n[Pn]=ye(("0."+e)*1e3)}for(gn="S";gn.length<=9;gn+="S")Ee(gn,bv);wf=nr("Milliseconds",!1),te("z",0,0,"zoneAbbr"),te("zz",0,0,"zoneName");function wv(){return this._isUTC?"UTC":""}function _v(){return this._isUTC?"Coordinated Universal Time":""}var H=Nr.prototype;H.add=uC,H.calendar=wC,H.clone=_C,H.diff=TC,H.endOf=AC,H.format=NC,H.from=PC,H.fromNow=$C,H.to=BC,H.toNow=VC,H.get=xS,H.invalidAt=UC,H.isAfter=kC,H.isBefore=SC,H.isBetween=CC,H.isSame=vC,H.isSameOrAfter=EC,H.isSameOrBefore=MC,H.isValid=WC,H.lang=uf,H.locale=ff,H.localeData=pf,H.max=W2,H.min=j2,H.parsingFlags=HC,H.set=NS,H.startOf=IC,H.subtract=pC,H.toArray=YC,H.toObject=zC,H.toDate=LC,H.toISOString=OC,H.inspect=xC,typeof Symbol<"u"&&Symbol.for!=null&&(H[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),H.toJSON=jC,H.toString=DC,H.unix=FC,H.valueOf=RC,H.creationData=qC,H.eraName=JC,H.eraNarrow=XC,H.eraAbbr=QC,H.eraYear=ev,H.year=Ld,H.isLeapYear=OS,H.weekYear=iv,H.isoWeekYear=lv,H.quarter=H.quarters=mv,H.month=Hd,H.daysInMonth=LS,H.week=H.weeks=GS,H.isoWeek=H.isoWeeks=KS,H.weeksInYear=fv,H.weeksInWeekYear=uv,H.isoWeeksInYear=cv,H.isoWeeksInISOWeekYear=dv,H.date=bf,H.day=H.days=l2,H.weekday=c2,H.isoWeekday=d2,H.dayOfYear=hv,H.hour=H.hours=y2,H.minute=H.minutes=gv,H.second=H.seconds=yv,H.millisecond=H.milliseconds=wf,H.utcOffset=Q2,H.utc=tC,H.local=nC,H.parseZone=rC,H.hasAlignedHourOffset=aC,H.isDST=oC,H.isLocal=iC,H.isUtcOffset=lC,H.isUtc=of,H.isUTC=of,H.zoneAbbr=wv,H.zoneName=_v,H.dates=gt("dates accessor is deprecated. Use date instead.",bf),H.months=gt("months accessor is deprecated. Use month instead",Hd),H.years=gt("years accessor is deprecated. Use year instead",Ld),H.zone=gt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",eC),H.isDSTShifted=gt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",sC);function kv(e){return xe(e*1e3)}function Sv(){return xe.apply(null,arguments).parseZone()}function _f(e){return e}var Se=Ns.prototype;Se.calendar=iS,Se.longDateFormat=fS,Se.invalidDate=pS,Se.ordinal=gS,Se.preparse=_f,Se.postformat=_f,Se.relativeTime=bS,Se.pastFuture=wS,Se.set=oS,Se.eras=GC,Se.erasParse=KC,Se.erasConvertYear=ZC,Se.erasAbbrRegex=nv,Se.erasNameRegex=tv,Se.erasNarrowRegex=rv,Se.months=IS,Se.monthsShort=AS,Se.monthsParse=FS,Se.monthsRegex=zS,Se.monthsShortRegex=YS,Se.week=WS,Se.firstDayOfYear=qS,Se.firstDayOfWeek=US,Se.weekdays=r2,Se.weekdaysMin=o2,Se.weekdaysShort=a2,Se.weekdaysParse=i2,Se.weekdaysRegex=f2,Se.weekdaysShortRegex=u2,Se.weekdaysMinRegex=p2,Se.isPM=h2,Se.meridiem=b2;function Ka(e,n,r,a){var o=nn(),s=At().set(a,n);return o[r](s,e)}function kf(e,n,r){if(Jt(e)&&(n=e,e=void 0),e=e||"",n!=null)return Ka(e,n,r,"month");var a,o=[];for(a=0;a<12;a++)o[a]=Ka(e,a,r,"month");return o}function ti(e,n,r,a){typeof e=="boolean"?(Jt(n)&&(r=n,n=void 0),n=n||""):(n=e,r=n,e=!1,Jt(n)&&(r=n,n=void 0),n=n||"");var o=nn(),s=e?o._week.dow:0,i,l=[];if(r!=null)return Ka(n,(r+s)%7,a,"day");for(i=0;i<7;i++)l[i]=Ka(n,(i+s)%7,a,"day");return l}function Cv(e,n){return kf(e,n,"months")}function vv(e,n){return kf(e,n,"monthsShort")}function Ev(e,n,r){return ti(e,n,r,"weekdays")}function Mv(e,n,r){return ti(e,n,r,"weekdaysShort")}function Tv(e,n,r){return ti(e,n,r,"weekdaysMin")}hn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var n=e%10,r=ye(e%100/10)===1?"th":n===1?"st":n===2?"nd":n===3?"rd":"th";return e+r}}),Z.lang=gt("moment.lang is deprecated. Use moment.locale instead.",hn),Z.langData=gt("moment.langData is deprecated. Use moment.localeData instead.",nn);var rn=Math.abs;function Dv(){var e=this._data;return this._milliseconds=rn(this._milliseconds),this._days=rn(this._days),this._months=rn(this._months),e.milliseconds=rn(e.milliseconds),e.seconds=rn(e.seconds),e.minutes=rn(e.minutes),e.hours=rn(e.hours),e.months=rn(e.months),e.years=rn(e.years),this}function Sf(e,n,r,a){var o=xt(n,r);return e._milliseconds+=a*o._milliseconds,e._days+=a*o._days,e._months+=a*o._months,e._bubble()}function Ov(e,n){return Sf(this,e,n,1)}function xv(e,n){return Sf(this,e,n,-1)}function Cf(e){return e<0?Math.floor(e):Math.ceil(e)}function Nv(){var e=this._milliseconds,n=this._days,r=this._months,a=this._data,o,s,i,l,c;return e>=0&&n>=0&&r>=0||e<=0&&n<=0&&r<=0||(e+=Cf(ni(r)+n)*864e5,n=0,r=0),a.milliseconds=e%1e3,o=bt(e/1e3),a.seconds=o%60,s=bt(o/60),a.minutes=s%60,i=bt(s/60),a.hours=i%24,n+=bt(i/24),c=bt(vf(n)),r+=c,n-=Cf(ni(c)),l=bt(r/12),r%=12,a.days=n,a.months=r,a.years=l,this}function vf(e){return e*4800/146097}function ni(e){return e*146097/4800}function Pv(e){if(!this.isValid())return NaN;var n,r,a=this._milliseconds;if(e=yt(e),e==="month"||e==="quarter"||e==="year")switch(n=this._days+a/864e5,r=this._months+vf(n),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(n=this._days+Math.round(ni(this._months)),e){case"week":return n/7+a/6048e5;case"day":return n+a/864e5;case"hour":return n*24+a/36e5;case"minute":return n*1440+a/6e4;case"second":return n*86400+a/1e3;case"millisecond":return Math.floor(n*864e5)+a;default:throw new Error("Unknown unit "+e)}}function an(e){return function(){return this.as(e)}}var Ef=an("ms"),$v=an("s"),Bv=an("m"),Vv=an("h"),Iv=an("d"),Av=an("w"),Rv=an("M"),Fv=an("Q"),Lv=an("y"),Yv=Ef;function zv(){return xt(this)}function jv(e){return e=yt(e),this.isValid()?this[e+"s"]():NaN}function Bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Wv=Bn("milliseconds"),Hv=Bn("seconds"),Uv=Bn("minutes"),qv=Bn("hours"),Gv=Bn("days"),Kv=Bn("months"),Zv=Bn("years");function Jv(){return bt(this.days()/7)}var on=Math.round,sr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xv(e,n,r,a,o){return o.relativeTime(n||1,!!r,e,a)}function Qv(e,n,r,a){var o=xt(e).abs(),s=on(o.as("s")),i=on(o.as("m")),l=on(o.as("h")),c=on(o.as("d")),d=on(o.as("M")),u=on(o.as("w")),f=on(o.as("y")),p=s<=r.ss&&["s",s]||s<r.s&&["ss",s]||i<=1&&["m"]||i<r.m&&["mm",i]||l<=1&&["h"]||l<r.h&&["hh",l]||c<=1&&["d"]||c<r.d&&["dd",c];return r.w!=null&&(p=p||u<=1&&["w"]||u<r.w&&["ww",u]),p=p||d<=1&&["M"]||d<r.M&&["MM",d]||f<=1&&["y"]||["yy",f],p[2]=n,p[3]=+e>0,p[4]=a,Xv.apply(null,p)}function eE(e){return e===void 0?on:typeof e=="function"?(on=e,!0):!1}function tE(e,n){return sr[e]===void 0?!1:n===void 0?sr[e]:(sr[e]=n,e==="s"&&(sr.ss=n-1),!0)}function nE(e,n){if(!this.isValid())return this.localeData().invalidDate();var r=!1,a=sr,o,s;return typeof e=="object"&&(n=e,e=!1),typeof e=="boolean"&&(r=e),typeof n=="object"&&(a=Object.assign({},sr,n),n.s!=null&&n.ss==null&&(a.ss=n.s-1)),o=this.localeData(),s=Qv(this,!r,a,o),r&&(s=o.pastFuture(+this,s)),o.postformat(s)}var ri=Math.abs;function ir(e){return(e>0)-(e<0)||+e}function Za(){if(!this.isValid())return this.localeData().invalidDate();var e=ri(this._milliseconds)/1e3,n=ri(this._days),r=ri(this._months),a,o,s,i,l=this.asSeconds(),c,d,u,f;return l?(a=bt(e/60),o=bt(a/60),e%=60,a%=60,s=bt(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=l<0?"-":"",d=ir(this._months)!==ir(l)?"-":"",u=ir(this._days)!==ir(l)?"-":"",f=ir(this._milliseconds)!==ir(l)?"-":"",c+"P"+(s?d+s+"Y":"")+(r?d+r+"M":"")+(n?u+n+"D":"")+(o||a||e?"T":"")+(o?f+o+"H":"")+(a?f+a+"M":"")+(e?f+i+"S":"")):"P0D"}var we=ja.prototype;we.isValid=K2,we.abs=Dv,we.add=Ov,we.subtract=xv,we.as=Pv,we.asMilliseconds=Ef,we.asSeconds=$v,we.asMinutes=Bv,we.asHours=Vv,we.asDays=Iv,we.asWeeks=Av,we.asMonths=Rv,we.asQuarters=Fv,we.asYears=Lv,we.valueOf=Yv,we._bubble=Nv,we.clone=zv,we.get=jv,we.milliseconds=Wv,we.seconds=Hv,we.minutes=Uv,we.hours=qv,we.days=Gv,we.weeks=Jv,we.months=Kv,we.years=Zv,we.humanize=nE,we.toISOString=Za,we.toString=Za,we.toJSON=Za,we.locale=ff,we.localeData=pf,we.toIsoString=gt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Za),we.lang=uf,te("X",0,0,"unix"),te("x",0,0,"valueOf"),Q("x",Ia),Q("X",CS),Ee("X",function(e,n,r){r._d=new Date(parseFloat(e)*1e3)}),Ee("x",function(e,n,r){r._d=new Date(ye(e))});//! moment.js
|
|
40
|
-
Z.version="2.30.1",rS(xe),Z.fn=H,Z.min=H2,Z.max=U2,Z.now=q2,Z.utc=At,Z.unix=kv,Z.months=Cv,Z.isDate=xr,Z.locale=hn,Z.invalid=xa,Z.duration=xt,Z.isMoment=Dt,Z.weekdays=Ev,Z.parseZone=Sv,Z.localeData=nn,Z.isDuration=Wa,Z.monthsShort=vv,Z.weekdaysMin=Tv,Z.defineLocale=Ws,Z.updateLocale=S2,Z.locales=C2,Z.weekdaysShort=Mv,Z.normalizeUnits=yt,Z.relativeTimeRounding=eE,Z.relativeTimeThreshold=tE,Z.calendarFormat=bC,Z.prototype=H,Z.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const yn="--",Mf="YYYY-MM-DDTHH:mm:ss",rE="YYYY-MM-DDT23:59:59",aE="YYYY-MM-DD",ai=(e,n=aE)=>e?Z(e).format(n).replace("Invalid date",yn):yn,oE=e=>typeof e=="number"?!0:typeof e=="string"?!isNaN(parseFloat(e)):!1;function sE(e){const n=["角","分"],r=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],a=[["元","万","亿"],["","拾","佰","仟"]],o=e<0?"负":"";e=Math.abs(e);let s="";for(let i=0;i<n.length;i++)s+=(r[Math.floor(e*10*Math.pow(10,i))%10]+n[i]).replace(/零./,"");s=s||"整",e=Math.floor(e);for(let i=0;i<a[0].length&&e>0;i++){let l="";for(let c=0;c<a[1].length&&e>0;c++)l=r[e%10]+a[1][c]+l,e=Math.floor(e/10);s=l.replace(/(零.)*零$/,"").replace(/^$/,"零")+a[0][i]+s}return o+s.replace(/(零.)*零元/,"元").replace(/(零.)+/g,"零").replace(/^整$/,"零元整")}const Tf=He(t.defineComponent({name:"zh-date-icker",__name:"DatePicker",props:{style:{},class:{},modelValue:{}},emits:["update:modelValue","change"],setup(e,{emit:n}){const r=e,a=n,o=l=>Array.isArray(l)?[ai(l[0],Mf),ai(l[1],rE)]:l&&ai(l,Mf),s=l=>{const c=o(l);a("update:modelValue",c)},i=l=>{const c=o(l);a("change",c)};return(l,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([r.class,"zh-date-picker"])},[t.createVNode(t.unref(Bk),t.mergeProps(l.$attrs,{style:r.style,"model-value":r.modelValue,"onUpdate:modelValue":s,onChange:i}),null,16,["style","model-value"])],2))}})),iE={class:"info-pair"},lE={class:"info-pair--title"},cE={key:0,class:"info-pair--title--tip"},Df=He(t.defineComponent({name:"zh-detail-sub-title",__name:"DetailSubTitle",props:{title:{},value:{},ellipsis:{type:Boolean},tip:{}},setup(e){const n=e;return(r,a)=>(t.openBlock(),t.createElementBlock("div",iE,[t.createElementVNode("div",lE,[t.createTextVNode(t.toDisplayString(n.title)+" ",1),r.tip?(t.openBlock(),t.createElementBlock("div",cE,t.toDisplayString(r.tip),1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",{class:t.normalizeClass(["info-pair--value",{ellipsis:r.ellipsis}])},[t.renderSlot(r.$slots,"value",{},()=>[t.createTextVNode(t.toDisplayString(n.value||t.unref(yn)),1)])],2)]))}})),dE={class:"dialog-wrap"},fE={class:"title"},uE={key:0,class:"subtitle"},pE={class:"dialog-footer"},Of=at(t.defineComponent({name:"zh-dialog",__name:"Dialog",props:t.mergeModels({title:{},subtitle:{},submitText:{},submitDisabled:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:t.mergeModels(["close","submit"],["update:modelValue"]),setup(e,{emit:n}){const r=n,a=t.useModel(e,"modelValue"),o=async()=>{r("submit")},s=()=>{r("close")};return(i,l)=>(t.openBlock(),t.createElementBlock("div",dE,[t.createVNode(t.unref(Zk),t.mergeProps({modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c)},i.$attrs,{"close-on-click-modal":i.$attrs.closeOnClickModal??!1,"show-close":i.$attrs.showClose??!0}),{header:t.withCtx(()=>[t.createElementVNode("div",fE,t.toDisplayString(i.title),1),i.subtitle?(t.openBlock(),t.createElementBlock("div",uE,t.toDisplayString(i.subtitle),1)):t.createCommentVNode("",!0)]),footer:t.withCtx(()=>[t.createElementVNode("div",pE,[t.createVNode(t.unref(Zn),{plain:"",onClick:s},{default:t.withCtx(()=>l[1]||(l[1]=[t.createTextVNode("取消")])),_:1}),t.createVNode(t.unref(Zn),{type:"primary",color:"#1966FF",onClick:o,disabled:i.submitDisabled},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.submitText||"提交"),1)]),_:1},8,["disabled"])])]),default:t.withCtx(()=>[t.renderSlot(i.$slots,"default",{},void 0,!0)]),_:3},16,["modelValue","close-on-click-modal","show-close"])]))}}),[["__scopeId","data-v-f26f266e"]]),xf=He(Of),mE={class:"info-pair"},hE={class:"info-pair--title"},gE={key:0,class:"info-pair--title--tip"},Nf=He(at(t.defineComponent({name:"zh-edit-info-pair",__name:"EditInfoPair",props:{title:{},value:{},ellipsis:{type:Boolean},tip:{}},setup(e){const n=e;return(r,a)=>(t.openBlock(),t.createElementBlock("div",mE,[t.createElementVNode("div",hE,[t.createTextVNode(t.toDisplayString(n.title)+" ",1),r.tip?(t.openBlock(),t.createElementBlock("div",gE,t.toDisplayString(r.tip),1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",{class:t.normalizeClass(["info-pair--value",{ellipsis:r.ellipsis}])},[t.renderSlot(r.$slots,"value",{},()=>[t.createTextVNode(t.toDisplayString(n.value||t.unref(yn)),1)],!0)],2)]))}}),[["__scopeId","data-v-8ed96c83"]])),yE={class:"file_wrapper"},bE={key:0,class:"header"},wE={class:"file_main"},_E={class:"file"},kE={class:"file_name"},Pf=He(at(t.defineComponent({name:"zh-file-wrapper",__name:"FileWrapper",props:{downLoadUrl:{type:String,default:""},canPreview:{type:Boolean,default:!1},fileName:{type:String,default:yn},canDelete:{type:Boolean,default:!1},title:{type:String,default:""},fileId:{type:Number,default:0}},emits:["deleteFile"],setup(e,{emit:n}){const r=e,a=n,o=()=>{r.canDelete&&a("deleteFile",r.fileId)};return(s,i)=>(t.openBlock(),t.createElementBlock("div",yE,[r.title?(t.openBlock(),t.createElementBlock("div",bE,t.toDisplayString(r.title),1)):t.createCommentVNode("",!0),t.createElementVNode("div",wE,[t.createElementVNode("div",_E,[i[0]||(i[0]=t.createElementVNode("div",{class:"file_type mr-12"},[t.createElementVNode("i",{class:"iconfont icon-xiangmuguanli"})],-1)),t.createElementVNode("div",kE,t.toDisplayString(r.fileName),1)]),t.createVNode(t.unref(nS),{size:"small",class:"btn",link:"",style:{width:"80px"},href:r.downLoadUrl,underline:!1,download:"download"},{default:t.withCtx(()=>i[1]||(i[1]=[t.createTextVNode(" 查看/下载 ")])),_:1},8,["href"]),e.canDelete?(t.openBlock(),t.createElementBlock("i",{key:0,class:"iconfont icon-close close",onClick:o})):t.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-480bb0e6"]])),$f=He(t.defineComponent({name:"zh-grid",__name:"Grid",props:{cols:{default:()=>({xs:1,sm:2,md:2,lg:4,xl:4})},collapsed:{type:Boolean,default:!1},collapsedRows:{default:1},gap:{default:10}},setup(e,{expose:n}){const r=e;t.onBeforeMount(()=>r.collapsed&&c()),t.onMounted(()=>{a({target:{innerWidth:window.innerWidth}}),window.addEventListener("resize",a)}),t.onActivated(()=>{a({target:{innerWidth:window.innerWidth}}),window.addEventListener("resize",a)}),t.onUnmounted(()=>{window.removeEventListener("resize",a)}),t.onDeactivated(()=>{window.removeEventListener("resize",a)});const a=f=>{let p=f.target.innerWidth;switch(!!p){case p<768:o.value="xs";break;case(p>=768&&p<992):o.value="sm";break;case(p>=992&&p<1200):o.value="md";break;case(p>=1200&&p<1920):o.value="lg";break;case p>=1920:o.value="xl";break}};t.provide("gap",Array.isArray(r.gap)?r.gap[0]:r.gap);let o=t.ref("xl");t.provide("breakPoint",o);const s=t.ref(-1);t.provide("shouldHiddenIndex",s);const i=t.computed(()=>typeof r.cols=="object"?r.cols[o.value]??r.cols:r.cols);t.provide("cols",i);const l=t.useSlots().default(),c=()=>{var m,h,w,y;let f=[],p=null;l.forEach(k=>{var C;typeof k.type=="object"&&k.type.name==="GridItem"&&((C=k.props)==null?void 0:C.suffix)!==void 0&&(p=k),typeof k.type=="symbol"&&Array.isArray(k.children)&&f.push(...k.children)});let g=0;p&&(g=(((m=p.props[o.value])==null?void 0:m.span)??((h=p.props)==null?void 0:h.span)??1)+(((w=p.props[o.value])==null?void 0:w.offset)??((y=p.props)==null?void 0:y.offset)??0));try{let k=!1;f.reduce((C=0,b,_)=>{var v,M,D,B;if(C+=(((v=b.props[o.value])==null?void 0:v.span)??((M=b.props)==null?void 0:M.span)??1)+(((D=b.props[o.value])==null?void 0:D.offset)??((B=b.props)==null?void 0:B.offset)??0),Number(C)>r.collapsedRows*i.value-g)throw s.value=_,k=!0,"find it";return C},0),k||(s.value=-1)}catch{}};t.watch(()=>o.value,()=>{r.collapsed&&c()}),t.watch(()=>r.collapsed,f=>{if(f)return c();s.value=-1});const d=t.computed(()=>typeof r.gap=="number"?`${r.gap}px`:Array.isArray(r.gap)?`${r.gap[1]}px ${r.gap[0]}px`:"unset"),u=t.computed(()=>({display:"grid",gridGap:d.value,gridTemplateColumns:`repeat(${i.value}, minmax(0, 1fr))`}));return n({breakPoint:o}),(f,p)=>(t.openBlock(),t.createElementBlock("div",{style:t.normalizeStyle(u.value)},[t.renderSlot(f.$slots,"default")],4))}})),SE={class:"info-pair"},CE={class:"info-pair--title"},vE={key:0,class:"info-pair--title--tip"},Bf=He(at(t.defineComponent({name:"zh-info-pair",__name:"InfoPair",props:{title:{},value:{},ellipsis:{type:Boolean},tip:{}},setup(e){const n=e;return(r,a)=>(t.openBlock(),t.createElementBlock("div",SE,[t.createElementVNode("div",CE,[t.createTextVNode(t.toDisplayString(n.title)+" ",1),r.tip?(t.openBlock(),t.createElementBlock("div",vE,t.toDisplayString(r.tip),1)):t.createCommentVNode("",!0)]),t.createElementVNode("div",{class:t.normalizeClass(["info-pair--value",{ellipsis:r.ellipsis}])},[t.renderSlot(r.$slots,"value",{},()=>[t.createTextVNode(t.toDisplayString(n.value||t.unref(yn)),1)],!0)],2)]))}}),[["__scopeId","data-v-7c46e10e"]])),Vf=He(at(t.defineComponent({name:"zh-input",__name:"Input",props:t.mergeModels({style:{},class:{default:"zh-default-input"},size:{default:"default"},className:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const n=t.useAttrs(),r=e,a=t.useModel(e,"modelValue"),o=()=>{(n.max||Number(n.max)===0)&&Number(a.value)>=n.max&&(a.value=n.max.toString()),(n.min||Number(n.min)===0)&&Number(a.value)<=n.min&&(a.value=n.min.toString())};return(s,i)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(r.class)},[t.createVNode(t.unref(It),t.mergeProps(s.$attrs,{modelValue:a.value,"onUpdate:modelValue":i[0]||(i[0]=l=>a.value=l),size:s.size,onBlur:o}),t.createSlots({_:2},[t.renderList(s.$slots,(l,c)=>({name:l,fn:t.withCtx(d=>[t.renderSlot(s.$slots,l,t.normalizeProps(t.guardReactiveProps(d)),void 0,!0)])}))]),1040,["modelValue","size"])],2))}}),[["__scopeId","data-v-75a9ec9f"]])),If=at(t.defineComponent({name:"zh-input-number",__name:"InputNumber",props:{style:{},class:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:n}){const r=e,a=n,o=t.useAttrs(),s=(d,u=0,f=0,p=0)=>{let g=(d==null?void 0:d.toString())??"",m,h,w;return f===0?(g=g.replace(/[^\d]/g,""),g=g.replace(/^0\d+/g,"0"),u!==0&&(g=g.slice(0,u))):(g=g.replace(/[^\-\d.]/g,""),g=g.replace(/^[^\-\d]/g,""),g=g.replace(/\.{2}/g,"."),g=g.replace(/^0(\d+)/g,"$1"),m=g.split(".")||[],m.length>1?(u===0?h=m[0]:h=m[0].slice(0,u),w=m[1].slice(0,f),g=h+"."+w):u!==0&&(g=g.slice(0,u))),p!==0&&(g=g.slice(0,p)),g},i=()=>{r.modelValue===""||r.modelValue===void 0||(o.max&&Number(r.modelValue)>o.max&&a("update:modelValue",o.max.toString()),o.min&&Number(r.modelValue)<o.min&&a("update:modelValue",o.min.toString()))},l=d=>d?s(d,o.integer,o.precision,o.maxLength):"",c=d=>{/^\d+\.0*$/.test((d==null?void 0:d.toString())||"")||d===""?a("update:modelValue",l(d)):a("update:modelValue",Number(l(d)))};return(d,u)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["input-number",r.class]),style:t.normalizeStyle(r.style)},[t.createVNode(t.unref(It),t.mergeProps(d.$attrs,{"model-value":r.modelValue,"onUpdate:modelValue":c,onBlur:i,style:{width:"100%"},formatter:l}),t.createSlots({_:2},[t.renderList(Object.keys(d.$slots),f=>({name:f,fn:t.withCtx(p=>[t.renderSlot(d.$slots,f,t.normalizeProps(t.guardReactiveProps(p)),void 0,!0)])}))]),1040,["model-value"])],6))}}),[["__scopeId","data-v-32d536a9"]]),Af=He(If),EE={class:"loading-box"},Rf=He(at(t.defineComponent({name:"zh-loading",__name:"Loading",setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",EE,r[0]||(r[0]=[t.createElementVNode("div",{class:"loading-wrap"},[t.createElementVNode("span",{class:"dot dot-spin"},[t.createElementVNode("i"),t.createElementVNode("i"),t.createElementVNode("i"),t.createElementVNode("i")])],-1)])))}}),[["__scopeId","data-v-bcc04aa5"]])),ME={key:0,class:"tips"},Ff=He(at(t.defineComponent({name:"zh-message-box",__name:"MessageBox",props:t.mergeModels({title:{},subtitle:{},tip:{},placeholder:{},formItemProps:{},formProps:{},inputProps:{},closeOnClickModal:{type:Boolean},callBack:{type:Function},onAction:{type:Function},onVanish:{type:Function},submitText:{},render:{type:Function},maxlength:{},renderProps:{}},{visible:{type:Boolean,default:!0},visibleModifiers:{}}),emits:t.mergeModels(["action","vanish"],["update:visible"]),setup(e,{emit:n}){const r=e,a=n,o=t.useModel(e,"visible"),s=t.ref(),i=t.ref({textarea:""}),l=(f,p,g)=>{p||g(r.placeholder),g()},c=t.ref({textarea:[{validator:l,trigger:["blur","change"]}]}),d=async()=>{var f;r.placeholder?(f=s.value)==null||f.validate(async p=>{if(p)try{if(r.callBack){const g=await r.callBack(i.value.textarea);console.log(g)}a("action","submit"),o.value=!1}catch(g){console.log(g)}}):(a("action","submit"),o.value=!1)},u=()=>{a("action","cancel"),o.value=!1};return(f,p)=>(t.openBlock(),t.createBlock(Of,t.mergeProps({modelValue:o.value,"onUpdate:modelValue":p[1]||(p[1]=g=>o.value=g),width:"544"},r,{onSubmit:d,onClose:u}),{default:t.withCtx(()=>[f.tip?(t.openBlock(),t.createElementBlock("div",ME,t.toDisplayString(f.tip),1)):t.createCommentVNode("",!0),f.render?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(f.render),t.normalizeProps(t.mergeProps({key:1},r.renderProps)),null,16)):f.placeholder?(t.openBlock(),t.createBlock(t.unref(Aw),t.mergeProps({key:2,ref_key:"formRef",ref:s,model:i.value,rules:c.value},r.formProps),{default:t.withCtx(()=>[t.createVNode(t.unref(Rw),t.mergeProps({prop:"textarea"},r.formItemProps),{default:t.withCtx(()=>[t.createVNode(t.unref(It),t.mergeProps({modelValue:i.value.textarea,"onUpdate:modelValue":p[0]||(p[0]=g=>i.value.textarea=g),style:{width:"100%"},rows:4,type:"textarea",placeholder:f.placeholder,maxlength:r.maxlength||100,"show-word-limit":""},f.inputProps),null,16,["modelValue","placeholder","maxlength"])]),_:1},16)]),_:1},16,["model","rules"])):t.createCommentVNode("",!0)]),_:1},16,["modelValue"]))}}),[["__scopeId","data-v-1903b5ef"]])),Lf=He(at(t.defineComponent({name:"zh-money-input",__name:"MoneyInput",props:t.mergeModels({style:{},class:{},showTooltip:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:t.mergeModels(["update:modelValue"],["update:modelValue"]),setup(e,{emit:n}){const r=e,a=t.useModel(e,"modelValue"),o=t.computed(()=>{if(a.value)return oE(a.value)&&Number(a.value)>=1e3?sE(Number(a.value)):""}),s=t.ref(!1);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(as),{effect:"dark",content:o.value,placement:"top",visible:i.showTooltip&&s.value&&!!o.value},{default:t.withCtx(()=>[t.createVNode(If,t.mergeProps(i.$attrs,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c),style:r.style,class:r.class,onFocus:l[1]||(l[1]=()=>s.value=!0),onBlur:l[2]||(l[2]=()=>s.value=!1)}),t.createSlots({_:2},[t.renderList(Object.keys(i.$slots),c=>({name:c,fn:t.withCtx(d=>[t.renderSlot(i.$slots,c,t.normalizeProps(t.guardReactiveProps(d)),void 0,!0)])}))]),1040,["modelValue","style","class"])]),_:3},8,["content","visible"]))}}),[["__scopeId","data-v-d97e0edf"]])),TE={class:"page-head"},DE={class:"left-wrap"},OE={class:"page-name"},xE={class:"value"},NE={class:"other-inform"},PE={class:"label"},$E={class:"value mg-r-24"},BE={class:"status"},Yf=He(at(t.defineComponent({name:"zh-page-head-panel",__name:"PageHeadPanel",props:{dataSource:{}},setup(e){const n=e,{name:r,no:a,status:o,extendLabel:s,extendValue:i}=t.toRefs(n.dataSource);return(l,c)=>(t.openBlock(),t.createElementBlock("div",TE,[t.createElementVNode("div",DE,[t.createElementVNode("span",OE,t.toDisplayString(t.unref(r)),1),t.createElementVNode("div",null,[c[0]||(c[0]=t.createElementVNode("span",{class:"label mg-l-16"},"编号",-1)),t.createElementVNode("span",xE,t.toDisplayString(t.unref(a)),1)])]),t.createElementVNode("div",NE,[t.renderSlot(l.$slots,"extend",{},()=>[t.createElementVNode("span",PE,t.toDisplayString(t.unref(s)),1),t.createElementVNode("span",$E,t.toDisplayString(t.unref(i)),1)],!0),t.createElementVNode("span",BE,t.toDisplayString(t.unref(o)),1)])]))}}),[["__scopeId","data-v-cecdddb2"]])),zf=He(at(t.defineComponent({name:"zh-tool-tips",__name:"ToolTips",props:{placement:{type:String,default:"top"},content:{type:String,default:"top"}},setup(e){const n=e;return(r,a)=>(t.openBlock(),t.createBlock(t.unref(as),{class:"box-item",effect:"dark",content:n.content,placement:n.placement},{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default",{},()=>[a[0]||(a[0]=t.createElementVNode("i",{class:"iconfont icon-Frame2"},null,-1))],!0)]),_:3},8,["content","placement"]))}}),[["__scopeId","data-v-93c79d22"]])),jf=He(t.defineComponent({name:"ZhBaseInfo",__name:"BaseInfo",props:{contentWidth:{default:void 0},labelWidth:{default:"70px"},infoDirection:{default:"vertical"},cols:{default:5},gap:{default:16}},setup(e){const n=e,r=t.ref(),a=t.ref(),o=t.ref();t.provide("infoLabelWidth",r),t.provide("infoContentWidth",a),t.provide("infoDirection",o);function s(){r.value=n.labelWidth}function i(){a.value=n.contentWidth}function l(){o.value=n.infoDirection}return t.watch(()=>n.contentWidth,()=>i(),{immediate:!0}),t.watch(()=>n.labelWidth,()=>s(),{immediate:!0}),t.watch(()=>n.infoDirection,()=>l(),{immediate:!0}),(c,d)=>{const u=t.resolveComponent("grid");return t.openBlock(),t.createBlock(u,{cols:c.cols,gap:c.gap},{default:t.withCtx(()=>[t.renderSlot(c.$slots,"default")]),_:3},8,["cols","gap"])}}})),VE={class:"common-card"},IE={class:"detail-header"},AE={class:"detail-header--left"},RE={class:"title common-title"},FE={class:"info-pair--label"},LE={class:"info-pair--value"},YE={key:1,class:"detail-header--right"},zE={class:"info-pair--label"},jE={class:"info-pair--value"},Wf=He(at(t.defineComponent({name:"ZhDetailHeader",__name:"DetailHeader",props:{title:{},leftInfos:{},rightInfos:{},stateMeta:{}},setup(e){const n=t.useSlots(),r=e;return(a,o)=>{var s,i;return t.openBlock(),t.createElementBlock("div",VE,[t.createElementVNode("div",null,[t.renderSlot(a.$slots,"menu",{},void 0,!0)]),t.createElementVNode("div",IE,[t.createElementVNode("div",AE,[t.createElementVNode("div",RE,t.toDisplayString(r.title),1),t.renderSlot(a.$slots,"extra-info",{},void 0,!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.leftInfos,l=>(t.openBlock(),t.createElementBlock("div",{class:"info-pair",key:l.value},[t.createElementVNode("div",FE,t.toDisplayString(l.label),1),t.createElementVNode("div",LE,t.toDisplayString(l.value??t.unref(yn)),1)]))),128))]),t.renderSlot(a.$slots,"default",{},void 0,!0),t.unref(n)["right-infos"]?t.renderSlot(a.$slots,"right-infos",{key:0},void 0,!0):(t.openBlock(),t.createElementBlock("div",YE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.rightInfos,l=>(t.openBlock(),t.createElementBlock("div",{class:"info-pair",key:l.value},[t.createElementVNode("div",zE,t.toDisplayString(l.label),1),t.createElementVNode("div",jE,t.toDisplayString(l.value??t.unref(yn)),1)]))),128)),a.stateMeta?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["state common-title",(s=a.stateMeta)==null?void 0:s.state])},t.toDisplayString((i=a.stateMeta)==null?void 0:i.intro),3)):t.createCommentVNode("",!0)]))])])}}}),[["__scopeId","data-v-8830340b"]])),WE=jg([jf,dl,Tf,Wf,Df,xf,Nf,Pf,$f,Bf,Vf,Af,Rf,Ff,Lf,Yf,zf]);pe.ZhBaseInfo=jf,pe.ZhButton=dl,pe.ZhDatePicker=Tf,pe.ZhDetailHeader=Wf,pe.ZhDetailSubTitle=Df,pe.ZhDialog=xf,pe.ZhEditInfoPair=Nf,pe.ZhFileWrapper=Pf,pe.ZhGrid=$f,pe.ZhInfoPair=Bf,pe.ZhInput=Vf,pe.ZhInputNumber=Af,pe.ZhLoading=Rf,pe.ZhMessageBox=Ff,pe.ZhMoneyInput=Lf,pe.ZhPageHeadPanel=Yf,pe.ZhToolTips=zf,pe.default=WE,Object.defineProperties(pe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
36
|
+
var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}function setHookCallback(t){hookCallback=t}function isArray(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function isObject(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function hasOwnProp(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function isObjectEmpty(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var e;for(e in t)if(hasOwnProp(t,e))return!1;return!0}function isUndefined(t){return t===void 0}function isNumber(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function isDate(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function map(t,e){var n=[],r,i=t.length;for(r=0;r<i;++r)n.push(e(t[r],r));return n}function extend$3(t,e){for(var n in e)hasOwnProp(e,n)&&(t[n]=e[n]);return hasOwnProp(e,"toString")&&(t.toString=e.toString),hasOwnProp(e,"valueOf")&&(t.valueOf=e.valueOf),t}function createUTC(t,e,n,r){return createLocalOrUTC(t,e,n,r,!0).utc()}function defaultParsingFlags(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function getParsingFlags(t){return t._pf==null&&(t._pf=defaultParsingFlags()),t._pf}var some;Array.prototype.some?some=Array.prototype.some:some=function(t){var e=Object(this),n=e.length>>>0,r;for(r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};function isValid(t){var e=null,n=!1,r=t._d&&!isNaN(t._d.getTime());if(r&&(e=getParsingFlags(t),n=some.call(e.parsedDateParts,function(i){return i!=null}),r=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n),t._strict&&(r=r&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(t))t._isValid=r;else return r;return t._isValid}function createInvalid(t){var e=createUTC(NaN);return t!=null?extend$3(getParsingFlags(e),t):getParsingFlags(e).userInvalidated=!0,e}var momentProperties=hooks.momentProperties=[],updateInProgress=!1;function copyConfig(t,e){var n,r,i,s=momentProperties.length;if(isUndefined(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),isUndefined(e._i)||(t._i=e._i),isUndefined(e._f)||(t._f=e._f),isUndefined(e._l)||(t._l=e._l),isUndefined(e._strict)||(t._strict=e._strict),isUndefined(e._tzm)||(t._tzm=e._tzm),isUndefined(e._isUTC)||(t._isUTC=e._isUTC),isUndefined(e._offset)||(t._offset=e._offset),isUndefined(e._pf)||(t._pf=getParsingFlags(e)),isUndefined(e._locale)||(t._locale=e._locale),s>0)for(n=0;n<s;n++)r=momentProperties[n],i=e[r],isUndefined(i)||(t[r]=i);return t}function Moment(t){copyConfig(this,t),this._d=new Date(t._d!=null?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),updateInProgress===!1&&(updateInProgress=!0,hooks.updateOffset(this),updateInProgress=!1)}function isMoment(t){return t instanceof Moment||t!=null&&t._isAMomentObject!=null}function warn$1(t){hooks.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+t)}function deprecate(t,e){var n=!0;return extend$3(function(){if(hooks.deprecationHandler!=null&&hooks.deprecationHandler(null,t),n){var r=[],i,s,o,a=arguments.length;for(s=0;s<a;s++){if(i="",typeof arguments[s]=="object"){i+=`
|
|
37
|
+
[`+s+"] ";for(o in arguments[0])hasOwnProp(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}warn$1(t+`
|
|
38
|
+
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
|
39
|
+
`+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var deprecations={};function deprecateSimple(t,e){hooks.deprecationHandler!=null&&hooks.deprecationHandler(t,e),deprecations[t]||(warn$1(e),deprecations[t]=!0)}hooks.suppressDeprecationWarnings=!1,hooks.deprecationHandler=null;function isFunction(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function set$1(t){var e,n;for(n in t)hasOwnProp(t,n)&&(e=t[n],isFunction(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function mergeConfigs(t,e){var n=extend$3({},t),r;for(r in e)hasOwnProp(e,r)&&(isObject(t[r])&&isObject(e[r])?(n[r]={},extend$3(n[r],t[r]),extend$3(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)hasOwnProp(t,r)&&!hasOwnProp(e,r)&&isObject(t[r])&&(n[r]=extend$3({},n[r]));return n}function Locale(t){t!=null&&this.set(t)}var keys;Object.keys?keys=Object.keys:keys=function(t){var e,n=[];for(e in t)hasOwnProp(t,e)&&n.push(e);return n};var defaultCalendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function calendar(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return isFunction(r)?r.call(e,n):r}function zeroFill(t,e,n){var r=""+Math.abs(t),i=e-r.length,s=t>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={};function addFormatToken(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(formatTokenFunctions[t]=i),e&&(formatTokenFunctions[e[0]]=function(){return zeroFill(i.apply(this,arguments),e[1],e[2])}),n&&(formatTokenFunctions[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function removeFormattingTokens(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function makeFormatFunction(t){var e=t.match(formattingTokens),n,r;for(n=0,r=e.length;n<r;n++)formatTokenFunctions[e[n]]?e[n]=formatTokenFunctions[e[n]]:e[n]=removeFormattingTokens(e[n]);return function(i){var s="",o;for(o=0;o<r;o++)s+=isFunction(e[o])?e[o].call(i,t):e[o];return s}}function formatMoment(t,e){return t.isValid()?(e=expandFormat(e,t.localeData()),formatFunctions[e]=formatFunctions[e]||makeFormatFunction(e),formatFunctions[e](t)):t.localeData().invalidDate()}function expandFormat(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(localFormattingTokens.lastIndex=0;n>=0&&localFormattingTokens.test(t);)t=t.replace(localFormattingTokens,r),localFormattingTokens.lastIndex=0,n-=1;return t}var defaultLongDateFormat={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"};function longDateFormat(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(formattingTokens).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var defaultInvalidDate="Invalid date";function invalidDate(){return this._invalidDate}var defaultOrdinal="%d",defaultDayOfMonthOrdinalParse=/\d{1,2}/;function ordinal(t){return this._ordinal.replace("%d",t)}var defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime(t,e,n,r){var i=this._relativeTime[n];return isFunction(i)?i(t,e,n,r):i.replace(/%d/i,t)}function pastFuture(t,e){var n=this._relativeTime[t>0?"future":"past"];return isFunction(n)?n(e):n.replace(/%s/i,e)}var aliases={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function normalizeUnits(t){return typeof t=="string"?aliases[t]||aliases[t.toLowerCase()]:void 0}function normalizeObjectUnits(t){var e={},n,r;for(r in t)hasOwnProp(t,r)&&(n=normalizeUnits(r),n&&(e[n]=t[r]));return e}var priorities={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function getPrioritizedUnits(t){var e=[],n;for(n in t)hasOwnProp(t,n)&&e.push({unit:n,priority:priorities[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var match1=/\d/,match2=/\d\d/,match3=/\d{3}/,match4=/\d{4}/,match6=/[+-]?\d{6}/,match1to2=/\d\d?/,match3to4=/\d\d\d\d?/,match5to6=/\d\d\d\d\d\d?/,match1to3=/\d{1,3}/,match1to4=/\d{1,4}/,match1to6=/[+-]?\d{1,6}/,matchUnsigned=/\d+/,matchSigned=/[+-]?\d+/,matchOffset=/Z|[+-]\d\d:?\d\d/gi,matchShortOffset=/Z|[+-]\d\d(?::?\d\d)?/gi,matchTimestamp=/[+-]?\d+(\.\d{1,3})?/,matchWord=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,match1to2NoLeadingZero=/^[1-9]\d?/,match1to2HasZero=/^([1-9]\d|\d)/,regexes;regexes={};function addRegexToken(t,e,n){regexes[t]=isFunction(e)?e:function(r,i){return r&&n?n:e}}function getParseRegexForToken(t,e){return hasOwnProp(regexes,t)?regexes[t](e._strict,e._locale):new RegExp(unescapeFormat(t))}function unescapeFormat(t){return regexEscape(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,s){return n||r||i||s}))}function regexEscape(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function absFloor(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function toInt(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=absFloor(e)),n}var tokens={};function addParseToken(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),isNumber(e)&&(r=function(s,o){o[e]=toInt(s)}),i=t.length,n=0;n<i;n++)tokens[t[n]]=r}function addWeekParseToken(t,e){addParseToken(t,function(n,r,i,s){i._w=i._w||{},e(n,i._w,i,s)})}function addTimeToArrayFromToken(t,e,n){e!=null&&hasOwnProp(tokens,t)&&tokens[t](e,n._a,n,t)}function isLeapYear(t){return t%4===0&&t%100!==0||t%400===0}var YEAR=0,MONTH=1,DATE=2,HOUR=3,MINUTE=4,SECOND=5,MILLISECOND=6,WEEK=7,WEEKDAY=8;addFormatToken("Y",0,0,function(){var t=this.year();return t<=9999?zeroFill(t,4):"+"+t}),addFormatToken(0,["YY",2],0,function(){return this.year()%100}),addFormatToken(0,["YYYY",4],0,"year"),addFormatToken(0,["YYYYY",5],0,"year"),addFormatToken(0,["YYYYYY",6,!0],0,"year"),addRegexToken("Y",matchSigned),addRegexToken("YY",match1to2,match2),addRegexToken("YYYY",match1to4,match4),addRegexToken("YYYYY",match1to6,match6),addRegexToken("YYYYYY",match1to6,match6),addParseToken(["YYYYY","YYYYYY"],YEAR),addParseToken("YYYY",function(t,e){e[YEAR]=t.length===2?hooks.parseTwoDigitYear(t):toInt(t)}),addParseToken("YY",function(t,e){e[YEAR]=hooks.parseTwoDigitYear(t)}),addParseToken("Y",function(t,e){e[YEAR]=parseInt(t,10)});function daysInYear(t){return isLeapYear(t)?366:365}hooks.parseTwoDigitYear=function(t){return toInt(t)+(toInt(t)>68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function makeGetSet(t,e){return function(n){return n!=null?(set$1$1(this,t,n),hooks.updateOffset(this,e),this):get$4(this,t)}}function get$4(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function set$1$1(t,e,n){var r,i,s,o,a;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=t.month(),a=t.date(),a=a===29&&o===1&&!isLeapYear(s)?28:a,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function stringGet(t){return t=normalizeUnits(t),isFunction(this[t])?this[t]():this}function stringSet(t,e){if(typeof t=="object"){t=normalizeObjectUnits(t);var n=getPrioritizedUnits(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=normalizeUnits(t),isFunction(this[t]))return this[t](e);return this}function mod(t,e){return(t%e+e)%e}var indexOf;Array.prototype.indexOf?indexOf=Array.prototype.indexOf:indexOf=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function daysInMonth(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=mod(e,12);return t+=(e-n)/12,n===1?isLeapYear(t)?29:28:31-n%7%2}addFormatToken("M",["MM",2],"Mo",function(){return this.month()+1}),addFormatToken("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),addFormatToken("MMMM",0,0,function(t){return this.localeData().months(this,t)}),addRegexToken("M",match1to2,match1to2NoLeadingZero),addRegexToken("MM",match1to2,match2),addRegexToken("MMM",function(t,e){return e.monthsShortRegex(t)}),addRegexToken("MMMM",function(t,e){return e.monthsRegex(t)}),addParseToken(["M","MM"],function(t,e){e[MONTH]=toInt(t)-1}),addParseToken(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[MONTH]=i:getParsingFlags(n).invalidMonth=t});var defaultLocaleMonths="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),defaultLocaleMonthsShort="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),MONTHS_IN_FORMAT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,defaultMonthsShortRegex=matchWord,defaultMonthsRegex=matchWord;function localeMonths(t,e){return t?isArray(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||MONTHS_IN_FORMAT).test(e)?"format":"standalone"][t.month()]:isArray(this._months)?this._months:this._months.standalone}function localeMonthsShort(t,e){return t?isArray(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[MONTHS_IN_FORMAT.test(e)?"format":"standalone"][t.month()]:isArray(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function handleStrictParse(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=createUTC([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?e==="MMM"?(i=indexOf.call(this._shortMonthsParse,o),i!==-1?i:null):(i=indexOf.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=indexOf.call(this._shortMonthsParse,o),i!==-1?i:(i=indexOf.call(this._longMonthsParse,o),i!==-1?i:null)):(i=indexOf.call(this._longMonthsParse,o),i!==-1?i:(i=indexOf.call(this._shortMonthsParse,o),i!==-1?i:null))}function localeMonthsParse(t,e,n){var r,i,s;if(this._monthsParseExact)return handleStrictParse.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=createUTC([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function setMonth(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=toInt(e);else if(e=t.localeData().monthsParse(e),!isNumber(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,daysInMonth(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function getSetMonth(t){return t!=null?(setMonth(this,t),hooks.updateOffset(this,!0),this):get$4(this,"Month")}function getDaysInMonth(){return daysInMonth(this.year(),this.month())}function monthsShortRegex(t){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(hasOwnProp(this,"_monthsShortRegex")||(this._monthsShortRegex=defaultMonthsShortRegex),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function monthsRegex(t){return this._monthsParseExact?(hasOwnProp(this,"_monthsRegex")||computeMonthsParse.call(this),t?this._monthsStrictRegex:this._monthsRegex):(hasOwnProp(this,"_monthsRegex")||(this._monthsRegex=defaultMonthsRegex),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function computeMonthsParse(){function t(l,u){return u.length-l.length}var e=[],n=[],r=[],i,s,o,a;for(i=0;i<12;i++)s=createUTC([2e3,i]),o=regexEscape(this.monthsShort(s,"")),a=regexEscape(this.months(s,"")),e.push(o),n.push(a),r.push(a),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function createDate(t,e,n,r,i,s,o){var a;return t<100&&t>=0?(a=new Date(t+400,e,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,n,r,i,s,o),a}function createUTCDate(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function firstWeekOffset(t,e,n){var r=7+e-n,i=(7+createUTCDate(t,0,r).getUTCDay()-e)%7;return-i+r-1}function dayOfYearFromWeeks(t,e,n,r,i){var s=(7+n-r)%7,o=firstWeekOffset(t,r,i),a=1+7*(e-1)+s+o,l,u;return a<=0?(l=t-1,u=daysInYear(l)+a):a>daysInYear(t)?(l=t+1,u=a-daysInYear(t)):(l=t,u=a),{year:l,dayOfYear:u}}function weekOfYear(t,e,n){var r=firstWeekOffset(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,s,o;return i<1?(o=t.year()-1,s=i+weeksInYear(o,e,n)):i>weeksInYear(t.year(),e,n)?(s=i-weeksInYear(t.year(),e,n),o=t.year()+1):(o=t.year(),s=i),{week:s,year:o}}function weeksInYear(t,e,n){var r=firstWeekOffset(t,e,n),i=firstWeekOffset(t+1,e,n);return(daysInYear(t)-r+i)/7}addFormatToken("w",["ww",2],"wo","week"),addFormatToken("W",["WW",2],"Wo","isoWeek"),addRegexToken("w",match1to2,match1to2NoLeadingZero),addRegexToken("ww",match1to2,match2),addRegexToken("W",match1to2,match1to2NoLeadingZero),addRegexToken("WW",match1to2,match2),addWeekParseToken(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=toInt(t)});function localeWeek(t){return weekOfYear(t,this._week.dow,this._week.doy).week}var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function getSetISOWeek(t){var e=weekOfYear(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}addFormatToken("d",0,"do","day"),addFormatToken("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),addFormatToken("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),addFormatToken("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),addFormatToken("e",0,0,"weekday"),addFormatToken("E",0,0,"isoWeekday"),addRegexToken("d",match1to2),addRegexToken("e",match1to2),addRegexToken("E",match1to2),addRegexToken("dd",function(t,e){return e.weekdaysMinRegex(t)}),addRegexToken("ddd",function(t,e){return e.weekdaysShortRegex(t)}),addRegexToken("dddd",function(t,e){return e.weekdaysRegex(t)}),addWeekParseToken(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:getParsingFlags(n).invalidWeekday=t}),addWeekParseToken(["d","e","E"],function(t,e,n,r){e[r]=toInt(t)});function parseWeekday(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function parseIsoWeekday(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function shiftWeekdays(t,e){return t.slice(e,7).concat(t.slice(0,e))}var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;function localeWeekdays(t,e){var n=isArray(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?shiftWeekdays(n,this._week.dow):t?n[t.day()]:n}function localeWeekdaysShort(t){return t===!0?shiftWeekdays(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function localeWeekdaysMin(t){return t===!0?shiftWeekdays(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function handleStrictParse$1(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=createUTC([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?e==="dddd"?(i=indexOf.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=indexOf.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=indexOf.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=indexOf.call(this._weekdaysParse,o),i!==-1||(i=indexOf.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=indexOf.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=indexOf.call(this._shortWeekdaysParse,o),i!==-1||(i=indexOf.call(this._weekdaysParse,o),i!==-1)?i:(i=indexOf.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=indexOf.call(this._minWeekdaysParse,o),i!==-1||(i=indexOf.call(this._weekdaysParse,o),i!==-1)?i:(i=indexOf.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function localeWeekdaysParse(t,e,n){var r,i,s;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=createUTC([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function getSetDayOfWeek(t){if(!this.isValid())return t!=null?this:NaN;var e=get$4(this,"Day");return t!=null?(t=parseWeekday(t,this.localeData()),this.add(t-e,"d")):e}function getSetLocaleDayOfWeek(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function getSetISODayOfWeek(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=parseIsoWeekday(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function weekdaysRegex(t){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(t){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(t){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function t(c,d){return d.length-c.length}var e=[],n=[],r=[],i=[],s,o,a,l,u;for(s=0;s<7;s++)o=createUTC([2e3,1]).day(s),a=regexEscape(this.weekdaysMin(o,"")),l=regexEscape(this.weekdaysShort(o,"")),u=regexEscape(this.weekdays(o,"")),e.push(a),n.push(l),r.push(u),i.push(a),i.push(l),i.push(u);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken("H",["HH",2],0,"hour"),addFormatToken("h",["hh",2],0,hFormat),addFormatToken("k",["kk",2],0,kFormat),addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)}),addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)}),addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)}),addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});function meridiem(t,e){addFormatToken(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}meridiem("a",!0),meridiem("A",!1);function matchMeridiem(t,e){return e._meridiemParse}addRegexToken("a",matchMeridiem),addRegexToken("A",matchMeridiem),addRegexToken("H",match1to2,match1to2HasZero),addRegexToken("h",match1to2,match1to2NoLeadingZero),addRegexToken("k",match1to2,match1to2NoLeadingZero),addRegexToken("HH",match1to2,match2),addRegexToken("hh",match1to2,match2),addRegexToken("kk",match1to2,match2),addRegexToken("hmm",match3to4),addRegexToken("hmmss",match5to6),addRegexToken("Hmm",match3to4),addRegexToken("Hmmss",match5to6),addParseToken(["H","HH"],HOUR),addParseToken(["k","kk"],function(t,e,n){var r=toInt(t);e[HOUR]=r===24?0:r}),addParseToken(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),addParseToken(["h","hh"],function(t,e,n){e[HOUR]=toInt(t),getParsingFlags(n).bigHour=!0}),addParseToken("hmm",function(t,e,n){var r=t.length-2;e[HOUR]=toInt(t.substr(0,r)),e[MINUTE]=toInt(t.substr(r)),getParsingFlags(n).bigHour=!0}),addParseToken("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[HOUR]=toInt(t.substr(0,r)),e[MINUTE]=toInt(t.substr(r,2)),e[SECOND]=toInt(t.substr(i)),getParsingFlags(n).bigHour=!0}),addParseToken("Hmm",function(t,e,n){var r=t.length-2;e[HOUR]=toInt(t.substr(0,r)),e[MINUTE]=toInt(t.substr(r))}),addParseToken("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[HOUR]=toInt(t.substr(0,r)),e[MINUTE]=toInt(t.substr(r,2)),e[SECOND]=toInt(t.substr(i))});function localeIsPM(t){return(t+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);function localeMeridiem(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},globalLocale;function commonPrefix(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function normalizeLocale(t){return t&&t.toLowerCase().replace("_","-")}function chooseLocale(t){for(var e=0,n,r,i,s;e<t.length;){for(s=normalizeLocale(t[e]).split("-"),n=s.length,r=normalizeLocale(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=loadLocale(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&commonPrefix(s,r)>=n-1)break;n--}e++}return globalLocale}function isLocaleNameSane(t){return!!(t&&t.match("^[^/\\\\]*$"))}function loadLocale(t){var e=null,n;if(locales[t]===void 0&&typeof module<"u"&&module&&module.exports&&isLocaleNameSane(t))try{e=globalLocale._abbr,n=require,n("./locale/"+t),getSetGlobalLocale(e)}catch{locales[t]=null}return locales[t]}function getSetGlobalLocale(t,e){var n;return t&&(isUndefined(e)?n=getLocale(t):n=defineLocale(t,e),n?globalLocale=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(t,e){if(e!==null){var n,r=baseConfig;if(e.abbr=t,locales[t]!=null)deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=locales[t]._config;else if(e.parentLocale!=null)if(locales[e.parentLocale]!=null)r=locales[e.parentLocale]._config;else if(n=loadLocale(e.parentLocale),n!=null)r=n._config;else return localeFamilies[e.parentLocale]||(localeFamilies[e.parentLocale]=[]),localeFamilies[e.parentLocale].push({name:t,config:e}),null;return locales[t]=new Locale(mergeConfigs(r,e)),localeFamilies[t]&&localeFamilies[t].forEach(function(i){defineLocale(i.name,i.config)}),getSetGlobalLocale(t),locales[t]}else return delete locales[t],null}function updateLocale(t,e){if(e!=null){var n,r,i=baseConfig;locales[t]!=null&&locales[t].parentLocale!=null?locales[t].set(mergeConfigs(locales[t]._config,e)):(r=loadLocale(t),r!=null&&(i=r._config),e=mergeConfigs(i,e),r==null&&(e.abbr=t),n=new Locale(e),n.parentLocale=locales[t],locales[t]=n),getSetGlobalLocale(t)}else locales[t]!=null&&(locales[t].parentLocale!=null?(locales[t]=locales[t].parentLocale,t===getSetGlobalLocale()&&getSetGlobalLocale(t)):locales[t]!=null&&delete locales[t]);return locales[t]}function getLocale(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return globalLocale;if(!isArray(t)){if(e=loadLocale(t),e)return e;t=[t]}return chooseLocale(t)}function listLocales(){return keys(locales)}function checkOverflow(t){var e,n=t._a;return n&&getParsingFlags(t).overflow===-2&&(e=n[MONTH]<0||n[MONTH]>11?MONTH:n[DATE]<1||n[DATE]>daysInMonth(n[YEAR],n[MONTH])?DATE:n[HOUR]<0||n[HOUR]>24||n[HOUR]===24&&(n[MINUTE]!==0||n[SECOND]!==0||n[MILLISECOND]!==0)?HOUR:n[MINUTE]<0||n[MINUTE]>59?MINUTE:n[SECOND]<0||n[SECOND]>59?SECOND:n[MILLISECOND]<0||n[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(t)._overflowDayOfYear&&(e<YEAR||e>DATE)&&(e=DATE),getParsingFlags(t)._overflowWeeks&&e===-1&&(e=WEEK),getParsingFlags(t)._overflowWeekday&&e===-1&&(e=WEEKDAY),getParsingFlags(t).overflow=e),t}var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO(t){var e,n,r=t._i,i=extendedIsoRegex.exec(r)||basicIsoRegex.exec(r),s,o,a,l,u=isoDates.length,c=isoTimes.length;if(i){for(getParsingFlags(t).iso=!0,e=0,n=u;e<n;e++)if(isoDates[e][1].exec(i[1])){o=isoDates[e][0],s=isoDates[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=c;e<n;e++)if(isoTimes[e][1].exec(i[3])){a=(i[2]||" ")+isoTimes[e][0];break}if(a==null){t._isValid=!1;return}}if(!s&&a!=null){t._isValid=!1;return}if(i[4])if(tzRegex.exec(i[4]))l="Z";else{t._isValid=!1;return}t._f=o+(a||"")+(l||""),configFromStringAndFormat(t)}else t._isValid=!1}function extractFromRFC2822Strings(t,e,n,r,i,s){var o=[untruncateYear(t),defaultLocaleMonthsShort.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function untruncateYear(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function preprocessRFC2822(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function checkWeekday(t,e,n){if(t){var r=defaultLocaleWeekdaysShort.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return getParsingFlags(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function calculateOffset(t,e,n){if(t)return obsOffsets[t];if(e)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return s*60+i}function configFromRFC2822(t){var e=rfc2822.exec(preprocessRFC2822(t._i)),n;if(e){if(n=extractFromRFC2822Strings(e[4],e[3],e[2],e[5],e[6],e[7]),!checkWeekday(e[1],n,t))return;t._a=n,t._tzm=calculateOffset(e[8],e[9],e[10]),t._d=createUTCDate.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),getParsingFlags(t).rfc2822=!0}else t._isValid=!1}function configFromString(t){var e=aspNetJsonRegex.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(configFromISO(t),t._isValid===!1)delete t._isValid;else return;if(configFromRFC2822(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:hooks.createFromInputFallback(t)}hooks.createFromInputFallback=deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function defaults$2(t,e,n){return t??e??n}function currentDateArray(t){var e=new Date(hooks.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function configFromArray(t){var e,n,r=[],i,s,o;if(!t._d){for(i=currentDateArray(t),t._w&&t._a[DATE]==null&&t._a[MONTH]==null&&dayOfYearFromWeekInfo(t),t._dayOfYear!=null&&(o=defaults$2(t._a[YEAR],i[YEAR]),(t._dayOfYear>daysInYear(o)||t._dayOfYear===0)&&(getParsingFlags(t)._overflowDayOfYear=!0),n=createUTCDate(o,0,t._dayOfYear),t._a[MONTH]=n.getUTCMonth(),t._a[DATE]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[HOUR]===24&&t._a[MINUTE]===0&&t._a[SECOND]===0&&t._a[MILLISECOND]===0&&(t._nextDay=!0,t._a[HOUR]=0),t._d=(t._useUTC?createUTCDate:createDate).apply(null,r),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[HOUR]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(getParsingFlags(t).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(t){var e,n,r,i,s,o,a,l,u;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,o=4,n=defaults$2(e.GG,t._a[YEAR],weekOfYear(createLocal(),1,4).year),r=defaults$2(e.W,1),i=defaults$2(e.E,1),(i<1||i>7)&&(l=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,u=weekOfYear(createLocal(),s,o),n=defaults$2(e.gg,t._a[YEAR],u.year),r=defaults$2(e.w,u.week),e.d!=null?(i=e.d,(i<0||i>6)&&(l=!0)):e.e!=null?(i=e.e+s,(e.e<0||e.e>6)&&(l=!0)):i=s),r<1||r>weeksInYear(n,s,o)?getParsingFlags(t)._overflowWeeks=!0:l!=null?getParsingFlags(t)._overflowWeekday=!0:(a=dayOfYearFromWeeks(n,r,i,s,o),t._a[YEAR]=a.year,t._dayOfYear=a.dayOfYear)}hooks.ISO_8601=function(){},hooks.RFC_2822=function(){};function configFromStringAndFormat(t){if(t._f===hooks.ISO_8601){configFromISO(t);return}if(t._f===hooks.RFC_2822){configFromRFC2822(t);return}t._a=[],getParsingFlags(t).empty=!0;var e=""+t._i,n,r,i,s,o,a=e.length,l=0,u,c;for(i=expandFormat(t._f,t._locale).match(formattingTokens)||[],c=i.length,n=0;n<c;n++)s=i[n],r=(e.match(getParseRegexForToken(s,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&getParsingFlags(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),l+=r.length),formatTokenFunctions[s]?(r?getParsingFlags(t).empty=!1:getParsingFlags(t).unusedTokens.push(s),addTimeToArrayFromToken(s,r,t)):t._strict&&!r&&getParsingFlags(t).unusedTokens.push(s);getParsingFlags(t).charsLeftOver=a-l,e.length>0&&getParsingFlags(t).unusedInput.push(e),t._a[HOUR]<=12&&getParsingFlags(t).bigHour===!0&&t._a[HOUR]>0&&(getParsingFlags(t).bigHour=void 0),getParsingFlags(t).parsedDateParts=t._a.slice(0),getParsingFlags(t).meridiem=t._meridiem,t._a[HOUR]=meridiemFixWrap(t._locale,t._a[HOUR],t._meridiem),u=getParsingFlags(t).era,u!==null&&(t._a[YEAR]=t._locale.erasConvertYear(u,t._a[YEAR])),configFromArray(t),checkOverflow(t)}function meridiemFixWrap(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function configFromStringAndArray(t){var e,n,r,i,s,o,a=!1,l=t._f.length;if(l===0){getParsingFlags(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<l;i++)s=0,o=!1,e=copyConfig({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],configFromStringAndFormat(e),isValid(e)&&(o=!0),s+=getParsingFlags(e).charsLeftOver,s+=getParsingFlags(e).unusedTokens.length*10,getParsingFlags(e).score=s,a?s<r&&(r=s,n=e):(r==null||s<r||o)&&(r=s,n=e,o&&(a=!0));extend$3(t,n||e)}function configFromObject(t){if(!t._d){var e=normalizeObjectUnits(t._i),n=e.day===void 0?e.date:e.day;t._a=map([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),configFromArray(t)}}function createFromConfig(t){var e=new Moment(checkOverflow(prepareConfig(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function prepareConfig(t){var e=t._i,n=t._f;return t._locale=t._locale||getLocale(t._l),e===null||n===void 0&&e===""?createInvalid({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),isMoment(e)?new Moment(checkOverflow(e)):(isDate(e)?t._d=e:isArray(n)?configFromStringAndArray(t):n?configFromStringAndFormat(t):configFromInput(t),isValid(t)||(t._d=null),t))}function configFromInput(t){var e=t._i;isUndefined(e)?t._d=new Date(hooks.now()):isDate(e)?t._d=new Date(e.valueOf()):typeof e=="string"?configFromString(t):isArray(e)?(t._a=map(e.slice(0),function(n){return parseInt(n,10)}),configFromArray(t)):isObject(e)?configFromObject(t):isNumber(e)?t._d=new Date(e):hooks.createFromInputFallback(t)}function createLocalOrUTC(t,e,n,r,i){var s={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(isObject(t)&&isObjectEmpty(t)||isArray(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=t,s._f=e,s._strict=r,createFromConfig(s)}function createLocal(t,e,n,r){return createLocalOrUTC(t,e,n,r,!1)}var prototypeMin=deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=createLocal.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:createInvalid()}),prototypeMax=deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=createLocal.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:createInvalid()});function pickBy(t,e){var n,r;if(e.length===1&&isArray(e[0])&&(e=e[0]),!e.length)return createLocal();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function min(){var t=[].slice.call(arguments,0);return pickBy("isBefore",t)}function max(){var t=[].slice.call(arguments,0);return pickBy("isAfter",t)}var now=function(){return Date.now?Date.now():+new Date},ordering=["year","quarter","month","week","day","hour","minute","second","millisecond"];function isDurationValid(t){var e,n=!1,r,i=ordering.length;for(e in t)if(hasOwnProp(t,e)&&!(indexOf.call(ordering,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[ordering[r]]){if(n)return!1;parseFloat(t[ordering[r]])!==toInt(t[ordering[r]])&&(n=!0)}return!0}function isValid$1(){return this._isValid}function createInvalid$1(){return createDuration(NaN)}function Duration(t){var e=normalizeObjectUnits(t),n=e.year||0,r=e.quarter||0,i=e.month||0,s=e.week||e.isoWeek||0,o=e.day||0,a=e.hour||0,l=e.minute||0,u=e.second||0,c=e.millisecond||0;this._isValid=isDurationValid(e),this._milliseconds=+c+u*1e3+l*6e4+a*1e3*60*60,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._locale=getLocale(),this._bubble()}function isDuration(t){return t instanceof Duration}function absRound(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function compareArrays(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),s=0,o;for(o=0;o<r;o++)toInt(t[o])!==toInt(e[o])&&s++;return s+i}function offset(t,e){addFormatToken(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+zeroFill(~~(n/60),2)+e+zeroFill(~~n%60,2)})}offset("Z",":"),offset("ZZ",""),addRegexToken("Z",matchShortOffset),addRegexToken("ZZ",matchShortOffset),addParseToken(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=offsetFromString(matchShortOffset,t)});var chunkOffset=/([\+\-]|\d\d)/gi;function offsetFromString(t,e){var n=(e||"").match(t),r,i,s;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(chunkOffset)||["-",0,0],s=+(i[1]*60)+toInt(i[2]),s===0?0:i[0]==="+"?s:-s)}function cloneWithOffset(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(isMoment(t)||isDate(t)?t.valueOf():createLocal(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),hooks.updateOffset(n,!1),n):createLocal(t).local()}function getDateOffset(t){return-Math.round(t._d.getTimezoneOffset())}hooks.updateOffset=function(){};function getSetOffset(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=offsetFromString(matchShortOffset,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=getDateOffset(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?addSubtract(this,createDuration(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,hooks.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:getDateOffset(this)}function getSetZone(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function setOffsetToUTC(t){return this.utcOffset(0,t)}function setOffsetToLocal(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(getDateOffset(this),"m")),this}function setOffsetToParsedOffset(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=offsetFromString(matchOffset,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function hasAlignedHourOffset(t){return this.isValid()?(t=t?createLocal(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function isDaylightSavingTime(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var t={},e;return copyConfig(t,this),t=prepareConfig(t),t._a?(e=t._isUTC?createUTC(t._a):createLocal(t._a),this._isDSTShifted=this.isValid()&&compareArrays(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:!1}function isUtcOffset(){return this.isValid()?this._isUTC:!1}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var aspNetRegex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(t,e){var n=t,r=null,i,s,o;return isDuration(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:isNumber(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=aspNetRegex.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:toInt(r[DATE])*i,h:toInt(r[HOUR])*i,m:toInt(r[MINUTE])*i,s:toInt(r[SECOND])*i,ms:toInt(absRound(r[MILLISECOND]*1e3))*i}):(r=isoRegex.exec(t))?(i=r[1]==="-"?-1:1,n={y:parseIso(r[2],i),M:parseIso(r[3],i),w:parseIso(r[4],i),d:parseIso(r[5],i),h:parseIso(r[6],i),m:parseIso(r[7],i),s:parseIso(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=momentsDifference(createLocal(n.from),createLocal(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),s=new Duration(n),isDuration(t)&&hasOwnProp(t,"_locale")&&(s._locale=t._locale),isDuration(t)&&hasOwnProp(t,"_isValid")&&(s._isValid=t._isValid),s}createDuration.fn=Duration.prototype,createDuration.invalid=createInvalid$1;function parseIso(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function positiveMomentsDifference(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function momentsDifference(t,e){var n;return t.isValid()&&e.isValid()?(e=cloneWithOffset(e,t),t.isBefore(e)?n=positiveMomentsDifference(t,e):(n=positiveMomentsDifference(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function createAdder(t,e){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(deprecateSimple(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=createDuration(n,r),addSubtract(this,i,t),this}}function addSubtract(t,e,n,r){var i=e._milliseconds,s=absRound(e._days),o=absRound(e._months);t.isValid()&&(r=r??!0,o&&setMonth(t,get$4(t,"Month")+o*n),s&&set$1$1(t,"Date",get$4(t,"Date")+s*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&hooks.updateOffset(t,s||o))}var add$3=createAdder(1,"add"),subtract=createAdder(-1,"subtract");function isString(t){return typeof t=="string"||t instanceof String}function isMomentInput(t){return isMoment(t)||isDate(t)||isString(t)||isNumber(t)||isNumberOrStringArray(t)||isMomentInputObject(t)||t===null||t===void 0}function isMomentInputObject(t){var e=isObject(t)&&!isObjectEmpty(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=r.length;for(i=0;i<o;i+=1)s=r[i],n=n||hasOwnProp(t,s);return e&&n}function isNumberOrStringArray(t){var e=isArray(t),n=!1;return e&&(n=t.filter(function(r){return!isNumber(r)&&isString(t)}).length===0),e&&n}function isCalendarSpec(t){var e=isObject(t)&&!isObjectEmpty(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<r.length;i+=1)s=r[i],n=n||hasOwnProp(t,s);return e&&n}function getCalendarFormat(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function calendar$1(t,e){arguments.length===1&&(arguments[0]?isMomentInput(arguments[0])?(t=arguments[0],e=void 0):isCalendarSpec(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||createLocal(),r=cloneWithOffset(n,this).startOf("day"),i=hooks.calendarFormat(this,r)||"sameElse",s=e&&(isFunction(e[i])?e[i].call(this,n):e[i]);return this.format(s||this.localeData().calendar(i,this,createLocal(n)))}function clone$1(){return new Moment(this)}function isAfter(t,e){var n=isMoment(t)?t:createLocal(t);return this.isValid()&&n.isValid()?(e=normalizeUnits(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function isBefore(t,e){var n=isMoment(t)?t:createLocal(t);return this.isValid()&&n.isValid()?(e=normalizeUnits(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function isBetween(t,e,n,r){var i=isMoment(t)?t:createLocal(t),s=isMoment(e)?e:createLocal(e);return this.isValid()&&i.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function isSame(t,e){var n=isMoment(t)?t:createLocal(t),r;return this.isValid()&&n.isValid()?(e=normalizeUnits(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function isSameOrAfter(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function isSameOrBefore(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function diff(t,e,n){var r,i,s;if(!this.isValid())return NaN;if(r=cloneWithOffset(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=normalizeUnits(e),e){case"year":s=monthDiff(this,r)/12;break;case"month":s=monthDiff(this,r);break;case"quarter":s=monthDiff(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:absFloor(s)}function monthDiff(t,e){if(t.date()<e.date())return-monthDiff(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,s;return e-r<0?(i=t.clone().add(n-1,"months"),s=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),s=(e-r)/(i-r)),-(n+s)||0}hooks.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",hooks.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function toString$2(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function toISOString(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?formatMoment(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(n,"Z")):formatMoment(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(n+r+i+s)}function format(t){t||(t=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var e=formatMoment(this,t);return this.localeData().postformat(e)}function from(t,e){return this.isValid()&&(isMoment(t)&&t.isValid()||createLocal(t).isValid())?createDuration({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function fromNow(t){return this.from(createLocal(),t)}function to(t,e){return this.isValid()&&(isMoment(t)&&t.isValid()||createLocal(t).isValid())?createDuration({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function toNow(t){return this.to(createLocal(),t)}function locale(t){var e;return t===void 0?this._locale._abbr:(e=getLocale(t),e!=null&&(this._locale=e),this)}var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function localeData(){return this._locale}var MS_PER_SECOND=1e3,MS_PER_MINUTE=60*MS_PER_SECOND,MS_PER_HOUR=60*MS_PER_MINUTE,MS_PER_400_YEARS=(365*400+97)*24*MS_PER_HOUR;function mod$1(t,e){return(t%e+e)%e}function localStartOfDate(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-MS_PER_400_YEARS:new Date(t,e,n).valueOf()}function utcStartOfDate(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-MS_PER_400_YEARS:Date.UTC(t,e,n)}function startOf(t){var e,n;if(t=normalizeUnits(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?utcStartOfDate:localStartOfDate,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=mod$1(e+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR);break;case"minute":e=this._d.valueOf(),e-=mod$1(e,MS_PER_MINUTE);break;case"second":e=this._d.valueOf(),e-=mod$1(e,MS_PER_SECOND);break}return this._d.setTime(e),hooks.updateOffset(this,!0),this}function endOf(t){var e,n;if(t=normalizeUnits(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?utcStartOfDate:localStartOfDate,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=MS_PER_HOUR-mod$1(e+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR)-1;break;case"minute":e=this._d.valueOf(),e+=MS_PER_MINUTE-mod$1(e,MS_PER_MINUTE)-1;break;case"second":e=this._d.valueOf(),e+=MS_PER_SECOND-mod$1(e,MS_PER_SECOND)-1;break}return this._d.setTime(e),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray$1(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function toObject(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend$3({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken("N",0,0,"eraAbbr"),addFormatToken("NN",0,0,"eraAbbr"),addFormatToken("NNN",0,0,"eraAbbr"),addFormatToken("NNNN",0,0,"eraName"),addFormatToken("NNNNN",0,0,"eraNarrow"),addFormatToken("y",["y",1],"yo","eraYear"),addFormatToken("y",["yy",2],0,"eraYear"),addFormatToken("y",["yyy",3],0,"eraYear"),addFormatToken("y",["yyyy",4],0,"eraYear"),addRegexToken("N",matchEraAbbr),addRegexToken("NN",matchEraAbbr),addRegexToken("NNN",matchEraAbbr),addRegexToken("NNNN",matchEraName),addRegexToken("NNNNN",matchEraNarrow),addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?getParsingFlags(n).era=i:getParsingFlags(n).invalidEra=t}),addRegexToken("y",matchUnsigned),addRegexToken("yy",matchUnsigned),addRegexToken("yyy",matchUnsigned),addRegexToken("yyyy",matchUnsigned),addRegexToken("yo",matchEraYearOrdinal),addParseToken(["y","yy","yyy","yyyy"],YEAR),addParseToken(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[YEAR]=n._locale.eraYearOrdinalParse(t,i):e[YEAR]=parseInt(t,10)});function localeEras(t,e){var n,r,i,s=this._eras||getLocale("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":i=hooks(s[n].since).startOf("day"),s[n].since=i.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=hooks(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf();break}}return s}function localeErasParse(t,e,n){var r,i,s=this.eras(),o,a,l;for(t=t.toUpperCase(),r=0,i=s.length;r<i;++r)if(o=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),l=s[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(a===t)return s[r];break;case"NNNN":if(o===t)return s[r];break;case"NNNNN":if(l===t)return s[r];break}else if([o,a,l].indexOf(t)>=0)return s[r]}function localeErasConvertYear(t,e){var n=t.since<=t.until?1:-1;return e===void 0?hooks(t.since).year():hooks(t.since).year()+(e-t.offset)*n}function getEraName(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function getEraNarrow(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function getEraAbbr(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function getEraYear(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-hooks(i[t].since).year())*n+i[t].offset;return this.year()}function erasNameRegex(t){return hasOwnProp(this,"_erasNameRegex")||computeErasParse.call(this),t?this._erasNameRegex:this._erasRegex}function erasAbbrRegex(t){return hasOwnProp(this,"_erasAbbrRegex")||computeErasParse.call(this),t?this._erasAbbrRegex:this._erasRegex}function erasNarrowRegex(t){return hasOwnProp(this,"_erasNarrowRegex")||computeErasParse.call(this),t?this._erasNarrowRegex:this._erasRegex}function matchEraAbbr(t,e){return e.erasAbbrRegex(t)}function matchEraName(t,e){return e.erasNameRegex(t)}function matchEraNarrow(t,e){return e.erasNarrowRegex(t)}function matchEraYearOrdinal(t,e){return e._eraYearOrdinalRegex||matchUnsigned}function computeErasParse(){var t=[],e=[],n=[],r=[],i,s,o,a,l,u=this.eras();for(i=0,s=u.length;i<s;++i)o=regexEscape(u[i].name),a=regexEscape(u[i].abbr),l=regexEscape(u[i].narrow),e.push(o),t.push(a),n.push(l),r.push(o),r.push(a),r.push(l);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}addFormatToken(0,["gg",2],0,function(){return this.weekYear()%100}),addFormatToken(0,["GG",2],0,function(){return this.isoWeekYear()%100});function addWeekYearFormatToken(t,e){addFormatToken(0,[t,t.length],0,e)}addWeekYearFormatToken("gggg","weekYear"),addWeekYearFormatToken("ggggg","weekYear"),addWeekYearFormatToken("GGGG","isoWeekYear"),addWeekYearFormatToken("GGGGG","isoWeekYear"),addRegexToken("G",matchSigned),addRegexToken("g",matchSigned),addRegexToken("GG",match1to2,match2),addRegexToken("gg",match1to2,match2),addRegexToken("GGGG",match1to4,match4),addRegexToken("gggg",match1to4,match4),addRegexToken("GGGGG",match1to6,match6),addRegexToken("ggggg",match1to6,match6),addWeekParseToken(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=toInt(t)}),addWeekParseToken(["gg","GG"],function(t,e,n,r){e[r]=hooks.parseTwoDigitYear(t)});function getSetWeekYear(t){return getSetWeekYearHelper.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function getSetISOWeekYear(t){return getSetWeekYearHelper.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function getISOWeeksInYear(){return weeksInYear(this.year(),1,4)}function getISOWeeksInISOWeekYear(){return weeksInYear(this.isoWeekYear(),1,4)}function getWeeksInYear(){var t=this.localeData()._week;return weeksInYear(this.year(),t.dow,t.doy)}function getWeeksInWeekYear(){var t=this.localeData()._week;return weeksInYear(this.weekYear(),t.dow,t.doy)}function getSetWeekYearHelper(t,e,n,r,i){var s;return t==null?weekOfYear(this,r,i).year:(s=weeksInYear(t,r,i),e>s&&(e=s),setWeekAll.call(this,t,e,n,r,i))}function setWeekAll(t,e,n,r,i){var s=dayOfYearFromWeeks(t,e,n,r,i),o=createUTCDate(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}addFormatToken("Q",0,"Qo","quarter"),addRegexToken("Q",match1),addParseToken("Q",function(t,e){e[MONTH]=(toInt(t)-1)*3});function getSetQuarter(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date"),addRegexToken("D",match1to2,match1to2NoLeadingZero),addRegexToken("DD",match1to2,match2),addRegexToken("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),addParseToken(["D","DD"],DATE),addParseToken("Do",function(t,e){e[DATE]=toInt(t.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear"),addRegexToken("DDD",match1to3),addRegexToken("DDDD",match3),addParseToken(["DDD","DDDD"],function(t,e,n){n._dayOfYear=toInt(t)});function getSetDayOfYear(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}addFormatToken("m",["mm",2],0,"minute"),addRegexToken("m",match1to2,match1to2HasZero),addRegexToken("mm",match1to2,match2),addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second"),addRegexToken("s",match1to2,match1to2HasZero),addRegexToken("ss",match1to2,match2),addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)}),addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),addFormatToken(0,["SSS",3],0,"millisecond"),addFormatToken(0,["SSSS",4],0,function(){return this.millisecond()*10}),addFormatToken(0,["SSSSS",5],0,function(){return this.millisecond()*100}),addFormatToken(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),addFormatToken(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),addFormatToken(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),addFormatToken(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),addRegexToken("S",match1to3,match1),addRegexToken("SS",match1to3,match2),addRegexToken("SSS",match1to3,match3);var token,getSetMillisecond;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,matchUnsigned);function parseMs(t,e){e[MILLISECOND]=toInt(("0."+t)*1e3)}for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);getSetMillisecond=makeGetSet("Milliseconds",!1),addFormatToken("z",0,0,"zoneAbbr"),addFormatToken("zz",0,0,"zoneName");function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}var proto=Moment.prototype;proto.add=add$3,proto.calendar=calendar$1,proto.clone=clone$1,proto.diff=diff,proto.endOf=endOf,proto.format=format,proto.from=from,proto.fromNow=fromNow,proto.to=to,proto.toNow=toNow,proto.get=stringGet,proto.invalidAt=invalidAt,proto.isAfter=isAfter,proto.isBefore=isBefore,proto.isBetween=isBetween,proto.isSame=isSame,proto.isSameOrAfter=isSameOrAfter,proto.isSameOrBefore=isSameOrBefore,proto.isValid=isValid$2,proto.lang=lang,proto.locale=locale,proto.localeData=localeData,proto.max=prototypeMax,proto.min=prototypeMin,proto.parsingFlags=parsingFlags,proto.set=stringSet,proto.startOf=startOf,proto.subtract=subtract,proto.toArray=toArray$1,proto.toObject=toObject,proto.toDate=toDate,proto.toISOString=toISOString,proto.inspect=inspect,typeof Symbol<"u"&&Symbol.for!=null&&(proto[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),proto.toJSON=toJSON,proto.toString=toString$2,proto.unix=unix,proto.valueOf=valueOf,proto.creationData=creationData,proto.eraName=getEraName,proto.eraNarrow=getEraNarrow,proto.eraAbbr=getEraAbbr,proto.eraYear=getEraYear,proto.year=getSetYear,proto.isLeapYear=getIsLeapYear,proto.weekYear=getSetWeekYear,proto.isoWeekYear=getSetISOWeekYear,proto.quarter=proto.quarters=getSetQuarter,proto.month=getSetMonth,proto.daysInMonth=getDaysInMonth,proto.week=proto.weeks=getSetWeek,proto.isoWeek=proto.isoWeeks=getSetISOWeek,proto.weeksInYear=getWeeksInYear,proto.weeksInWeekYear=getWeeksInWeekYear,proto.isoWeeksInYear=getISOWeeksInYear,proto.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear,proto.date=getSetDayOfMonth,proto.day=proto.days=getSetDayOfWeek,proto.weekday=getSetLocaleDayOfWeek,proto.isoWeekday=getSetISODayOfWeek,proto.dayOfYear=getSetDayOfYear,proto.hour=proto.hours=getSetHour,proto.minute=proto.minutes=getSetMinute,proto.second=proto.seconds=getSetSecond,proto.millisecond=proto.milliseconds=getSetMillisecond,proto.utcOffset=getSetOffset,proto.utc=setOffsetToUTC,proto.local=setOffsetToLocal,proto.parseZone=setOffsetToParsedOffset,proto.hasAlignedHourOffset=hasAlignedHourOffset,proto.isDST=isDaylightSavingTime,proto.isLocal=isLocal,proto.isUtcOffset=isUtcOffset,proto.isUtc=isUtc,proto.isUTC=isUtc,proto.zoneAbbr=getZoneAbbr,proto.zoneName=getZoneName,proto.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth),proto.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth),proto.years=deprecate("years accessor is deprecated. Use year instead",getSetYear),proto.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone),proto.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);function createUnix(t){return createLocal(t*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(t){return t}var proto$1=Locale.prototype;proto$1.calendar=calendar,proto$1.longDateFormat=longDateFormat,proto$1.invalidDate=invalidDate,proto$1.ordinal=ordinal,proto$1.preparse=preParsePostFormat,proto$1.postformat=preParsePostFormat,proto$1.relativeTime=relativeTime,proto$1.pastFuture=pastFuture,proto$1.set=set$1,proto$1.eras=localeEras,proto$1.erasParse=localeErasParse,proto$1.erasConvertYear=localeErasConvertYear,proto$1.erasAbbrRegex=erasAbbrRegex,proto$1.erasNameRegex=erasNameRegex,proto$1.erasNarrowRegex=erasNarrowRegex,proto$1.months=localeMonths,proto$1.monthsShort=localeMonthsShort,proto$1.monthsParse=localeMonthsParse,proto$1.monthsRegex=monthsRegex,proto$1.monthsShortRegex=monthsShortRegex,proto$1.week=localeWeek,proto$1.firstDayOfYear=localeFirstDayOfYear,proto$1.firstDayOfWeek=localeFirstDayOfWeek,proto$1.weekdays=localeWeekdays,proto$1.weekdaysMin=localeWeekdaysMin,proto$1.weekdaysShort=localeWeekdaysShort,proto$1.weekdaysParse=localeWeekdaysParse,proto$1.weekdaysRegex=weekdaysRegex,proto$1.weekdaysShortRegex=weekdaysShortRegex,proto$1.weekdaysMinRegex=weekdaysMinRegex,proto$1.isPM=localeIsPM,proto$1.meridiem=localeMeridiem;function get$1$1(t,e,n,r){var i=getLocale(),s=createUTC().set(r,e);return i[n](s,t)}function listMonthsImpl(t,e,n){if(isNumber(t)&&(e=t,t=void 0),t=t||"",e!=null)return get$1$1(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=get$1$1(t,r,n,"month");return i}function listWeekdaysImpl(t,e,n,r){typeof t=="boolean"?(isNumber(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,isNumber(e)&&(n=e,e=void 0),e=e||"");var i=getLocale(),s=t?i._week.dow:0,o,a=[];if(n!=null)return get$1$1(e,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=get$1$1(e,(o+s)%7,r,"day");return a}function listMonths(t,e){return listMonthsImpl(t,e,"months")}function listMonthsShort(t,e){return listMonthsImpl(t,e,"monthsShort")}function listWeekdays(t,e,n){return listWeekdaysImpl(t,e,n,"weekdays")}function listWeekdaysShort(t,e,n){return listWeekdaysImpl(t,e,n,"weekdaysShort")}function listWeekdaysMin(t,e,n){return listWeekdaysImpl(t,e,n,"weekdaysMin")}getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=toInt(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}}),hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale),hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs;function abs(){var t=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),t.milliseconds=mathAbs(t.milliseconds),t.seconds=mathAbs(t.seconds),t.minutes=mathAbs(t.minutes),t.hours=mathAbs(t.hours),t.months=mathAbs(t.months),t.years=mathAbs(t.years),this}function addSubtract$1(t,e,n,r){var i=createDuration(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function add$1$1(t,e){return addSubtract$1(this,t,e,1)}function subtract$1(t,e){return addSubtract$1(this,t,e,-1)}function absCeil(t){return t<0?Math.floor(t):Math.ceil(t)}function bubble(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,s,o,a,l;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=absCeil(monthsToDays(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=absFloor(t/1e3),r.seconds=i%60,s=absFloor(i/60),r.minutes=s%60,o=absFloor(s/60),r.hours=o%24,e+=absFloor(o/24),l=absFloor(daysToMonths(e)),n+=l,e-=absCeil(monthsToDays(l)),a=absFloor(n/12),n%=12,r.days=e,r.months=n,r.years=a,this}function daysToMonths(t){return t*4800/146097}function monthsToDays(t){return t*146097/4800}function as(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=normalizeUnits(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+daysToMonths(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(monthsToDays(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function makeAs(t){return function(){return this.as(t)}}var asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asQuarters=makeAs("Q"),asYears=makeAs("y"),valueOf$1=asMilliseconds;function clone$1$1(){return createDuration(this)}function get$2$1(t){return t=normalizeUnits(t),this.isValid()?this[t+"s"]():NaN}function makeGetter(t){return function(){return this.isValid()?this._data[t]:NaN}}var milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var round=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function relativeTime$1(t,e,n,r){var i=createDuration(t).abs(),s=round(i.as("s")),o=round(i.as("m")),a=round(i.as("h")),l=round(i.as("d")),u=round(i.as("M")),c=round(i.as("w")),d=round(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(h=h||c<=1&&["w"]||c<n.w&&["ww",c]),h=h||u<=1&&["M"]||u<n.M&&["MM",u]||d<=1&&["y"]||["yy",d],h[2]=e,h[3]=+t>0,h[4]=r,substituteTimeAgo.apply(null,h)}function getSetRelativeTimeRounding(t){return t===void 0?round:typeof t=="function"?(round=t,!0):!1}function getSetRelativeTimeThreshold(t,e){return thresholds[t]===void 0?!1:e===void 0?thresholds[t]:(thresholds[t]=e,t==="s"&&(thresholds.ss=e-1),!0)}function humanize(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=thresholds,i,s;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},thresholds,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),s=relativeTime$1(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var abs$1=Math.abs;function sign(t){return(t>0)-(t<0)||+t}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var t=abs$1(this._milliseconds)/1e3,e=abs$1(this._days),n=abs$1(this._months),r,i,s,o,a=this.asSeconds(),l,u,c,d;return a?(r=absFloor(t/60),i=absFloor(r/60),t%=60,r%=60,s=absFloor(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",u=sign(this._months)!==sign(a)?"-":"",c=sign(this._days)!==sign(a)?"-":"",d=sign(this._milliseconds)!==sign(a)?"-":"",l+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(e?c+e+"D":"")+(i||r||t?"T":"")+(i?d+i+"H":"")+(r?d+r+"M":"")+(t?d+o+"S":"")):"P0D"}var proto$2=Duration.prototype;proto$2.isValid=isValid$1,proto$2.abs=abs,proto$2.add=add$1$1,proto$2.subtract=subtract$1,proto$2.as=as,proto$2.asMilliseconds=asMilliseconds,proto$2.asSeconds=asSeconds,proto$2.asMinutes=asMinutes,proto$2.asHours=asHours,proto$2.asDays=asDays,proto$2.asWeeks=asWeeks,proto$2.asMonths=asMonths,proto$2.asQuarters=asQuarters,proto$2.asYears=asYears,proto$2.valueOf=valueOf$1,proto$2._bubble=bubble,proto$2.clone=clone$1$1,proto$2.get=get$2$1,proto$2.milliseconds=milliseconds,proto$2.seconds=seconds,proto$2.minutes=minutes,proto$2.hours=hours,proto$2.days=days,proto$2.weeks=weeks,proto$2.months=months,proto$2.years=years,proto$2.humanize=humanize,proto$2.toISOString=toISOString$1,proto$2.toString=toISOString$1,proto$2.toJSON=toISOString$1,proto$2.locale=locale,proto$2.localeData=localeData,proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1),proto$2.lang=lang,addFormatToken("X",0,0,"unix"),addFormatToken("x",0,0,"valueOf"),addRegexToken("x",matchSigned),addRegexToken("X",matchTimestamp),addParseToken("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)}),addParseToken("x",function(t,e,n){n._d=new Date(toInt(t))});//! moment.js
|
|
40
|
+
hooks.version="2.30.1",setHookCallback(createLocal),hooks.fn=proto,hooks.min=min,hooks.max=max,hooks.now=now,hooks.utc=createUTC,hooks.unix=createUnix,hooks.months=listMonths,hooks.isDate=isDate,hooks.locale=getSetGlobalLocale,hooks.invalid=createInvalid,hooks.duration=createDuration,hooks.isMoment=isMoment,hooks.weekdays=listWeekdays,hooks.parseZone=createInZone,hooks.localeData=getLocale,hooks.isDuration=isDuration,hooks.monthsShort=listMonthsShort,hooks.weekdaysMin=listWeekdaysMin,hooks.defineLocale=defineLocale,hooks.updateLocale=updateLocale,hooks.locales=listLocales,hooks.weekdaysShort=listWeekdaysShort,hooks.normalizeUnits=normalizeUnits,hooks.relativeTimeRounding=getSetRelativeTimeRounding,hooks.relativeTimeThreshold=getSetRelativeTimeThreshold,hooks.calendarFormat=getCalendarFormat,hooks.prototype=proto,hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const DEFAULT_VALUE="--",LOG_DATE_FORMAT_T="YYYY-MM-DDTHH:mm:ss",LOG_DATE_FORMAT_END="YYYY-MM-DDT23:59:59",DATE_PICKER_FORMAT="YYYY-MM-DD",dateFormat=(t,e=DATE_PICKER_FORMAT)=>t?hooks(t).format(e).replace("Invalid date",DEFAULT_VALUE):DEFAULT_VALUE,validateNumber=t=>typeof t=="number"?!0:typeof t=="string"?!isNaN(parseFloat(t)):!1;function digitUppercase(t){const e=["角","分"],n=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],r=[["元","万","亿"],["","拾","佰","仟"]],i=t<0?"负":"";t=Math.abs(t);let s="";for(let o=0;o<e.length;o++)s+=(n[Math.floor(t*10*Math.pow(10,o))%10]+e[o]).replace(/零./,"");s=s||"整",t=Math.floor(t);for(let o=0;o<r[0].length&&t>0;o++){let a="";for(let l=0;l<r[1].length&&t>0;l++)a=n[t%10]+r[1][l]+a,t=Math.floor(t/10);s=a.replace(/(零.)*零$/,"").replace(/^$/,"零")+r[0][o]+s}return i+s.replace(/(零.)*零元/,"元").replace(/(零.)+/g,"零").replace(/^整$/,"零元整")}const _sfc_main$m=vue.defineComponent({name:"zh-date-picker",__name:"DatePicker",props:{style:{},class:{},modelValue:{}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,r=e,i=a=>Array.isArray(a)?[dateFormat(a[0],LOG_DATE_FORMAT_T),dateFormat(a[1],LOG_DATE_FORMAT_END)]:a&&dateFormat(a,LOG_DATE_FORMAT_T),s=a=>{const l=i(a);r("update:modelValue",l)},o=a=>{const l=i(a);r("change",l)};return(a,l)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([n.class,"zh-date-picker"])},[vue.createVNode(vue.unref(ElDatePicker),vue.mergeProps(a.$attrs,{style:n.style,"model-value":n.modelValue,"onUpdate:modelValue":s,onChange:o}),null,16,["style","model-value"])],2))}}),ZhDatePicker=withInstall$1(_sfc_main$m),_hoisted_1$d={class:"info-pair"},_hoisted_2$9={class:"info-pair--title"},_hoisted_3$8={key:0,class:"info-pair--title--tip"},_sfc_main$l=vue.defineComponent({name:"zh-detail-sub-title",__name:"DetailSubTitle",props:{title:{},value:{},ellipsis:{type:Boolean},tip:{}},setup(t){const e=t;return(n,r)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$d,[vue.createElementVNode("div",_hoisted_2$9,[vue.createTextVNode(vue.toDisplayString(e.title)+" ",1),n.tip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$8,vue.toDisplayString(n.tip),1)):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",{class:vue.normalizeClass(["info-pair--value",{ellipsis:n.ellipsis}])},[vue.renderSlot(n.$slots,"value",{},()=>[vue.createTextVNode(vue.toDisplayString(e.value||vue.unref(DEFAULT_VALUE)),1)])],2)]))}}),ZhDetailSubTitle=withInstall$1(_sfc_main$l),_hoisted_1$c={class:"dialog-wrap"},_hoisted_2$8={class:"title"},_hoisted_3$7={key:0,class:"subtitle"},_hoisted_4$4={class:"dialog-footer"},_sfc_main$k=vue.defineComponent({name:"zh-dialog",__name:"Dialog",props:vue.mergeModels({title:{},subtitle:{},submitText:{},submitDisabled:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:vue.mergeModels(["close","submit"],["update:modelValue"]),setup(t,{emit:e}){const n=e,r=vue.useModel(t,"modelValue"),i=async()=>{n("submit")},s=()=>{n("close")};return(o,a)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$c,[vue.createVNode(vue.unref(ElDialog),vue.mergeProps({modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l)},o.$attrs,{"close-on-click-modal":o.$attrs.closeOnClickModal??!1,"show-close":o.$attrs.showClose??!0}),{header:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$8,vue.toDisplayString(o.title),1),o.subtitle?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$7,vue.toDisplayString(o.subtitle),1)):vue.createCommentVNode("",!0)]),footer:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_4$4,[vue.createVNode(vue.unref(ElButton),{plain:"",onClick:s},{default:vue.withCtx(()=>a[1]||(a[1]=[vue.createTextVNode("取消")])),_:1}),vue.createVNode(vue.unref(ElButton),{type:"primary",color:"#1966FF",onClick:i,disabled:o.submitDisabled},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(o.submitText||"提交"),1)]),_:1},8,["disabled"])])]),default:vue.withCtx(()=>[vue.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3},16,["modelValue","close-on-click-modal","show-close"])]))}}),zhDialog=_export_sfc(_sfc_main$k,[["__scopeId","data-v-f26f266e"]]),ZhDialog=withInstall$1(zhDialog),_hoisted_1$b={class:"info-pair"},_hoisted_2$7={class:"info-pair--title"},_hoisted_3$6={key:0,class:"info-pair--title--tip"},_sfc_main$j=vue.defineComponent({name:"zh-edit-info-pair",__name:"EditInfoPair",props:{title:{},value:{},ellipsis:{type:Boolean},tip:{}},setup(t){const e=t;return(n,r)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$b,[vue.createElementVNode("div",_hoisted_2$7,[vue.createTextVNode(vue.toDisplayString(e.title)+" ",1),n.tip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$6,vue.toDisplayString(n.tip),1)):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",{class:vue.normalizeClass(["info-pair--value",{ellipsis:n.ellipsis}])},[vue.renderSlot(n.$slots,"value",{},()=>[vue.createTextVNode(vue.toDisplayString(e.value||vue.unref(DEFAULT_VALUE)),1)],!0)],2)]))}}),EditInfoPair=_export_sfc(_sfc_main$j,[["__scopeId","data-v-8ed96c83"]]),ZhEditInfoPair=withInstall$1(EditInfoPair),_hoisted_1$a={class:"file_wrapper"},_hoisted_2$6={key:0,class:"header"},_hoisted_3$5={class:"file_main"},_hoisted_4$3={class:"file"},_hoisted_5$3={class:"file_name"},_sfc_main$i=vue.defineComponent({name:"zh-file-wrapper",__name:"FileWrapper",props:{downLoadUrl:{type:String,default:""},canPreview:{type:Boolean,default:!1},fileName:{type:String,default:DEFAULT_VALUE},canDelete:{type:Boolean,default:!1},title:{type:String,default:""},fileId:{type:Number,default:0}},emits:["deleteFile"],setup(t,{emit:e}){const n=t,r=e,i=()=>{n.canDelete&&r("deleteFile",n.fileId)};return(s,o)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$a,[n.title?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$6,vue.toDisplayString(n.title),1)):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_3$5,[vue.createElementVNode("div",_hoisted_4$3,[o[0]||(o[0]=vue.createElementVNode("div",{class:"file_type mr-12"},[vue.createElementVNode("i",{class:"iconfont icon-xiangmuguanli"})],-1)),vue.createElementVNode("div",_hoisted_5$3,vue.toDisplayString(n.fileName),1)]),vue.createVNode(vue.unref(ElLink),{size:"small",class:"btn",link:"",style:{width:"80px"},href:n.downLoadUrl,underline:!1,download:"download"},{default:vue.withCtx(()=>o[1]||(o[1]=[vue.createTextVNode(" 查看/下载 ")])),_:1},8,["href"]),t.canDelete?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"iconfont icon-close close",onClick:i})):vue.createCommentVNode("",!0)])]))}}),FileWrapper=_export_sfc(_sfc_main$i,[["__scopeId","data-v-480bb0e6"]]),ZhFileWrapper=withInstall$1(FileWrapper),_sfc_main$h=vue.defineComponent({name:"zh-grid",__name:"Grid",props:{cols:{default:()=>({xs:1,sm:2,md:2,lg:4,xl:4})},collapsed:{type:Boolean,default:!1},collapsedRows:{default:1},gap:{default:10}},setup(t,{expose:e}){const n=t;vue.onBeforeMount(()=>n.collapsed&&l()),vue.onMounted(()=>{r({target:{innerWidth:window.innerWidth}}),window.addEventListener("resize",r)}),vue.onActivated(()=>{r({target:{innerWidth:window.innerWidth}}),window.addEventListener("resize",r)}),vue.onUnmounted(()=>{window.removeEventListener("resize",r)}),vue.onDeactivated(()=>{window.removeEventListener("resize",r)});const r=d=>{let h=d.target.innerWidth;switch(!!h){case h<768:i.value="xs";break;case(h>=768&&h<992):i.value="sm";break;case(h>=992&&h<1200):i.value="md";break;case(h>=1200&&h<1920):i.value="lg";break;case h>=1920:i.value="xl";break}};vue.provide("gap",Array.isArray(n.gap)?n.gap[0]:n.gap);let i=vue.ref("xl");vue.provide("breakPoint",i);const s=vue.ref(-1);vue.provide("shouldHiddenIndex",s);const o=vue.computed(()=>typeof n.cols=="object"?n.cols[i.value]??n.cols:n.cols);vue.provide("cols",o);const a=vue.useSlots().default(),l=()=>{var p,g,v,m;let d=[],h=null;a.forEach(y=>{var b;typeof y.type=="object"&&y.type.name==="GridItem"&&((b=y.props)==null?void 0:b.suffix)!==void 0&&(h=y),typeof y.type=="symbol"&&Array.isArray(y.children)&&d.push(...y.children)});let f=0;h&&(f=(((p=h.props[i.value])==null?void 0:p.span)??((g=h.props)==null?void 0:g.span)??1)+(((v=h.props[i.value])==null?void 0:v.offset)??((m=h.props)==null?void 0:m.offset)??0));try{let y=!1;d.reduce((b=0,_,T)=>{var x,k,w,O;if(b+=(((x=_.props[i.value])==null?void 0:x.span)??((k=_.props)==null?void 0:k.span)??1)+(((w=_.props[i.value])==null?void 0:w.offset)??((O=_.props)==null?void 0:O.offset)??0),Number(b)>n.collapsedRows*o.value-f)throw s.value=T,y=!0,"find it";return b},0),y||(s.value=-1)}catch{}};vue.watch(()=>i.value,()=>{n.collapsed&&l()}),vue.watch(()=>n.collapsed,d=>{if(d)return l();s.value=-1});const u=vue.computed(()=>typeof n.gap=="number"?`${n.gap}px`:Array.isArray(n.gap)?`${n.gap[1]}px ${n.gap[0]}px`:"unset"),c=vue.computed(()=>({display:"grid",gridGap:u.value,gridTemplateColumns:`repeat(${o.value}, minmax(0, 1fr))`}));return e({breakPoint:i}),(d,h)=>(vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle(c.value)},[vue.renderSlot(d.$slots,"default")],4))}}),ZhGrid=withInstall$1(_sfc_main$h),_hoisted_1$9={class:"info-pair"},_hoisted_2$5={class:"info-pair--title"},_hoisted_3$4={key:0,class:"info-pair--title--tip"},_sfc_main$g=vue.defineComponent({name:"zh-info-pair",__name:"InfoPair",props:{title:{},value:{},ellipsis:{type:Boolean},tip:{}},setup(t){const e=t;return(n,r)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$9,[vue.createElementVNode("div",_hoisted_2$5,[vue.createTextVNode(vue.toDisplayString(e.title)+" ",1),n.tip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$4,vue.toDisplayString(n.tip),1)):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",{class:vue.normalizeClass(["info-pair--value",{ellipsis:n.ellipsis}])},[vue.renderSlot(n.$slots,"value",{},()=>[vue.createTextVNode(vue.toDisplayString(e.value||vue.unref(DEFAULT_VALUE)),1)],!0)],2)]))}}),InfoPair=_export_sfc(_sfc_main$g,[["__scopeId","data-v-7c46e10e"]]),ZhInfoPair=withInstall$1(InfoPair),_sfc_main$f=vue.defineComponent({name:"zh-input",__name:"Input",props:vue.mergeModels({style:{},class:{default:"zh-default-input"},size:{default:"default"},className:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=vue.useAttrs(),n=t,r=vue.useModel(t,"modelValue"),i=()=>{(e.max||Number(e.max)===0)&&Number(r.value)>=e.max&&(r.value=e.max.toString()),(e.min||Number(e.min)===0)&&Number(r.value)<=e.min&&(r.value=e.min.toString())};return(s,o)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(n.class)},[vue.createVNode(vue.unref(ElInput),vue.mergeProps(s.$attrs,{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=a=>r.value=a),size:s.size,onBlur:i}),vue.createSlots({_:2},[vue.renderList(s.$slots,(a,l)=>({name:a,fn:vue.withCtx(u=>[vue.renderSlot(s.$slots,a,vue.normalizeProps(vue.guardReactiveProps(u)),void 0,!0)])}))]),1040,["modelValue","size"])],2))}}),Input=_export_sfc(_sfc_main$f,[["__scopeId","data-v-75a9ec9f"]]),ZhInput=withInstall$1(Input),_sfc_main$e=vue.defineComponent({name:"zh-input-number",__name:"InputNumber",props:{style:{},class:{},modelValue:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=vue.useAttrs(),s=(u,c=0,d=0,h=0)=>{let f=(u==null?void 0:u.toString())??"",p,g,v;return d===0?(f=f.replace(/[^\d]/g,""),f=f.replace(/^0\d+/g,"0"),c!==0&&(f=f.slice(0,c))):(f=f.replace(/[^\-\d.]/g,""),f=f.replace(/^[^\-\d]/g,""),f=f.replace(/\.{2}/g,"."),f=f.replace(/^0(\d+)/g,"$1"),p=f.split(".")||[],p.length>1?(c===0?g=p[0]:g=p[0].slice(0,c),v=p[1].slice(0,d),f=g+"."+v):c!==0&&(f=f.slice(0,c))),h!==0&&(f=f.slice(0,h)),f},o=()=>{n.modelValue===""||n.modelValue===void 0||(i.max&&Number(n.modelValue)>i.max&&r("update:modelValue",i.max.toString()),i.min&&Number(n.modelValue)<i.min&&r("update:modelValue",i.min.toString()))},a=u=>u?s(u,i.integer,i.precision,i.maxLength):"",l=u=>{/^\d+\.0*$/.test((u==null?void 0:u.toString())||"")||u===""?r("update:modelValue",a(u)):r("update:modelValue",Number(a(u)))};return(u,c)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["input-number",n.class]),style:vue.normalizeStyle(n.style)},[vue.createVNode(vue.unref(ElInput),vue.mergeProps(u.$attrs,{"model-value":n.modelValue,"onUpdate:modelValue":l,onBlur:o,style:{width:"100%"},formatter:a}),vue.createSlots({_:2},[vue.renderList(Object.keys(u.$slots),d=>({name:d,fn:vue.withCtx(h=>[vue.renderSlot(u.$slots,d,vue.normalizeProps(vue.guardReactiveProps(h)),void 0,!0)])}))]),1040,["model-value"])],6))}}),InputNumber=_export_sfc(_sfc_main$e,[["__scopeId","data-v-32d536a9"]]),ZhInputNumber=withInstall$1(InputNumber),_hoisted_1$8={class:"loading-box"},_sfc_main$d=vue.defineComponent({name:"zh-loading",__name:"Loading",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$8,n[0]||(n[0]=[vue.createElementVNode("div",{class:"loading-wrap"},[vue.createElementVNode("span",{class:"dot dot-spin"},[vue.createElementVNode("i"),vue.createElementVNode("i"),vue.createElementVNode("i"),vue.createElementVNode("i")])],-1)])))}}),Loading=_export_sfc(_sfc_main$d,[["__scopeId","data-v-bcc04aa5"]]),ZhLoading=withInstall$1(Loading),_hoisted_1$7={key:0,class:"tips"},_sfc_main$c=vue.defineComponent({name:"zh-message-box",__name:"MessageBox",props:vue.mergeModels({title:{},subtitle:{},tip:{},placeholder:{},formItemProps:{},formProps:{},inputProps:{},closeOnClickModal:{type:Boolean},callBack:{type:Function},onAction:{type:Function},onVanish:{type:Function},submitText:{},render:{type:Function},maxlength:{},renderProps:{}},{visible:{type:Boolean,default:!0},visibleModifiers:{}}),emits:vue.mergeModels(["action","vanish"],["update:visible"]),setup(t,{emit:e}){const n=t,r=e,i=vue.useModel(t,"visible"),s=vue.ref(),o=vue.ref({textarea:""}),a=(d,h,f)=>{h||f(n.placeholder),f()},l=vue.ref({textarea:[{validator:a,trigger:["blur","change"]}]}),u=async()=>{var d;n.placeholder?(d=s.value)==null||d.validate(async h=>{if(h)try{if(n.callBack){const f=await n.callBack(o.value.textarea);console.log(f)}r("action","submit"),i.value=!1}catch(f){console.log(f)}}):(r("action","submit"),i.value=!1)},c=()=>{r("action","cancel"),i.value=!1};return(d,h)=>(vue.openBlock(),vue.createBlock(zhDialog,vue.mergeProps({modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=f=>i.value=f),width:"544"},n,{onSubmit:u,onClose:c}),{default:vue.withCtx(()=>[d.tip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$7,vue.toDisplayString(d.tip),1)):vue.createCommentVNode("",!0),d.render?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(d.render),vue.normalizeProps(vue.mergeProps({key:1},n.renderProps)),null,16)):d.placeholder?(vue.openBlock(),vue.createBlock(vue.unref(ElForm),vue.mergeProps({key:2,ref_key:"formRef",ref:s,model:o.value,rules:l.value},n.formProps),{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElFormItem),vue.mergeProps({prop:"textarea"},n.formItemProps),{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElInput),vue.mergeProps({modelValue:o.value.textarea,"onUpdate:modelValue":h[0]||(h[0]=f=>o.value.textarea=f),style:{width:"100%"},rows:4,type:"textarea",placeholder:d.placeholder,maxlength:n.maxlength||100,"show-word-limit":""},d.inputProps),null,16,["modelValue","placeholder","maxlength"])]),_:1},16)]),_:1},16,["model","rules"])):vue.createCommentVNode("",!0)]),_:1},16,["modelValue"]))}}),MessageBox=_export_sfc(_sfc_main$c,[["__scopeId","data-v-1903b5ef"]]),ZhMessageBox=withInstall$1(MessageBox),_sfc_main$b=vue.defineComponent({name:"zh-money-input",__name:"MoneyInput",props:vue.mergeModels({style:{},class:{},showTooltip:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:vue.mergeModels(["update:modelValue"],["update:modelValue"]),setup(t,{emit:e}){const n=t,r=vue.useModel(t,"modelValue"),i=vue.computed(()=>{if(r.value)return validateNumber(r.value)&&Number(r.value)>=1e3?digitUppercase(Number(r.value)):""}),s=vue.ref(!1);return(o,a)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),{effect:"dark",content:i.value,placement:"top",visible:o.showTooltip&&s.value&&!!i.value},{default:vue.withCtx(()=>[vue.createVNode(InputNumber,vue.mergeProps(o.$attrs,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l),style:n.style,class:n.class,onFocus:a[1]||(a[1]=()=>s.value=!0),onBlur:a[2]||(a[2]=()=>s.value=!1)}),vue.createSlots({_:2},[vue.renderList(Object.keys(o.$slots),l=>({name:l,fn:vue.withCtx(u=>[vue.renderSlot(o.$slots,l,vue.normalizeProps(vue.guardReactiveProps(u)),void 0,!0)])}))]),1040,["modelValue","style","class"])]),_:3},8,["content","visible"]))}}),MoneyInput=_export_sfc(_sfc_main$b,[["__scopeId","data-v-d97e0edf"]]),ZhMoneyInput=withInstall$1(MoneyInput),_hoisted_1$6={class:"page-head"},_hoisted_2$4={class:"left-wrap"},_hoisted_3$3={class:"page-name"},_hoisted_4$2={class:"value"},_hoisted_5$2={class:"other-inform"},_hoisted_6$2={class:"label"},_hoisted_7$2={class:"value mg-r-24"},_hoisted_8$1={class:"status"},_sfc_main$a=vue.defineComponent({name:"zh-page-head-panel",__name:"PageHeadPanel",props:{dataSource:{}},setup(t){const e=t,{name:n,no:r,status:i,extendLabel:s,extendValue:o}=vue.toRefs(e.dataSource);return(a,l)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$6,[vue.createElementVNode("div",_hoisted_2$4,[vue.createElementVNode("span",_hoisted_3$3,vue.toDisplayString(vue.unref(n)),1),vue.createElementVNode("div",null,[l[0]||(l[0]=vue.createElementVNode("span",{class:"label mg-l-16"},"编号",-1)),vue.createElementVNode("span",_hoisted_4$2,vue.toDisplayString(vue.unref(r)),1)])]),vue.createElementVNode("div",_hoisted_5$2,[vue.renderSlot(a.$slots,"extend",{},()=>[vue.createElementVNode("span",_hoisted_6$2,vue.toDisplayString(vue.unref(s)),1),vue.createElementVNode("span",_hoisted_7$2,vue.toDisplayString(vue.unref(o)),1)],!0),vue.createElementVNode("span",_hoisted_8$1,vue.toDisplayString(vue.unref(i)),1)])]))}}),PageHeadPanel=_export_sfc(_sfc_main$a,[["__scopeId","data-v-cecdddb2"]]),ZhPageHeadPanel=withInstall$1(PageHeadPanel),_sfc_main$9=vue.defineComponent({name:"zh-tool-tips",__name:"ToolTips",props:{placement:{type:String,default:"top"},content:{type:String,default:"top"}},setup(t){const e=t;return(n,r)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),{class:"box-item",effect:"dark",content:e.content,placement:e.placement},{default:vue.withCtx(()=>[vue.renderSlot(n.$slots,"default",{},()=>[r[0]||(r[0]=vue.createElementVNode("i",{class:"iconfont icon-Frame2"},null,-1))],!0)]),_:3},8,["content","placement"]))}}),ToolTips=_export_sfc(_sfc_main$9,[["__scopeId","data-v-93c79d22"]]),ZhToolTips=withInstall$1(ToolTips),_sfc_main$8=vue.defineComponent({name:"ZhBaseInfo",__name:"BaseInfo",props:{contentWidth:{default:void 0},labelWidth:{default:"70px"},infoDirection:{default:"vertical"},cols:{default:5},gap:{default:16}},setup(t){const e=t,n=vue.ref(),r=vue.ref(),i=vue.ref();vue.provide("infoLabelWidth",n),vue.provide("infoContentWidth",r),vue.provide("infoDirection",i);function s(){n.value=e.labelWidth}function o(){r.value=e.contentWidth}function a(){i.value=e.infoDirection}return vue.watch(()=>e.contentWidth,()=>o(),{immediate:!0}),vue.watch(()=>e.labelWidth,()=>s(),{immediate:!0}),vue.watch(()=>e.infoDirection,()=>a(),{immediate:!0}),(l,u)=>{const c=vue.resolveComponent("grid");return vue.openBlock(),vue.createBlock(c,{cols:l.cols,gap:l.gap},{default:vue.withCtx(()=>[vue.renderSlot(l.$slots,"default")]),_:3},8,["cols","gap"])}}}),ZhBaseInfo=withInstall$1(_sfc_main$8),_hoisted_1$5={class:"common-card"},_hoisted_2$3={class:"detail-header"},_hoisted_3$2={class:"detail-header--left"},_hoisted_4$1={class:"title common-title"},_hoisted_5$1={class:"info-pair--label"},_hoisted_6$1={class:"info-pair--value"},_hoisted_7$1={key:1,class:"detail-header--right"},_hoisted_8={class:"info-pair--label"},_hoisted_9={class:"info-pair--value"},_sfc_main$7=vue.defineComponent({name:"ZhDetailHeader",__name:"DetailHeader",props:{title:{},leftInfos:{},rightInfos:{},stateMeta:{}},setup(t){const e=vue.useSlots(),n=t;return(r,i)=>{var s,o;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$5,[vue.createElementVNode("div",null,[vue.renderSlot(r.$slots,"menu",{},void 0,!0)]),vue.createElementVNode("div",_hoisted_2$3,[vue.createElementVNode("div",_hoisted_3$2,[vue.createElementVNode("div",_hoisted_4$1,vue.toDisplayString(n.title),1),vue.renderSlot(r.$slots,"extra-info",{},void 0,!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.leftInfos,a=>(vue.openBlock(),vue.createElementBlock("div",{class:"info-pair",key:a.value},[vue.createElementVNode("div",_hoisted_5$1,vue.toDisplayString(a.label),1),vue.createElementVNode("div",_hoisted_6$1,vue.toDisplayString(a.value??vue.unref(DEFAULT_VALUE)),1)]))),128))]),vue.renderSlot(r.$slots,"default",{},void 0,!0),vue.unref(e)["right-infos"]?vue.renderSlot(r.$slots,"right-infos",{key:0},void 0,!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_7$1,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.rightInfos,a=>(vue.openBlock(),vue.createElementBlock("div",{class:"info-pair",key:a.value},[vue.createElementVNode("div",_hoisted_8,vue.toDisplayString(a.label),1),vue.createElementVNode("div",_hoisted_9,vue.toDisplayString(a.value??vue.unref(DEFAULT_VALUE)),1)]))),128)),r.stateMeta?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["state common-title",(s=r.stateMeta)==null?void 0:s.state])},vue.toDisplayString((o=r.stateMeta)==null?void 0:o.intro),3)):vue.createCommentVNode("",!0)]))])])}}}),DetailHeader=_export_sfc(_sfc_main$7,[["__scopeId","data-v-8830340b"]]),ZhDetailHeader=withInstall$1(DetailHeader);var BaseMapType=(t=>(t[t.vector=0]="vector",t[t.satellite=1]="satellite",t))(BaseMapType||{});class BaseEvent{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const ObjectEventType={PROPERTYCHANGE:"propertychange"};class Disposable{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function binarySearch(t,e,n){let r,i;n=n||ascending;let s=0,o=t.length,a=!1;for(;s<o;)r=s+(o-s>>1),i=+n(t[r],e),i<0?s=r+1:(o=r,a=!i);return a?s:~s}function ascending(t,e){return t>e?1:t<e?-1:0}function descending(t,e){return t<e?1:t>e?-1:0}function linearFindNearest(t,e,n){if(t[0]<=e)return 0;const r=t.length;if(e<=t[r-1])return r-1;if(typeof n=="function"){for(let i=1;i<r;++i){const s=t[i];if(s===e)return i;if(s<e)return n(e,t[i-1],s)>0?i-1:i}return r-1}if(n>0){for(let i=1;i<r;++i)if(t[i]<e)return i-1;return r-1}if(n<0){for(let i=1;i<r;++i)if(t[i]<=e)return i;return r-1}for(let i=1;i<r;++i){if(t[i]==e)return i;if(t[i]<e)return t[i-1]-e<e-t[i]?i-1:i}return r-1}function reverseSubArray(t,e,n){for(;e<n;){const r=t[e];t[e]=t[n],t[n]=r,++e,--n}}function extend$2(t,e){const n=Array.isArray(e)?e:[e],r=n.length;for(let i=0;i<r;i++)t[t.length]=n[i]}function equals$2(t,e){const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function isSorted(t,e,n){const r=e||ascending;return t.every(function(i,s){if(s===0)return!0;const o=r(t[s-1],i);return!(o>0||o===0)})}function TRUE(){return!0}function FALSE(){return!1}function VOID(){}function memoizeOne(t){let e,n,r;return function(){const i=Array.prototype.slice.call(arguments);return(!n||this!==r||!equals$2(i,n))&&(r=this,n=i,e=t.apply(this,arguments)),e}}function toPromise(t){function e(){let n;try{n=t()}catch(r){return Promise.reject(r)}return n instanceof Promise?n:Promise.resolve(n)}return e()}function clear(t){for(const e in t)delete t[e]}function isEmpty$1(t){let e;for(e in t)return!1;return!e}class Target extends Disposable{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,n){if(!e||!n)return;const r=this.listeners_||(this.listeners_={}),i=r[e]||(r[e]=[]);i.includes(n)||i.push(n)}dispatchEvent(e){const n=typeof e=="string",r=n?e:e.type,i=this.listeners_&&this.listeners_[r];if(!i)return;const s=n?new BaseEvent(e):e;s.target||(s.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});r in o||(o[r]=0,a[r]=0),++o[r];let l;for(let u=0,c=i.length;u<c;++u)if("handleEvent"in i[u]?l=i[u].handleEvent(s):l=i[u].call(this,s),l===!1||s.propagationStopped){l=!1;break}if(--o[r]===0){let u=a[r];for(delete a[r];u--;)this.removeEventListener(r,VOID);delete o[r]}return l}disposeInternal(){this.listeners_&&clear(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,n){if(!this.listeners_)return;const r=this.listeners_[e];if(!r)return;const i=r.indexOf(n);i!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(r[i]=VOID,++this.pendingRemovals_[e]):(r.splice(i,1),r.length===0&&delete this.listeners_[e]))}}const EventType={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function listen(t,e,n,r,i){if(i){const o=n;n=function(){t.removeEventListener(e,n),o.apply(r??this,arguments)}}else r&&r!==t&&(n=n.bind(r));const s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function listenOnce(t,e,n,r){return listen(t,e,n,r,!0)}function unlistenByKey(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),clear(t))}class Observable extends Target{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(EventType.CHANGE)}getRevision(){return this.revision_}onInternal(e,n){if(Array.isArray(e)){const r=e.length,i=new Array(r);for(let s=0;s<r;++s)i[s]=listen(this,e[s],n);return i}return listen(this,e,n)}onceInternal(e,n){let r;if(Array.isArray(e)){const i=e.length;r=new Array(i);for(let s=0;s<i;++s)r[s]=listenOnce(this,e[s],n)}else r=listenOnce(this,e,n);return n.ol_key=r,r}unInternal(e,n){const r=n.ol_key;if(r)unByKey(r);else if(Array.isArray(e))for(let i=0,s=e.length;i<s;++i)this.removeEventListener(e[i],n);else this.removeEventListener(e,n)}}Observable.prototype.on,Observable.prototype.once,Observable.prototype.un;function unByKey(t){if(Array.isArray(t))for(let e=0,n=t.length;e<n;++e)unlistenByKey(t[e]);else unlistenByKey(t)}function abstract(){throw new Error("Unimplemented abstract method.")}let uidCounter_=0;function getUid(t){return t.ol_uid||(t.ol_uid=String(++uidCounter_))}class ObjectEvent extends BaseEvent{constructor(e,n,r){super(e),this.key=n,this.oldValue=r}}class BaseObject extends Observable{constructor(e){super(),this.on,this.once,this.un,getUid(this),this.values_=null,e!==void 0&&this.setProperties(e)}get(e){let n;return this.values_&&this.values_.hasOwnProperty(e)&&(n=this.values_[e]),n}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(e,n){let r;r=`change:${e}`,this.hasListener(r)&&this.dispatchEvent(new ObjectEvent(r,e,n)),r=ObjectEventType.PROPERTYCHANGE,this.hasListener(r)&&this.dispatchEvent(new ObjectEvent(r,e,n))}addChangeListener(e,n){this.addEventListener(`change:${e}`,n)}removeChangeListener(e,n){this.removeEventListener(`change:${e}`,n)}set(e,n,r){const i=this.values_||(this.values_={});if(r)i[e]=n;else{const s=i[e];i[e]=n,s!==n&&this.notify(e,s)}}setProperties(e,n){for(const r in e)this.set(r,e[r],n)}applyProperties(e){e.values_&&Object.assign(this.values_||(this.values_={}),e.values_)}unset(e,n){if(this.values_&&e in this.values_){const r=this.values_[e];delete this.values_[e],isEmpty$1(this.values_)&&(this.values_=null),n||this.notify(e,r)}}}const CollectionEventType={ADD:"add",REMOVE:"remove"},Property$3={LENGTH:"length"};class CollectionEvent extends BaseEvent{constructor(e,n,r){super(e),this.element=n,this.index=r}}class Collection extends BaseObject{constructor(e,n){if(super(),this.on,this.once,this.un,n=n||{},this.unique_=!!n.unique,this.array_=e||[],this.unique_)for(let r=0,i=this.array_.length;r<i;++r)this.assertUnique_(this.array_[r],r);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(e){for(let n=0,r=e.length;n<r;++n)this.push(e[n]);return this}forEach(e){const n=this.array_;for(let r=0,i=n.length;r<i;++r)e(n[r],r,n)}getArray(){return this.array_}item(e){return this.array_[e]}getLength(){return this.get(Property$3.LENGTH)}insertAt(e,n){if(e<0||e>this.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n),this.array_.splice(e,0,n),this.updateLength_(),this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD,n,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const n=this.getLength();return this.insertAt(n,e),this.getLength()}remove(e){const n=this.array_;for(let r=0,i=n.length;r<i;++r)if(n[r]===e)return this.removeAt(r)}removeAt(e){if(e<0||e>=this.getLength())return;const n=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE,n,e)),n}setAt(e,n){const r=this.getLength();if(e>=r){this.insertAt(e,n);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n,e);const i=this.array_[e];this.array_[e]=n,this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE,i,e)),this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD,n,e))}updateLength_(){this.set(Property$3.LENGTH,this.array_.length)}assertUnique_(e,n){for(let r=0,i=this.array_.length;r<i;++r)if(this.array_[r]===e&&r!==n)throw new Error("Duplicate item added to a unique collection")}}function quickselect(t,e,n=0,r=t.length-1,i=defaultCompare){for(;r>n;){if(r-n>600){const l=r-n+1,u=e-n+1,c=Math.log(l),d=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*d*(l-d)/l)*(u-l/2<0?-1:1),f=Math.max(n,Math.floor(e-u*d/l+h)),p=Math.min(r,Math.floor(e+(l-u)*d/l+h));quickselect(t,e,f,p,i)}const s=t[e];let o=n,a=r;for(swap(t,n,e),i(t[r],s)>0&&swap(t,n,r);o<a;){for(swap(t,o,a),o++,a--;i(t[o],s)<0;)o++;for(;i(t[a],s)>0;)a--}i(t[n],s)===0?swap(t,n,a):(a++,swap(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}}function swap(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function defaultCompare(t,e){return t<e?-1:t>e?1:0}let RBush$1=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;const r=[];if(!intersects$1(e,n))return r;const i=this.toBBox,s=[];for(;n;){for(let o=0;o<n.children.length;o++){const a=n.children[o],l=n.leaf?i(a):a;intersects$1(e,l)&&(n.leaf?r.push(a):contains(e,l)?this._all(a,r):s.push(a))}n=s.pop()}return r}collides(e){let n=this.data;if(!intersects$1(e,n))return!1;const r=[];for(;n;){for(let i=0;i<n.children.length;i++){const s=n.children[i],o=n.leaf?this.toBBox(s):s;if(intersects$1(e,o)){if(n.leaf||contains(e,o))return!0;r.push(s)}}n=r.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let r=0;r<e.length;r++)this.insert(e[r]);return this}let n=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=n;else if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){const r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=createNode([]),this}remove(e,n){if(!e)return this;let r=this.data;const i=this.toBBox(e),s=[],o=[];let a,l,u;for(;r||s.length;){if(r||(r=s.pop(),l=s[s.length-1],a=o.pop(),u=!0),r.leaf){const c=findItem(e,r.children,n);if(c!==-1)return r.children.splice(c,1),s.push(r),this._condense(s),this}!u&&!r.leaf&&contains(r,i)?(s.push(r),o.push(a),a=0,l=r,r=r.children[0]):l?(a++,r=l.children[a],u=!1):r=null}return this}toBBox(e){return e}compareMinX(e,n){return e.minX-n.minX}compareMinY(e,n){return e.minY-n.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,n){const r=[];for(;e;)e.leaf?n.push(...e.children):r.push(...e.children),e=r.pop();return n}_build(e,n,r,i){const s=r-n+1;let o=this._maxEntries,a;if(s<=o)return a=createNode(e.slice(n,r+1)),calcBBox(a,this.toBBox),a;i||(i=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,i-1))),a=createNode([]),a.leaf=!1,a.height=i;const l=Math.ceil(s/o),u=l*Math.ceil(Math.sqrt(o));multiSelect(e,n,r,u,this.compareMinX);for(let c=n;c<=r;c+=u){const d=Math.min(c+u-1,r);multiSelect(e,c,d,l,this.compareMinY);for(let h=c;h<=d;h+=l){const f=Math.min(h+l-1,d);a.children.push(this._build(e,h,f,i-1))}}return calcBBox(a,this.toBBox),a}_chooseSubtree(e,n,r,i){for(;i.push(n),!(n.leaf||i.length-1===r);){let s=1/0,o=1/0,a;for(let l=0;l<n.children.length;l++){const u=n.children[l],c=bboxArea(u),d=enlargedArea(e,u)-c;d<o?(o=d,s=c<s?c:s,a=u):d===o&&c<s&&(s=c,a=u)}n=a||n.children[0]}return n}_insert(e,n,r){const i=r?e:this.toBBox(e),s=[],o=this._chooseSubtree(i,this.data,n,s);for(o.children.push(e),extend$1(o,i);n>=0&&s[n].children.length>this._maxEntries;)this._split(s,n),n--;this._adjustParentBBoxes(i,s,n)}_split(e,n){const r=e[n],i=r.children.length,s=this._minEntries;this._chooseSplitAxis(r,s,i);const o=this._chooseSplitIndex(r,s,i),a=createNode(r.children.splice(o,r.children.length-o));a.height=r.height,a.leaf=r.leaf,calcBBox(r,this.toBBox),calcBBox(a,this.toBBox),n?e[n-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,n){this.data=createNode([e,n]),this.data.height=e.height+1,this.data.leaf=!1,calcBBox(this.data,this.toBBox)}_chooseSplitIndex(e,n,r){let i,s=1/0,o=1/0;for(let a=n;a<=r-n;a++){const l=distBBox(e,0,a,this.toBBox),u=distBBox(e,a,r,this.toBBox),c=intersectionArea(l,u),d=bboxArea(l)+bboxArea(u);c<s?(s=c,i=a,o=d<o?d:o):c===s&&d<o&&(o=d,i=a)}return i||r-n}_chooseSplitAxis(e,n,r){const i=e.leaf?this.compareMinX:compareNodeMinX,s=e.leaf?this.compareMinY:compareNodeMinY,o=this._allDistMargin(e,n,r,i),a=this._allDistMargin(e,n,r,s);o<a&&e.children.sort(i)}_allDistMargin(e,n,r,i){e.children.sort(i);const s=this.toBBox,o=distBBox(e,0,n,s),a=distBBox(e,r-n,r,s);let l=bboxMargin(o)+bboxMargin(a);for(let u=n;u<r-n;u++){const c=e.children[u];extend$1(o,e.leaf?s(c):c),l+=bboxMargin(o)}for(let u=r-n-1;u>=n;u--){const c=e.children[u];extend$1(a,e.leaf?s(c):c),l+=bboxMargin(a)}return l}_adjustParentBBoxes(e,n,r){for(let i=r;i>=0;i--)extend$1(n[i],e)}_condense(e){for(let n=e.length-1,r;n>=0;n--)e[n].children.length===0?n>0?(r=e[n-1].children,r.splice(r.indexOf(e[n]),1)):this.clear():calcBBox(e[n],this.toBBox)}};function findItem(t,e,n){if(!n)return e.indexOf(t);for(let r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function calcBBox(t,e){distBBox(t,0,t.children.length,e,t)}function distBBox(t,e,n,r,i){i||(i=createNode(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s=e;s<n;s++){const o=t.children[s];extend$1(i,t.leaf?r(o):o)}return i}function extend$1(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function compareNodeMinX(t,e){return t.minX-e.minX}function compareNodeMinY(t,e){return t.minY-e.minY}function bboxArea(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function bboxMargin(t){return t.maxX-t.minX+(t.maxY-t.minY)}function enlargedArea(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function intersectionArea(t,e){const n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),s=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,s-r)}function contains(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function intersects$1(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function createNode(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function multiSelect(t,e,n,r,i){const s=[e,n];for(;s.length;){if(n=s.pop(),e=s.pop(),n-e<=r)continue;const o=e+Math.ceil((n-e)/r/2)*r;quickselect(t,o,e,n,i),s.push(e,o,o,n)}}const Relationship={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function boundingExtent(t){const e=createEmpty();for(let n=0,r=t.length;n<r;++n)extendCoordinate(e,t[n]);return e}function buffer(t,e,n){return n?(n[0]=t[0]-e,n[1]=t[1]-e,n[2]=t[2]+e,n[3]=t[3]+e,n):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function clone(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function closestSquaredDistanceXY(t,e,n){let r,i;return e<t[0]?r=t[0]-e:t[2]<e?r=e-t[2]:r=0,n<t[1]?i=t[1]-n:t[3]<n?i=n-t[3]:i=0,r*r+i*i}function containsCoordinate(t,e){return containsXY(t,e[0],e[1])}function containsExtent(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function containsXY(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function coordinateRelationship(t,e){const n=t[0],r=t[1],i=t[2],s=t[3],o=e[0],a=e[1];let l=Relationship.UNKNOWN;return o<n?l=l|Relationship.LEFT:o>i&&(l=l|Relationship.RIGHT),a<r?l=l|Relationship.BELOW:a>s&&(l=l|Relationship.ABOVE),l===Relationship.UNKNOWN&&(l=Relationship.INTERSECTING),l}function createEmpty(){return[1/0,1/0,-1/0,-1/0]}function createOrUpdate$2(t,e,n,r,i){return i?(i[0]=t,i[1]=e,i[2]=n,i[3]=r,i):[t,e,n,r]}function createOrUpdateEmpty(t){return createOrUpdate$2(1/0,1/0,-1/0,-1/0,t)}function createOrUpdateFromCoordinate(t,e){const n=t[0],r=t[1];return createOrUpdate$2(n,r,n,r,e)}function createOrUpdateFromFlatCoordinates(t,e,n,r,i){const s=createOrUpdateEmpty(i);return extendFlatCoordinates(s,t,e,n,r)}function equals$1(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function extend(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function extendCoordinate(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function extendFlatCoordinates(t,e,n,r,i){for(;n<r;n+=i)extendXY(t,e[n],e[n+1]);return t}function extendXY(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function forEachCorner(t,e){let n;return n=e(getBottomLeft(t)),n||(n=e(getBottomRight(t)),n)||(n=e(getTopRight(t)),n)||(n=e(getTopLeft(t)),n)?n:!1}function getArea(t){let e=0;return isEmpty(t)||(e=getWidth(t)*getHeight(t)),e}function getBottomLeft(t){return[t[0],t[1]]}function getBottomRight(t){return[t[2],t[1]]}function getCenter(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function getCorner(t,e){let n;if(e==="bottom-left")n=getBottomLeft(t);else if(e==="bottom-right")n=getBottomRight(t);else if(e==="top-left")n=getTopLeft(t);else if(e==="top-right")n=getTopRight(t);else throw new Error("Invalid corner");return n}function getForViewAndSize(t,e,n,r,i){const[s,o,a,l,u,c,d,h]=getRotatedViewport(t,e,n,r);return createOrUpdate$2(Math.min(s,a,u,d),Math.min(o,l,c,h),Math.max(s,a,u,d),Math.max(o,l,c,h),i)}function getRotatedViewport(t,e,n,r){const i=e*r[0]/2,s=e*r[1]/2,o=Math.cos(n),a=Math.sin(n),l=i*o,u=i*a,c=s*o,d=s*a,h=t[0],f=t[1];return[h-l+d,f-u-c,h-l-d,f-u+c,h+l-d,f+u+c,h+l+d,f+u-c,h-l+d,f-u-c]}function getHeight(t){return t[3]-t[1]}function getIntersection(t,e,n){const r=createEmpty();return intersects(t,e)?(t[0]>e[0]?r[0]=t[0]:r[0]=e[0],t[1]>e[1]?r[1]=t[1]:r[1]=e[1],t[2]<e[2]?r[2]=t[2]:r[2]=e[2],t[3]<e[3]?r[3]=t[3]:r[3]=e[3]):createOrUpdateEmpty(r),r}function getTopLeft(t){return[t[0],t[3]]}function getTopRight(t){return[t[2],t[3]]}function getWidth(t){return t[2]-t[0]}function intersects(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function isEmpty(t){return t[2]<t[0]||t[3]<t[1]}function returnOrUpdate(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function intersectsSegment(t,e,n){let r=!1;const i=coordinateRelationship(t,e),s=coordinateRelationship(t,n);if(i===Relationship.INTERSECTING||s===Relationship.INTERSECTING)r=!0;else{const o=t[0],a=t[1],l=t[2],u=t[3],c=e[0],d=e[1],h=n[0],f=n[1],p=(f-d)/(h-c);let g,v;s&Relationship.ABOVE&&!(i&Relationship.ABOVE)&&(g=h-(f-u)/p,r=g>=o&&g<=l),!r&&s&Relationship.RIGHT&&!(i&Relationship.RIGHT)&&(v=f-(h-l)*p,r=v>=a&&v<=u),!r&&s&Relationship.BELOW&&!(i&Relationship.BELOW)&&(g=h-(f-a)/p,r=g>=o&&g<=l),!r&&s&Relationship.LEFT&&!(i&Relationship.LEFT)&&(v=f-(h-o)*p,r=v>=a&&v<=u)}return r}function wrapX$2(t,e){const n=e.getExtent(),r=getCenter(t);if(e.canWrapX()&&(r[0]<n[0]||r[0]>=n[2])){const i=getWidth(n),o=Math.floor((r[0]-n[0])/i)*i;t[0]-=o,t[2]-=o}return t}function wrapAndSliceX(t,e,n){if(e.canWrapX()){const r=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[r[0],t[1],r[2],t[3]]];wrapX$2(t,e);const i=getWidth(r);if(getWidth(t)>i&&!n)return[[r[0],t[1],r[2],t[3]]];if(t[0]<r[0])return[[t[0]+i,t[1],r[2],t[3]],[r[0],t[1],t[2],t[3]]];if(t[2]>r[2])return[[t[0],t[1],r[2],t[3]],[r[0],t[1],t[2]-i,t[3]]]}return[t]}class RBush{constructor(e){this.rbush_=new RBush$1(e),this.items_={}}insert(e,n){const r={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:n};this.rbush_.insert(r),this.items_[getUid(n)]=r}load(e,n){const r=new Array(n.length);for(let i=0,s=n.length;i<s;i++){const o=e[i],a=n[i],l={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:a};r[i]=l,this.items_[getUid(a)]=l}this.rbush_.load(r)}remove(e){const n=getUid(e),r=this.items_[n];return delete this.items_[n],this.rbush_.remove(r)!==null}update(e,n){const r=this.items_[getUid(n)],i=[r.minX,r.minY,r.maxX,r.maxY];equals$1(i,e)||(this.remove(n),this.insert(e,n))}getAll(){return this.rbush_.all().map(function(n){return n.value})}getInExtent(e){const n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]};return this.rbush_.search(n).map(function(i){return i.value})}forEach(e){return this.forEach_(this.getAll(),e)}forEachInExtent(e,n){return this.forEach_(this.getInExtent(e),n)}forEach_(e,n){let r;for(let i=0,s=e.length;i<s;i++)if(r=n(e[i]),r)return r;return r}isEmpty(){return isEmpty$1(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(e){const n=this.rbush_.toJSON();return createOrUpdate$2(n.minX,n.minY,n.maxX,n.maxY,e)}concat(e){this.rbush_.load(e.rbush_.all());for(const n in e.items_)this.items_[n]=e.items_[n]}}function assert(t,e){if(!t)throw new Error(e)}class Feature extends BaseObject{constructor(e){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){const n=e;this.setGeometry(n)}else{const n=e;this.setProperties(n)}}clone(){const e=new Feature(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());const n=this.getGeometry();n&&e.setGeometry(n.clone());const r=this.getStyle();return r&&e.setStyle(r),e}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(unlistenByKey(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=listen(e,EventType.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?createStyleFunction(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function createStyleFunction(t){if(typeof t=="function")return t;let e;return Array.isArray(t)?e=t:(assert(typeof t.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}const tmp_=new Array(6);function create$2(){return[1,0,0,1,0,0]}function multiply(t,e){const n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],l=e[0],u=e[1],c=e[2],d=e[3],h=e[4],f=e[5];return t[0]=n*l+i*u,t[1]=r*l+s*u,t[2]=n*c+i*d,t[3]=r*c+s*d,t[4]=n*h+i*f+o,t[5]=r*h+s*f+a,t}function set(t,e,n,r,i,s,o){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=o,t}function setFromArray(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function apply(t,e){const n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function translate$2(t,e,n){return multiply(t,set(tmp_,1,0,0,1,e,n))}function compose(t,e,n,r,i,s,o,a){const l=Math.sin(s),u=Math.cos(s);return t[0]=r*u,t[1]=i*l,t[2]=-r*l,t[3]=i*u,t[4]=o*r*u-a*r*l+e,t[5]=o*i*l+a*i*u+n,t}function makeInverse(t,e){const n=determinant(e);assert(n!==0,"Transformation matrix cannot be inverted");const r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5];return t[0]=o/n,t[1]=-i/n,t[2]=-s/n,t[3]=r/n,t[4]=(s*l-o*a)/n,t[5]=-(r*l-i*a)/n,t}function determinant(t){return t[0]*t[3]-t[1]*t[2]}const matrixPrecision=[1e6,1e6,1e6,1e6,2,2];function toString$1(t){return"matrix("+t.map((n,r)=>Math.round(n*matrixPrecision[r])/matrixPrecision[r]).join(", ")+")"}const METERS_PER_UNIT$1={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class Projection{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||METERS_PER_UNIT$1[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const RADIUS$1=6378137,HALF_SIZE=Math.PI*RADIUS$1,EXTENT$1=[-HALF_SIZE,-HALF_SIZE,HALF_SIZE,HALF_SIZE],WORLD_EXTENT=[-180,-85,180,85],MAX_SAFE_Y=RADIUS$1*Math.log(Math.tan(Math.PI/2));class EPSG3857Projection extends Projection{constructor(e){super({code:e,units:"m",extent:EXTENT$1,global:!0,worldExtent:WORLD_EXTENT,getPointResolution:function(n,r){return n/Math.cosh(r[1]/RADIUS$1)}})}}const PROJECTIONS$1=[new EPSG3857Projection("EPSG:3857"),new EPSG3857Projection("EPSG:102100"),new EPSG3857Projection("EPSG:102113"),new EPSG3857Projection("EPSG:900913"),new EPSG3857Projection("http://www.opengis.net/def/crs/EPSG/0/3857"),new EPSG3857Projection("http://www.opengis.net/gml/srs/epsg.xml#3857")];function fromEPSG4326(t,e,n,r){const i=t.length;n=n>1?n:2,r=r??n,e===void 0&&(n>2?e=t.slice():e=new Array(i));for(let s=0;s<i;s+=r){e[s]=HALF_SIZE*t[s]/180;let o=RADIUS$1*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));o>MAX_SAFE_Y?o=MAX_SAFE_Y:o<-MAX_SAFE_Y&&(o=-MAX_SAFE_Y),e[s+1]=o}return e}function toEPSG4326(t,e,n,r){const i=t.length;n=n>1?n:2,r=r??n,e===void 0&&(n>2?e=t.slice():e=new Array(i));for(let s=0;s<i;s+=r)e[s]=180*t[s]/HALF_SIZE,e[s+1]=360*Math.atan(Math.exp(t[s+1]/RADIUS$1))/Math.PI-90;return e}const RADIUS=6378137,EXTENT=[-180,-90,180,90],METERS_PER_UNIT=Math.PI*RADIUS/180;class EPSG4326Projection extends Projection{constructor(e,n){super({code:e,units:"degrees",extent:EXTENT,axisOrientation:n,global:!0,metersPerUnit:METERS_PER_UNIT,worldExtent:EXTENT})}}const PROJECTIONS=[new EPSG4326Projection("CRS:84"),new EPSG4326Projection("EPSG:4326","neu"),new EPSG4326Projection("urn:ogc:def:crs:OGC:1.3:CRS84"),new EPSG4326Projection("urn:ogc:def:crs:OGC:2:84"),new EPSG4326Projection("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new EPSG4326Projection("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new EPSG4326Projection("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let cache$1={};function get$3(t){return cache$1[t]||cache$1[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function add$2(t,e){cache$1[t]=e}let transforms={};function add$1(t,e,n){const r=t.getCode(),i=e.getCode();r in transforms||(transforms[r]={}),transforms[r][i]=n}function get$2(t,e){return t in transforms&&e in transforms[t]?transforms[t][e]:null}function clamp(t,e,n){return Math.min(Math.max(t,e),n)}function squaredSegmentDistance(t,e,n,r,i,s){const o=i-n,a=s-r;if(o!==0||a!==0){const l=((t-n)*o+(e-r)*a)/(o*o+a*a);l>1?(n=i,r=s):l>0&&(n+=o*l,r+=a*l)}return squaredDistance$1(t,e,n,r)}function squaredDistance$1(t,e,n,r){const i=n-t,s=r-e;return i*i+s*s}function solveLinearSystem(t){const e=t.length;for(let r=0;r<e;r++){let i=r,s=Math.abs(t[r][r]);for(let a=r+1;a<e;a++){const l=Math.abs(t[a][r]);l>s&&(s=l,i=a)}if(s===0)return null;const o=t[i];t[i]=t[r],t[r]=o;for(let a=r+1;a<e;a++){const l=-t[a][r]/t[r][r];for(let u=r;u<e+1;u++)r==u?t[a][u]=0:t[a][u]+=l*t[r][u]}}const n=new Array(e);for(let r=e-1;r>=0;r--){n[r]=t[r][e]/t[r][r];for(let i=r-1;i>=0;i--)t[i][e]-=t[i][r]*n[r]}return n}function toDegrees(t){return t*180/Math.PI}function toRadians(t){return t*Math.PI/180}function modulo(t,e){const n=t%e;return n*e<0?n+e:n}function lerp(t,e,n){return t+n*(e-t)}function toFixed(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}function floor(t,e){return Math.floor(toFixed(t,e))}function ceil(t,e){return Math.ceil(toFixed(t,e))}function wrap(t,e,n){if(t>=e&&t<n)return t;const r=n-e;return((t-e)%r+r)%r+e}function add(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function equals(t,e){let n=!0;for(let r=t.length-1;r>=0;--r)if(t[r]!=e[r]){n=!1;break}return n}function rotate$1(t,e){const n=Math.cos(e),r=Math.sin(e),i=t[0]*n-t[1]*r,s=t[1]*n+t[0]*r;return t[0]=i,t[1]=s,t}function scale$3(t,e){return t[0]*=e,t[1]*=e,t}function squaredDistance(t,e){const n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function distance(t,e){return Math.sqrt(squaredDistance(t,e))}function wrapX$1(t,e){if(e.canWrapX()){const n=getWidth(e.getExtent()),r=getWorldsAway(t,e,n);r&&(t[0]-=r*n)}return t}function getWorldsAway(t,e,n){const r=e.getExtent();let i=0;return e.canWrapX()&&(t[0]<r[0]||t[0]>r[2])&&(n=n||getWidth(r),i=Math.floor((t[0]-r[0])/n)),i}const DEFAULT_RADIUS=63710088e-1;function getDistance(t,e,n){n=n||DEFAULT_RADIUS;const r=toRadians(t[1]),i=toRadians(e[1]),s=(i-r)/2,o=toRadians(e[0]-t[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(r)*Math.cos(i);return 2*n*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function getLengthInternal(t,e){let n=0;for(let r=0,i=t.length;r<i-1;++r)n+=getDistance(t[r],t[r+1],e);return n}function getLength(t,e){e=e||{};const n=e.radius||DEFAULT_RADIUS,r=e.projection||"EPSG:3857",i=t.getType();i!=="GeometryCollection"&&(t=t.clone().transform(r,"EPSG:4326"));let s=0,o,a,l,u,c,d;switch(i){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":{o=t.getCoordinates(),s=getLengthInternal(o,n);break}case"MultiLineString":case"Polygon":{for(o=t.getCoordinates(),l=0,u=o.length;l<u;++l)s+=getLengthInternal(o[l],n);break}case"MultiPolygon":{for(o=t.getCoordinates(),l=0,u=o.length;l<u;++l)for(a=o[l],c=0,d=a.length;c<d;++c)s+=getLengthInternal(a[c],n);break}case"GeometryCollection":{const h=t.getGeometries();for(l=0,u=h.length;l<u;++l)s+=getLength(h[l],e);break}default:throw new Error("Unsupported geometry type: "+i)}return s}const K0=.9996,E=.00669438,E2=E*E,E3=E2*E,E_P2=E/(1-E),SQRT_E=Math.sqrt(1-E),_E=(1-SQRT_E)/(1+SQRT_E),_E2=_E*_E,_E3=_E2*_E,_E4=_E3*_E,_E5=_E4*_E,M1=1-E/4-3*E2/64-5*E3/256,M2=3*E/8+3*E2/32+45*E3/1024,M3=15*E2/256+45*E3/1024,M4=35*E3/3072,P2=3/2*_E-27/32*_E3+269/512*_E5,P3=21/16*_E2-55/32*_E4,P4=151/96*_E3-417/128*_E5,P5=1097/512*_E4,R=6378137;function toLonLat(t,e,n){const r=t-5e5,o=(n.north?e:e-1e7)/K0/(R*M1),a=o+P2*Math.sin(2*o)+P3*Math.sin(4*o)+P4*Math.sin(6*o)+P5*Math.sin(8*o),l=Math.sin(a),u=l*l,c=Math.cos(a),d=l/c,h=d*d,f=h*h,p=1-E*u,g=Math.sqrt(1-E*u),v=R/g,m=(1-E)/p,y=E_P2*c**2,b=y*y,_=r/(v*K0),T=_*_,x=T*_,k=x*_,w=k*_,O=w*_,S=a-d/m*(T/2-k/24*(5+3*h+10*y-4*b-9*E_P2))+O/720*(61+90*h+298*y+45*f-252*E_P2-3*b);let F=(_-x/6*(1+2*h+y)+w/120*(5-2*y+28*h-3*b+8*E_P2+24*f))/c;return F=wrap(F+toRadians(zoneToCentralLongitude(n.number)),-Math.PI,Math.PI),[toDegrees(F),toDegrees(S)]}const MIN_LATITUDE=-80,MAX_LATITUDE=84,MIN_LONGITUDE=-180,MAX_LONGITUDE=180;function fromLonLat$1(t,e,n){t=wrap(t,MIN_LONGITUDE,MAX_LONGITUDE),e<MIN_LATITUDE?e=MIN_LATITUDE:e>MAX_LATITUDE&&(e=MAX_LATITUDE);const r=toRadians(e),i=Math.sin(r),s=Math.cos(r),o=i/s,a=o*o,l=a*a,u=toRadians(t),c=zoneToCentralLongitude(n.number),d=toRadians(c),h=R/Math.sqrt(1-E*i**2),f=E_P2*s**2,p=s*wrap(u-d,-Math.PI,Math.PI),g=p*p,v=g*p,m=v*p,y=m*p,b=y*p,_=R*(M1*r-M2*Math.sin(2*r)+M3*Math.sin(4*r)-M4*Math.sin(6*r)),T=K0*h*(p+v/6*(1-a+f)+y/120*(5-18*a+l+72*f-58*E_P2))+5e5;let x=K0*(_+h*o*(g/2+m/24*(5-a+9*f+4*f**2)+b/720*(61-58*a+l+600*f-330*E_P2)));return n.north||(x+=1e7),[T,x]}function zoneToCentralLongitude(t){return(t-1)*6-180+3}const epsgRegExes=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function zoneFromCode(t){let e=0;for(const i of epsgRegExes){const s=t.match(i);if(s){e=parseInt(s[1]);break}}if(!e)return null;let n=0,r=!1;return e>32700&&e<32761?n=e-32700:e>32600&&e<32661&&(r=!0,n=e-32600),n?{number:n,north:r}:null}function makeTransformFunction(t,e){return function(n,r,i,s){const o=n.length;i=i>1?i:2,s=s??i,r||(i>2?r=n.slice():r=new Array(o));for(let a=0;a<o;a+=s){const l=n[a],u=n[a+1],c=t(l,u,e);r[a]=c[0],r[a+1]=c[1]}return r}}function makeProjection(t){return zoneFromCode(t)?new Projection({code:t,units:"m"}):null}function makeTransforms(t){const e=zoneFromCode(t.getCode());return e?{forward:makeTransformFunction(fromLonLat$1,e),inverse:makeTransformFunction(toLonLat,e)}:null}function warn(...t){console.warn(...t)}const transformFactories=[makeTransforms],projectionFactories=[makeProjection];let showCoordinateWarning=!0;function disableCoordinateWarning(t){showCoordinateWarning=!1}function cloneTransform(t,e){if(e!==void 0){for(let n=0,r=t.length;n<r;++n)e[n]=t[n];e=e}else e=t.slice();return e}function addProjection(t){add$2(t.getCode(),t),add$1(t,t,cloneTransform)}function addProjections(t){t.forEach(addProjection)}function get$1(t){if(typeof t!="string")return t;const e=get$3(t);if(e)return e;for(const n of projectionFactories){const r=n(t);if(r)return r}return null}function getPointResolution(t,e,n,r){t=get$1(t);let i;const s=t.getPointResolutionFunc();if(s){if(i=s(e,n),r&&r!==t.getUnits()){const o=t.getMetersPerUnit();o&&(i=i*o/METERS_PER_UNIT$1[r])}}else{const o=t.getUnits();if(o=="degrees"&&!r||r=="degrees")i=e;else{const a=getTransformFromProjections(t,get$1("EPSG:4326"));if(!a&&o!=="degrees")i=e*t.getMetersPerUnit();else{let u=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];u=a(u,u,2);const c=getDistance(u.slice(0,2),u.slice(2,4)),d=getDistance(u.slice(4,6),u.slice(6,8));i=(c+d)/2}const l=r?METERS_PER_UNIT$1[r]:t.getMetersPerUnit();l!==void 0&&(i/=l)}}return i}function addEquivalentProjections(t){addProjections(t),t.forEach(function(e){t.forEach(function(n){e!==n&&add$1(e,n,cloneTransform)})})}function addEquivalentTransforms(t,e,n,r){t.forEach(function(i){e.forEach(function(s){add$1(i,s,n),add$1(s,i,r)})})}function createProjection(t,e){return t?typeof t=="string"?get$1(t):t:get$1(e)}function createTransformFromCoordinateTransform(t){return function(e,n,r,i){const s=e.length;r=r!==void 0?r:2,i=i??r,n=n!==void 0?n:new Array(s);for(let o=0;o<s;o+=i){const a=t(e.slice(o,o+r)),l=a.length;for(let u=0,c=i;u<c;++u)n[o+u]=u>=l?e[o+u]:a[u]}return n}}function fromLonLat(t,e){return disableCoordinateWarning(),transform(t,"EPSG:4326","EPSG:3857")}function equivalent(t,e){if(t===e)return!0;const n=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||getTransformFromProjections(t,e)===cloneTransform)&&n}function getTransformFromProjections(t,e){const n=t.getCode(),r=e.getCode();let i=get$2(n,r);if(i)return i;let s=null,o=null;for(const l of transformFactories)s||(s=l(t)),o||(o=l(e));if(!s&&!o)return null;const a="EPSG:4326";if(o)if(s)i=composeTransformFuncs(s.inverse,o.forward);else{const l=get$2(n,a);l&&(i=composeTransformFuncs(l,o.forward))}else{const l=get$2(a,r);l&&(i=composeTransformFuncs(s.inverse,l))}return i&&(addProjection(t),addProjection(e),add$1(t,e,i)),i}function composeTransformFuncs(t,e){return function(n,r,i,s){return r=t(n,r,i,s),e(r,r,i,s)}}function getTransform(t,e){const n=get$1(t),r=get$1(e);return getTransformFromProjections(n,r)}function transform(t,e,n){const r=getTransform(e,n);if(!r){const i=get$1(e).getCode(),s=get$1(n).getCode();throw new Error(`No transform available between ${i} and ${s}`)}return r(t,void 0,t.length)}function toUserCoordinate(t,e){return t}function fromUserCoordinate(t,e){return showCoordinateWarning&&!equals(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(showCoordinateWarning=!1,warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function toUserExtent(t,e){return t}function fromUserExtent(t,e){return t}function addCommon(){addEquivalentProjections(PROJECTIONS$1),addEquivalentProjections(PROJECTIONS),addEquivalentTransforms(PROJECTIONS,PROJECTIONS$1,fromEPSG4326,toEPSG4326)}addCommon();function transform2D(t,e,n,r,i,s,o){s=s||[],o=o||2;let a=0;for(let l=e;l<n;l+=r){const u=t[l],c=t[l+1];s[a++]=i[0]*u+i[2]*c+i[4],s[a++]=i[1]*u+i[3]*c+i[5];for(let d=2;d<o;d++)s[a++]=t[l+d]}return s&&s.length!=a&&(s.length=a),s}function rotate(t,e,n,r,i,s,o){o=o||[];const a=Math.cos(i),l=Math.sin(i),u=s[0],c=s[1];let d=0;for(let h=e;h<n;h+=r){const f=t[h]-u,p=t[h+1]-c;o[d++]=u+f*a-p*l,o[d++]=c+f*l+p*a;for(let g=h+2;g<h+r;++g)o[d++]=t[g]}return o&&o.length!=d&&(o.length=d),o}function scale$2(t,e,n,r,i,s,o,a){a=a||[];const l=o[0],u=o[1];let c=0;for(let d=e;d<n;d+=r){const h=t[d]-l,f=t[d+1]-u;a[c++]=l+i*h,a[c++]=u+s*f;for(let p=d+2;p<d+r;++p)a[c++]=t[p]}return a&&a.length!=c&&(a.length=c),a}function translate$1(t,e,n,r,i,s,o){o=o||[];let a=0;for(let l=e;l<n;l+=r){o[a++]=t[l]+i,o[a++]=t[l+1]+s;for(let u=l+2;u<l+r;++u)o[a++]=t[u]}return o&&o.length!=a&&(o.length=a),o}const tmpTransform$1=create$2();class Geometry extends BaseObject{constructor(){super(),this.extent_=createEmpty(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=memoizeOne((e,n,r)=>{if(!r)return this.getSimplifiedGeometry(n);const i=this.clone();return i.applyTransform(r),i.getSimplifiedGeometry(n)})}simplifyTransformed(e,n){return this.simplifyTransformedInternal(this.getRevision(),e,n)}clone(){return abstract()}closestPointXY(e,n,r,i){return abstract()}containsXY(e,n){const r=this.getClosestPoint([e,n]);return r[0]===e&&r[1]===n}getClosestPoint(e,n){return n=n||[NaN,NaN],this.closestPointXY(e[0],e[1],n,1/0),n}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return abstract()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&createOrUpdateEmpty(n),this.extentRevision_=this.getRevision()}return returnOrUpdate(this.extent_,e)}rotate(e,n){abstract()}scale(e,n,r){abstract()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return abstract()}getType(){return abstract()}applyTransform(e){abstract()}intersectsExtent(e){return abstract()}translate(e,n){abstract()}transform(e,n){const r=get$1(e),i=r.getUnits()=="tile-pixels"?function(s,o,a){const l=r.getExtent(),u=r.getWorldExtent(),c=getHeight(u)/getHeight(l);compose(tmpTransform$1,u[0],u[3],c,-c,0,0,0);const d=transform2D(s,0,s.length,a,tmpTransform$1,o),h=getTransform(r,n);return h?h(d,d,a):d}:getTransform(r,n);return this.applyTransform(i),this}}class SimpleGeometry extends Geometry{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return abstract()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const n=this.getSimplifiedGeometryInternal(e);return n.getFlatCoordinates().length<this.flatCoordinates.length?n:(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getSimplifiedGeometryInternal(e){return this}getStride(){return this.stride}setFlatCoordinates(e,n){this.stride=getStrideForLayout(e),this.layout=e,this.flatCoordinates=n}setCoordinates(e,n){abstract()}setLayout(e,n,r){let i;if(e)i=getStrideForLayout(e);else{for(let s=0;s<r;++s){if(n.length===0){this.layout="XY",this.stride=2;return}n=n[0]}i=n.length,e=getLayoutForStride(i)}this.layout=e,this.stride=i}applyTransform(e){this.flatCoordinates&&(e(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(e,n){const r=this.getFlatCoordinates();if(r){const i=this.getStride();rotate(r,0,r.length,i,e,n,r),this.changed()}}scale(e,n,r){n===void 0&&(n=e),r||(r=getCenter(this.getExtent()));const i=this.getFlatCoordinates();if(i){const s=this.getStride();scale$2(i,0,i.length,s,e,n,r,i),this.changed()}}translate(e,n){const r=this.getFlatCoordinates();if(r){const i=this.getStride();translate$1(r,0,r.length,i,e,n,r),this.changed()}}}function getLayoutForStride(t){let e;return t==2?e="XY":t==3?e="XYZ":t==4&&(e="XYZM"),e}function getStrideForLayout(t){let e;return t=="XY"?e=2:t=="XYZ"||t=="XYM"?e=3:t=="XYZM"&&(e=4),e}function transformGeom2D(t,e,n){const r=t.getFlatCoordinates();if(!r)return null;const i=t.getStride();return transform2D(r,0,r.length,i,e,n)}function deflateCoordinate(t,e,n,r){for(let i=0,s=n.length;i<s;++i)t[e++]=n[i];return e}function deflateCoordinates(t,e,n,r){for(let i=0,s=n.length;i<s;++i){const o=n[i];for(let a=0;a<r;++a)t[e++]=o[a]}return e}function deflateCoordinatesArray(t,e,n,r,i){i=i||[];let s=0;for(let o=0,a=n.length;o<a;++o){const l=deflateCoordinates(t,e,n[o],r);i[s++]=l,e=l}return i.length=s,i}function deflateMultiCoordinatesArray(t,e,n,r,i){i=i||[];let s=0;for(let o=0,a=n.length;o<a;++o){const l=deflateCoordinatesArray(t,e,n[o],r,i[s]);l.length===0&&(l[0]=e),i[s++]=l,e=l[l.length-1]}return i.length=s,i}class Circle extends SimpleGeometry{constructor(e,n,r){super(),r!==void 0&&n===void 0?this.setFlatCoordinates(r,e):(n=n||0,this.setCenterAndRadius(e,n,r))}clone(){const e=new Circle(this.flatCoordinates.slice(),void 0,this.layout);return e.applyProperties(this),e}closestPointXY(e,n,r,i){const s=this.flatCoordinates,o=e-s[0],a=n-s[1],l=o*o+a*a;if(l<i){if(l===0)for(let u=0;u<this.stride;++u)r[u]=s[u];else{const u=this.getRadius()/Math.sqrt(l);r[0]=s[0]+u*o,r[1]=s[1]+u*a;for(let c=2;c<this.stride;++c)r[c]=s[c]}return r.length=this.stride,l}return i}containsXY(e,n){const r=this.flatCoordinates,i=e-r[0],s=n-r[1];return i*i+s*s<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(e){const n=this.flatCoordinates,r=n[this.stride]-n[0];return createOrUpdate$2(n[0]-r,n[1]-r,n[0]+r,n[1]+r,e)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const e=this.flatCoordinates[this.stride]-this.flatCoordinates[0],n=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return e*e+n*n}getType(){return"Circle"}intersectsExtent(e){const n=this.getExtent();if(intersects(e,n)){const r=this.getCenter();return e[0]<=r[0]&&e[2]>=r[0]||e[1]<=r[1]&&e[3]>=r[1]?!0:forEachCorner(e,this.intersectsCoordinate.bind(this))}return!1}setCenter(e){const n=this.stride,r=this.flatCoordinates[n]-this.flatCoordinates[0],i=e.slice();i[n]=i[0]+r;for(let s=1;s<n;++s)i[n+s]=e[s];this.setFlatCoordinates(this.layout,i),this.changed()}setCenterAndRadius(e,n,r){this.setLayout(r,e,0),this.flatCoordinates||(this.flatCoordinates=[]);const i=this.flatCoordinates;let s=deflateCoordinate(i,0,e,this.stride);i[s++]=i[0]+n;for(let o=1,a=this.stride;o<a;++o)i[s++]=i[o];i.length=s,this.changed()}getCoordinates(){return null}setCoordinates(e,n){}setRadius(e){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+e,this.changed()}rotate(e,n){const r=this.getCenter(),i=this.getStride();this.setCenter(rotate(r,0,r.length,i,e,n,r)),this.changed()}}Circle.prototype.transform;class GeometryCollection extends Geometry{constructor(e){super(),this.geometries_=e,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(unlistenByKey),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const e=this.geometries_;for(let n=0,r=e.length;n<r;++n)this.changeEventsKeys_.push(listen(e[n],EventType.CHANGE,this.changed,this))}clone(){const e=new GeometryCollection(cloneGeometries(this.geometries_));return e.applyProperties(this),e}closestPointXY(e,n,r,i){if(i<closestSquaredDistanceXY(this.getExtent(),e,n))return i;const s=this.geometries_;for(let o=0,a=s.length;o<a;++o)i=s[o].closestPointXY(e,n,r,i);return i}containsXY(e,n){const r=this.geometries_;for(let i=0,s=r.length;i<s;++i)if(r[i].containsXY(e,n))return!0;return!1}computeExtent(e){createOrUpdateEmpty(e);const n=this.geometries_;for(let r=0,i=n.length;r<i;++r)extend(e,n[r].getExtent());return e}getGeometries(){return cloneGeometries(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let e=[];const n=this.geometries_;for(let r=0,i=n.length;r<i;++r)n[r].getType()===this.getType()?e=e.concat(n[r].getGeometriesArrayRecursive()):e.push(n[r]);return e}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const n=[],r=this.geometries_;let i=!1;for(let s=0,o=r.length;s<o;++s){const a=r[s],l=a.getSimplifiedGeometry(e);n.push(l),l!==a&&(i=!0)}return i?new GeometryCollection(n):(this.simplifiedGeometryMaxMinSquaredTolerance=e,this)}getType(){return"GeometryCollection"}intersectsExtent(e){const n=this.geometries_;for(let r=0,i=n.length;r<i;++r)if(n[r].intersectsExtent(e))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(e,n){const r=this.geometries_;for(let i=0,s=r.length;i<s;++i)r[i].rotate(e,n);this.changed()}scale(e,n,r){r||(r=getCenter(this.getExtent()));const i=this.geometries_;for(let s=0,o=i.length;s<o;++s)i[s].scale(e,n,r);this.changed()}setGeometries(e){this.setGeometriesArray(cloneGeometries(e))}setGeometriesArray(e){this.unlistenGeometriesChange_(),this.geometries_=e,this.listenGeometriesChange_(),this.changed()}applyTransform(e){const n=this.geometries_;for(let r=0,i=n.length;r<i;++r)n[r].applyTransform(e);this.changed()}translate(e,n){const r=this.geometries_;for(let i=0,s=r.length;i<s;++i)r[i].translate(e,n);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function cloneGeometries(t){return t.map(e=>e.clone())}function assignClosest(t,e,n,r,i,s,o){const a=t[e],l=t[e+1],u=t[n]-a,c=t[n+1]-l;let d;if(u===0&&c===0)d=e;else{const h=((i-a)*u+(s-l)*c)/(u*u+c*c);if(h>1)d=n;else if(h>0){for(let f=0;f<r;++f)o[f]=lerp(t[e+f],t[n+f],h);o.length=r;return}else d=e}for(let h=0;h<r;++h)o[h]=t[d+h];o.length=r}function maxSquaredDelta(t,e,n,r,i){let s=t[e],o=t[e+1];for(e+=r;e<n;e+=r){const a=t[e],l=t[e+1],u=squaredDistance$1(s,o,a,l);u>i&&(i=u),s=a,o=l}return i}function arrayMaxSquaredDelta(t,e,n,r,i){for(let s=0,o=n.length;s<o;++s){const a=n[s];i=maxSquaredDelta(t,e,a,r,i),e=a}return i}function multiArrayMaxSquaredDelta(t,e,n,r,i){for(let s=0,o=n.length;s<o;++s){const a=n[s];i=arrayMaxSquaredDelta(t,e,a,r,i),e=a[a.length-1]}return i}function assignClosestPoint(t,e,n,r,i,s,o,a,l,u,c){if(e==n)return u;let d,h;if(i===0){if(h=squaredDistance$1(o,a,t[e],t[e+1]),h<u){for(d=0;d<r;++d)l[d]=t[e+d];return l.length=r,h}return u}c=c||[NaN,NaN];let f=e+r;for(;f<n;)if(assignClosest(t,f-r,f,r,o,a,c),h=squaredDistance$1(o,a,c[0],c[1]),h<u){for(u=h,d=0;d<r;++d)l[d]=c[d];l.length=r,f+=r}else f+=r*Math.max((Math.sqrt(h)-Math.sqrt(u))/i|0,1);if(s&&(assignClosest(t,n-r,e,r,o,a,c),h=squaredDistance$1(o,a,c[0],c[1]),h<u)){for(u=h,d=0;d<r;++d)l[d]=c[d];l.length=r}return u}function assignClosestArrayPoint(t,e,n,r,i,s,o,a,l,u,c){c=c||[NaN,NaN];for(let d=0,h=n.length;d<h;++d){const f=n[d];u=assignClosestPoint(t,e,f,r,i,s,o,a,l,u,c),e=f}return u}function assignClosestMultiArrayPoint(t,e,n,r,i,s,o,a,l,u,c){c=c||[NaN,NaN];for(let d=0,h=n.length;d<h;++d){const f=n[d];u=assignClosestArrayPoint(t,e,f,r,i,s,o,a,l,u,c),e=f[f.length-1]}return u}function douglasPeucker(t,e,n,r,i,s,o){const a=(n-e)/r;if(a<3){for(;e<n;e+=r)s[o++]=t[e],s[o++]=t[e+1];return o}const l=new Array(a);l[0]=1,l[a-1]=1;const u=[e,n-r];let c=0;for(;u.length>0;){const d=u.pop(),h=u.pop();let f=0;const p=t[h],g=t[h+1],v=t[d],m=t[d+1];for(let y=h+r;y<d;y+=r){const b=t[y],_=t[y+1],T=squaredSegmentDistance(b,_,p,g,v,m);T>f&&(c=y,f=T)}f>i&&(l[(c-e)/r]=1,h+r<c&&u.push(h,c),c+r<d&&u.push(c,d))}for(let d=0;d<a;++d)l[d]&&(s[o++]=t[e+d*r],s[o++]=t[e+d*r+1]);return o}function douglasPeuckerArray(t,e,n,r,i,s,o,a){for(let l=0,u=n.length;l<u;++l){const c=n[l];o=douglasPeucker(t,e,c,r,i,s,o),a.push(o),e=c}return o}function snap(t,e){return e*Math.round(t/e)}function quantize(t,e,n,r,i,s,o){if(e==n)return o;let a=snap(t[e],i),l=snap(t[e+1],i);e+=r,s[o++]=a,s[o++]=l;let u,c;do if(u=snap(t[e],i),c=snap(t[e+1],i),e+=r,e==n)return s[o++]=u,s[o++]=c,o;while(u==a&&c==l);for(;e<n;){const d=snap(t[e],i),h=snap(t[e+1],i);if(e+=r,d==u&&h==c)continue;const f=u-a,p=c-l,g=d-a,v=h-l;if(f*v==p*g&&(f<0&&g<f||f==g||f>0&&g>f)&&(p<0&&v<p||p==v||p>0&&v>p)){u=d,c=h;continue}s[o++]=u,s[o++]=c,a=u,l=c,u=d,c=h}return s[o++]=u,s[o++]=c,o}function quantizeArray(t,e,n,r,i,s,o,a){for(let l=0,u=n.length;l<u;++l){const c=n[l];o=quantize(t,e,c,r,i,s,o),a.push(o),e=c}return o}function quantizeMultiArray(t,e,n,r,i,s,o,a){for(let l=0,u=n.length;l<u;++l){const c=n[l],d=[];o=quantizeArray(t,e,c,r,i,s,o,d),a.push(d),e=c[c.length-1]}return o}function inflateCoordinates(t,e,n,r,i){i=i!==void 0?i:[];let s=0;for(let o=e;o<n;o+=r)i[s++]=t.slice(o,o+r);return i.length=s,i}function inflateCoordinatesArray(t,e,n,r,i){i=i!==void 0?i:[];let s=0;for(let o=0,a=n.length;o<a;++o){const l=n[o];i[s++]=inflateCoordinates(t,e,l,r,i[s]),e=l}return i.length=s,i}function inflateMultiCoordinatesArray(t,e,n,r,i){i=i!==void 0?i:[];let s=0;for(let o=0,a=n.length;o<a;++o){const l=n[o];i[s++]=l.length===1&&l[0]===e?[]:inflateCoordinatesArray(t,e,l,r,i[s]),e=l[l.length-1]}return i.length=s,i}function linearRing(t,e,n,r){let i=0;const s=t[n-r],o=t[n-r+1];let a=0,l=0;for(;e<n;e+=r){const u=t[e]-s,c=t[e+1]-o;i+=l*u-a*c,a=u,l=c}return i/2}function linearRings(t,e,n,r){let i=0;for(let s=0,o=n.length;s<o;++s){const a=n[s];i+=linearRing(t,e,a,r),e=a}return i}function linearRingss$1(t,e,n,r){let i=0;for(let s=0,o=n.length;s<o;++s){const a=n[s];i+=linearRings(t,e,a,r),e=a[a.length-1]}return i}class LinearRing extends SimpleGeometry{constructor(e,n){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(n,e):this.setCoordinates(e,n)}clone(){return new LinearRing(this.flatCoordinates.slice(),this.layout)}closestPointXY(e,n,r,i){return i<closestSquaredDistanceXY(this.getExtent(),e,n)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(maxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,e,n,r,i))}getArea(){return linearRing(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(e){const n=[];return n.length=douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,0),new LinearRing(n,"XY")}getType(){return"LinearRing"}intersectsExtent(e){return!1}setCoordinates(e,n){this.setLayout(n,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,e,this.stride),this.changed()}}function forEach(t,e,n,r,i){let s;for(e+=r;e<n;e+=r)if(s=i(t.slice(e-r,e),t.slice(e,e+r)),s)return s;return!1}function interpolatePoint(t,e,n,r,i,s,o){let a,l;const u=(n-e)/r;if(u===1)a=e;else if(u===2)a=e,l=i;else if(u!==0){let c=t[e],d=t[e+1],h=0;const f=[0];for(let v=e+r;v<n;v+=r){const m=t[v],y=t[v+1];h+=Math.sqrt((m-c)*(m-c)+(y-d)*(y-d)),f.push(h),c=m,d=y}const p=i*h,g=binarySearch(f,p);g<0?(l=(p-f[-g-2])/(f[-g-1]-f[-g-2]),a=e+(-g-2)*r):a=e+g*r}o=o>1?o:2,s=s||new Array(o);for(let c=0;c<o;++c)s[c]=a===void 0?NaN:l===void 0?t[a+c]:lerp(t[a+c],t[a+r+c],l);return s}function lineStringCoordinateAtM(t,e,n,r,i,s){if(n==e)return null;let o;if(i<t[e+r-1])return s?(o=t.slice(e,e+r),o[r-1]=i,o):null;if(t[n-1]<i)return s?(o=t.slice(n-r,n),o[r-1]=i,o):null;if(i==t[e+r-1])return t.slice(e,e+r);let a=e/r,l=n/r;for(;a<l;){const h=a+l>>1;i<t[(h+1)*r-1]?l=h:a=h+1}const u=t[a*r-1];if(i==u)return t.slice((a-1)*r,(a-1)*r+r);const c=t[(a+1)*r-1],d=(i-u)/(c-u);o=[];for(let h=0;h<r-1;++h)o.push(lerp(t[(a-1)*r+h],t[a*r+h],d));return o.push(i),o}function lineStringsCoordinateAtM(t,e,n,r,i,s,o){if(o)return lineStringCoordinateAtM(t,e,n[n.length-1],r,i,s);let a;if(i<t[r-1])return s?(a=t.slice(0,r),a[r-1]=i,a):null;if(t[t.length-1]<i)return s?(a=t.slice(t.length-r),a[r-1]=i,a):null;for(let l=0,u=n.length;l<u;++l){const c=n[l];if(e!=c){if(i<t[e+r-1])return null;if(i<=t[c-1])return lineStringCoordinateAtM(t,e,c,r,i,!1);e=c}}return null}function linearRingContainsExtent(t,e,n,r,i){return!forEachCorner(i,function(o){return!linearRingContainsXY(t,e,n,r,o[0],o[1])})}function linearRingContainsXY(t,e,n,r,i,s){let o=0,a=t[n-r],l=t[n-r+1];for(;e<n;e+=r){const u=t[e],c=t[e+1];l<=s?c>s&&(u-a)*(s-l)-(i-a)*(c-l)>0&&o++:c<=s&&(u-a)*(s-l)-(i-a)*(c-l)<0&&o--,a=u,l=c}return o!==0}function linearRingsContainsXY(t,e,n,r,i,s){if(n.length===0||!linearRingContainsXY(t,e,n[0],r,i,s))return!1;for(let o=1,a=n.length;o<a;++o)if(linearRingContainsXY(t,n[o-1],n[o],r,i,s))return!1;return!0}function linearRingssContainsXY(t,e,n,r,i,s){if(n.length===0)return!1;for(let o=0,a=n.length;o<a;++o){const l=n[o];if(linearRingsContainsXY(t,e,l,r,i,s))return!0;e=l[l.length-1]}return!1}function intersectsLineString(t,e,n,r,i){const s=extendFlatCoordinates(createEmpty(),t,e,n,r);return intersects(i,s)?containsExtent(i,s)||s[0]>=i[0]&&s[2]<=i[2]||s[1]>=i[1]&&s[3]<=i[3]?!0:forEach(t,e,n,r,function(o,a){return intersectsSegment(i,o,a)}):!1}function intersectsLineStringArray(t,e,n,r,i){for(let s=0,o=n.length;s<o;++s){if(intersectsLineString(t,e,n[s],r,i))return!0;e=n[s]}return!1}function intersectsLinearRing(t,e,n,r,i){return!!(intersectsLineString(t,e,n,r,i)||linearRingContainsXY(t,e,n,r,i[0],i[1])||linearRingContainsXY(t,e,n,r,i[0],i[3])||linearRingContainsXY(t,e,n,r,i[2],i[1])||linearRingContainsXY(t,e,n,r,i[2],i[3]))}function intersectsLinearRingArray(t,e,n,r,i){if(!intersectsLinearRing(t,e,n[0],r,i))return!1;if(n.length===1)return!0;for(let s=1,o=n.length;s<o;++s)if(linearRingContainsExtent(t,n[s-1],n[s],r,i)&&!intersectsLineString(t,n[s-1],n[s],r,i))return!1;return!0}function intersectsLinearRingMultiArray(t,e,n,r,i){for(let s=0,o=n.length;s<o;++s){const a=n[s];if(intersectsLinearRingArray(t,e,a,r,i))return!0;e=a[a.length-1]}return!1}function lineStringLength(t,e,n,r){let i=t[e],s=t[e+1],o=0;for(let a=e+r;a<n;a+=r){const l=t[a],u=t[a+1];o+=Math.sqrt((l-i)*(l-i)+(u-s)*(u-s)),i=l,s=u}return o}class LineString extends SimpleGeometry{constructor(e,n){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(e[0])?this.setFlatCoordinates(n,e):this.setCoordinates(e,n)}appendCoordinate(e){extend$2(this.flatCoordinates,e),this.changed()}clone(){const e=new LineString(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,n,r,i){return i<closestSquaredDistanceXY(this.getExtent(),e,n)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(maxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,e,n,r,i))}forEachSegment(e){return forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinateAtM(e,n){return this.layout!="XYM"&&this.layout!="XYZM"?null:(n=n!==void 0?n:!1,lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n))}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(e,n){return interpolatePoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,this.stride)}getLength(){return lineStringLength(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(e){const n=[];return n.length=douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e,n,0),new LineString(n,"XY")}getType(){return"LineString"}intersectsExtent(e){return intersectsLineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}setCoordinates(e,n){this.setLayout(n,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,e,this.stride),this.changed()}}class MultiLineString extends SimpleGeometry{constructor(e,n,r){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(e[0]))this.setCoordinates(e,n);else if(n!==void 0&&r)this.setFlatCoordinates(n,e),this.ends_=r;else{const i=e,s=[],o=[];for(let l=0,u=i.length;l<u;++l){const c=i[l];extend$2(s,c.getFlatCoordinates()),o.push(s.length)}const a=i.length===0?this.getLayout():i[0].getLayout();this.setFlatCoordinates(a,s),this.ends_=o}}appendLineString(e){extend$2(this.flatCoordinates,e.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new MultiLineString(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,n,r,i){return i<closestSquaredDistanceXY(this.getExtent(),e,n)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestArrayPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,e,n,r,i))}getCoordinateAtM(e,n,r){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(n=n!==void 0?n:!1,r=r!==void 0?r:!1,lineStringsCoordinateAtM(this.flatCoordinates,0,this.ends_,this.stride,e,n,r))}getCoordinates(){return inflateCoordinatesArray(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(e){return e<0||this.ends_.length<=e?null:new LineString(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLineStrings(){const e=this.flatCoordinates,n=this.ends_,r=this.layout,i=[];let s=0;for(let o=0,a=n.length;o<a;++o){const l=n[o],u=new LineString(e.slice(s,l),r);i.push(u),s=l}return i}getFlatMidpoints(){const e=[],n=this.flatCoordinates;let r=0;const i=this.ends_,s=this.stride;for(let o=0,a=i.length;o<a;++o){const l=i[o],u=interpolatePoint(n,r,l,s,.5);extend$2(e,u),r=l}return e}getSimplifiedGeometryInternal(e){const n=[],r=[];return n.length=douglasPeuckerArray(this.flatCoordinates,0,this.ends_,this.stride,e,n,0,r),new MultiLineString(n,"XY",r)}getType(){return"MultiLineString"}intersectsExtent(e){return intersectsLineStringArray(this.flatCoordinates,0,this.ends_,this.stride,e)}setCoordinates(e,n){this.setLayout(n,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const r=deflateCoordinatesArray(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=r.length===0?0:r[r.length-1],this.changed()}}class Point extends SimpleGeometry{constructor(e,n){super(),this.setCoordinates(e,n)}clone(){const e=new Point(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,n,r,i){const s=this.flatCoordinates,o=squaredDistance$1(e,n,s[0],s[1]);if(o<i){const a=this.stride;for(let l=0;l<a;++l)r[l]=s[l];return r.length=a,o}return i}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(e){return createOrUpdateFromCoordinate(this.flatCoordinates,e)}getType(){return"Point"}intersectsExtent(e){return containsXY(e,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(e,n){this.setLayout(n,e,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinate(this.flatCoordinates,0,e,this.stride),this.changed()}}class MultiPoint extends SimpleGeometry{constructor(e,n){super(),n&&!Array.isArray(e[0])?this.setFlatCoordinates(n,e):this.setCoordinates(e,n)}appendPoint(e){extend$2(this.flatCoordinates,e.getFlatCoordinates()),this.changed()}clone(){const e=new MultiPoint(this.flatCoordinates.slice(),this.layout);return e.applyProperties(this),e}closestPointXY(e,n,r,i){if(i<closestSquaredDistanceXY(this.getExtent(),e,n))return i;const s=this.flatCoordinates,o=this.stride;for(let a=0,l=s.length;a<l;a+=o){const u=squaredDistance$1(e,n,s[a],s[a+1]);if(u<i){i=u;for(let c=0;c<o;++c)r[c]=s[a+c];r.length=o}}return i}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(e){const n=this.flatCoordinates.length/this.stride;return e<0||n<=e?null:new Point(this.flatCoordinates.slice(e*this.stride,(e+1)*this.stride),this.layout)}getPoints(){const e=this.flatCoordinates,n=this.layout,r=this.stride,i=[];for(let s=0,o=e.length;s<o;s+=r){const a=new Point(e.slice(s,s+r),n);i.push(a)}return i}getType(){return"MultiPoint"}intersectsExtent(e){const n=this.flatCoordinates,r=this.stride;for(let i=0,s=n.length;i<s;i+=r){const o=n[i],a=n[i+1];if(containsXY(e,o,a))return!0}return!1}setCoordinates(e,n){this.setLayout(n,e,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,e,this.stride),this.changed()}}function getInteriorPointOfArray(t,e,n,r,i,s,o){let a,l,u,c,d,h,f;const p=i[s+1],g=[];for(let y=0,b=n.length;y<b;++y){const _=n[y];for(c=t[_-r],h=t[_-r+1],a=e;a<_;a+=r)d=t[a],f=t[a+1],(p<=h&&f<=p||h<=p&&p<=f)&&(u=(p-h)/(f-h)*(d-c)+c,g.push(u)),c=d,h=f}let v=NaN,m=-1/0;for(g.sort(ascending),c=g[0],a=1,l=g.length;a<l;++a){d=g[a];const y=Math.abs(d-c);y>m&&(u=(c+d)/2,linearRingsContainsXY(t,e,n,r,u,p)&&(v=u,m=y)),c=d}return isNaN(v)&&(v=i[s]),o?(o.push(v,p,m),o):[v,p,m]}function getInteriorPointsOfMultiArray(t,e,n,r,i){let s=[];for(let o=0,a=n.length;o<a;++o){const l=n[o];s=getInteriorPointOfArray(t,e,l,r,i,2*o,s),e=l[l.length-1]}return s}function coordinates(t,e,n,r){for(;e<n-r;){for(let i=0;i<r;++i){const s=t[e+i];t[e+i]=t[n-r+i],t[n-r+i]=s}e+=r,n-=r}}function linearRingIsClockwise(t,e,n,r){let i=0,s=t[n-r],o=t[n-r+1];for(;e<n;e+=r){const a=t[e],l=t[e+1];i+=(a-s)*(l+o),s=a,o=l}return i===0?void 0:i>0}function linearRingsAreOriented(t,e,n,r,i){i=i!==void 0?i:!1;for(let s=0,o=n.length;s<o;++s){const a=n[s],l=linearRingIsClockwise(t,e,a,r);if(s===0){if(i&&l||!i&&!l)return!1}else if(i&&!l||!i&&l)return!1;e=a}return!0}function linearRingssAreOriented(t,e,n,r,i){for(let s=0,o=n.length;s<o;++s){const a=n[s];if(!linearRingsAreOriented(t,e,a,r,i))return!1;a.length&&(e=a[a.length-1])}return!0}function orientLinearRings(t,e,n,r,i){i=i!==void 0?i:!1;for(let s=0,o=n.length;s<o;++s){const a=n[s],l=linearRingIsClockwise(t,e,a,r);(s===0?i&&l||!i&&!l:i&&!l||!i&&l)&&coordinates(t,e,a,r),e=a}return e}function orientLinearRingsArray(t,e,n,r,i){for(let s=0,o=n.length;s<o;++s)e=orientLinearRings(t,e,n[s],r,i);return e}function inflateEnds(t,e){const n=[];let r=0,i=0,s;for(let o=0,a=e.length;o<a;++o){const l=e[o],u=linearRingIsClockwise(t,r,l,2);if(s===void 0&&(s=u),u===s)n.push(e.slice(i,o+1));else{if(n.length===0)continue;n[n.length-1].push(e[i])}i=o+1,r=l}return n}class Polygon extends SimpleGeometry{constructor(e,n,r){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,n!==void 0&&r?(this.setFlatCoordinates(n,e),this.ends_=r):this.setCoordinates(e,n)}appendLinearRing(e){this.flatCoordinates?extend$2(this.flatCoordinates,e.getFlatCoordinates()):this.flatCoordinates=e.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const e=new Polygon(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return e.applyProperties(this),e}closestPointXY(e,n,r,i){return i<closestSquaredDistanceXY(this.getExtent(),e,n)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestArrayPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,e,n,r,i))}containsXY(e,n){return linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,n)}getArea(){return linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(e){let n;return e!==void 0?(n=this.getOrientedFlatCoordinates().slice(),orientLinearRings(n,0,this.ends_,this.stride,e)):n=this.flatCoordinates,inflateCoordinatesArray(n,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const e=getCenter(this.getExtent());this.flatInteriorPoint_=getInteriorPointOfArray(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Point(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(e){return e<0||this.ends_.length<=e?null:new LinearRing(this.flatCoordinates.slice(e===0?0:this.ends_[e-1],this.ends_[e]),this.layout)}getLinearRings(){const e=this.layout,n=this.flatCoordinates,r=this.ends_,i=[];let s=0;for(let o=0,a=r.length;o<a;++o){const l=r[o],u=new LinearRing(n.slice(s,l),e);i.push(u),s=l}return i}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;linearRingsAreOriented(e,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const n=[],r=[];return n.length=quantizeArray(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(e),n,0,r),new Polygon(n,"XY",r)}getType(){return"Polygon"}intersectsExtent(e){return intersectsLinearRingArray(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,e)}setCoordinates(e,n){this.setLayout(n,e,2),this.flatCoordinates||(this.flatCoordinates=[]);const r=deflateCoordinatesArray(this.flatCoordinates,0,e,this.stride,this.ends_);this.flatCoordinates.length=r.length===0?0:r[r.length-1],this.changed()}}function fromExtent(t){if(isEmpty(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],n=t[1],r=t[2],i=t[3],s=[e,n,e,i,r,i,r,n,e,n];return new Polygon(s,"XY",[s.length])}function linearRingss(t,e,n,r){const i=[];let s=createEmpty();for(let o=0,a=n.length;o<a;++o){const l=n[o];s=createOrUpdateFromFlatCoordinates(t,e,l[0],r),i.push((s[0]+s[2])/2,(s[1]+s[3])/2),e=l[l.length-1]}return i}class MultiPolygon extends SimpleGeometry{constructor(e,n,r){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!r&&!Array.isArray(e[0])){const i=e,s=[],o=[];for(let a=0,l=i.length;a<l;++a){const u=i[a],c=s.length,d=u.getEnds();for(let h=0,f=d.length;h<f;++h)d[h]+=c;extend$2(s,u.getFlatCoordinates()),o.push(d)}n=i.length===0?this.getLayout():i[0].getLayout(),e=s,r=o}n!==void 0&&r?(this.setFlatCoordinates(n,e),this.endss_=r):this.setCoordinates(e,n)}appendPolygon(e){let n;if(!this.flatCoordinates)this.flatCoordinates=e.getFlatCoordinates().slice(),n=e.getEnds().slice(),this.endss_.push();else{const r=this.flatCoordinates.length;extend$2(this.flatCoordinates,e.getFlatCoordinates()),n=e.getEnds().slice();for(let i=0,s=n.length;i<s;++i)n[i]+=r}this.endss_.push(n),this.changed()}clone(){const e=this.endss_.length,n=new Array(e);for(let i=0;i<e;++i)n[i]=this.endss_[i].slice();const r=new MultiPolygon(this.flatCoordinates.slice(),this.layout,n);return r.applyProperties(this),r}closestPointXY(e,n,r,i){return i<closestSquaredDistanceXY(this.getExtent(),e,n)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(multiArrayMaxSquaredDelta(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestMultiArrayPoint(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,e,n,r,i))}containsXY(e,n){return linearRingssContainsXY(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e,n)}getArea(){return linearRingss$1(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(e){let n;return e!==void 0?(n=this.getOrientedFlatCoordinates().slice(),orientLinearRingsArray(n,0,this.endss_,this.stride,e)):n=this.flatCoordinates,inflateMultiCoordinatesArray(n,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const e=linearRingss(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=getInteriorPointsOfMultiArray(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new MultiPoint(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const e=this.flatCoordinates;linearRingssAreOriented(e,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=e:(this.orientedFlatCoordinates_=e.slice(),this.orientedFlatCoordinates_.length=orientLinearRingsArray(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(e){const n=[],r=[];return n.length=quantizeMultiArray(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(e),n,0,r),new MultiPolygon(n,"XY",r)}getPolygon(e){if(e<0||this.endss_.length<=e)return null;let n;if(e===0)n=0;else{const s=this.endss_[e-1];n=s[s.length-1]}const r=this.endss_[e].slice(),i=r[r.length-1];if(n!==0)for(let s=0,o=r.length;s<o;++s)r[s]-=n;return new Polygon(this.flatCoordinates.slice(n,i),this.layout,r)}getPolygons(){const e=this.layout,n=this.flatCoordinates,r=this.endss_,i=[];let s=0;for(let o=0,a=r.length;o<a;++o){const l=r[o].slice(),u=l[l.length-1];if(s!==0)for(let d=0,h=l.length;d<h;++d)l[d]-=s;const c=new Polygon(n.slice(s,u),e,l);i.push(c),s=u}return i}getType(){return"MultiPolygon"}intersectsExtent(e){return intersectsLinearRingMultiArray(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,e)}setCoordinates(e,n){this.setLayout(n,e,3),this.flatCoordinates||(this.flatCoordinates=[]);const r=deflateMultiCoordinatesArray(this.flatCoordinates,0,e,this.stride,this.endss_);if(r.length===0)this.flatCoordinates.length=0;else{const i=r[r.length-1];this.flatCoordinates.length=i.length===0?0:i[i.length-1]}this.changed()}}const tmpTransform=create$2();class RenderFeature{constructor(e,n,r,i,s,o){this.styleFunction,this.extent_,this.id_=o,this.type_=e,this.flatCoordinates_=n,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r||null,this.properties_=s,this.squaredTolerance_,this.stride_=i,this.simplifiedGeometry_}get(e){return this.properties_[e]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?createOrUpdateFromCoordinate(this.flatCoordinates_):createOrUpdateFromFlatCoordinates(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const e=getCenter(this.getExtent());this.flatInteriorPoints_=getInteriorPointOfArray(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const e=inflateEnds(this.flatCoordinates_,this.ends_),n=linearRingss(this.flatCoordinates_,0,e,2);this.flatInteriorPoints_=getInteriorPointsOfMultiArray(this.flatCoordinates_,0,e,2,n)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=interpolatePoint(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const e=this.flatCoordinates_;let n=0;const r=this.ends_;for(let i=0,s=r.length;i<s;++i){const o=r[i],a=interpolatePoint(e,n,o,2,.5);extend$2(this.flatMidpoints_,a),n=o}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(e){return this}simplifyTransformed(e,n){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(e){e=get$1(e);const n=e.getExtent(),r=e.getWorldExtent();if(n&&r){const i=getHeight(r)/getHeight(n);compose(tmpTransform,r[0],r[3],i,-i,0,0,0),transform2D(this.flatCoordinates_,0,this.flatCoordinates_.length,2,tmpTransform,this.flatCoordinates_)}}applyTransform(e){e(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){var e;return new RenderFeature(this.type_,this.flatCoordinates_.slice(),(e=this.ends_)==null?void 0:e.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=memoizeOne((e,n)=>{if(e===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),n&&this.simplifiedGeometry_.applyTransform(n);const r=this.simplifiedGeometry_.getFlatCoordinates();let i;switch(this.type_){case"LineString":r.length=douglasPeucker(r,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,r,0),i=[r.length];break;case"MultiLineString":i=[],r.length=douglasPeuckerArray(r,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,r,0,i);break;case"Polygon":i=[],r.length=quantizeArray(r,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(e),r,0,i);break}return i&&(this.simplifiedGeometry_=new RenderFeature(this.type_,r,i,2,this.properties_,this.id_)),this.squaredTolerance_=e,this.simplifiedGeometry_}),this}}RenderFeature.prototype.getFlatCoordinates=RenderFeature.prototype.getOrientedFlatCoordinates;class Source extends BaseObject{constructor(e){super(),this.projection=get$1(e.projection),this.attributions_=adaptAttributions(e.attributions),this.attributionsCollapsible_=e.attributionsCollapsible??!0,this.loading=!1,this.state_=e.state!==void 0?e.state:"ready",this.wrapX_=e.wrapX!==void 0?e.wrapX:!1,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;const n=this;this.viewPromise_=new Promise(function(r,i){n.viewResolver=r,n.viewRejector=i})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(e){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=adaptAttributions(e),this.changed()}setState(e){this.state_=e,this.changed()}}function adaptAttributions(t){return t?typeof t=="function"?t:(Array.isArray(t)||(t=[t]),e=>t):null}const VectorEventType={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function all$1(t,e){return[[-1/0,-1/0,1/0,1/0]]}let withCredentials=!1;function loadFeaturesXhr(t,e,n,r,i,s,o){const a=new XMLHttpRequest;a.open("GET",typeof t=="function"?t(n,r,i):t,!0),e.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=withCredentials,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const u=e.getType();try{let c;u=="text"||u=="json"?c=a.responseText:u=="xml"?c=a.responseXML||a.responseText:u=="arraybuffer"&&(c=a.response),c?s(e.readFeatures(c,{extent:n,featureProjection:i}),e.readProjection(c)):o()}catch{o()}}else o()},a.onerror=o,a.send()}function xhr(t,e){return function(n,r,i,s,o){const a=this;loadFeaturesXhr(t,e,n,r,i,function(l,u){a.addFeatures(l),s!==void 0&&s(l)},o||VOID)}}class VectorSourceEvent extends BaseEvent{constructor(e,n,r){super(e),this.feature=n,this.features=r}}class VectorSource extends Source{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=VOID,this.format_=e.format||null,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&(assert(this.format_,"`format` must be set when `url` is set"),this.loader_=xhr(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:all$1;const n=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=n?new RBush:null,this.loadedExtentsRtree_=new RBush,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let r,i;Array.isArray(e.features)?i=e.features:e.features&&(r=e.features,i=r.getArray()),!n&&r===void 0&&(r=new Collection(i)),i!==void 0&&this.addFeaturesInternal(i),r!==void 0&&this.bindFeaturesCollection_(r)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const n=getUid(e);if(!this.addToIndex_(n,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(n,e);const r=e.getGeometry();if(r){const i=r.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,e)}else this.nullGeometryFeatures_[n]=e;this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE,e))}setupChangeEvents_(e,n){n instanceof RenderFeature||(this.featureChangeKeys_[e]=[listen(n,EventType.CHANGE,this.handleFeatureChange_,this),listen(n,ObjectEventType.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(e,n){let r=!0;if(n.getId()!==void 0){const i=String(n.getId());if(!(i in this.idIndex_))this.idIndex_[i]=n;else if(n instanceof RenderFeature){const s=this.idIndex_[i];s instanceof RenderFeature?Array.isArray(s)?s.push(n):this.idIndex_[i]=[s,n]:r=!1}else r=!1}return r&&(assert(!(e in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[e]=n),r}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const n=[],r=[],i=[];for(let s=0,o=e.length;s<o;s++){const a=e[s],l=getUid(a);this.addToIndex_(l,a)&&r.push(a)}for(let s=0,o=r.length;s<o;s++){const a=r[s],l=getUid(a);this.setupChangeEvents_(l,a);const u=a.getGeometry();if(u){const c=u.getExtent();n.push(c),i.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(n,i),this.hasListener(VectorEventType.ADDFEATURE))for(let s=0,o=r.length;s<o;s++)this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE,r[s]))}bindFeaturesCollection_(e){let n=!1;this.addEventListener(VectorEventType.ADDFEATURE,function(r){n||(n=!0,e.push(r.feature),n=!1)}),this.addEventListener(VectorEventType.REMOVEFEATURE,function(r){n||(n=!0,e.remove(r.feature),n=!1)}),e.addEventListener(CollectionEventType.ADD,r=>{n||(n=!0,this.addFeature(r.element),n=!1)}),e.addEventListener(CollectionEventType.REMOVE,r=>{n||(n=!0,this.removeFeature(r.element),n=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const r in this.featureChangeKeys_)this.featureChangeKeys_[r].forEach(unlistenByKey);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){this.featuresRtree_.forEach(r=>{this.removeFeatureInternal(r)});for(const r in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[r])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const n=new VectorSourceEvent(VectorEventType.CLEAR);this.dispatchEvent(n),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,n){const r=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(r,function(i){const s=i.getGeometry();if(s instanceof RenderFeature||s.intersectsCoordinate(e))return n(i)})}forEachFeatureInExtent(e,n){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,n);this.featuresCollection_&&this.featuresCollection_.forEach(n)}forEachFeatureIntersectingExtent(e,n){return this.forEachFeatureInExtent(e,function(r){const i=r.getGeometry();if(i instanceof RenderFeature||i.intersectsExtent(e)){const s=n(r);if(s)return s}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),isEmpty$1(this.nullGeometryFeatures_)||extend$2(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const n=[];return this.forEachFeatureAtCoordinateDirect(e,function(r){n.push(r)}),n}getFeaturesInExtent(e,n){if(this.featuresRtree_){if(!(n&&n.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const i=wrapAndSliceX(e,n);return[].concat(...i.map(s=>this.featuresRtree_.getInExtent(s)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,n){const r=e[0],i=e[1];let s=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return n=n||TRUE,this.featuresRtree_.forEachInExtent(l,function(u){if(n(u)){const c=u.getGeometry(),d=a;if(a=c instanceof RenderFeature?0:c.closestPointXY(r,i,o,a),a<d){s=u;const h=Math.sqrt(a);l[0]=r-h,l[1]=i-h,l[2]=r+h,l[3]=i+h}}}),s}getExtent(e){return this.featuresRtree_.getExtent(e)}getFeatureById(e){const n=this.idIndex_[e.toString()];return n!==void 0?n:null}getFeatureByUid(e){const n=this.uidIndex_[e];return n!==void 0?n:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(e){const n=e.target,r=getUid(n),i=n.getGeometry();if(!i)r in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(n),this.nullGeometryFeatures_[r]=n);else{const o=i.getExtent();r in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[r],this.featuresRtree_&&this.featuresRtree_.insert(o,n)):this.featuresRtree_&&this.featuresRtree_.update(o,n)}const s=n.getId();if(s!==void 0){const o=s.toString();this.idIndex_[o]!==n&&(this.removeFromIdIndex_(n),this.idIndex_[o]=n)}else this.removeFromIdIndex_(n),this.uidIndex_[r]=n;this.changed(),this.dispatchEvent(new VectorSourceEvent(VectorEventType.CHANGEFEATURE,n))}hasFeature(e){const n=e.getId();return n!==void 0?n in this.idIndex_:getUid(e)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&isEmpty$1(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(e,n,r){const i=this.loadedExtentsRtree_,s=this.strategy_(e,n,r);for(let o=0,a=s.length;o<a;++o){const l=s[o];i.forEachInExtent(l,function(c){return containsExtent(c.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADSTART)),this.loader_.call(this,l,n,r,c=>{--this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADEND,void 0,c))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADERROR))}),i.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const n=this.loadedExtentsRtree_,r=n.forEachInExtent(e,function(i){if(equals$1(i.extent,e))return i});r&&n.remove(r)}removeFeatures(e){let n=!1;for(let r=0,i=e.length;r<i;++r)n=this.removeFeatureInternal(e[r])||n;n&&this.changed()}removeFeature(e){if(!e)return;this.removeFeatureInternal(e)&&this.changed()}removeFeatureInternal(e){const n=getUid(e);if(!(n in this.uidIndex_))return!1;n in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[n]:this.featuresRtree_&&this.featuresRtree_.remove(e);const r=this.featureChangeKeys_[n];r==null||r.forEach(unlistenByKey),delete this.featureChangeKeys_[n];const i=e.getId();if(i!==void 0){const s=i.toString(),o=this.idIndex_[s];o===e?delete this.idIndex_[s]:Array.isArray(o)&&(o.splice(o.indexOf(e),1),o.length===1&&(this.idIndex_[s]=o[0]))}return delete this.uidIndex_[n],this.hasListener(VectorEventType.REMOVEFEATURE)&&this.dispatchEvent(new VectorSourceEvent(VectorEventType.REMOVEFEATURE,e)),!0}removeFromIdIndex_(e){for(const n in this.idIndex_)if(this.idIndex_[n]===e){delete this.idIndex_[n];break}}setLoader(e){this.loader_=e}setUrl(e){assert(this.format_,"`format` must be set when `url` is set"),this.url_=e,this.setLoader(xhr(e,this.format_))}setOverlaps(e){this.overlaps_=e,this.changed()}}const ImageState={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},rgb={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var xyz={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};xyz.whitepoint={2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}},xyz.max=xyz.whitepoint[2].D65,xyz.rgb=function(t,e){e=e||xyz.whitepoint[2].E;var n=t[0]/e[0],r=t[1]/e[1],i=t[2]/e[2],s,o,a;return s=n*3.240969941904521+r*-1.537383177570093+i*-.498610760293,o=n*-.96924363628087+r*1.87596750150772+i*.041555057407175,a=n*.055630079696993+r*-.20397695888897+i*1.056971514242878,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s=s*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[s*255,o*255,a*255]},rgb.xyz=function(t,e){var n=t[0]/255,r=t[1]/255,i=t[2]/255;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var s=n*.41239079926595+r*.35758433938387+i*.18048078840183,o=n*.21263900587151+r*.71516867876775+i*.072192315360733,a=n*.019330818715591+r*.11919477979462+i*.95053215224966;return e=e||xyz.whitepoint[2].E,[s*e[0],o*e[1],a*e[2]]};const luv={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,n){var r,i,s,o,a,l,u,c,d,h,f,p,g;if(s=t[0],o=t[1],a=t[2],s===0)return[0,0,0];var v=.0011070564598794539;return e=e||"D65",n=n||2,d=xyz.whitepoint[n][e][0],h=xyz.whitepoint[n][e][1],f=xyz.whitepoint[n][e][2],p=4*d/(d+15*h+3*f),g=9*h/(d+15*h+3*f),r=o/(13*s)+p||0,i=a/(13*s)+g||0,u=s>8?h*Math.pow((s+16)/116,3):h*s*v,l=u*9*r/(4*i)||0,c=u*(12-3*r-20*i)/(4*i)||0,[l,u,c]}};xyz.luv=function(t,e,n){var r,i,s,o,a,l,u,c,d,h,f,p,g,v=.008856451679035631,m=903.2962962962961;e=e||"D65",n=n||2,d=xyz.whitepoint[n][e][0],h=xyz.whitepoint[n][e][1],f=xyz.whitepoint[n][e][2],p=4*d/(d+15*h+3*f),g=9*h/(d+15*h+3*f),l=t[0],u=t[1],c=t[2],r=4*l/(l+15*u+3*c)||0,i=9*u/(l+15*u+3*c)||0;var y=u/h;return s=y<=v?m*y:116*Math.pow(y,1/3)-16,o=13*s*(r-p),a=13*s*(i-g),[s,o,a]};var lchuv={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e=t[0],n=t[1],r=t[2],i,s,o;return o=r/360*2*Math.PI,i=n*Math.cos(o),s=n*Math.sin(o),[e,i,s]},xyz:function(t){return luv.xyz(lchuv.luv(t))}};luv.lchuv=function(t){var e=t[0],n=t[1],r=t[2],i=Math.sqrt(n*n+r*r),s=Math.atan2(r,n),o=s*360/2/Math.PI;return o<0&&(o+=360),[e,i,o]},xyz.lchuv=function(t){return luv.lchuv(xyz.luv(t))};const names={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var baseHues={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function parse$1(t){var c,d;var e,n=[],r=1,i;if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(t=String(t).toLowerCase(),names[t])n=names[t].slice(),i="rgb";else if(t==="transparent")r=0,i="rgb",n=[0,0,0];else if(t[0]==="#"){var s=t.slice(1),o=s.length,a=o<=4;r=1,a?(n=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],o===4&&(r=parseInt(s[3]+s[3],16)/255)):(n=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],o===8&&(r=parseInt(s[6]+s[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),i="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var l=e[1];i=l.replace(/a$/,"");var u=i==="cmyk"?4:i==="gray"?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=n.shift()),n=n.map(function(h,f){if(h[h.length-1]==="%")return h=parseFloat(h)/100,f===3?h:i==="rgb"?h*255:i[0]==="h"||i[0]==="l"&&!f?h*100:i==="lab"?h*125:i==="lch"?f<2?h*150:h*360:i[0]==="o"&&!f?h:i==="oklab"?h*.4:i==="oklch"?f<2?h*.4:h*360:h;if(i[f]==="h"||f===2&&i[i.length-1]==="h"){if(baseHues[h]!==void 0)return baseHues[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),r=n.length>u?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),i=((d=(c=t.match(/([a-z])/ig))==null?void 0:c.join(""))==null?void 0:d.toLowerCase())||"rgb");return{space:i,values:n,alpha:r}}const hsl={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e=t[0]/360,n=t[1]/100,r=t[2]/100,i,s,o,a,l,u=0;if(n===0)return l=r*255,[l,l,l];for(s=r<.5?r*(1+n):r+n-r*n,i=2*r-s,a=[0,0,0];u<3;)o=e+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?i+(s-i)*6*o:2*o<1?s:3*o<2?i+(s-i)*(2/3-o)*6:i,a[u++]=l*255;return a}};rgb.hsl=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=s-i,a,l,u;return s===i?a=0:e===s?a=(n-r)/o:n===s?a=2+(r-e)/o:r===s&&(a=4+(e-n)/o),a=Math.min(a*60,360),a<0&&(a+=360),u=(i+s)/2,s===i?l=0:u<=.5?l=o/(s+i):l=o/(2-s-i),[a,l*100,u*100]};function rgba(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var e,n=parse$1(t);if(!n.space)return[];const r=n.space[0]==="h"?hsl.min:rgb.min,i=n.space[0]==="h"?hsl.max:rgb.max;return e=Array(3),e[0]=Math.min(Math.max(n.values[0],r[0]),i[0]),e[1]=Math.min(Math.max(n.values[1],r[1]),i[1]),e[2]=Math.min(Math.max(n.values[2],r[2]),i[2]),n.space[0]==="h"&&(e=hsl.rgb(e)),e.push(Math.min(Math.max(n.alpha,0),1)),e}const NO_COLOR=[NaN,NaN,NaN,0];function asString(t){return typeof t=="string"?t:toString(t)}const MAX_CACHE_SIZE=1024,cache={};let cacheSize=0;function withAlpha(t){if(t.length===4)return t;const e=t.slice();return e[3]=1,e}function rgbaToLcha(t){const e=xyz.lchuv(rgb.xyz(t));return e[3]=t[3],e}function lchaToRgba(t){const e=xyz.rgb(lchuv.xyz(t));return e[3]=t[3],e}function fromString(t){if(t==="none")return NO_COLOR;if(cache.hasOwnProperty(t))return cache[t];if(cacheSize>=MAX_CACHE_SIZE){let n=0;for(const r in cache)n++&3||(delete cache[r],--cacheSize)}const e=rgba(t);if(e.length!==4)throw new Error('failed to parse "'+t+'" as color');for(const n of e)if(isNaN(n))throw new Error('failed to parse "'+t+'" as color');return normalize(e),cache[t]=e,++cacheSize,e}function asArray(t){return Array.isArray(t)?t:fromString(t)}function normalize(t){return t[0]=clamp(t[0]+.5|0,0,255),t[1]=clamp(t[1]+.5|0,0,255),t[2]=clamp(t[2]+.5|0,0,255),t[3]=clamp(t[3],0,1),t}function toString(t){let e=t[0];e!=(e|0)&&(e=e+.5|0);let n=t[1];n!=(n|0)&&(n=n+.5|0);let r=t[2];r!=(r|0)&&(r=r+.5|0);const i=t[3]===void 0?1:Math.round(t[3]*1e3)/1e3;return"rgba("+e+","+n+","+r+","+i+")"}const ua=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",FIREFOX=ua.includes("firefox"),SAFARI=ua.includes("safari")&&!ua.includes("chrom"),SAFARI_BUG_237906=SAFARI&&(ua.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ua)),WEBKIT=ua.includes("webkit")&&!ua.includes("edge"),MAC=ua.includes("macintosh"),DEVICE_PIXEL_RATIO=typeof devicePixelRatio<"u"?devicePixelRatio:1,WORKER_OFFSCREEN_CANVAS=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,IMAGE_DECODE=typeof Image<"u"&&Image.prototype.decode,PASSIVE_EVENT_LISTENERS=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}();function createCanvasContext2D(t,e,n,r){let i;return n&&n.length?i=n.shift():WORKER_OFFSCREEN_CANVAS?i=new OffscreenCanvas(t||300,e||300):i=document.createElement("canvas"),t&&(i.width=t),e&&(i.height=e),i.getContext("2d",r)}let sharedCanvasContext;function getSharedCanvasContext2D(){return sharedCanvasContext||(sharedCanvasContext=createCanvasContext2D(1,1)),sharedCanvasContext}function releaseCanvas$1(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function outerWidth(t){let e=t.offsetWidth;const n=getComputedStyle(t);return e+=parseInt(n.marginLeft,10)+parseInt(n.marginRight,10),e}function outerHeight(t){let e=t.offsetHeight;const n=getComputedStyle(t);return e+=parseInt(n.marginTop,10)+parseInt(n.marginBottom,10),e}function replaceNode(t,e){const n=e.parentNode;n&&n.replaceChild(t,e)}function removeChildren(t){for(;t.lastChild;)t.lastChild.remove()}function replaceChildren(t,e){const n=t.childNodes;for(let r=0;;++r){const i=n[r],s=e[r];if(!i&&!s)break;if(i!==s){if(!i){t.appendChild(s);continue}if(!s){t.removeChild(i),--r;continue}t.insertBefore(s,i)}}}function listenImage(t,e,n){const r=t;let i=!0,s=!1,o=!1;const a=[listenOnce(r,EventType.LOAD,function(){o=!0,s||e()})];return r.src&&IMAGE_DECODE?(s=!0,r.decode().then(function(){i&&e()}).catch(function(l){i&&(o?e():n())})):a.push(listenOnce(r,EventType.ERROR,n)),function(){i=!1,a.forEach(unlistenByKey)}}function load(t,e){return new Promise((n,r)=>{function i(){o(),n(t)}function s(){o(),r(new Error("Image load error"))}function o(){t.removeEventListener("load",i),t.removeEventListener("error",s)}t.addEventListener("load",i),t.addEventListener("error",s)})}function decodeFallback(t,e){return e&&(t.src=e),t.src&&IMAGE_DECODE?new Promise((n,r)=>t.decode().then(()=>n(t)).catch(i=>t.complete&&t.width?n(t):r(i))):load(t)}class IconImageCache{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const n in this.cache_){const r=this.cache_[n];!(e++&3)&&!r.hasListener()&&(delete this.cache_[n],delete this.patternCache_[n],--this.cacheSize_)}}}get(e,n,r){const i=getCacheKey$1(e,n,r);return i in this.cache_?this.cache_[i]:null}getPattern(e,n,r){const i=getCacheKey$1(e,n,r);return i in this.patternCache_?this.patternCache_[i]:null}set(e,n,r,i,s){const o=getCacheKey$1(e,n,r),a=o in this.cache_;this.cache_[o]=i,s&&(i.getImageState()===ImageState.IDLE&&i.load(),i.getImageState()===ImageState.LOADING?i.ready().then(()=>{this.patternCache_[o]=getSharedCanvasContext2D().createPattern(i.getImage(1),"repeat")}):this.patternCache_[o]=getSharedCanvasContext2D().createPattern(i.getImage(1),"repeat")),a||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function getCacheKey$1(t,e,n){const r=n?asArray(n):"null";return e+":"+t+":"+r}const shared=new IconImageCache;let taintedTestContext=null;class IconImage extends Target{constructor(e,n,r,i,s){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=r,this.canvas_={},this.color_=s,this.imageState_=i===void 0?ImageState.IDLE:i,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=n,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===ImageState.LOADED){taintedTestContext||(taintedTestContext=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})),taintedTestContext.drawImage(this.image_,0,0);try{taintedTestContext.getImageData(0,0,1,1),this.tainted_=!1}catch{taintedTestContext=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(EventType.CHANGE)}handleImageError_(){this.imageState_=ImageState.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=ImageState.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],n=this.size_[1],r=createCanvasContext2D(e,n);r.fillRect(0,0,e,n),this.hitDetectionImage_=r.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===ImageState.IDLE){this.image_||this.initializeImage_(),this.imageState_=ImageState.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&decodeFallback(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==ImageState.LOADED)return;const n=this.image_,r=createCanvasContext2D(Math.ceil(n.width*e),Math.ceil(n.height*e)),i=r.canvas;r.scale(e,e),r.drawImage(n,0,0),r.globalCompositeOperation="multiply",r.fillStyle=asString(this.color_),r.fillRect(0,0,i.width/e,i.height/e),r.globalCompositeOperation="destination-in",r.drawImage(n,0,0),this.canvas_[e]=i}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===ImageState.LOADED||this.imageState_===ImageState.ERROR)e();else{const n=()=>{(this.imageState_===ImageState.LOADED||this.imageState_===ImageState.ERROR)&&(this.removeEventListener(EventType.CHANGE,n),e())};this.addEventListener(EventType.CHANGE,n)}})),this.ready_}}function get(t,e,n,r,i,s){let o=e===void 0?void 0:shared.get(e,n,i);return o||(o=new IconImage(t,t&&"src"in t?t.src||void 0:e,n,r,i),shared.set(e,n,i,o,s)),s&&o&&!shared.getPattern(e,n,i)&&shared.set(e,n,i,o,s),o}function hasArea(t){return t[0]>0&&t[1]>0}function scale$1(t,e,n){return n===void 0&&(n=[0,0]),n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n}function toSize(t,e){return Array.isArray(t)?t:(e===void 0?e=[t,t]:(e[0]=t,e[1]=t),e)}class ImageStyle{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=toSize(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new ImageStyle({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return abstract()}getImage(e){return abstract()}getHitDetectionImage(){return abstract()}getPixelRatio(e){return 1}getImageState(){return abstract()}getImageSize(){return abstract()}getOrigin(){return abstract()}getSize(){return abstract()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=toSize(e)}listenImageChange(e){abstract()}load(){abstract()}unlistenImageChange(e){abstract()}ready(){return Promise.resolve()}}function asColorLike(t){return t?Array.isArray(t)?toString(t):typeof t=="object"&&"src"in t?asCanvasPattern(t):t:null}function asCanvasPattern(t){if(!t.offset||!t.size)return shared.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,n=shared.getPattern(e,void 0,t.color);if(n)return n;const r=shared.get(t.src,"anonymous",null);if(r.getImageState()!==ImageState.LOADED)return null;const i=createCanvasContext2D(t.size[0],t.size[1]);return i.drawImage(r.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),get(i.canvas,e,void 0,ImageState.LOADED,t.color,!0),shared.getPattern(e,void 0,t.color)}const CLASS_HIDDEN="ol-hidden",CLASS_SELECTABLE="ol-selectable",CLASS_UNSELECTABLE="ol-unselectable",CLASS_CONTROL="ol-control",CLASS_COLLAPSED="ol-collapsed",fontRegEx=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),fontRegExMatchIndex=["style","variant","weight","size","lineHeight","family"],getFontParameters=function(t){const e=t.match(fontRegEx);if(!e)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let r=0,i=fontRegExMatchIndex.length;r<i;++r){const s=e[r+1];s!==void 0&&(n[fontRegExMatchIndex[r]]=s)}return n.families=n.family.split(/,\s?/),n},defaultFont="10px sans-serif",defaultFillStyle="#000",defaultLineCap="round",defaultLineDash=[],defaultLineDashOffset=0,defaultLineJoin="round",defaultMiterLimit=10,defaultStrokeStyle="#000",defaultTextAlign="center",defaultTextBaseline="middle",defaultPadding=[0,0,0,0],defaultLineWidth=1,checkedFonts=new BaseObject;let measureContext=null,measureFont;const textHeights={},registerFont=function(){const e="32px ",n=["monospace","serif"],r=n.length,i="wmytzilWMYTZIL@#/&?$%10";let s,o;function a(u,c,d){let h=!0;for(let f=0;f<r;++f){const p=n[f];if(o=measureTextWidth(u+" "+c+" "+e+p,i),d!=p){const g=measureTextWidth(u+" "+c+" "+e+d+","+p,i);h=h&&g!=o}}return!!h}function l(){let u=!0;const c=checkedFonts.getKeys();for(let d=0,h=c.length;d<h;++d){const f=c[d];if(checkedFonts.get(f)<100){const[p,g,v]=f.split(`
|
|
41
|
+
`);a(p,g,v)?(clear(textHeights),measureContext=null,measureFont=void 0,checkedFonts.set(f,100)):(checkedFonts.set(f,checkedFonts.get(f)+1,!0),u=!1)}}u&&(clearInterval(s),s=void 0)}return function(u){const c=getFontParameters(u);if(!c)return;const d=c.families;for(let h=0,f=d.length;h<f;++h){const p=d[h],g=c.style+`
|
|
42
|
+
`+c.weight+`
|
|
43
|
+
`+p;checkedFonts.get(g)===void 0&&(checkedFonts.set(g,100,!0),a(c.style,c.weight,p)||(checkedFonts.set(g,0,!0),s===void 0&&(s=setInterval(l,32))))}}}(),measureTextHeight=function(){let t;return function(e){let n=textHeights[e];if(n==null){if(WORKER_OFFSCREEN_CANVAS){const r=getFontParameters(e),i=measureText(e,"Žg");n=(isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),n=t.offsetHeight,document.body.removeChild(t);textHeights[e]=n}return n}}();function measureText(t,e){return measureContext||(measureContext=createCanvasContext2D(1,1)),t!=measureFont&&(measureContext.font=t,measureFont=measureContext.font),measureContext.measureText(e)}function measureTextWidth(t,e){return measureText(t,e).width}function measureAndCacheTextWidth(t,e,n){if(e in n)return n[e];const r=e.split(`
|
|
44
|
+
`).reduce((i,s)=>Math.max(i,measureTextWidth(t,s)),0);return n[e]=r,r}function getTextDimensions(t,e){const n=[],r=[],i=[];let s=0,o=0,a=0,l=0;for(let u=0,c=e.length;u<=c;u+=2){const d=e[u];if(d===`
|
|
45
|
+
`||u===c){s=Math.max(s,o),i.push(o),o=0,a+=l,l=0;continue}const h=e[u+1]||t.font,f=measureTextWidth(h,d);n.push(f),o+=f;const p=measureTextHeight(h);r.push(p),l=Math.max(l,p)}return{width:s,height:a,widths:n,heights:r,lineWidths:i}}function drawImageOrLabel(t,e,n,r,i,s,o,a,l,u,c){t.save(),n!==1&&(t.globalAlpha===void 0?t.globalAlpha=d=>d.globalAlpha*=n:t.globalAlpha*=n),e&&t.transform.apply(t,e),r.contextInstructions?(t.translate(l,u),t.scale(c[0],c[1]),executeLabelInstructions(r,t)):c[0]<0||c[1]<0?(t.translate(l,u),t.scale(c[0],c[1]),t.drawImage(r,i,s,o,a,0,0,o,a)):t.drawImage(r,i,s,o,a,l,u,o*c[0],a*c[1]),t.restore()}function executeLabelInstructions(t,e){const n=t.contextInstructions;for(let r=0,i=n.length;r<i;r+=2)Array.isArray(n[r+1])?e[n[r]].apply(e,n[r+1]):e[n[r]]=n[r+1]}class RegularShape extends ImageStyle{constructor(e){super({opacity:1,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,rotation:e.rotation!==void 0?e.rotation:0,scale:e.scale!==void 0?e.scale:1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=e.fill!==void 0?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius=e.radius,this.radius2_=e.radius2,this.angle_=e.angle!==void 0?e.angle:0,this.stroke_=e.stroke!==void 0?e.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?ImageState.LOADING:ImageState.LOADED,this.imageState_===ImageState.LOADING&&this.ready().then(()=>this.imageState_=ImageState.LOADED),this.render()}clone(){const e=this.getScale(),n=new RegularShape({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n}getAnchor(){const e=this.size_,n=this.getDisplacement(),r=this.getScaleArray();return[e[0]/2-n[0]/r[0],e[1]/2+n[1]/r[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){var s,o;const n=(s=this.fill_)==null?void 0:s.getKey(),r=`${e},${this.angle_},${this.radius},${this.radius2_},${this.points_},${n}`+Object.values(this.renderOptions_).join(",");let i=(o=shared.get(r,null,null))==null?void 0:o.getImage(1);if(!i){const a=this.renderOptions_,l=Math.ceil(a.size*e),u=createCanvasContext2D(l,l);this.draw_(a,u,e),i=u.canvas,shared.set(r,null,null,new IconImage(i,void 0,null,ImageState.LOADED,null))}return i}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,n,r){if(n===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return n;let i=this.radius,s=this.radius2_===void 0?i:this.radius2_;if(i<s){const x=i;i=s,s=x}const o=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/o,l=s*Math.sin(a),u=Math.sqrt(s*s-l*l),c=i-u,d=Math.sqrt(l*l+c*c),h=d/l;if(e==="miter"&&h<=r)return h*n;const f=n/2/h,p=n/2*(c/d),v=Math.sqrt((i+f)*(i+f)+p*p)-i;if(this.radius2_===void 0||e==="bevel")return v*2;const m=i*Math.sin(a),y=Math.sqrt(i*i-m*m),b=s-y,T=Math.sqrt(m*m+b*b)/m;if(T<=r){const x=T*n/2-s-i;return 2*Math.max(v,x)}return v*2}createRenderOptions(){let e=defaultLineCap,n=defaultLineJoin,r=0,i=null,s=0,o,a=0;this.stroke_&&(o=asColorLike(this.stroke_.getColor()??defaultStrokeStyle),a=this.stroke_.getWidth()??defaultLineWidth,i=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset()??0,n=this.stroke_.getLineJoin()??defaultLineJoin,e=this.stroke_.getLineCap()??defaultLineCap,r=this.stroke_.getMiterLimit()??defaultMiterLimit);const l=this.calculateLineJoinSize_(n,a,r),u=Math.max(this.radius,this.radius2_||0),c=Math.ceil(2*u+l);return{strokeStyle:o,strokeWidth:a,size:c,lineCap:e,lineDash:i,lineDashOffset:s,lineJoin:n,miterLimit:r}}render(){this.renderOptions_=this.createRenderOptions();const e=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[e,e]}draw_(e,n,r){if(n.scale(r,r),n.translate(e.size/2,e.size/2),this.createPath_(n),this.fill_){let i=this.fill_.getColor();i===null&&(i=defaultFillStyle),n.fillStyle=asColorLike(i),n.fill()}e.strokeStyle&&(n.strokeStyle=e.strokeStyle,n.lineWidth=e.strokeWidth,e.lineDash&&(n.setLineDash(e.lineDash),n.lineDashOffset=e.lineDashOffset),n.lineCap=e.lineCap,n.lineJoin=e.lineJoin,n.miterLimit=e.miterLimit,n.stroke())}createHitDetectionCanvas_(e){let n;if(this.fill_){let r=this.fill_.getColor(),i=0;typeof r=="string"&&(r=asArray(r)),r===null?i=1:Array.isArray(r)&&(i=r.length===4?r[3]:1),i===0&&(n=createCanvasContext2D(e.size,e.size),this.drawHitDetectionCanvas_(e,n))}return n?n.canvas:this.getImage(1)}createPath_(e){let n=this.points_;const r=this.radius;if(n===1/0)e.arc(0,0,r,0,2*Math.PI);else{const i=this.radius2_===void 0?r:this.radius2_;this.radius2_!==void 0&&(n*=2);const s=this.angle_-Math.PI/2,o=2*Math.PI/n;for(let a=0;a<n;a++){const l=s+a*o,u=a%2===0?r:i;e.lineTo(u*Math.cos(l),u*Math.sin(l))}e.closePath()}}drawHitDetectionCanvas_(e,n){n.translate(e.size/2,e.size/2),this.createPath_(n),n.fillStyle=defaultFillStyle,n.fill(),e.strokeStyle&&(n.strokeStyle=e.strokeStyle,n.lineWidth=e.strokeWidth,e.lineDash&&(n.setLineDash(e.lineDash),n.lineDashOffset=e.lineDashOffset),n.lineJoin=e.lineJoin,n.miterLimit=e.miterLimit,n.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}class CircleStyle extends RegularShape{constructor(e){e=e||{radius:5},super({points:1/0,fill:e.fill,radius:e.radius,stroke:e.stroke,scale:e.scale!==void 0?e.scale:1,rotation:e.rotation!==void 0?e.rotation:0,rotateWithView:e.rotateWithView!==void 0?e.rotateWithView:!1,displacement:e.displacement!==void 0?e.displacement:[0,0],declutterMode:e.declutterMode})}clone(){const e=this.getScale(),n=new CircleStyle({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n}setRadius(e){this.radius=e,this.render()}}class Fill{constructor(e){e=e||{},this.patternImage_=null,this.color_=null,e.color!==void 0&&this.setColor(e.color)}clone(){const e=this.getColor();return new Fill({color:Array.isArray(e)?e.slice():e||void 0})}getColor(){return this.color_}setColor(e){if(e!==null&&typeof e=="object"&&"src"in e){const n=get(null,e.src,"anonymous",void 0,e.offset?null:e.color?e.color:null,!(e.offset&&e.size));n.ready().then(()=>{this.patternImage_=null}),n.getImageState()===ImageState.IDLE&&n.load(),n.getImageState()===ImageState.LOADING&&(this.patternImage_=n)}this.color_=e}getKey(){const e=this.getColor();return e?e instanceof CanvasPattern||e instanceof CanvasGradient?getUid(e):typeof e=="object"&&"src"in e?e.src+":"+e.offset:asArray(e).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}function calculateScale(t,e,n,r){return n!==void 0&&r!==void 0?[n/t,r/e]:n!==void 0?n/t:r!==void 0?r/e:1}class Icon extends ImageStyle{constructor(e){e=e||{};const n=e.opacity!==void 0?e.opacity:1,r=e.rotation!==void 0?e.rotation:0,i=e.scale!==void 0?e.scale:1,s=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:n,rotation:r,scale:i,displacement:e.displacement!==void 0?e.displacement:[0,0],rotateWithView:s,declutterMode:e.declutterMode}),this.anchor_=e.anchor!==void 0?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=e.anchorOrigin!==void 0?e.anchorOrigin:"top-left",this.anchorXUnits_=e.anchorXUnits!==void 0?e.anchorXUnits:"fraction",this.anchorYUnits_=e.anchorYUnits!==void 0?e.anchorYUnits:"fraction",this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null;const o=e.img!==void 0?e.img:null;let a=e.src;assert(!(a!==void 0&&o),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&o&&(a=o.src||getUid(o)),assert(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),assert(!((e.width!==void 0||e.height!==void 0)&&e.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let l;if(e.src!==void 0?l=ImageState.IDLE:o!==void 0&&("complete"in o?o.complete?l=o.src?ImageState.LOADED:ImageState.IDLE:l=ImageState.LOADING:l=ImageState.LOADED),this.color_=e.color!==void 0?asArray(e.color):null,this.iconImage_=get(o,a,this.crossOrigin_,l,this.color_),this.offset_=e.offset!==void 0?e.offset:[0,0],this.offsetOrigin_=e.offsetOrigin!==void 0?e.offsetOrigin:"top-left",this.origin_=null,this.size_=e.size!==void 0?e.size:null,this.initialOptions_,e.width!==void 0||e.height!==void 0){let u,c;if(e.size)[u,c]=e.size;else{const d=this.getImage(1);if(d.width&&d.height)u=d.width,c=d.height;else if(d instanceof HTMLImageElement){this.initialOptions_=e;const h=()=>{if(this.unlistenImageChange(h),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(calculateScale(f[0],f[1],e.width,e.height))};this.listenImageChange(h);return}}u!==void 0&&this.setScale(calculateScale(u,c,e.width,e.height))}}clone(){let e,n,r;return this.initialOptions_?(n=this.initialOptions_.width,r=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new Icon({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:n,height:r,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;const i=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!i)return null;e=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(e[0]*=i[0]),this.anchorYUnits_=="fraction"&&(e[1]*=i[1])}if(this.anchorOrigin_!="top-left"){if(!i)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(e[0]=-e[0]+i[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(e[1]=-e[1]+i[1])}this.normalizedAnchor_=e}const n=this.getDisplacement(),r=this.getScaleArray();return[e[0]-n[0]/r[0],e[1]+n[1]/r[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if(this.offsetOrigin_!="top-left"){const n=this.getSize(),r=this.iconImage_.getSize();if(!n||!r)return null;e=e.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(e[0]=r[0]-n[0]-e[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(e[1]=r[1]-n[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const e=this.getScaleArray();if(this.size_)return this.size_[0]*e[0];if(this.iconImage_.getImageState()==ImageState.LOADED)return this.iconImage_.getSize()[0]*e[0]}getHeight(){const e=this.getScaleArray();if(this.size_)return this.size_[1]*e[1];if(this.iconImage_.getImageState()==ImageState.LOADED)return this.iconImage_.getSize()[1]*e[1]}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(EventType.CHANGE,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(EventType.CHANGE,e)}ready(){return this.iconImage_.ready()}}class Stroke{constructor(e){e=e||{},this.color_=e.color!==void 0?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=e.lineDash!==void 0?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}clone(){const e=this.getColor();return new Stroke({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(e){this.color_=e}setLineCap(e){this.lineCap_=e}setLineDash(e){this.lineDash_=e}setLineDashOffset(e){this.lineDashOffset_=e}setLineJoin(e){this.lineJoin_=e}setMiterLimit(e){this.miterLimit_=e}setWidth(e){this.width_=e}}class Style{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=defaultGeometryFunction,e.geometry!==void 0&&this.setGeometry(e.geometry),this.fill_=e.fill!==void 0?e.fill:null,this.image_=e.image!==void 0?e.image:null,this.renderer_=e.renderer!==void 0?e.renderer:null,this.hitDetectionRenderer_=e.hitDetectionRenderer!==void 0?e.hitDetectionRenderer:null,this.stroke_=e.stroke!==void 0?e.stroke:null,this.text_=e.text!==void 0?e.text:null,this.zIndex_=e.zIndex}clone(){let e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new Style({geometry:e??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(e){this.renderer_=e}setHitDetectionRenderer(e){this.hitDetectionRenderer_=e}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(e){this.fill_=e}getImage(){return this.image_}setImage(e){this.image_=e}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e}getText(){return this.text_}setText(e){this.text_=e}getZIndex(){return this.zIndex_}setGeometry(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(n){return n.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=defaultGeometryFunction,this.geometry_=e}setZIndex(e){this.zIndex_=e}}function toFunction(t){let e;if(typeof t=="function")e=t;else{let n;Array.isArray(t)?n=t:(assert(typeof t.getZIndex=="function","Expected an `Style` or an array of `Style`"),n=[t]),e=function(){return n}}return e}let defaultStyles=null;function createDefaultStyle$1(t,e){if(!defaultStyles){const n=new Fill({color:"rgba(255,255,255,0.4)"}),r=new Stroke({color:"#3399CC",width:1.25});defaultStyles=[new Style({image:new CircleStyle({fill:n,stroke:r,radius:5}),fill:n,stroke:r})]}return defaultStyles}function createEditingStyle(){const t={},e=[255,255,255,1],n=[0,153,255,1],r=3;return t.Polygon=[new Style({fill:new Fill({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new Style({stroke:new Stroke({color:e,width:r+2})}),new Style({stroke:new Stroke({color:n,width:r})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new Style({image:new CircleStyle({radius:r*2,fill:new Fill({color:n}),stroke:new Stroke({color:e,width:r/2})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function defaultGeometryFunction(t){return t.getGeometry()}const DEFAULT_FILL_COLOR="#333";class Text{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.keepUpright_=e.keepUpright,this.scale_=e.scale,this.scaleArray_=toSize(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new Fill({color:DEFAULT_FILL_COLOR}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=e.stroke!==void 0?e.stroke:null,this.offsetX_=e.offsetX!==void 0?e.offsetX:0,this.offsetY_=e.offsetY!==void 0?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=e.padding===void 0?null:e.padding,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Text({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setKeepUpright(e){this.keepUpright_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=toSize(e!==void 0?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}}const InteractionProperty={ACTIVE:"active"};function easeIn(t){return Math.pow(t,3)}function easeOut(t){return 1-easeIn(1-t)}function inAndOut(t){return 3*t*t-2*t*t*t}function linear(t){return t}class Interaction extends BaseObject{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(InteractionProperty.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(InteractionProperty.ACTIVE,e)}setMap(e){this.map_=e}}function pan(t,e,n){const r=t.getCenterInternal();if(r){const i=[r[0]+e[0],r[1]+e[1]];t.animateInternal({duration:n!==void 0?n:250,easing:linear,center:t.getConstrainedCenter(i)})}}function zoomByDelta(t,e,n,r){const i=t.getZoom();if(i===void 0)return;const s=t.getConstrainedZoom(i+e),o=t.getResolutionForZoom(s);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:n,duration:r!==void 0?r:250,easing:easeOut})}const MapBrowserEventType={SINGLECLICK:"singleclick",CLICK:EventType.CLICK,DBLCLICK:EventType.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class DoubleClickZoom extends Interaction{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:250}handleEvent(e){let n=!1;if(e.type==MapBrowserEventType.DBLCLICK){const r=e.originalEvent,i=e.map,s=e.coordinate,o=r.shiftKey?-this.delta_:this.delta_,a=i.getView();zoomByDelta(a,o,s,this.duration_),r.preventDefault(),n=!0}return!n}}class PointerInteraction extends Interaction{constructor(e){e=e||{},super(e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let n=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==MapBrowserEventType.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==MapBrowserEventType.POINTERUP){const r=this.handleUpEvent(e);this.handlingDownUpSequence=r&&this.targetPointers.length>0}}else if(e.type==MapBrowserEventType.POINTERDOWN){const r=this.handleDownEvent(e);this.handlingDownUpSequence=r,n=this.stopDown(r)}else e.type==MapBrowserEventType.POINTERMOVE&&this.handleMoveEvent(e);return!n}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}}function centroid(t){const e=t.length;let n=0,r=0;for(let i=0;i<e;i++)n+=t[i].clientX,r+=t[i].clientY;return{clientX:n/e,clientY:r/e}}class RenderBox extends Disposable{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const e=this.startPixel_,n=this.endPixel_,r="px",i=this.element_.style;i.left=Math.min(e[0],n[0])+r,i.top=Math.min(e[1],n[1])+r,i.width=Math.abs(n[0]-e[0])+r,i.height=Math.abs(n[1]-e[1])+r}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const n=this.element_.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,n){this.startPixel_=e,this.endPixel_=n,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const e=this.startPixel_,n=this.endPixel_,i=[e,[e[0],n[1]],n,[n[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Polygon([i])}getGeometry(){return this.geometry_}}function all(t){const e=arguments;return function(n){let r=!0;for(let i=0,s=e.length;i<s&&(r=r&&e[i](n),!!r);++i);return r}}const altShiftKeysOnly=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},focus=function(t){const e=t.map.getTargetElement(),n=e.getRootNode(),r=t.map.getOwnerDocument().activeElement;return n instanceof ShadowRoot?n.host.contains(r):e.contains(r)},focusWithTabindex=function(t){const e=t.map.getTargetElement(),n=e.getRootNode();return(n instanceof ShadowRoot?n.host:e).hasAttribute("tabindex")?focus(t):!0},always$1=TRUE,mouseActionButton=function(t){const e=t.originalEvent;return e.button==0&&!(WEBKIT&&MAC&&e.ctrlKey)},never=FALSE,noModifierKeys=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},platformModifierKey=function(t){const e=t.originalEvent;return MAC?e.metaKey:e.ctrlKey},shiftKeyOnly=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},targetNotEditable=function(t){const e=t.originalEvent,n=e.target.tagName;return n!=="INPUT"&&n!=="SELECT"&&n!=="TEXTAREA"&&!e.target.isContentEditable},mouseOnly=function(t){const e=t.originalEvent;return assert(e!==void 0,"mapBrowserEvent must originate from a pointer event"),e.pointerType=="mouse"},primaryAction=function(t){const e=t.originalEvent;return assert(e!==void 0,"mapBrowserEvent must originate from a pointer event"),e.isPrimary&&e.button===0},DragBoxEventType={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class DragBoxEvent extends BaseEvent{constructor(e,n,r){super(e),this.coordinate=n,this.mapBrowserEvent=r}}class DragBox extends PointerInteraction{constructor(e){super(),this.on,this.once,this.un,e=e??{},this.box_=new RenderBox(e.className||"ol-dragbox"),this.minArea_=e.minArea??64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition??mouseActionButton,this.boxEndCondition_=e.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(e,n,r){const i=r[0]-n[0],s=r[1]-n[1];return i*i+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.startPixel_&&(this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXDRAG,e.coordinate,e)))}handleUpEvent(e){if(!this.startPixel_)return!1;const n=this.boxEndCondition_(e,this.startPixel_,e.pixel);return n&&this.onBoxEnd(e),this.dispatchEvent(new DragBoxEvent(n?DragBoxEventType.BOXEND:DragBoxEventType.BOXCANCEL,e.coordinate,e)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}setActive(e){e||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(e)}setMap(e){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(e)}}class DragPan extends PointerInteraction{constructor(e){super({stopDown:FALSE}),e=e||{},this.kinetic_=e.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const n=e.condition?e.condition:all(noModifierKeys,primaryAction);this.condition_=e.onFocusOnly?all(focusWithTabindex,n):n,this.noKinetic_=!1}handleDragEvent(e){const n=e.map;this.panning_||(this.panning_=!0,n.getView().beginInteraction());const r=this.targetPointers,i=n.getEventPixel(centroid(r));if(r.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){const s=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],a=e.map.getView();scale$3(s,a.getResolution()),rotate$1(s,a.getRotation()),a.adjustCenterInternal(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=r.length,e.originalEvent.preventDefault()}handleUpEvent(e){const n=e.map,r=n.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const i=this.kinetic_.getDistance(),s=this.kinetic_.getAngle(),o=r.getCenterInternal(),a=n.getPixelFromCoordinateInternal(o),l=n.getCoordinateFromPixelInternal([a[0]-i*Math.cos(s),a[1]-i*Math.sin(s)]);r.animateInternal({center:r.getConstrainedCenter(l),duration:500,easing:easeOut})}return this.panning_&&(this.panning_=!1,r.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(e){if(this.targetPointers.length>0&&this.condition_(e)){const r=e.map.getView();return this.lastCentroid=null,r.getAnimating()&&r.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}function disable(t){if(t!==void 0)return 0}function none$1(t){if(t!==void 0)return t}function createSnapToN(t){const e=2*Math.PI/t;return function(n,r){if(r)return n;if(n!==void 0)return n=Math.floor(n/e+.5)*e,n}}function createSnapToZero(t){const e=toRadians(5);return function(n,r){return r||n===void 0?n:Math.abs(n)<=e?0:n}}class DragRotate extends PointerInteraction{constructor(e){e=e||{},super({stopDown:FALSE}),this.condition_=e.condition?e.condition:altShiftKeysOnly,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!mouseOnly(e))return;const n=e.map,r=n.getView();if(r.getConstraints().rotation===disable)return;const i=n.getSize(),s=e.pixel,o=Math.atan2(i[1]/2-s[1],s[0]-i[0]/2);if(this.lastAngle_!==void 0){const a=o-this.lastAngle_;r.adjustRotationInternal(-a)}this.lastAngle_=o}handleUpEvent(e){return mouseOnly(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return mouseOnly(e)&&mouseActionButton(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class DragZoom extends DragBox{constructor(e){e=e||{};const n=e.condition?e.condition:shiftKeyOnly;super({condition:n,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=e.duration!==void 0?e.duration:200,this.out_=e.out!==void 0?e.out:!1}onBoxEnd(e){const r=this.getMap().getView();let i=this.getGeometry();if(this.out_){const s=r.rotatedExtentForGeometry(i),o=r.getResolutionForExtentInternal(s),a=r.getResolution()/o;i=i.clone(),i.scale(a*a)}r.fitInternal(i,{duration:this.duration_,easing:easeOut})}}class MapEvent extends BaseEvent{constructor(e,n,r){super(e),this.map=n,this.frameState=r!==void 0?r:null}}class MapBrowserEvent extends MapEvent{constructor(e,n,r,i,s,o){super(e,n,s),this.originalEvent=r,this.pixel_=null,this.coordinate_=null,this.dragging=i!==void 0?i:!1,this.activePointers=o}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(e){this.pixel_=e}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(e){this.coordinate_=e}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const LayerProperty={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class BaseLayer extends BaseObject{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const n=Object.assign({},e);typeof e.properties=="object"&&(delete n.properties,Object.assign(n,e.properties)),n[LayerProperty.OPACITY]=e.opacity!==void 0?e.opacity:1,assert(typeof n[LayerProperty.OPACITY]=="number","Layer opacity must be a number"),n[LayerProperty.VISIBLE]=e.visible!==void 0?e.visible:!0,n[LayerProperty.Z_INDEX]=e.zIndex,n[LayerProperty.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,n[LayerProperty.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,n[LayerProperty.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,n[LayerProperty.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=n.className!==void 0?n.className:"ol-layer",delete n.className,this.setProperties(n),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const n=this.state_||{layer:this,managed:e===void 0?!0:e},r=this.getZIndex();return n.opacity=clamp(Math.round(this.getOpacity()*100)/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=r===void 0&&!n.managed?1/0:r,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.state_=n,n}getLayersArray(e){return abstract()}getLayerStatesArray(e){return abstract()}getExtent(){return this.get(LayerProperty.EXTENT)}getMaxResolution(){return this.get(LayerProperty.MAX_RESOLUTION)}getMinResolution(){return this.get(LayerProperty.MIN_RESOLUTION)}getMinZoom(){return this.get(LayerProperty.MIN_ZOOM)}getMaxZoom(){return this.get(LayerProperty.MAX_ZOOM)}getOpacity(){return this.get(LayerProperty.OPACITY)}getSourceState(){return abstract()}getVisible(){return this.get(LayerProperty.VISIBLE)}getZIndex(){return this.get(LayerProperty.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(LayerProperty.EXTENT,e)}setMaxResolution(e){this.set(LayerProperty.MAX_RESOLUTION,e)}setMinResolution(e){this.set(LayerProperty.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(LayerProperty.MAX_ZOOM,e)}setMinZoom(e){this.set(LayerProperty.MIN_ZOOM,e)}setOpacity(e){assert(typeof e=="number","Layer opacity must be a number"),this.set(LayerProperty.OPACITY,e)}setVisible(e){this.set(LayerProperty.VISIBLE,e)}setZIndex(e){this.set(LayerProperty.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const RenderEventType={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},ViewHint={ANIMATING:0,INTERACTING:1},ViewProperty={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},DEFAULT_MAX_ZOOM=42,DEFAULT_TILE_SIZE=256;function createExtent(t,e,n){return function(r,i,s,o,a){if(!r)return;if(!i&&!e)return r;const l=e?0:s[0]*i,u=e?0:s[1]*i,c=a?a[0]:0,d=a?a[1]:0;let h=t[0]+l/2+c,f=t[2]-l/2+c,p=t[1]+u/2+d,g=t[3]-u/2+d;h>f&&(h=(f+h)/2,f=h),p>g&&(p=(g+p)/2,g=p);let v=clamp(r[0],h,f),m=clamp(r[1],p,g);if(o&&n&&i){const y=30*i;v+=-y*Math.log(1+Math.max(0,h-r[0])/y)+y*Math.log(1+Math.max(0,r[0]-f)/y),m+=-y*Math.log(1+Math.max(0,p-r[1])/y)+y*Math.log(1+Math.max(0,r[1]-g)/y)}return[v,m]}}function none(t){return t}function getViewportClampedResolution(t,e,n,r){const i=getWidth(e)/n[0],s=getHeight(e)/n[1];return r?Math.min(t,Math.max(i,s)):Math.min(t,Math.min(i,s))}function getSmoothClampedResolution(t,e,n){let r=Math.min(t,e);const i=50;return r*=Math.log(1+i*Math.max(0,t/e-1))/i+1,n&&(r=Math.max(r,n),r/=Math.log(1+i*Math.max(0,n/t-1))/i+1),clamp(r,n/2,e*2)}function createSnapToResolutions(t,e,n,r){return e=e!==void 0?e:!0,function(i,s,o,a){if(i!==void 0){const l=t[0],u=t[t.length-1],c=n?getViewportClampedResolution(l,n,o,r):l;if(a)return e?getSmoothClampedResolution(i,c,u):clamp(i,u,c);const d=Math.min(c,i),h=Math.floor(linearFindNearest(t,d,s));return t[h]>c&&h<t.length-1?t[h+1]:t[h]}}}function createSnapToPower(t,e,n,r,i,s){return r=r!==void 0?r:!0,n=n!==void 0?n:0,function(o,a,l,u){if(o!==void 0){const c=i?getViewportClampedResolution(e,i,l,s):e;if(u)return r?getSmoothClampedResolution(o,c,n):clamp(o,n,c);const d=1e-9,h=Math.ceil(Math.log(e/c)/Math.log(t)-d),f=-a*(.5-d)+.5,p=Math.min(c,o),g=Math.floor(Math.log(e/p)/Math.log(t)+f),v=Math.max(h,g),m=e/Math.pow(t,v);return clamp(m,n,c)}}}function createMinMaxResolution(t,e,n,r,i){return n=n!==void 0?n:!0,function(s,o,a,l){if(s!==void 0){const u=r?getViewportClampedResolution(t,r,a,i):t;return!n||!l?clamp(s,e,u):getSmoothClampedResolution(s,u,e)}}}const DEFAULT_MIN_ZOOM=0;class View extends BaseObject{constructor(e){super(),this.on,this.once,this.un,e=Object.assign({},e),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=createProjection(e.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,e.projection&&disableCoordinateWarning(),e.center&&(e.center=fromUserCoordinate(e.center,this.projection_)),e.extent&&(e.extent=fromUserExtent(e.extent,this.projection_)),this.applyOptions_(e)}applyOptions_(e){const n=Object.assign({},e);for(const a in ViewProperty)delete n[a];this.setProperties(n,!0);const r=createResolutionConstraint(e);this.maxResolution_=r.maxResolution,this.minResolution_=r.minResolution,this.zoomFactor_=r.zoomFactor,this.resolutions_=e.resolutions,this.padding_=e.padding,this.minZoom_=r.minZoom;const i=createCenterConstraint(e),s=r.constraint,o=createRotationConstraint(e);this.constraints_={center:i,resolution:s,rotation:o},this.setRotation(e.rotation!==void 0?e.rotation:0),this.setCenterInternal(e.center!==void 0?e.center:null),e.resolution!==void 0?this.setResolution(e.resolution):e.zoom!==void 0&&this.setZoom(e.zoom)}get padding(){return this.padding_}set padding(e){let n=this.padding_;this.padding_=e;const r=this.getCenterInternal();if(r){const i=e||[0,0,0,0];n=n||[0,0,0,0];const s=this.getResolution(),o=s/2*(i[3]-n[3]+n[1]-i[1]),a=s/2*(i[0]-n[0]+n[2]-i[2]);this.setCenterInternal([r[0]+o,r[1]-a])}}getUpdatedOptions_(e){const n=this.getProperties();return n.resolution!==void 0?n.resolution=this.getResolution():n.zoom=this.getZoom(),n.center=this.getCenterInternal(),n.rotation=this.getRotation(),Object.assign({},n,e)}animate(e){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const n=new Array(arguments.length);for(let r=0;r<n.length;++r){let i=arguments[r];i.center&&(i=Object.assign({},i),i.center=fromUserCoordinate(i.center,this.getProjection())),i.anchor&&(i=Object.assign({},i),i.anchor=fromUserCoordinate(i.anchor,this.getProjection())),n[r]=i}this.animateInternal.apply(this,n)}animateInternal(e){let n=arguments.length,r;n>1&&typeof arguments[n-1]=="function"&&(r=arguments[n-1],--n);let i=0;for(;i<n&&!this.isDef();++i){const c=arguments[i];c.center&&this.setCenterInternal(c.center),c.zoom!==void 0?this.setZoom(c.zoom):c.resolution&&this.setResolution(c.resolution),c.rotation!==void 0&&this.setRotation(c.rotation)}if(i===n){r&&animationCallback(r,!0);return}let s=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const u=[];for(;i<n;++i){const c=arguments[i],d={start:s,complete:!1,anchor:c.anchor,duration:c.duration!==void 0?c.duration:1e3,easing:c.easing||inAndOut,callback:r};if(c.center&&(d.sourceCenter=o,d.targetCenter=c.center.slice(),o=d.targetCenter),c.zoom!==void 0?(d.sourceResolution=a,d.targetResolution=this.getResolutionForZoom(c.zoom),a=d.targetResolution):c.resolution&&(d.sourceResolution=a,d.targetResolution=c.resolution,a=d.targetResolution),c.rotation!==void 0){d.sourceRotation=l;const h=modulo(c.rotation-l+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=l+h,l=d.targetRotation}isNoopAnimation(d)?d.complete=!0:s+=d.duration,u.push(d)}this.animations_.push(u),this.setHint(ViewHint.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[ViewHint.ANIMATING]>0}getInteracting(){return this.hints_[ViewHint.INTERACTING]>0}cancelAnimations(){this.setHint(ViewHint.ANIMATING,-this.hints_[ViewHint.ANIMATING]);let e;for(let n=0,r=this.animations_.length;n<r;++n){const i=this.animations_[n];if(i[0].callback&&animationCallback(i[0].callback,!1),!e)for(let s=0,o=i.length;s<o;++s){const a=i[s];if(!a.complete){e=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=e,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const e=Date.now();let n=!1;for(let r=this.animations_.length-1;r>=0;--r){const i=this.animations_[r];let s=!0;for(let o=0,a=i.length;o<a;++o){const l=i[o];if(l.complete)continue;const u=e-l.start;let c=l.duration>0?u/l.duration:1;c>=1?(l.complete=!0,c=1):s=!1;const d=l.easing(c);if(l.sourceCenter){const h=l.sourceCenter[0],f=l.sourceCenter[1],p=l.targetCenter[0],g=l.targetCenter[1];this.nextCenter_=l.targetCenter;const v=h+d*(p-h),m=f+d*(g-f);this.targetCenter_=[v,m]}if(l.sourceResolution&&l.targetResolution){const h=d===1?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),p=this.constraints_.resolution(h,0,f,!0);this.targetCenter_=this.calculateCenterZoom(p,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=h,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const h=d===1?modulo(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(h,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=h}if(this.applyTargetState_(!0),n=!0,!l.complete)break}if(s){this.animations_[r]=null,this.setHint(ViewHint.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=i[0].callback;o&&animationCallback(o,!0)}}this.animations_=this.animations_.filter(Boolean),n&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,n){let r;const i=this.getCenterInternal();return i!==void 0&&(r=[i[0]-n[0],i[1]-n[1]],rotate$1(r,e-this.getRotation()),add(r,n)),r}calculateCenterZoom(e,n){let r;const i=this.getCenterInternal(),s=this.getResolution();if(i!==void 0&&s!==void 0){const o=n[0]-e*(n[0]-i[0])/s,a=n[1]-e*(n[1]-i[1])/s;r=[o,a]}return r}getViewportSize_(e){const n=this.viewportSize_;if(e){const r=n[0],i=n[1];return[Math.abs(r*Math.cos(e))+Math.abs(i*Math.sin(e)),Math.abs(r*Math.sin(e))+Math.abs(i*Math.cos(e))]}return n}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&toUserCoordinate(e,this.getProjection())}getCenterInternal(){return this.get(ViewProperty.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const n=this.calculateExtentInternal(e);return toUserExtent(n,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const n=this.getCenterInternal();assert(n,"The view center is not defined");const r=this.getResolution();assert(r!==void 0,"The view resolution is not defined");const i=this.getRotation();return assert(i!==void 0,"The view rotation is not defined"),getForViewAndSize(n,r,i,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(ViewProperty.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,n){return this.getResolutionForExtentInternal(fromUserExtent(e,this.getProjection()),n)}getResolutionForExtentInternal(e,n){n=n||this.getViewportSizeMinusPadding_();const r=getWidth(e)/n[0],i=getHeight(e)/n[1];return Math.max(r,i)}getResolutionForValueFunction(e){e=e||2;const n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/Math.log(e);return function(s){return n/Math.pow(e,s*i)}}getRotation(){return this.get(ViewProperty.ROTATION)}getValueForResolutionFunction(e){const n=Math.log(e||2),r=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(r/i)/n;return function(o){return Math.log(r/o)/n/s}}getViewportSizeMinusPadding_(e){let n=this.getViewportSize_(e);const r=this.padding_;return r&&(n=[n[0]-r[1]-r[3],n[1]-r[0]-r[2]]),n}getState(){const e=this.getProjection(),n=this.getResolution(),r=this.getRotation();let i=this.getCenterInternal();const s=this.padding_;if(s){const o=this.getViewportSizeMinusPadding_();i=calculateCenterOn(i,this.getViewportSize_(),[o[0]/2+s[3],o[1]/2+s[0]],n,r)}return{center:i.slice(0),projection:e!==void 0?e:null,resolution:n,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:r,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const n=this.getResolution();return n!==void 0&&(e=this.getZoomForResolution(n)),e}getZoomForResolution(e){let n=this.minZoom_||0,r,i;if(this.resolutions_){const s=linearFindNearest(this.resolutions_,e,1);n=s,r=this.resolutions_[s],s==this.resolutions_.length-1?i=2:i=r/this.resolutions_[s+1]}else r=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(r/e)/Math.log(i)}getResolutionForZoom(e){var n;if((n=this.resolutions_)!=null&&n.length){if(this.resolutions_.length===1)return this.resolutions_[0];const r=clamp(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[r]/this.resolutions_[r+1];return this.resolutions_[r]/Math.pow(i,clamp(e-r,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,n){let r;if(assert(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){assert(!isEmpty(e),"Cannot fit empty extent provided as `geometry`");const i=fromUserExtent(e,this.getProjection());r=fromExtent(i)}else if(e.getType()==="Circle"){const i=fromUserExtent(e.getExtent(),this.getProjection());r=fromExtent(i),r.rotate(this.getRotation(),getCenter(i))}else r=e;this.fitInternal(r,n)}rotatedExtentForGeometry(e){const n=this.getRotation(),r=Math.cos(n),i=Math.sin(-n),s=e.getFlatCoordinates(),o=e.getStride();let a=1/0,l=1/0,u=-1/0,c=-1/0;for(let d=0,h=s.length;d<h;d+=o){const f=s[d]*r-s[d+1]*i,p=s[d]*i+s[d+1]*r;a=Math.min(a,f),l=Math.min(l,p),u=Math.max(u,f),c=Math.max(c,p)}return[a,l,u,c]}fitInternal(e,n){n=n||{};let r=n.size;r||(r=this.getViewportSizeMinusPadding_());const i=n.padding!==void 0?n.padding:[0,0,0,0],s=n.nearest!==void 0?n.nearest:!1;let o;n.minResolution!==void 0?o=n.minResolution:n.maxZoom!==void 0?o=this.getResolutionForZoom(n.maxZoom):o=0;const a=this.rotatedExtentForGeometry(e);let l=this.getResolutionForExtentInternal(a,[r[0]-i[1]-i[3],r[1]-i[0]-i[2]]);l=isNaN(l)?o:Math.max(l,o),l=this.getConstrainedResolution(l,s?0:1);const u=this.getRotation(),c=Math.sin(u),d=Math.cos(u),h=getCenter(a);h[0]+=(i[1]-i[3])/2*l,h[1]+=(i[0]-i[2])/2*l;const f=h[0]*d-h[1]*c,p=h[1]*d+h[0]*c,g=this.getConstrainedCenter([f,p],l),v=n.callback?n.callback:VOID;n.duration!==void 0?this.animateInternal({resolution:l,center:g,duration:n.duration,easing:n.easing},v):(this.targetResolution_=l,this.targetCenter_=g,this.applyTargetState_(!1,!0),animationCallback(v,!0))}centerOn(e,n,r){this.centerOnInternal(fromUserCoordinate(e,this.getProjection()),n,r)}centerOnInternal(e,n,r){this.setCenterInternal(calculateCenterOn(e,n,r,this.getResolution(),this.getRotation()))}calculateCenterShift(e,n,r,i){let s;const o=this.padding_;if(o&&e){const a=this.getViewportSizeMinusPadding_(-r),l=calculateCenterOn(e,i,[a[0]/2+o[3],a[1]/2+o[0]],n,r);s=[e[0]-l[0],e[1]-l[1]]}return s}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(e){const n=toUserCoordinate(this.targetCenter_,this.getProjection());this.setCenter([n[0]+e[0],n[1]+e[1]])}adjustCenterInternal(e){const n=this.targetCenter_;this.setCenterInternal([n[0]+e[0],n[1]+e[1]])}adjustResolution(e,n){n=n&&fromUserCoordinate(n,this.getProjection()),this.adjustResolutionInternal(e,n)}adjustResolutionInternal(e,n){const r=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*e,0,i,r);n&&(this.targetCenter_=this.calculateCenterZoom(s,n)),this.targetResolution_*=e,this.applyTargetState_()}adjustZoom(e,n){this.adjustResolution(Math.pow(this.zoomFactor_,-e),n)}adjustRotation(e,n){n&&(n=fromUserCoordinate(n,this.getProjection())),this.adjustRotationInternal(e,n)}adjustRotationInternal(e,n){const r=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+e,r);n&&(this.targetCenter_=this.calculateCenterRotate(i,n)),this.targetRotation_+=e,this.applyTargetState_()}setCenter(e){this.setCenterInternal(e&&fromUserCoordinate(e,this.getProjection()))}setCenterInternal(e){this.targetCenter_=e,this.applyTargetState_()}setHint(e,n){return this.hints_[e]+=n,this.changed(),this.hints_[e]}setResolution(e){this.targetResolution_=e,this.applyTargetState_()}setRotation(e){this.targetRotation_=e,this.applyTargetState_()}setZoom(e){this.setResolution(this.getResolutionForZoom(e))}applyTargetState_(e,n){const r=this.getAnimating()||this.getInteracting()||n,i=this.constraints_.rotation(this.targetRotation_,r),s=this.getViewportSize_(i),o=this.constraints_.resolution(this.targetResolution_,0,s,r),a=this.constraints_.center(this.targetCenter_,o,s,r,this.calculateCenterShift(this.targetCenter_,o,i,s));this.get(ViewProperty.ROTATION)!==i&&this.set(ViewProperty.ROTATION,i),this.get(ViewProperty.RESOLUTION)!==o&&(this.set(ViewProperty.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(ViewProperty.CENTER)||!equals(this.get(ViewProperty.CENTER),a))&&this.set(ViewProperty.CENTER,a),this.getAnimating()&&!e&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(e,n,r){e=e!==void 0?e:200;const i=n||0,s=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(s),a=this.constraints_.resolution(this.targetResolution_,i,o),l=this.constraints_.center(this.targetCenter_,a,o,!1,this.calculateCenterShift(this.targetCenter_,a,s,o));if(e===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=s,this.targetCenter_=l,this.applyTargetState_();return}r=r||(e===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==s||!this.getCenterInternal()||!equals(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:l,resolution:a,duration:e,easing:easeOut,anchor:r}))}beginInteraction(){this.resolveConstraints(0),this.setHint(ViewHint.INTERACTING,1)}endInteraction(e,n,r){r=r&&fromUserCoordinate(r,this.getProjection()),this.endInteractionInternal(e,n,r)}endInteractionInternal(e,n,r){this.getInteracting()&&(this.setHint(ViewHint.INTERACTING,-1),this.resolveConstraints(e,n,r))}getConstrainedCenter(e,n){const r=this.getViewportSize_(this.getRotation());return this.constraints_.center(e,n||this.getResolution(),r)}getConstrainedZoom(e,n){const r=this.getResolutionForZoom(e);return this.getZoomForResolution(this.getConstrainedResolution(r,n))}getConstrainedResolution(e,n){n=n||0;const r=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(e,n,r)}}function animationCallback(t,e){setTimeout(function(){t(e)},0)}function createCenterConstraint(t){if(t.extent!==void 0){const n=t.smoothExtentConstraint!==void 0?t.smoothExtentConstraint:!0;return createExtent(t.extent,t.constrainOnlyCenter,n)}const e=createProjection(t.projection,"EPSG:3857");if(t.multiWorld!==!0&&e.isGlobal()){const n=e.getExtent().slice();return n[0]=-1/0,n[2]=1/0,createExtent(n,!1,!1)}return none}function createResolutionConstraint(t){let e,n,r,o=t.minZoom!==void 0?t.minZoom:DEFAULT_MIN_ZOOM,a=t.maxZoom!==void 0?t.maxZoom:28;const l=t.zoomFactor!==void 0?t.zoomFactor:2,u=t.multiWorld!==void 0?t.multiWorld:!1,c=t.smoothResolutionConstraint!==void 0?t.smoothResolutionConstraint:!0,d=t.showFullExtent!==void 0?t.showFullExtent:!1,h=createProjection(t.projection,"EPSG:3857"),f=h.getExtent();let p=t.constrainOnlyCenter,g=t.extent;if(!u&&!g&&h.isGlobal()&&(p=!1,g=f),t.resolutions!==void 0){const v=t.resolutions;n=v[o],r=v[a]!==void 0?v[a]:v[v.length-1],t.constrainResolution?e=createSnapToResolutions(v,c,!p&&g,d):e=createMinMaxResolution(n,r,c,!p&&g,d)}else{const m=(f?Math.max(getWidth(f),getHeight(f)):360*METERS_PER_UNIT$1.degrees/h.getMetersPerUnit())/DEFAULT_TILE_SIZE/Math.pow(2,DEFAULT_MIN_ZOOM),y=m/Math.pow(2,28-DEFAULT_MIN_ZOOM);n=t.maxResolution,n!==void 0?o=0:n=m/Math.pow(l,o),r=t.minResolution,r===void 0&&(t.maxZoom!==void 0?t.maxResolution!==void 0?r=n/Math.pow(l,a):r=m/Math.pow(l,a):r=y),a=o+Math.floor(Math.log(n/r)/Math.log(l)),r=n/Math.pow(l,a-o),t.constrainResolution?e=createSnapToPower(l,n,r,c,!p&&g,d):e=createMinMaxResolution(n,r,c,!p&&g,d)}return{constraint:e,maxResolution:n,minResolution:r,minZoom:o,zoomFactor:l}}function createRotationConstraint(t){if(t.enableRotation!==void 0?t.enableRotation:!0){const n=t.constrainRotation;return n===void 0||n===!0?createSnapToZero():n===!1?none$1:typeof n=="number"?createSnapToN(n):none$1}return disable}function isNoopAnimation(t){return!(t.sourceCenter&&t.targetCenter&&!equals(t.sourceCenter,t.targetCenter)||t.sourceResolution!==t.targetResolution||t.sourceRotation!==t.targetRotation)}function calculateCenterOn(t,e,n,r,i){const s=Math.cos(-i);let o=Math.sin(-i),a=t[0]*s-t[1]*o,l=t[1]*s+t[0]*o;a+=(e[0]/2-n[0])*r,l+=(n[1]-e[1]/2)*r,o=-o;const u=a*s-l*o,c=l*s+a*o;return[u,c]}class Layer extends BaseLayer{constructor(e){const n=Object.assign({},e);delete n.source,super(n),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,e.render&&(this.render=e.render),e.map&&this.setMap(e.map),this.addChangeListener(LayerProperty.SOURCE,this.handleSourcePropertyChange_);const r=e.source?e.source:null;this.setSource(r)}getLayersArray(e){return e=e||[],e.push(this),e}getLayerStatesArray(e){return e=e||[],e.push(this.getLayerState()),e}getSource(){return this.get(LayerProperty.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const e=this.getSource();return e?e.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(unlistenByKey(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const e=this.getSource();e&&(this.sourceChangeKey_=listen(e,EventType.CHANGE,this.handleSourceChange_,this),e.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let n;const r=this.getMapInternal();!e&&r&&(e=r.getView()),e instanceof View?n={viewState:e.getState(),extent:e.calculateExtent()}:n=e,!n.layerStatesArray&&r&&(n.layerStatesArray=r.getLayerGroup().getLayerStatesArray());let i;if(n.layerStatesArray){if(i=n.layerStatesArray.find(o=>o.layer===this),!i)return!1}else i=this.getLayerState();const s=this.getExtent();return inView(i,n.viewState)&&(!s||intersects(s,n.extent))}getAttributions(e){var s;if(!this.isVisible(e))return[];const n=(s=this.getSource())==null?void 0:s.getAttributions();if(!n)return[];const r=e instanceof View?e.getViewStateAndExtent():e;let i=n(r);return Array.isArray(i)||(i=[i]),i}render(e,n){const r=this.getRenderer();return r.prepareFrame(e)?(this.rendered=!0,r.renderFrame(e,n)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(e,n){}renderDeferred(e){const n=this.getRenderer();n&&n.renderDeferred(e)}setMapInternal(e){e||this.unrender(),this.set(LayerProperty.MAP,e)}getMapInternal(){return this.get(LayerProperty.MAP)}setMap(e){this.mapPrecomposeKey_&&(unlistenByKey(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(unlistenByKey(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=listen(e,RenderEventType.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=listen(this,EventType.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){const n=e.frameState.layerStatesArray,r=this.getLayerState(!1);assert(!n.some(i=>i.layer===r.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),n.push(r)}setSource(e){this.set(LayerProperty.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}}function inView(t,e){if(!t.visible)return!1;const n=e.resolution;if(n<t.minResolution||n>=t.maxResolution)return!1;const r=e.zoom;return r>t.minZoom&&r<=t.maxZoom}let numTypes=0;const BooleanType=1<<numTypes++,NumberType=1<<numTypes++,StringType=1<<numTypes++,ColorType=1<<numTypes++,NumberArrayType=1<<numTypes++,SizeType=1<<numTypes++,AnyType=Math.pow(2,numTypes)-1,typeNames={[BooleanType]:"boolean",[NumberType]:"number",[StringType]:"string",[ColorType]:"color",[NumberArrayType]:"number[]",[SizeType]:"size"},namedTypes=Object.keys(typeNames).map(Number).sort(ascending);function isSpecific(t){return t in typeNames}function typeName(t){const e=[];for(const n of namedTypes)includesType(t,n)&&e.push(typeNames[n]);return e.length===0?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}function includesType(t,e){return(t&e)===e}function isType(t,e){return t===e}class LiteralExpression{constructor(e,n){if(!isSpecific(e))throw new Error(`literal expressions must have a specific type, got ${typeName(e)}`);this.type=e,this.value=n}}class CallExpression{constructor(e,n,...r){this.type=e,this.operator=n,this.args=r}}function newParsingContext(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1}}function parse(t,e,n){switch(typeof t){case"boolean":{if(isType(e,StringType))return new LiteralExpression(StringType,t?"true":"false");if(!includesType(e,BooleanType))throw new Error(`got a boolean, but expected ${typeName(e)}`);return new LiteralExpression(BooleanType,t)}case"number":{if(isType(e,SizeType))return new LiteralExpression(SizeType,toSize(t));if(isType(e,BooleanType))return new LiteralExpression(BooleanType,!!t);if(isType(e,StringType))return new LiteralExpression(StringType,t.toString());if(!includesType(e,NumberType))throw new Error(`got a number, but expected ${typeName(e)}`);return new LiteralExpression(NumberType,t)}case"string":{if(isType(e,ColorType))return new LiteralExpression(ColorType,fromString(t));if(isType(e,BooleanType))return new LiteralExpression(BooleanType,!!t);if(!includesType(e,StringType))throw new Error(`got a string, but expected ${typeName(e)}`);return new LiteralExpression(StringType,t)}}if(!Array.isArray(t))throw new Error("expression must be an array or a primitive value");if(t.length===0)throw new Error("empty expression");if(typeof t[0]=="string")return parseCallExpression(t,e,n);for(const r of t)if(typeof r!="number")throw new Error("expected an array of numbers");if(isType(e,SizeType)){if(t.length!==2)throw new Error(`expected an array of two values for a size, got ${t.length}`);return new LiteralExpression(SizeType,t)}if(isType(e,ColorType)){if(t.length===3)return new LiteralExpression(ColorType,[...t,1]);if(t.length===4)return new LiteralExpression(ColorType,t);throw new Error(`expected an array of 3 or 4 values for a color, got ${t.length}`)}if(!includesType(e,NumberArrayType))throw new Error(`got an array of numbers, but expected ${typeName(e)}`);return new LiteralExpression(NumberArrayType,t)}const Ops={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",LineMetric:"line-metric",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},parsers={[Ops.Get]:createCallExpressionParser(hasArgsCount(1,1/0),withGetArgs),[Ops.Var]:createCallExpressionParser(hasArgsCount(1,1),withVarArgs),[Ops.Has]:createCallExpressionParser(hasArgsCount(1,1/0),withGetArgs),[Ops.Id]:createCallExpressionParser(usesFeatureId,withNoArgs),[Ops.Concat]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(StringType)),[Ops.GeometryType]:createCallExpressionParser(usesGeometryType,withNoArgs),[Ops.LineMetric]:createCallExpressionParser(withNoArgs),[Ops.Resolution]:createCallExpressionParser(withNoArgs),[Ops.Zoom]:createCallExpressionParser(withNoArgs),[Ops.Time]:createCallExpressionParser(withNoArgs),[Ops.Any]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(BooleanType)),[Ops.All]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(BooleanType)),[Ops.Not]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(BooleanType)),[Ops.Equal]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(AnyType)),[Ops.NotEqual]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(AnyType)),[Ops.GreaterThan]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType)),[Ops.GreaterThanOrEqualTo]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType)),[Ops.LessThan]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType)),[Ops.LessThanOrEqualTo]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType)),[Ops.Multiply]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfReturnType),[Ops.Coalesce]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfReturnType),[Ops.Divide]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType)),[Ops.Add]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(NumberType)),[Ops.Subtract]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType)),[Ops.Clamp]:createCallExpressionParser(hasArgsCount(3,3),withArgsOfType(NumberType)),[Ops.Mod]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType)),[Ops.Pow]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType)),[Ops.Abs]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType)),[Ops.Floor]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType)),[Ops.Ceil]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType)),[Ops.Round]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType)),[Ops.Sin]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType)),[Ops.Cos]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType)),[Ops.Atan]:createCallExpressionParser(hasArgsCount(1,2),withArgsOfType(NumberType)),[Ops.Sqrt]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType)),[Ops.Match]:createCallExpressionParser(hasArgsCount(4,1/0),hasEvenArgs,withMatchArgs),[Ops.Between]:createCallExpressionParser(hasArgsCount(3,3),withArgsOfType(NumberType)),[Ops.Interpolate]:createCallExpressionParser(hasArgsCount(6,1/0),hasEvenArgs,withInterpolateArgs),[Ops.Case]:createCallExpressionParser(hasArgsCount(3,1/0),hasOddArgs,withCaseArgs),[Ops.In]:createCallExpressionParser(hasArgsCount(2,2),withInArgs),[Ops.Number]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(AnyType)),[Ops.String]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(AnyType)),[Ops.Array]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(NumberType)),[Ops.Color]:createCallExpressionParser(hasArgsCount(1,4),withArgsOfType(NumberType)),[Ops.Band]:createCallExpressionParser(hasArgsCount(1,3),withArgsOfType(NumberType)),[Ops.Palette]:createCallExpressionParser(hasArgsCount(2,2),withPaletteArgs),[Ops.ToString]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(BooleanType|NumberType|StringType|ColorType))};function withGetArgs(t,e,n){const r=t.length-1,i=new Array(r);for(let s=0;s<r;++s){const o=t[s+1];switch(typeof o){case"number":{i[s]=new LiteralExpression(NumberType,o);break}case"string":{i[s]=new LiteralExpression(StringType,o);break}default:throw new Error(`expected a string key or numeric array index for a get operation, got ${o}`)}s===0&&n.properties.add(String(o))}return i}function withVarArgs(t,e,n){const r=t[1];if(typeof r!="string")throw new Error("expected a string argument for var operation");return n.variables.add(r),[new LiteralExpression(StringType,r)]}function usesFeatureId(t,e,n){n.featureId=!0}function usesGeometryType(t,e,n){n.geometryType=!0}function withNoArgs(t,e,n){const r=t[0];if(t.length!==1)throw new Error(`expected no arguments for ${r} operation`);return[]}function hasArgsCount(t,e){return function(n,r,i){const s=n[0],o=n.length-1;if(t===e){if(o!==t){const a=t===1?"":"s";throw new Error(`expected ${t} argument${a} for ${s}, got ${o}`)}}else if(o<t||o>e){const a=e===1/0?`${t} or more`:`${t} to ${e}`;throw new Error(`expected ${a} arguments for ${s}, got ${o}`)}}}function withArgsOfReturnType(t,e,n){const r=t.length-1,i=new Array(r);for(let s=0;s<r;++s){const o=parse(t[s+1],e,n);i[s]=o}return i}function withArgsOfType(t){return function(e,n,r){const i=e.length-1,s=new Array(i);for(let o=0;o<i;++o){const a=parse(e[o+1],t,r);s[o]=a}return s}}function hasOddArgs(t,e,n){const r=t[0],i=t.length-1;if(i%2===0)throw new Error(`expected an odd number of arguments for ${r}, got ${i} instead`)}function hasEvenArgs(t,e,n){const r=t[0],i=t.length-1;if(i%2===1)throw new Error(`expected an even number of arguments for operation ${r}, got ${i} instead`)}function withMatchArgs(t,e,n){const r=t.length-1,i=StringType|NumberType|BooleanType,s=parse(t[1],i,n),o=parse(t[t.length-1],e,n),a=new Array(r-2);for(let l=0;l<r-2;l+=2){try{const u=parse(t[l+2],s.type,n);a[l]=u}catch(u){throw new Error(`failed to parse argument ${l+1} of match expression: ${u.message}`)}try{const u=parse(t[l+3],o.type,n);a[l+1]=u}catch(u){throw new Error(`failed to parse argument ${l+2} of match expression: ${u.message}`)}}return[s,...a,o]}function withInterpolateArgs(t,e,n){const r=t[1];let i;switch(r[0]){case"linear":i=1;break;case"exponential":const l=r[1];if(typeof l!="number"||l<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(l)} instead`);i=l;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(r)}`)}const s=new LiteralExpression(NumberType,i);let o;try{o=parse(t[2],NumberType,n)}catch(l){throw new Error(`failed to parse argument 1 in interpolate expression: ${l.message}`)}const a=new Array(t.length-3);for(let l=0;l<a.length;l+=2){try{const u=parse(t[l+3],NumberType,n);a[l]=u}catch(u){throw new Error(`failed to parse argument ${l+2} for interpolate expression: ${u.message}`)}try{const u=parse(t[l+4],e,n);a[l+1]=u}catch(u){throw new Error(`failed to parse argument ${l+3} for interpolate expression: ${u.message}`)}}return[s,o,...a]}function withCaseArgs(t,e,n){const r=parse(t[t.length-1],e,n),i=new Array(t.length-1);for(let s=0;s<i.length-1;s+=2){try{const o=parse(t[s+1],BooleanType,n);i[s]=o}catch(o){throw new Error(`failed to parse argument ${s} of case expression: ${o.message}`)}try{const o=parse(t[s+2],r.type,n);i[s+1]=o}catch(o){throw new Error(`failed to parse argument ${s+1} of case expression: ${o.message}`)}}return i[i.length-1]=r,i}function withInArgs(t,e,n){let r=t[2];if(!Array.isArray(r))throw new Error('the second argument for the "in" operator must be an array');let i;if(typeof r[0]=="string"){if(r[0]!=="literal")throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');if(!Array.isArray(r[1]))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array');r=r[1],i=StringType}else i=NumberType;const s=new Array(r.length);for(let a=0;a<s.length;a++)try{const l=parse(r[a],i,n);s[a]=l}catch(l){throw new Error(`failed to parse haystack item ${a} for "in" expression: ${l.message}`)}return[parse(t[1],i,n),...s]}function withPaletteArgs(t,e,n){let r;try{r=parse(t[1],NumberType,n)}catch(o){throw new Error(`failed to parse first argument in palette expression: ${o.message}`)}const i=t[2];if(!Array.isArray(i))throw new Error("the second argument of palette must be an array");const s=new Array(i.length);for(let o=0;o<s.length;o++){let a;try{a=parse(i[o],ColorType,n)}catch(l){throw new Error(`failed to parse color at index ${o} in palette expression: ${l.message}`)}if(!(a instanceof LiteralExpression))throw new Error(`the palette color at index ${o} must be a literal value`);s[o]=a}return[r,...s]}function createCallExpressionParser(...t){return function(e,n,r){const i=e[0];let s;for(let o=0;o<t.length;o++){const a=t[o](e,n,r);if(o==t.length-1){if(!a)throw new Error("expected last argument validator to return the parsed args");s=a}}return new CallExpression(n,i,...s)}}function parseCallExpression(t,e,n){const r=t[0],i=parsers[r];if(!i)throw new Error(`unknown operator: ${r}`);return i(t,e,n)}function computeGeometryType(t){if(!t)return"";const e=t.getType();switch(e){case"Point":case"LineString":case"Polygon":return e;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return computeGeometryType(t.getGeometries()[0]);default:return""}}function newEvaluationContext(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function buildExpression$1(t,e,n){const r=parse(t,e,n);return compileExpression(r)}function compileExpression(t,e){if(t instanceof LiteralExpression){if(t.type===ColorType&&typeof t.value=="string"){const r=fromString(t.value);return function(){return r}}return function(){return t.value}}const n=t.operator;switch(n){case Ops.Number:case Ops.String:case Ops.Coalesce:return compileAssertionExpression(t);case Ops.Get:case Ops.Var:case Ops.Has:return compileAccessorExpression(t);case Ops.Id:return r=>r.featureId;case Ops.GeometryType:return r=>r.geometryType;case Ops.Concat:{const r=t.args.map(i=>compileExpression(i));return i=>"".concat(...r.map(s=>s(i).toString()))}case Ops.Resolution:return r=>r.resolution;case Ops.Any:case Ops.All:case Ops.Between:case Ops.In:case Ops.Not:return compileLogicalExpression(t);case Ops.Equal:case Ops.NotEqual:case Ops.LessThan:case Ops.LessThanOrEqualTo:case Ops.GreaterThan:case Ops.GreaterThanOrEqualTo:return compileComparisonExpression(t);case Ops.Multiply:case Ops.Divide:case Ops.Add:case Ops.Subtract:case Ops.Clamp:case Ops.Mod:case Ops.Pow:case Ops.Abs:case Ops.Floor:case Ops.Ceil:case Ops.Round:case Ops.Sin:case Ops.Cos:case Ops.Atan:case Ops.Sqrt:return compileNumericExpression(t);case Ops.Case:return compileCaseExpression(t);case Ops.Match:return compileMatchExpression(t);case Ops.Interpolate:return compileInterpolateExpression(t);case Ops.ToString:return compileConvertExpression(t);default:throw new Error(`Unsupported operator ${n}`)}}function compileAssertionExpression(t,e){const n=t.operator,r=t.args.length,i=new Array(r);for(let s=0;s<r;++s)i[s]=compileExpression(t.args[s]);switch(n){case Ops.Coalesce:return s=>{for(let o=0;o<r;++o){const a=i[o](s);if(typeof a<"u"&&a!==null)return a}throw new Error("Expected one of the values to be non-null")};case Ops.Number:case Ops.String:return s=>{for(let o=0;o<r;++o){const a=i[o](s);if(typeof a===n)return a}throw new Error(`Expected one of the values to be a ${n}`)};default:throw new Error(`Unsupported assertion operator ${n}`)}}function compileAccessorExpression(t,e){const r=t.args[0].value;switch(t.operator){case Ops.Get:return i=>{const s=t.args;let o=i.properties[r];for(let a=1,l=s.length;a<l;++a){const c=s[a].value;o=o[c]}return o};case Ops.Var:return i=>i.variables[r];case Ops.Has:return i=>{const s=t.args;if(!(r in i.properties))return!1;let o=i.properties[r];for(let a=1,l=s.length;a<l;++a){const c=s[a].value;if(!o||!Object.hasOwn(o,c))return!1;o=o[c]}return!0};default:throw new Error(`Unsupported accessor operator ${t.operator}`)}}function compileComparisonExpression(t,e){const n=t.operator,r=compileExpression(t.args[0]),i=compileExpression(t.args[1]);switch(n){case Ops.Equal:return s=>r(s)===i(s);case Ops.NotEqual:return s=>r(s)!==i(s);case Ops.LessThan:return s=>r(s)<i(s);case Ops.LessThanOrEqualTo:return s=>r(s)<=i(s);case Ops.GreaterThan:return s=>r(s)>i(s);case Ops.GreaterThanOrEqualTo:return s=>r(s)>=i(s);default:throw new Error(`Unsupported comparison operator ${n}`)}}function compileLogicalExpression(t,e){const n=t.operator,r=t.args.length,i=new Array(r);for(let s=0;s<r;++s)i[s]=compileExpression(t.args[s]);switch(n){case Ops.Any:return s=>{for(let o=0;o<r;++o)if(i[o](s))return!0;return!1};case Ops.All:return s=>{for(let o=0;o<r;++o)if(!i[o](s))return!1;return!0};case Ops.Between:return s=>{const o=i[0](s),a=i[1](s),l=i[2](s);return o>=a&&o<=l};case Ops.In:return s=>{const o=i[0](s);for(let a=1;a<r;++a)if(o===i[a](s))return!0;return!1};case Ops.Not:return s=>!i[0](s);default:throw new Error(`Unsupported logical operator ${n}`)}}function compileNumericExpression(t,e){const n=t.operator,r=t.args.length,i=new Array(r);for(let s=0;s<r;++s)i[s]=compileExpression(t.args[s]);switch(n){case Ops.Multiply:return s=>{let o=1;for(let a=0;a<r;++a)o*=i[a](s);return o};case Ops.Divide:return s=>i[0](s)/i[1](s);case Ops.Add:return s=>{let o=0;for(let a=0;a<r;++a)o+=i[a](s);return o};case Ops.Subtract:return s=>i[0](s)-i[1](s);case Ops.Clamp:return s=>{const o=i[0](s),a=i[1](s);if(o<a)return a;const l=i[2](s);return o>l?l:o};case Ops.Mod:return s=>i[0](s)%i[1](s);case Ops.Pow:return s=>Math.pow(i[0](s),i[1](s));case Ops.Abs:return s=>Math.abs(i[0](s));case Ops.Floor:return s=>Math.floor(i[0](s));case Ops.Ceil:return s=>Math.ceil(i[0](s));case Ops.Round:return s=>Math.round(i[0](s));case Ops.Sin:return s=>Math.sin(i[0](s));case Ops.Cos:return s=>Math.cos(i[0](s));case Ops.Atan:return r===2?s=>Math.atan2(i[0](s),i[1](s)):s=>Math.atan(i[0](s));case Ops.Sqrt:return s=>Math.sqrt(i[0](s));default:throw new Error(`Unsupported numeric operator ${n}`)}}function compileCaseExpression(t,e){const n=t.args.length,r=new Array(n);for(let i=0;i<n;++i)r[i]=compileExpression(t.args[i]);return i=>{for(let s=0;s<n-1;s+=2)if(r[s](i))return r[s+1](i);return r[n-1](i)}}function compileMatchExpression(t,e){const n=t.args.length,r=new Array(n);for(let i=0;i<n;++i)r[i]=compileExpression(t.args[i]);return i=>{const s=r[0](i);for(let o=1;o<n;o+=2)if(s===r[o](i))return r[o+1](i);return r[n-1](i)}}function compileInterpolateExpression(t,e){const n=t.args.length,r=new Array(n);for(let i=0;i<n;++i)r[i]=compileExpression(t.args[i]);return i=>{const s=r[0](i),o=r[1](i);let a,l;for(let u=2;u<n;u+=2){const c=r[u](i);let d=r[u+1](i);const h=Array.isArray(d);if(h&&(d=withAlpha(d)),c>=o)return u===2?d:h?interpolateColor(s,o,a,l,c,d):interpolateNumber(s,o,a,l,c,d);a=c,l=d}return l}}function compileConvertExpression(t,e){const n=t.operator,r=t.args.length,i=new Array(r);for(let s=0;s<r;++s)i[s]=compileExpression(t.args[s]);switch(n){case Ops.ToString:return s=>{const o=i[0](s);return t.args[0].type===ColorType?toString(o):o.toString()};default:throw new Error(`Unsupported convert operator ${n}`)}}function interpolateNumber(t,e,n,r,i,s){const o=i-n;if(o===0)return r;const a=e-n,l=t===1?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1);return r+l*(s-r)}function interpolateColor(t,e,n,r,i,s){if(i-n===0)return r;const a=rgbaToLcha(r),l=rgbaToLcha(s);let u=l[2]-a[2];u>180?u-=360:u<-180&&(u+=360);const c=[interpolateNumber(t,e,n,a[0],i,l[0]),interpolateNumber(t,e,n,a[1],i,l[1]),a[2]+interpolateNumber(t,e,n,0,i,u),interpolateNumber(t,e,n,r[3],i,s[3])];return normalize(lchaToRgba(c))}function always(t){return!0}function rulesToStyleFunction(t){const e=newParsingContext(),n=buildRuleSet(t,e),r=newEvaluationContext();return function(i,s){if(r.properties=i.getPropertiesInternal(),r.resolution=s,e.featureId){const o=i.getId();o!==void 0?r.featureId=o:r.featureId=null}return e.geometryType&&(r.geometryType=computeGeometryType(i.getGeometry())),n(r)}}function flatStylesToStyleFunction(t){const e=newParsingContext(),n=t.length,r=new Array(n);for(let o=0;o<n;++o)r[o]=buildStyle(t[o],e);const i=newEvaluationContext(),s=new Array(n);return function(o,a){if(i.properties=o.getPropertiesInternal(),i.resolution=a,e.featureId){const u=o.getId();u!==void 0?i.featureId=u:i.featureId=null}let l=0;for(let u=0;u<n;++u){const c=r[u](i);c&&(s[l]=c,l+=1)}return s.length=l,s}}function buildRuleSet(t,e){const n=t.length,r=new Array(n);for(let i=0;i<n;++i){const s=t[i],o="filter"in s?buildExpression$1(s.filter,BooleanType,e):always;let a;if(Array.isArray(s.style)){const l=s.style.length;a=new Array(l);for(let u=0;u<l;++u)a[u]=buildStyle(s.style[u],e)}else a=[buildStyle(s.style,e)];r[i]={filter:o,styles:a}}return function(i){const s=[];let o=!1;for(let a=0;a<n;++a){const l=r[a].filter;if(l(i)&&!(t[a].else&&o)){o=!0;for(const u of r[a].styles){const c=u(i);c&&s.push(c)}}}return s}}function buildStyle(t,e){const n=buildFill(t,"",e),r=buildStroke(t,"",e),i=buildText(t,e),s=buildImage(t,e),o=numberEvaluator(t,"z-index",e);if(!n&&!r&&!i&&!s&&!isEmpty$1(t))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(t));const a=new Style;return function(l){let u=!0;if(n){const c=n(l);c&&(u=!1),a.setFill(c)}if(r){const c=r(l);c&&(u=!1),a.setStroke(c)}if(i){const c=i(l);c&&(u=!1),a.setText(c)}if(s){const c=s(l);c&&(u=!1),a.setImage(c)}return o&&a.setZIndex(o(l)),u?null:a}}function buildFill(t,e,n){let r;if(e+"fill-pattern-src"in t)r=patternEvaluator(t,e+"fill-",n);else{if(t[e+"fill-color"]==="none")return s=>null;r=colorLikeEvaluator(t,e+"fill-color",n)}if(!r)return null;const i=new Fill;return function(s){const o=r(s);return o===NO_COLOR?null:(i.setColor(o),i)}}function buildStroke(t,e,n){const r=numberEvaluator(t,e+"stroke-width",n),i=colorLikeEvaluator(t,e+"stroke-color",n);if(!r&&!i)return null;const s=stringEvaluator(t,e+"stroke-line-cap",n),o=stringEvaluator(t,e+"stroke-line-join",n),a=numberArrayEvaluator(t,e+"stroke-line-dash",n),l=numberEvaluator(t,e+"stroke-line-dash-offset",n),u=numberEvaluator(t,e+"stroke-miter-limit",n),c=new Stroke;return function(d){if(i){const h=i(d);if(h===NO_COLOR)return null;c.setColor(h)}if(r&&c.setWidth(r(d)),s){const h=s(d);if(h!=="butt"&&h!=="round"&&h!=="square")throw new Error("Expected butt, round, or square line cap");c.setLineCap(h)}if(o){const h=o(d);if(h!=="bevel"&&h!=="round"&&h!=="miter")throw new Error("Expected bevel, round, or miter line join");c.setLineJoin(h)}return a&&c.setLineDash(a(d)),l&&c.setLineDashOffset(l(d)),u&&c.setMiterLimit(u(d)),c}}function buildText(t,e){const n="text-",r=stringEvaluator(t,n+"value",e);if(!r)return null;const i=buildFill(t,n,e),s=buildFill(t,n+"background-",e),o=buildStroke(t,n,e),a=buildStroke(t,n+"background-",e),l=stringEvaluator(t,n+"font",e),u=numberEvaluator(t,n+"max-angle",e),c=numberEvaluator(t,n+"offset-x",e),d=numberEvaluator(t,n+"offset-y",e),h=booleanEvaluator(t,n+"overflow",e),f=stringEvaluator(t,n+"placement",e),p=numberEvaluator(t,n+"repeat",e),g=sizeLikeEvaluator(t,n+"scale",e),v=booleanEvaluator(t,n+"rotate-with-view",e),m=numberEvaluator(t,n+"rotation",e),y=stringEvaluator(t,n+"align",e),b=stringEvaluator(t,n+"justify",e),_=stringEvaluator(t,n+"baseline",e),T=booleanEvaluator(t,n+"keep-upright",e),x=numberArrayEvaluator(t,n+"padding",e),k=optionalDeclutterMode(t,n+"declutter-mode"),w=new Text({declutterMode:k});return function(O){if(w.setText(r(O)),i&&w.setFill(i(O)),s&&w.setBackgroundFill(s(O)),o&&w.setStroke(o(O)),a&&w.setBackgroundStroke(a(O)),l&&w.setFont(l(O)),u&&w.setMaxAngle(u(O)),c&&w.setOffsetX(c(O)),d&&w.setOffsetY(d(O)),h&&w.setOverflow(h(O)),f){const S=f(O);if(S!=="point"&&S!=="line")throw new Error("Expected point or line for text-placement");w.setPlacement(S)}if(p&&w.setRepeat(p(O)),g&&w.setScale(g(O)),v&&w.setRotateWithView(v(O)),m&&w.setRotation(m(O)),y){const S=y(O);if(S!=="left"&&S!=="center"&&S!=="right"&&S!=="end"&&S!=="start")throw new Error("Expected left, right, center, start, or end for text-align");w.setTextAlign(S)}if(b){const S=b(O);if(S!=="left"&&S!=="right"&&S!=="center")throw new Error("Expected left, right, or center for text-justify");w.setJustify(S)}if(_){const S=_(O);if(S!=="bottom"&&S!=="top"&&S!=="middle"&&S!=="alphabetic"&&S!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");w.setTextBaseline(S)}return x&&w.setPadding(x(O)),T&&w.setKeepUpright(T(O)),w}}function buildImage(t,e){return"icon-src"in t?buildIcon(t,e):"shape-points"in t?buildShape(t,e):"circle-radius"in t?buildCircle(t,e):null}function buildIcon(t,e){const n="icon-",r=n+"src",i=requireString(t[r],r),s=coordinateEvaluator(t,n+"anchor",e),o=sizeLikeEvaluator(t,n+"scale",e),a=numberEvaluator(t,n+"opacity",e),l=coordinateEvaluator(t,n+"displacement",e),u=numberEvaluator(t,n+"rotation",e),c=booleanEvaluator(t,n+"rotate-with-view",e),d=optionalIconOrigin(t,n+"anchor-origin"),h=optionalIconAnchorUnits(t,n+"anchor-x-units"),f=optionalIconAnchorUnits(t,n+"anchor-y-units"),p=optionalColorLike(t,n+"color"),g=optionalString(t,n+"cross-origin"),v=optionalNumberArray(t,n+"offset"),m=optionalIconOrigin(t,n+"offset-origin"),y=optionalNumber(t,n+"width"),b=optionalNumber(t,n+"height"),_=optionalSize(t,n+"size"),T=optionalDeclutterMode(t,n+"declutter-mode"),x=new Icon({src:i,anchorOrigin:d,anchorXUnits:h,anchorYUnits:f,color:p,crossOrigin:g,offset:v,offsetOrigin:m,height:b,width:y,size:_,declutterMode:T});return function(k){return a&&x.setOpacity(a(k)),l&&x.setDisplacement(l(k)),u&&x.setRotation(u(k)),c&&x.setRotateWithView(c(k)),o&&x.setScale(o(k)),s&&x.setAnchor(s(k)),x}}function buildShape(t,e){const n="shape-",r=n+"points",i=n+"radius",s=requireNumber(t[r],r),o=requireNumber(t[i],i),a=buildFill(t,n,e),l=buildStroke(t,n,e),u=sizeLikeEvaluator(t,n+"scale",e),c=coordinateEvaluator(t,n+"displacement",e),d=numberEvaluator(t,n+"rotation",e),h=booleanEvaluator(t,n+"rotate-with-view",e),f=optionalNumber(t,n+"radius2"),p=optionalNumber(t,n+"angle"),g=optionalDeclutterMode(t,n+"declutter-mode"),v=new RegularShape({points:s,radius:o,radius2:f,angle:p,declutterMode:g});return function(m){return a&&v.setFill(a(m)),l&&v.setStroke(l(m)),c&&v.setDisplacement(c(m)),d&&v.setRotation(d(m)),h&&v.setRotateWithView(h(m)),u&&v.setScale(u(m)),v}}function buildCircle(t,e){const n="circle-",r=buildFill(t,n,e),i=buildStroke(t,n,e),s=numberEvaluator(t,n+"radius",e),o=sizeLikeEvaluator(t,n+"scale",e),a=coordinateEvaluator(t,n+"displacement",e),l=numberEvaluator(t,n+"rotation",e),u=booleanEvaluator(t,n+"rotate-with-view",e),c=optionalDeclutterMode(t,n+"declutter-mode"),d=new CircleStyle({radius:5,declutterMode:c});return function(h){return s&&d.setRadius(s(h)),r&&d.setFill(r(h)),i&&d.setStroke(i(h)),a&&d.setDisplacement(a(h)),l&&d.setRotation(l(h)),u&&d.setRotateWithView(u(h)),o&&d.setScale(o(h)),d}}function numberEvaluator(t,e,n){if(!(e in t))return;const r=buildExpression$1(t[e],NumberType,n);return function(i){return requireNumber(r(i),e)}}function stringEvaluator(t,e,n){if(!(e in t))return null;const r=buildExpression$1(t[e],StringType,n);return function(i){return requireString(r(i),e)}}function patternEvaluator(t,e,n){const r=stringEvaluator(t,e+"pattern-src",n),i=sizeEvaluator(t,e+"pattern-offset",n),s=sizeEvaluator(t,e+"pattern-size",n),o=colorLikeEvaluator(t,e+"color",n);return function(a){return{src:r(a),offset:i&&i(a),size:s&&s(a),color:o&&o(a)}}}function booleanEvaluator(t,e,n){if(!(e in t))return null;const r=buildExpression$1(t[e],BooleanType,n);return function(i){const s=r(i);if(typeof s!="boolean")throw new Error(`Expected a boolean for ${e}`);return s}}function colorLikeEvaluator(t,e,n){if(!(e in t))return null;const r=buildExpression$1(t[e],ColorType,n);return function(i){return requireColorLike(r(i),e)}}function numberArrayEvaluator(t,e,n){if(!(e in t))return null;const r=buildExpression$1(t[e],NumberArrayType,n);return function(i){return requireNumberArray(r(i),e)}}function coordinateEvaluator(t,e,n){if(!(e in t))return null;const r=buildExpression$1(t[e],NumberArrayType,n);return function(i){const s=requireNumberArray(r(i),e);if(s.length!==2)throw new Error(`Expected two numbers for ${e}`);return s}}function sizeEvaluator(t,e,n){if(!(e in t))return null;const r=buildExpression$1(t[e],NumberArrayType,n);return function(i){return requireSize(r(i),e)}}function sizeLikeEvaluator(t,e,n){if(!(e in t))return null;const r=buildExpression$1(t[e],NumberArrayType|NumberType,n);return function(i){return requireSizeLike(r(i),e)}}function optionalNumber(t,e){const n=t[e];if(n!==void 0){if(typeof n!="number")throw new Error(`Expected a number for ${e}`);return n}}function optionalSize(t,e){const n=t[e];if(n!==void 0){if(typeof n=="number")return toSize(n);if(!Array.isArray(n))throw new Error(`Expected a number or size array for ${e}`);if(n.length!==2||typeof n[0]!="number"||typeof n[1]!="number")throw new Error(`Expected a number or size array for ${e}`);return n}}function optionalString(t,e){const n=t[e];if(n!==void 0){if(typeof n!="string")throw new Error(`Expected a string for ${e}`);return n}}function optionalIconOrigin(t,e){const n=t[e];if(n!==void 0){if(n!=="bottom-left"&&n!=="bottom-right"&&n!=="top-left"&&n!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return n}}function optionalIconAnchorUnits(t,e){const n=t[e];if(n!==void 0){if(n!=="pixels"&&n!=="fraction")throw new Error(`Expected pixels or fraction for ${e}`);return n}}function optionalNumberArray(t,e){const n=t[e];if(n!==void 0)return requireNumberArray(n,e)}function optionalDeclutterMode(t,e){const n=t[e];if(n!==void 0){if(typeof n!="string")throw new Error(`Expected a string for ${e}`);if(n!=="declutter"&&n!=="obstacle"&&n!=="none")throw new Error(`Expected declutter, obstacle, or none for ${e}`);return n}}function optionalColorLike(t,e){const n=t[e];if(n!==void 0)return requireColorLike(n,e)}function requireNumberArray(t,e){if(!Array.isArray(t))throw new Error(`Expected an array for ${e}`);const n=t.length;for(let r=0;r<n;++r)if(typeof t[r]!="number")throw new Error(`Expected an array of numbers for ${e}`);return t}function requireString(t,e){if(typeof t!="string")throw new Error(`Expected a string for ${e}`);return t}function requireNumber(t,e){if(typeof t!="number")throw new Error(`Expected a number for ${e}`);return t}function requireColorLike(t,e){if(typeof t=="string")return t;const n=requireNumberArray(t,e),r=n.length;if(r<3||r>4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return n}function requireSize(t,e){const n=requireNumberArray(t,e);if(n.length!==2)throw new Error(`Expected an array of two numbers for ${e}`);return n}function requireSizeLike(t,e){return typeof t=="number"?t:requireSize(t,e)}const Property$2={RENDER_ORDER:"renderOrder"};class BaseVectorLayer extends Layer{constructor(e){e=e||{};const n=Object.assign({},e);delete n.style,delete n.renderBuffer,delete n.updateWhileAnimating,delete n.updateWhileInteracting,super(n),this.declutter_=e.declutter?String(e.declutter):void 0,this.renderBuffer_=e.renderBuffer!==void 0?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=e.updateWhileAnimating!==void 0?e.updateWhileAnimating:!1,this.updateWhileInteracting_=e.updateWhileInteracting!==void 0?e.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Property$2.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e,n){const r=this.getDeclutter();r in e.declutter||(e.declutter[r]=new RBush$1(9)),this.getRenderer().renderDeclutter(e,n)}setRenderOrder(e){this.set(Property$2.RENDER_ORDER,e)}setStyle(e){this.style_=e===void 0?createDefaultStyle$1:e;const n=toStyleLike(e);this.styleFunction_=e===null?void 0:toFunction(n),this.changed()}setDeclutter(e){this.declutter_=e?String(e):void 0,this.changed()}}function toStyleLike(t){if(t===void 0)return createDefaultStyle$1;if(!t)return null;if(typeof t=="function"||t instanceof Style)return t;if(!Array.isArray(t))return flatStylesToStyleFunction([t]);if(t.length===0)return[];const e=t.length,n=t[0];if(n instanceof Style){const i=new Array(e);for(let s=0;s<e;++s){const o=t[s];if(!(o instanceof Style))throw new Error("Expected a list of style instances");i[s]=o}return i}if("style"in n){const i=new Array(e);for(let s=0;s<e;++s){const o=t[s];if(!("style"in o))throw new Error("Expected a list of rules with a style property");i[s]=o}return rulesToStyleFunction(i)}return flatStylesToStyleFunction(t)}const Instruction={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},fillInstruction=[Instruction.FILL],strokeInstruction=[Instruction.STROKE],beginPathInstruction=[Instruction.BEGIN_PATH],closePathInstruction=[Instruction.CLOSE_PATH];class VectorContext{drawCustom(e,n,r,i,s){}drawGeometry(e){}setStyle(e){}drawCircle(e,n,r){}drawFeature(e,n,r){}drawGeometryCollection(e,n,r){}drawLineString(e,n,r){}drawMultiLineString(e,n,r){}drawMultiPoint(e,n,r){}drawMultiPolygon(e,n,r){}drawPoint(e,n,r){}drawPolygon(e,n,r){}drawText(e,n,r){}setFillStrokeStyle(e,n){}setImageStyle(e,n){}setTextStyle(e,n){}}class CanvasBuilder extends VectorContext{constructor(e,n,r,i){super(),this.tolerance=e,this.maxExtent=n,this.pixelRatio=i,this.maxLineWidth=0,this.resolution=r,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(e){const n=this.pixelRatio;return n==1?e:e.map(function(r){return r*n})}appendFlatPointCoordinates(e,n){const r=this.getBufferedMaxExtent(),i=this.tmpCoordinate_,s=this.coordinates;let o=s.length;for(let a=0,l=e.length;a<l;a+=n)i[0]=e[a],i[1]=e[a+1],containsCoordinate(r,i)&&(s[o++]=i[0],s[o++]=i[1]);return o}appendFlatLineCoordinates(e,n,r,i,s,o){const a=this.coordinates;let l=a.length;const u=this.getBufferedMaxExtent();o&&(n+=i);let c=e[n],d=e[n+1];const h=this.tmpCoordinate_;let f=!0,p,g,v;for(p=n+i;p<r;p+=i)h[0]=e[p],h[1]=e[p+1],v=coordinateRelationship(u,h),v!==g?(f&&(a[l++]=c,a[l++]=d,f=!1),a[l++]=h[0],a[l++]=h[1]):v===Relationship.INTERSECTING?(a[l++]=h[0],a[l++]=h[1],f=!1):f=!0,c=h[0],d=h[1],g=v;return(s&&f||p===n+i)&&(a[l++]=c,a[l++]=d),l}drawCustomCoordinates_(e,n,r,i,s){for(let o=0,a=r.length;o<a;++o){const l=r[o],u=this.appendFlatLineCoordinates(e,n,l,i,!1,!1);s.push(u),n=l}return n}drawCustom(e,n,r,i,s){this.beginGeometry(e,n,s);const o=e.getType(),a=e.getStride(),l=this.coordinates.length;let u,c,d,h,f;switch(o){case"MultiPolygon":u=e.getOrientedFlatCoordinates(),h=[];const p=e.getEndss();f=0;for(let g=0,v=p.length;g<v;++g){const m=[];f=this.drawCustomCoordinates_(u,f,p[g],a,m),h.push(m)}this.instructions.push([Instruction.CUSTOM,l,h,e,r,inflateMultiCoordinatesArray,s]),this.hitDetectionInstructions.push([Instruction.CUSTOM,l,h,e,i||r,inflateMultiCoordinatesArray,s]);break;case"Polygon":case"MultiLineString":d=[],u=o=="Polygon"?e.getOrientedFlatCoordinates():e.getFlatCoordinates(),f=this.drawCustomCoordinates_(u,0,e.getEnds(),a,d),this.instructions.push([Instruction.CUSTOM,l,d,e,r,inflateCoordinatesArray,s]),this.hitDetectionInstructions.push([Instruction.CUSTOM,l,d,e,i||r,inflateCoordinatesArray,s]);break;case"LineString":case"Circle":u=e.getFlatCoordinates(),c=this.appendFlatLineCoordinates(u,0,u.length,a,!1,!1),this.instructions.push([Instruction.CUSTOM,l,c,e,r,inflateCoordinates,s]),this.hitDetectionInstructions.push([Instruction.CUSTOM,l,c,e,i||r,inflateCoordinates,s]);break;case"MultiPoint":u=e.getFlatCoordinates(),c=this.appendFlatPointCoordinates(u,a),c>l&&(this.instructions.push([Instruction.CUSTOM,l,c,e,r,inflateCoordinates,s]),this.hitDetectionInstructions.push([Instruction.CUSTOM,l,c,e,i||r,inflateCoordinates,s]));break;case"Point":u=e.getFlatCoordinates(),this.coordinates.push(u[0],u[1]),c=this.coordinates.length,this.instructions.push([Instruction.CUSTOM,l,c,e,r,void 0,s]),this.hitDetectionInstructions.push([Instruction.CUSTOM,l,c,e,i||r,void 0,s]);break}this.endGeometry(n)}beginGeometry(e,n,r){this.beginGeometryInstruction1_=[Instruction.BEGIN_GEOMETRY,n,0,e,r],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Instruction.BEGIN_GEOMETRY,n,0,e,r],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;e.reverse();let n;const r=e.length;let i,s,o=-1;for(n=0;n<r;++n)i=e[n],s=i[0],s==Instruction.END_GEOMETRY?o=n:s==Instruction.BEGIN_GEOMETRY&&(i[2]=n,reverseSubArray(this.hitDetectionInstructions,o,n),o=-1)}setFillStrokeStyle(e,n){const r=this.state;if(e){const i=e.getColor();r.fillPatternScale=i&&typeof i=="object"&&"src"in i?this.pixelRatio:1,r.fillStyle=asColorLike(i||defaultFillStyle)}else r.fillStyle=void 0;if(n){const i=n.getColor();r.strokeStyle=asColorLike(i||defaultStrokeStyle);const s=n.getLineCap();r.lineCap=s!==void 0?s:defaultLineCap;const o=n.getLineDash();r.lineDash=o?o.slice():defaultLineDash;const a=n.getLineDashOffset();r.lineDashOffset=a||defaultLineDashOffset;const l=n.getLineJoin();r.lineJoin=l!==void 0?l:defaultLineJoin;const u=n.getWidth();r.lineWidth=u!==void 0?u:defaultLineWidth;const c=n.getMiterLimit();r.miterLimit=c!==void 0?c:defaultMiterLimit,r.lineWidth>this.maxLineWidth&&(this.maxLineWidth=r.lineWidth,this.bufferedMaxExtent_=null)}else r.strokeStyle=void 0,r.lineCap=void 0,r.lineDash=null,r.lineDashOffset=void 0,r.lineJoin=void 0,r.lineWidth=void 0,r.miterLimit=void 0}createFill(e){const n=e.fillStyle,r=[Instruction.SET_FILL_STYLE,n];return typeof n!="string"&&r.push(e.fillPatternScale),r}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[Instruction.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,n){const r=e.fillStyle;(typeof r!="string"||e.currentFillStyle!=r)&&(r!==void 0&&this.instructions.push(n.call(this,e)),e.currentFillStyle=r)}updateStrokeStyle(e,n){const r=e.strokeStyle,i=e.lineCap,s=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,l=e.lineWidth,u=e.miterLimit;(e.currentStrokeStyle!=r||e.currentLineCap!=i||s!=e.currentLineDash&&!equals$2(e.currentLineDash,s)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=l||e.currentMiterLimit!=u)&&(r!==void 0&&n.call(this,e),e.currentStrokeStyle=r,e.currentLineCap=i,e.currentLineDash=s,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=l,e.currentMiterLimit=u)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const n=[Instruction.END_GEOMETRY,e];this.instructions.push(n),this.hitDetectionInstructions.push(n)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=clone(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;buffer(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class CanvasImageBuilder extends CanvasBuilder{constructor(e,n,r,i){super(e,n,r,i),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(e,n,r){if(!this.image_||this.maxExtent&&!containsCoordinate(this.maxExtent,e.getFlatCoordinates()))return;this.beginGeometry(e,n,r);const i=e.getFlatCoordinates(),s=e.getStride(),o=this.coordinates.length,a=this.appendFlatPointCoordinates(i,s);this.instructions.push([Instruction.DRAW_IMAGE,o,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Instruction.DRAW_IMAGE,o,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(n)}drawMultiPoint(e,n,r){if(!this.image_)return;this.beginGeometry(e,n,r);const i=e.getFlatCoordinates(),s=[];for(let l=0,u=i.length;l<u;l+=e.getStride())(!this.maxExtent||containsCoordinate(this.maxExtent,i.slice(l,l+2)))&&s.push(i[l],i[l+1]);const o=this.coordinates.length,a=this.appendFlatPointCoordinates(s,2);this.instructions.push([Instruction.DRAW_IMAGE,o,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Instruction.DRAW_IMAGE,o,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(n)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(e,n){const r=e.getAnchor(),i=e.getSize(),s=e.getOrigin();this.imagePixelRatio_=e.getPixelRatio(this.pixelRatio),this.anchorX_=r[0],this.anchorY_=r[1],this.hitDetectionImage_=e.getHitDetectionImage(),this.image_=e.getImage(this.pixelRatio),this.height_=i[1],this.opacity_=e.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=e.getRotateWithView(),this.rotation_=e.getRotation(),this.scale_=e.getScaleArray(),this.width_=i[0],this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=n}}class CanvasLineStringBuilder extends CanvasBuilder{constructor(e,n,r,i){super(e,n,r,i)}drawFlatCoordinates_(e,n,r,i){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(e,n,r,i,!1,!1),a=[Instruction.MOVE_TO_LINE_TO,s,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),r}drawLineString(e,n,r){const i=this.state,s=i.strokeStyle,o=i.lineWidth;if(s===void 0||o===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,n,r),this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,defaultLineDash,defaultLineDashOffset],beginPathInstruction);const a=e.getFlatCoordinates(),l=e.getStride();this.drawFlatCoordinates_(a,0,a.length,l),this.hitDetectionInstructions.push(strokeInstruction),this.endGeometry(n)}drawMultiLineString(e,n,r){const i=this.state,s=i.strokeStyle,o=i.lineWidth;if(s===void 0||o===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(e,n,r),this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,defaultLineDash,defaultLineDashOffset],beginPathInstruction);const a=e.getEnds(),l=e.getFlatCoordinates(),u=e.getStride();let c=0;for(let d=0,h=a.length;d<h;++d)c=this.drawFlatCoordinates_(l,c,a[d],u);this.hitDetectionInstructions.push(strokeInstruction),this.endGeometry(n)}finish(){const e=this.state;return e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&this.instructions.push(strokeInstruction),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(e){e.lastStroke!=null&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(strokeInstruction),e.lastStroke=this.coordinates.length),e.lastStroke=0,super.applyStroke(e),this.instructions.push(beginPathInstruction)}}class CanvasPolygonBuilder extends CanvasBuilder{constructor(e,n,r,i){super(e,n,r,i)}drawFlatCoordinatess_(e,n,r,i){const s=this.state,o=s.fillStyle!==void 0,a=s.strokeStyle!==void 0,l=r.length;this.instructions.push(beginPathInstruction),this.hitDetectionInstructions.push(beginPathInstruction);for(let u=0;u<l;++u){const c=r[u],d=this.coordinates.length,h=this.appendFlatLineCoordinates(e,n,c,i,!0,!a),f=[Instruction.MOVE_TO_LINE_TO,d,h];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(closePathInstruction),this.hitDetectionInstructions.push(closePathInstruction)),n=c}return o&&(this.instructions.push(fillInstruction),this.hitDetectionInstructions.push(fillInstruction)),a&&(this.instructions.push(strokeInstruction),this.hitDetectionInstructions.push(strokeInstruction)),n}drawCircle(e,n,r){const i=this.state,s=i.fillStyle,o=i.strokeStyle;if(s===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,n,r),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_FILL_STYLE,defaultFillStyle]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,defaultLineDash,defaultLineDashOffset]);const a=e.getFlatCoordinates(),l=e.getStride(),u=this.coordinates.length;this.appendFlatLineCoordinates(a,0,a.length,l,!1,!1);const c=[Instruction.CIRCLE,u];this.instructions.push(beginPathInstruction,c),this.hitDetectionInstructions.push(beginPathInstruction,c),i.fillStyle!==void 0&&(this.instructions.push(fillInstruction),this.hitDetectionInstructions.push(fillInstruction)),i.strokeStyle!==void 0&&(this.instructions.push(strokeInstruction),this.hitDetectionInstructions.push(strokeInstruction)),this.endGeometry(n)}drawPolygon(e,n,r){const i=this.state,s=i.fillStyle,o=i.strokeStyle;if(s===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,n,r),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_FILL_STYLE,defaultFillStyle]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,defaultLineDash,defaultLineDashOffset]);const a=e.getEnds(),l=e.getOrientedFlatCoordinates(),u=e.getStride();this.drawFlatCoordinatess_(l,0,a,u),this.endGeometry(n)}drawMultiPolygon(e,n,r){const i=this.state,s=i.fillStyle,o=i.strokeStyle;if(s===void 0&&o===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(e,n,r),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_FILL_STYLE,defaultFillStyle]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,defaultLineDash,defaultLineDashOffset]);const a=e.getEndss(),l=e.getOrientedFlatCoordinates(),u=e.getStride();let c=0;for(let d=0,h=a.length;d<h;++d)c=this.drawFlatCoordinatess_(l,c,a[d],u);this.endGeometry(n)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const e=this.tolerance;if(e!==0){const n=this.coordinates;for(let r=0,i=n.length;r<i;++r)n[r]=snap(n[r],e)}return super.finish()}setFillStrokeStyles_(){const e=this.state;e.fillStyle!==void 0&&this.updateFillStyle(e,this.createFill),e.strokeStyle!==void 0&&this.updateStrokeStyle(e,this.applyStroke)}}function lineChunk(t,e,n,r,i){const s=[];let o=n,a=0,l=e.slice(n,2);for(;a<t&&o+i<r;){const[u,c]=l.slice(-2),d=e[o+i],h=e[o+i+1],f=Math.sqrt((d-u)*(d-u)+(h-c)*(h-c));if(a+=f,a>=t){const p=(t-a+f)/f,g=lerp(u,d,p),v=lerp(c,h,p);l.push(g,v),s.push(l),l=[g,v],a==t&&(o+=i),a=0}else if(a<t)l.push(e[o+i],e[o+i+1]),o+=i;else{const p=f-a,g=lerp(u,d,p/f),v=lerp(c,h,p/f);l.push(g,v),s.push(l),l=[g,v],a=0,o+=i}}return a>0&&s.push(l),s}function matchingChunk(t,e,n,r,i){let s=n,o=n,a=0,l=0,u=n,c,d,h,f,p,g,v,m,y,b;for(d=n;d<r;d+=i){const _=e[d],T=e[d+1];p!==void 0&&(y=_-p,b=T-g,f=Math.sqrt(y*y+b*b),v!==void 0&&(l+=h,c=Math.acos((v*y+m*b)/(h*f)),c>t&&(l>a&&(a=l,s=u,o=d),l=0,u=d-i)),h=f,v=y,m=b),p=_,g=T}return l+=f,l>a?[u,d]:[s,o]}const TEXT_ALIGN={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class CanvasTextBuilder extends CanvasBuilder{constructor(e,n,r,i){super(e,n,r,i),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textKeepUpright_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[defaultFillStyle]={fillStyle:defaultFillStyle},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,n,r){const i=this.textFillState_,s=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!i&&!s)return;const a=this.coordinates;let l=a.length;const u=e.getType();let c=null,d=e.getStride();if(o.placement==="line"&&(u=="LineString"||u=="MultiLineString"||u=="Polygon"||u=="MultiPolygon")){if(!intersects(this.maxExtent,e.getExtent()))return;let h;if(c=e.getFlatCoordinates(),u=="LineString")h=[c.length];else if(u=="MultiLineString")h=e.getEnds();else if(u=="Polygon")h=e.getEnds().slice(0,1);else if(u=="MultiPolygon"){const v=e.getEndss();h=[];for(let m=0,y=v.length;m<y;++m)h.push(v[m][0])}this.beginGeometry(e,n,r);const f=o.repeat,p=f?void 0:o.textAlign;let g=0;for(let v=0,m=h.length;v<m;++v){let y;f?y=lineChunk(f*this.resolution,c,g,h[v],d):y=[c.slice(g,h[v])];for(let b=0,_=y.length;b<_;++b){const T=y[b];let x=0,k=T.length;if(p==null){const O=matchingChunk(o.maxAngle,T,0,T.length,2);x=O[0],k=O[1]}for(let O=x;O<k;O+=d)a.push(T[O],T[O+1]);const w=a.length;g=h[v],this.drawChars_(l,w),l=w}}this.endGeometry(n)}else{let h=o.overflow?null:[];switch(u){case"Point":case"MultiPoint":c=e.getFlatCoordinates();break;case"LineString":c=e.getFlatMidpoint();break;case"Circle":c=e.getCenter();break;case"MultiLineString":c=e.getFlatMidpoints(),d=2;break;case"Polygon":c=e.getFlatInteriorPoint(),o.overflow||h.push(c[2]/this.resolution),d=3;break;case"MultiPolygon":const y=e.getFlatInteriorPoints();c=[];for(let b=0,_=y.length;b<_;b+=3)o.overflow||h.push(y[b+2]/this.resolution),c.push(y[b],y[b+1]);if(c.length===0)return;d=2;break}const f=this.appendFlatPointCoordinates(c,d);if(f===l)return;if(h&&(f-l)/2!==c.length/d){let y=l/2;h=h.filter((b,_)=>{const T=a[(y+_)*2]===c[_*d]&&a[(y+_)*2+1]===c[_*d+1];return T||--y,T})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&this.updateFillStyle(this.state,this.createFill),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,n,r);let p=o.padding;if(p!=defaultPadding&&(o.scale[0]<0||o.scale[1]<0)){let y=o.padding[0],b=o.padding[1],_=o.padding[2],T=o.padding[3];o.scale[0]<0&&(b=-b,T=-T),o.scale[1]<0&&(y=-y,_=-_),p=[y,b,_,T]}const g=this.pixelRatio;this.instructions.push([Instruction.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,p==defaultPadding?defaultPadding:p.map(function(y){return y*g}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]);const v=1/g,m=this.state.fillStyle;o.backgroundFill&&(this.state.fillStyle=defaultFillStyle,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Instruction.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[v,v],NaN,this.declutterMode_,this.declutterImageWithText_,p,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?defaultFillStyle:this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]),o.backgroundFill&&(this.state.fillStyle=m,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(n)}}saveTextStates_(){const e=this.textStrokeState_,n=this.textState_,r=this.textFillState_,i=this.strokeKey_;e&&(i in this.strokeStates||(this.strokeStates[i]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:n.font,textAlign:n.textAlign||defaultTextAlign,justify:n.justify,textBaseline:n.textBaseline||defaultTextBaseline,scale:n.scale});const o=this.fillKey_;r&&(o in this.fillStates||(this.fillStates[o]={fillStyle:r.fillStyle}))}drawChars_(e,n){const r=this.textStrokeState_,i=this.textState_,s=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,u=TEXT_ALIGN[i.textBaseline],c=this.textOffsetY_*l,d=this.text_,h=r?r.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([Instruction.DRAW_CHARS,e,n,u,i.overflow,a,i.maxAngle,l,c,s,h*l,d,o,1,this.declutterMode_,this.textKeepUpright_]),this.hitDetectionInstructions.push([Instruction.DRAW_CHARS,e,n,u,i.overflow,a&&defaultFillStyle,i.maxAngle,l,c,s,h*l,d,o,1/l,this.declutterMode_,this.textKeepUpright_])}setTextStyle(e,n){let r,i,s;if(!e)this.text_="";else{const o=e.getFill();o?(i=this.textFillState_,i||(i={},this.textFillState_=i),i.fillStyle=asColorLike(o.getColor()||defaultFillStyle)):(i=null,this.textFillState_=i);const a=e.getStroke();if(!a)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const g=a.getLineDash(),v=a.getLineDashOffset(),m=a.getWidth(),y=a.getMiterLimit();s.lineCap=a.getLineCap()||defaultLineCap,s.lineDash=g?g.slice():defaultLineDash,s.lineDashOffset=v===void 0?defaultLineDashOffset:v,s.lineJoin=a.getLineJoin()||defaultLineJoin,s.lineWidth=m===void 0?defaultLineWidth:m,s.miterLimit=y===void 0?defaultMiterLimit:y,s.strokeStyle=asColorLike(a.getColor()||defaultStrokeStyle)}r=this.textState_;const l=e.getFont()||defaultFont;registerFont(l);const u=e.getScaleArray();r.overflow=e.getOverflow(),r.font=l,r.maxAngle=e.getMaxAngle(),r.placement=e.getPlacement(),r.textAlign=e.getTextAlign(),r.repeat=e.getRepeat(),r.justify=e.getJustify(),r.textBaseline=e.getTextBaseline()||defaultTextBaseline,r.backgroundFill=e.getBackgroundFill(),r.backgroundStroke=e.getBackgroundStroke(),r.padding=e.getPadding()||defaultPadding,r.scale=u===void 0?[1,1]:u;const c=e.getOffsetX(),d=e.getOffsetY(),h=e.getRotateWithView(),f=e.getKeepUpright(),p=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=d===void 0?0:d,this.textRotateWithView_=h===void 0?!1:h,this.textKeepUpright_=f===void 0?!0:f,this.textRotation_=p===void 0?0:p,this.strokeKey_=s?(typeof s.strokeStyle=="string"?s.strokeStyle:getUid(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=r.font+r.scale+(r.textAlign||"?")+(r.repeat||"?")+(r.justify||"?")+(r.textBaseline||"?"),this.fillKey_=i&&i.fillStyle?typeof i.fillStyle=="string"?i.fillStyle:"|"+getUid(i.fillStyle):""}this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=n}}const BATCH_CONSTRUCTORS={Circle:CanvasPolygonBuilder,Default:CanvasBuilder,Image:CanvasImageBuilder,LineString:CanvasLineStringBuilder,Polygon:CanvasPolygonBuilder,Text:CanvasTextBuilder};class BuilderGroup{constructor(e,n,r,i){this.tolerance_=e,this.maxExtent_=n,this.pixelRatio_=i,this.resolution_=r,this.buildersByZIndex_={}}finish(){const e={};for(const n in this.buildersByZIndex_){e[n]=e[n]||{};const r=this.buildersByZIndex_[n];for(const i in r){const s=r[i].finish();e[n][i]=s}}return e}getBuilder(e,n){const r=e!==void 0?e.toString():"0";let i=this.buildersByZIndex_[r];i===void 0&&(i={},this.buildersByZIndex_[r]=i);let s=i[n];if(s===void 0){const o=BATCH_CONSTRUCTORS[n];s=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[n]=s}return s}}const maxStaleKeys=5;class LayerRenderer extends Observable{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.staleKeys_=new Array,this.maxStaleKeys=maxStaleKeys}getStaleKeys(){return this.staleKeys_}prependStaleKey(e){this.staleKeys_.unshift(e),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(e){return abstract()}getData(e){return null}prepareFrame(e){return abstract()}renderFrame(e,n){return abstract()}forEachFeatureAtCoordinate(e,n,r,i,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){const n=e.target;(n.getState()===ImageState.LOADED||n.getState()===ImageState.ERROR)&&this.renderIfReadyAndVisible()}loadImage(e){let n=e.getState();return n!=ImageState.LOADED&&n!=ImageState.ERROR&&e.addEventListener(EventType.CHANGE,this.boundHandleImageChange_),n==ImageState.IDLE&&(e.load(),n=e.getState()),n==ImageState.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}renderDeferred(e){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class RenderEvent extends BaseEvent{constructor(e,n,r,i){super(e),this.inversePixelTransform=n,this.frameState=r,this.context=i}}class ZIndexContext{constructor(){On(this,"pushMethodArgs_",(...e)=>(this.instructions_[this.zIndex+this.offset_].push(e),this));this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(getSharedCanvasContext2D(),{get:(e,n)=>{if(typeof getSharedCanvasContext2D()[n]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(n),this.pushMethodArgs_},set:(e,n,r)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(n,r),!0)})}pushFunction(e){this.instructions_[this.zIndex+this.offset_].push(e)}getContext(){return this.context_}draw(e){this.instructions_.forEach(n=>{for(let r=0,i=n.length;r<i;++r){const s=n[r];if(typeof s=="function"){s(e);continue}const o=n[++r];if(typeof e[s]=="function")e[s](...o);else{if(typeof o=="function"){e[s]=o(e);continue}e[s]=o}}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}const canvasPool$1=[];let pixelContext=null;function createPixelContext(){pixelContext=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})}class CanvasLayerRenderer extends LayerRenderer{constructor(e){super(e),this.container=null,this.renderedResolution,this.tempTransform=create$2(),this.pixelTransform=create$2(),this.inversePixelTransform=create$2(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(e,n,r){pixelContext||createPixelContext(),pixelContext.clearRect(0,0,1,1);let i;try{pixelContext.drawImage(e,n,r,1,1,0,0,1,1),i=pixelContext.getImageData(0,0,1,1).data}catch{return pixelContext=null,null}return i}getBackground(e){let r=this.getLayer().getBackground();return typeof r=="function"&&(r=r(e.viewState.resolution)),r||void 0}useContainer(e,n,r){const i=this.getLayer().getClassName();let s,o;if(e&&e.className===i&&(!r||e&&e.style.backgroundColor&&equals$2(asArray(e.style.backgroundColor),asArray(r)))){const a=e.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(o&&o.canvas.style.transform===n?(this.container=e,this.context=o,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=i;let a=s.style;a.position="absolute",a.width="100%",a.height="100%",o=createCanvasContext2D();const l=o.canvas;s.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=s,this.context=o}!this.containerReused&&r&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=r)}clipUnrotated(e,n,r){const i=getTopLeft(r),s=getTopRight(r),o=getBottomRight(r),a=getBottomLeft(r);apply(n.coordinateToPixelTransform,i),apply(n.coordinateToPixelTransform,s),apply(n.coordinateToPixelTransform,o),apply(n.coordinateToPixelTransform,a);const l=this.inversePixelTransform;apply(l,i),apply(l,s),apply(l,o),apply(l,a),e.save(),e.beginPath(),e.moveTo(Math.round(i[0]),Math.round(i[1])),e.lineTo(Math.round(s[0]),Math.round(s[1])),e.lineTo(Math.round(o[0]),Math.round(o[1])),e.lineTo(Math.round(a[0]),Math.round(a[1])),e.clip()}prepareContainer(e,n){const r=e.extent,i=e.viewState.resolution,s=e.viewState.rotation,o=e.pixelRatio,a=Math.round(getWidth(r)/i*o),l=Math.round(getHeight(r)/i*o);compose(this.pixelTransform,e.size[0]/2,e.size[1]/2,1/o,1/o,s,-a/2,-l/2),makeInverse(this.inversePixelTransform,this.pixelTransform);const u=toString$1(this.pixelTransform);if(this.useContainer(n,u,this.getBackground(e)),!this.containerReused){const c=this.context.canvas;c.width!=a||c.height!=l?(c.width=a,c.height=l):this.context.clearRect(0,0,a,l),u!==c.style.transform&&(c.style.transform=u)}}dispatchRenderEvent_(e,n,r){const i=this.getLayer();if(i.hasListener(e)){const s=new RenderEvent(e,this.inversePixelTransform,r,n);i.dispatchEvent(s)}}preRender(e,n){this.frameState=n,!n.declutter&&this.dispatchRenderEvent_(RenderEventType.PRERENDER,e,n)}postRender(e,n){n.declutter||this.dispatchRenderEvent_(RenderEventType.POSTRENDER,e,n)}renderDeferredInternal(e){}getRenderContext(e){return e.declutter&&!this.deferredContext_&&(this.deferredContext_=new ZIndexContext),e.declutter?this.deferredContext_.getContext():this.context}renderDeferred(e){e.declutter&&(this.dispatchRenderEvent_(RenderEventType.PRERENDER,this.context,e),e.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(e),this.dispatchRenderEvent_(RenderEventType.POSTRENDER,this.context,e))}getRenderTransform(e,n,r,i,s,o,a){const l=s/2,u=o/2,c=i/n,d=-c,h=-e[0]+a,f=-e[1];return compose(this.tempTransform,l,u,c,d,-r,h,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}function drawTextOnPath(t,e,n,r,i,s,o,a,l,u,c,d,h=!0){let f=t[e],p=t[e+1],g=0,v=0,m=0,y=0;function b(){g=f,v=p,e+=r,f=t[e],p=t[e+1],y+=m,m=Math.sqrt((f-g)*(f-g)+(p-v)*(p-v))}do b();while(e<n-r&&y+m<s);let _=m===0?0:(s-y)/m;const T=lerp(g,f,_),x=lerp(v,p,_),k=e-r,w=y,O=s+a*l(u,i,c);for(;e<n-r&&y+m<O;)b();_=m===0?0:(O-y)/m;const S=lerp(g,f,_),F=lerp(v,p,_);let z=!1;if(h)if(d){const $=[T,x,S,F];rotate($,0,4,2,d,$,$),z=$[0]>$[2]}else z=T>S;const Y=Math.PI,ae=[],j=k+r===e;e=k,m=0,y=w,f=t[e],p=t[e+1];let M;if(j){b(),M=Math.atan2(p-v,f-g),z&&(M+=M>0?-Y:Y);const $=(S+T)/2,oe=(F+x)/2;return ae[0]=[$,oe,(O-s)/2,M,i],ae}i=i.replace(/\n/g," ");for(let $=0,oe=i.length;$<oe;){b();let A=Math.atan2(p-v,f-g);if(z&&(A+=A>0?-Y:Y),M!==void 0){let pe=A-M;if(pe+=pe>Y?-2*Y:pe<-Y?2*Y:0,Math.abs(pe)>o)return null}M=A;const V=$;let D=0;for(;$<oe;++$){const pe=z?oe-$-1:$,xe=a*l(u,i[pe],c);if(e+r<n&&y+m<s+D+xe/2)break;D+=xe}if($===V)continue;const le=z?i.substring(oe-V,oe-$):i.substring(V,$);_=m===0?0:(s+D/2-y)/m;const ie=lerp(g,f,_),re=lerp(v,p,_);ae.push([ie,re,D/2,A,le]),s+=D}return ae}const tmpExtent=createEmpty(),p1=[],p2=[],p3=[],p4=[];function getDeclutterBox(t){return t[3].declutterBox}const rtlRegEx=new RegExp("[֑-ࣿיִ-﷿ﹰ-ﻼࠀ--]");function horizontalTextAlign(t,e){return e==="start"?e=rtlRegEx.test(t)?"right":"left":e==="end"&&(e=rtlRegEx.test(t)?"left":"right"),TEXT_ALIGN[e]}function createTextChunks(t,e,n){return n>0&&t.push(`
|
|
46
|
+
`,""),t.push(e,""),t}class Executor{constructor(e,n,r,i,s){this.overlaps=r,this.pixelRatio=n,this.resolution=e,this.alignAndScaleFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=create$2(),this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=s?new ZIndexContext:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,n,r,i){const s=e+n+r+i;if(this.labels_[s])return this.labels_[s];const o=i?this.strokeStates[i]:null,a=r?this.fillStates[r]:null,l=this.textStates[n],u=this.pixelRatio,c=[l.scale[0]*u,l.scale[1]*u],d=l.justify?TEXT_ALIGN[l.justify]:horizontalTextAlign(Array.isArray(e)?e[0]:e,l.textAlign||defaultTextAlign),h=i&&o.lineWidth?o.lineWidth:0,f=Array.isArray(e)?e:String(e).split(`
|
|
47
|
+
`).reduce(createTextChunks,[]),{width:p,height:g,widths:v,heights:m,lineWidths:y}=getTextDimensions(l,f),b=p+h,_=[],T=(b+2)*c[0],x=(g+h)*c[1],k={width:T<0?Math.floor(T):Math.ceil(T),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:_};(c[0]!=1||c[1]!=1)&&_.push("scale",c),i&&(_.push("strokeStyle",o.strokeStyle),_.push("lineWidth",h),_.push("lineCap",o.lineCap),_.push("lineJoin",o.lineJoin),_.push("miterLimit",o.miterLimit),_.push("setLineDash",[o.lineDash]),_.push("lineDashOffset",o.lineDashOffset)),r&&_.push("fillStyle",a.fillStyle),_.push("textBaseline","middle"),_.push("textAlign","center");const w=.5-d;let O=d*b+w*h;const S=[],F=[];let z=0,Y=0,ae=0,j=0,M;for(let $=0,oe=f.length;$<oe;$+=2){const A=f[$];if(A===`
|
|
48
|
+
`){Y+=z,z=0,O=d*b+w*h,++j;continue}const V=f[$+1]||l.font;V!==M&&(i&&S.push("font",V),r&&F.push("font",V),M=V),z=Math.max(z,m[ae]);const D=[A,O+w*v[ae]+d*(v[ae]-y[j]),.5*(h+z)+Y];O+=v[ae],i&&S.push("strokeText",D),r&&F.push("fillText",D),++ae}return Array.prototype.push.apply(_,S),Array.prototype.push.apply(_,F),this.labels_[s]=k,k}replayTextBackground_(e,n,r,i,s,o,a){e.beginPath(),e.moveTo.apply(e,n),e.lineTo.apply(e,r),e.lineTo.apply(e,i),e.lineTo.apply(e,s),e.lineTo.apply(e,n),o&&(this.alignAndScaleFill_=o[2],this.fill_(e)),a&&(this.setStrokeStyle_(e,a),e.stroke())}calculateImageOrLabelDimensions_(e,n,r,i,s,o,a,l,u,c,d,h,f,p,g,v){a*=h[0],l*=h[1];let m=r-a,y=i-l;const b=s+u>e?e-u:s,_=o+c>n?n-c:o,T=p[3]+b*h[0]+p[1],x=p[0]+_*h[1]+p[2],k=m-p[3],w=y-p[0];(g||d!==0)&&(p1[0]=k,p4[0]=k,p1[1]=w,p2[1]=w,p2[0]=k+T,p3[0]=p2[0],p3[1]=w+x,p4[1]=p3[1]);let O;return d!==0?(O=compose(create$2(),r,i,1,1,d,-r,-i),apply(O,p1),apply(O,p2),apply(O,p3),apply(O,p4),createOrUpdate$2(Math.min(p1[0],p2[0],p3[0],p4[0]),Math.min(p1[1],p2[1],p3[1],p4[1]),Math.max(p1[0],p2[0],p3[0],p4[0]),Math.max(p1[1],p2[1],p3[1],p4[1]),tmpExtent)):createOrUpdate$2(Math.min(k,k+T),Math.min(w,w+x),Math.max(k,k+T),Math.max(w,w+x),tmpExtent),f&&(m=Math.round(m),y=Math.round(y)),{drawImageX:m,drawImageY:y,drawImageW:b,drawImageH:_,originX:u,originY:c,declutterBox:{minX:tmpExtent[0],minY:tmpExtent[1],maxX:tmpExtent[2],maxY:tmpExtent[3],value:v},canvasTransform:O,scale:h}}replayImageOrLabel_(e,n,r,i,s,o,a){const l=!!(o||a),u=i.declutterBox,c=a?a[2]*i.scale[0]/2:0;return u.minX-c<=n[0]&&u.maxX+c>=0&&u.minY-c<=n[1]&&u.maxY+c>=0&&(l&&this.replayTextBackground_(e,p1,p2,p3,p4,o,a),drawImageOrLabel(e,i.canvasTransform,s,r,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0}fill_(e){const n=this.alignAndScaleFill_;if(n){const r=apply(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;e.save(),e.translate(r[0]%i,r[1]%i),n!==1&&e.scale(n,n),e.rotate(this.viewRotation_)}e.fill(),n&&e.restore()}setStrokeStyle_(e,n){e.strokeStyle=n[1],e.lineWidth=n[2],e.lineCap=n[3],e.lineJoin=n[4],e.miterLimit=n[5],e.lineDashOffset=n[7],e.setLineDash(n[6])}drawLabelWithPointPlacement_(e,n,r,i){const s=this.textStates[n],o=this.createLabel(e,n,i,r),a=this.strokeStates[r],l=this.pixelRatio,u=horizontalTextAlign(Array.isArray(e)?e[0]:e,s.textAlign||defaultTextAlign),c=TEXT_ALIGN[s.textBaseline||defaultTextBaseline],d=a&&a.lineWidth?a.lineWidth:0,h=o.width/l-2*s.scale[0],f=u*h+2*(.5-u)*d,p=c*o.height/l+2*(.5-c)*d;return{label:o,anchorX:f,anchorY:p}}execute_(e,n,r,i,s,o,a,l){const u=this.zIndexContext_;let c;this.pixelCoordinates_&&equals$2(r,this.renderedTransform_)?c=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),c=transform2D(this.coordinates,0,this.coordinates.length,2,r,this.pixelCoordinates_),setFromArray(this.renderedTransform_,r));let d=0;const h=i.length;let f=0,p,g,v,m,y,b,_,T,x,k,w,O,S,F=0,z=0,Y=null,ae=null;const j=this.coordinateCache_,M=this.viewRotation_,$=Math.round(Math.atan2(-r[1],r[0])*1e12)/1e12,oe={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:M},A=this.instructions!=i||this.overlaps?0:200;let V,D,le,ie;for(;d<h;){const re=i[d];switch(re[0]){case Instruction.BEGIN_GEOMETRY:V=re[1],ie=re[3],V.getGeometry()?a!==void 0&&!intersects(a,ie.getExtent())?d=re[2]+1:++d:d=re[2],u&&(u.zIndex=re[4]);break;case Instruction.BEGIN_PATH:F>A&&(this.fill_(e),F=0),z>A&&(e.stroke(),z=0),!F&&!z&&(e.beginPath(),y=NaN,b=NaN),++d;break;case Instruction.CIRCLE:f=re[1];const xe=c[f],Ie=c[f+1],_e=c[f+2],Ne=c[f+3],$e=_e-xe,Ue=Ne-Ie,At=Math.sqrt($e*$e+Ue*Ue);e.moveTo(xe+At,Ie),e.arc(xe,Ie,At,0,2*Math.PI,!0),++d;break;case Instruction.CLOSE_PATH:e.closePath(),++d;break;case Instruction.CUSTOM:f=re[1],p=re[2];const kt=re[3],En=re[4],Tn=re[5];oe.geometry=kt,oe.feature=V,d in j||(j[d]=[]);const bn=j[d];Tn?Tn(c,f,p,2,bn):(bn[0]=c[f],bn[1]=c[f+1],bn.length=2),u&&(u.zIndex=re[6]),En(bn,oe),++d;break;case Instruction.DRAW_IMAGE:f=re[1],p=re[2],x=re[3],g=re[4],v=re[5];let Lt=re[6];const vn=re[7],Et=re[8],jt=re[9],_n=re[10];let kn=re[11];const Pn=re[12];let Ce=re[13];m=re[14]||"declutter";const qe=re[15];if(!x&&re.length>=20){k=re[19],w=re[20],O=re[21],S=re[22];const $n=this.drawLabelWithPointPlacement_(k,w,O,S);x=$n.label,re[3]=x;const Hn=re[23];g=($n.anchorX-Hn)*this.pixelRatio,re[4]=g;const Bn=re[24];v=($n.anchorY-Bn)*this.pixelRatio,re[5]=v,Lt=x.height,re[6]=Lt,Ce=x.width,re[13]=Ce}let wn;re.length>25&&(wn=re[25]);let In,Rn,Un;re.length>17?(In=re[16],Rn=re[17],Un=re[18]):(In=defaultPadding,Rn=!1,Un=!1),_n&&$?kn+=M:!_n&&!$&&(kn-=M);let Cn=0;for(;f<p;f+=2){if(wn&&wn[Cn++]<Ce/this.pixelRatio)continue;const $n=this.calculateImageOrLabelDimensions_(x.width,x.height,c[f],c[f+1],Ce,Lt,g,v,Et,jt,kn,Pn,s,In,Rn||Un,V),Hn=[e,n,x,$n,vn,Rn?Y:null,Un?ae:null];if(l){let Bn,Nn,Vn;if(qe){const Sn=p-f;if(!qe[Sn]){qe[Sn]={args:Hn,declutterMode:m};continue}const Dn=qe[Sn];Bn=Dn.args,Nn=Dn.declutterMode,delete qe[Sn],Vn=getDeclutterBox(Bn)}let Yn,Wn;if(Bn&&(Nn!=="declutter"||!l.collides(Vn))&&(Yn=!0),(m!=="declutter"||!l.collides($n.declutterBox))&&(Wn=!0),Nn==="declutter"&&m==="declutter"){const Sn=Yn&&Wn;Yn=Sn,Wn=Sn}Yn&&(Nn!=="none"&&l.insert(Vn),this.replayImageOrLabel_.apply(this,Bn)),Wn&&(m!=="none"&&l.insert($n.declutterBox),this.replayImageOrLabel_.apply(this,Hn))}else this.replayImageOrLabel_.apply(this,Hn)}++d;break;case Instruction.DRAW_CHARS:const Mn=re[1],de=re[2],Ve=re[3],he=re[4];S=re[5];const ze=re[6],L=re[7],Fe=re[8];O=re[9];const Pt=re[10];k=re[11],w=re[12];const xn=[re[13],re[13]];m=re[14]||"declutter";const zn=re[15],Zn=this.textStates[w],Kn=Zn.font,Ln=[Zn.scale[0]*L,Zn.scale[1]*L];let hn;Kn in this.widths_?hn=this.widths_[Kn]:(hn={},this.widths_[Kn]=hn);const Fn=lineStringLength(c,Mn,de,2),Qn=Math.abs(Ln[0])*measureAndCacheTextWidth(Kn,k,hn);if(he||Qn<=Fn){const $n=this.textStates[w].textAlign,Hn=(Fn-Qn)*horizontalTextAlign(k,$n),Bn=drawTextOnPath(c,Mn,de,2,k,Hn,ze,Math.abs(Ln[0]),measureAndCacheTextWidth,Kn,hn,$?0:this.viewRotation_,zn);e:if(Bn){const Nn=[];let Vn,Yn,Wn,Sn,Dn;if(O)for(Vn=0,Yn=Bn.length;Vn<Yn;++Vn){Dn=Bn[Vn],Wn=Dn[4],Sn=this.createLabel(Wn,w,"",O),g=Dn[2]+(Ln[0]<0?-Pt:Pt),v=Ve*Sn.height+(.5-Ve)*2*Pt*Ln[1]/Ln[0]-Fe;const jn=this.calculateImageOrLabelDimensions_(Sn.width,Sn.height,Dn[0],Dn[1],Sn.width,Sn.height,g,v,0,0,Dn[3],xn,!1,defaultPadding,!1,V);if(l&&m==="declutter"&&l.collides(jn.declutterBox))break e;Nn.push([e,n,Sn,jn,1,null,null])}if(S)for(Vn=0,Yn=Bn.length;Vn<Yn;++Vn){Dn=Bn[Vn],Wn=Dn[4],Sn=this.createLabel(Wn,w,S,""),g=Dn[2],v=Ve*Sn.height-Fe;const jn=this.calculateImageOrLabelDimensions_(Sn.width,Sn.height,Dn[0],Dn[1],Sn.width,Sn.height,g,v,0,0,Dn[3],xn,!1,defaultPadding,!1,V);if(l&&m==="declutter"&&l.collides(jn.declutterBox))break e;Nn.push([e,n,Sn,jn,1,null,null])}l&&m!=="none"&&l.load(Nn.map(getDeclutterBox));for(let jn=0,tr=Nn.length;jn<tr;++jn)this.replayImageOrLabel_.apply(this,Nn[jn])}}++d;break;case Instruction.END_GEOMETRY:if(o!==void 0){V=re[1];const $n=o(V,ie,m);if($n)return $n}++d;break;case Instruction.FILL:A?F++:this.fill_(e),++d;break;case Instruction.MOVE_TO_LINE_TO:for(f=re[1],p=re[2],D=c[f],le=c[f+1],e.moveTo(D,le),y=D+.5|0,b=le+.5|0,f+=2;f<p;f+=2)D=c[f],le=c[f+1],_=D+.5|0,T=le+.5|0,(f==p-2||_!==y||T!==b)&&(e.lineTo(D,le),y=_,b=T);++d;break;case Instruction.SET_FILL_STYLE:Y=re,this.alignAndScaleFill_=re[2],F&&(this.fill_(e),F=0,z&&(e.stroke(),z=0)),e.fillStyle=re[1],++d;break;case Instruction.SET_STROKE_STYLE:ae=re,z&&(e.stroke(),z=0),this.setStrokeStyle_(e,re),++d;break;case Instruction.STROKE:A?z++:e.stroke(),++d;break;default:++d;break}}F&&this.fill_(e),z&&e.stroke()}execute(e,n,r,i,s,o){this.viewRotation_=i,this.execute_(e,n,r,this.instructions,s,void 0,void 0,o)}executeHitDetection(e,n,r,i,s){return this.viewRotation_=r,this.execute_(e,[e.canvas.width,e.canvas.height],n,this.hitDetectionInstructions,!0,i,s)}}const ALL=["Polygon","Circle","LineString","Image","Text","Default"],DECLUTTER=["Image","Text"],NON_DECLUTTER=ALL.filter(t=>!DECLUTTER.includes(t));class ExecutorGroup{constructor(e,n,r,i,s,o,a){this.maxExtent_=e,this.overlaps_=i,this.pixelRatio_=r,this.resolution_=n,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=create$2(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(s,a)}clip(e,n){const r=this.getClipCoords(n);e.beginPath(),e.moveTo(r[0],r[1]),e.lineTo(r[2],r[3]),e.lineTo(r[4],r[5]),e.lineTo(r[6],r[7]),e.clip()}createExecutors_(e,n){for(const r in e){let i=this.executorsByZIndex_[r];i===void 0&&(i={},this.executorsByZIndex_[r]=i);const s=e[r];for(const o in s){const a=s[o];i[o]=new Executor(this.resolution_,this.pixelRatio_,this.overlaps_,a,n)}}}hasExecutors(e){for(const n in this.executorsByZIndex_){const r=this.executorsByZIndex_[n];for(let i=0,s=e.length;i<s;++i)if(e[i]in r)return!0}return!1}forEachFeatureAtCoordinate(e,n,r,i,s,o){i=Math.round(i);const a=i*2+1,l=compose(this.hitDetectionTransform_,i+.5,i+.5,1/n,-1/n,-r,-e[0],-e[1]),u=!this.hitDetectionContext_;u&&(this.hitDetectionContext_=createCanvasContext2D(a,a,void 0,{willReadFrequently:!0}));const c=this.hitDetectionContext_;c.canvas.width!==a||c.canvas.height!==a?(c.canvas.width=a,c.canvas.height=a):u||c.clearRect(0,0,a,a);let d;this.renderBuffer_!==void 0&&(d=createEmpty(),extendCoordinate(d,e),buffer(d,n*(this.renderBuffer_+i),d));const h=getPixelIndexArray(i);let f;function p(T,x,k){const w=c.getImageData(0,0,a,a).data;for(let O=0,S=h.length;O<S;O++)if(w[h[O]]>0){if(!o||k==="none"||f!=="Image"&&f!=="Text"||o.includes(T)){const F=(h[O]-3)/4,z=i-F%a,Y=i-(F/a|0),ae=s(T,x,z*z+Y*Y);if(ae)return ae}c.clearRect(0,0,a,a);break}}const g=Object.keys(this.executorsByZIndex_).map(Number);g.sort(ascending);let v,m,y,b,_;for(v=g.length-1;v>=0;--v){const T=g[v].toString();for(y=this.executorsByZIndex_[T],m=ALL.length-1;m>=0;--m)if(f=ALL[m],b=y[f],b!==void 0&&(_=b.executeHitDetection(c,l,r,p,d),_))return _}}getClipCoords(e){const n=this.maxExtent_;if(!n)return null;const r=n[0],i=n[1],s=n[2],o=n[3],a=[r,i,r,o,s,o,s,i];return transform2D(a,0,8,2,e,a),a}isEmpty(){return isEmpty$1(this.executorsByZIndex_)}execute(e,n,r,i,s,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(a?descending:ascending),o=o||ALL;const u=ALL.length;for(let c=0,d=l.length;c<d;++c){const h=l[c].toString(),f=this.executorsByZIndex_[h];for(let p=0,g=o.length;p<g;++p){const v=o[p],m=f[v];if(m!==void 0){const y=a===null?void 0:m.getZIndexContext(),b=y?y.getContext():e,_=this.maxExtent_&&v!=="Image"&&v!=="Text";if(_&&(b.save(),this.clip(b,r)),!y||v==="Text"||v==="Image"?m.execute(b,n,r,i,s,a):y.pushFunction(T=>m.execute(T,n,r,i,s,a)),_&&b.restore(),y){y.offset();const T=l[c]*u+p;this.deferredZIndexContexts_[T]||(this.deferredZIndexContexts_[T]=[]),this.deferredZIndexContexts_[T].push(y)}}}}this.renderedContext_=e}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const e=this.deferredZIndexContexts_,n=Object.keys(e).map(Number).sort(ascending);for(let r=0,i=n.length;r<i;++r)e[n[r]].forEach(s=>{s.draw(this.renderedContext_),s.clear()}),e[n[r]].length=0}}const circlePixelIndexArrayCache={};function getPixelIndexArray(t){if(circlePixelIndexArrayCache[t]!==void 0)return circlePixelIndexArrayCache[t];const e=t*2+1,n=t*t,r=new Array(n+1);for(let s=0;s<=t;++s)for(let o=0;o<=t;++o){const a=s*s+o*o;if(a>n)break;let l=r[a];l||(l=[],r[a]=l),l.push(((t+s)*e+(t+o))*4+3),s>0&&l.push(((t-s)*e+(t+o))*4+3),o>0&&(l.push(((t+s)*e+(t-o))*4+3),s>0&&l.push(((t-s)*e+(t-o))*4+3))}const i=[];for(let s=0,o=r.length;s<o;++s)r[s]&&i.push(...r[s]);return circlePixelIndexArrayCache[t]=i,i}class CanvasImmediateRenderer extends VectorContext{constructor(e,n,r,i,s,o,a){super(),this.context_=e,this.pixelRatio_=n,this.extent_=r,this.transform_=i,this.transformRotation_=i?toFixed(Math.atan2(i[1],i[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=create$2()}drawImages_(e,n,r,i){if(!this.image_)return;const s=transform2D(e,n,r,i,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;this.imageOpacity_!=1&&(o.globalAlpha=l*this.imageOpacity_);let u=this.imageRotation_;this.transformRotation_===0&&(u-=this.viewRotation_),this.imageRotateWithView_&&(u+=this.viewRotation_);for(let c=0,d=s.length;c<d;c+=2){const h=s[c]-this.imageAnchorX_,f=s[c+1]-this.imageAnchorY_;if(u!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const p=h+this.imageAnchorX_,g=f+this.imageAnchorY_;compose(a,p,g,1,1,u,-p,-g),o.save(),o.transform.apply(o,a),o.translate(p,g),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.restore()}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,h,f,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(o.globalAlpha=l)}drawText_(e,n,r,i){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=transform2D(e,n,r,i,this.transform_,this.pixelCoordinates_),o=this.context_;let a=this.textRotation_;for(this.transformRotation_===0&&(a-=this.viewRotation_),this.textRotateWithView_&&(a+=this.viewRotation_);n<r;n+=i){const l=s[n]+this.textOffsetX_,u=s[n+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(o.save(),o.translate(l-this.textOffsetX_,u-this.textOffsetY_),o.rotate(a),o.translate(this.textOffsetX_,this.textOffsetY_),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.restore()):(this.textStrokeState_&&o.strokeText(this.text_,l,u),this.textFillState_&&o.fillText(this.text_,l,u))}}moveToLineTo_(e,n,r,i,s){const o=this.context_,a=transform2D(e,n,r,i,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);let l=a.length;s&&(l-=2);for(let u=2;u<l;u+=2)o.lineTo(a[u],a[u+1]);return s&&o.closePath(),r}drawRings_(e,n,r,i){for(let s=0,o=r.length;s<o;++s)n=this.moveToLineTo_(e,n,r[s],i,!0);return n}drawCircle(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!intersects(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const n=transformGeom2D(e,this.transform_,this.pixelCoordinates_),r=n[2]-n[0],i=n[3]-n[1],s=Math.sqrt(r*r+i*i),o=this.context_;o.beginPath(),o.arc(n[0],n[1],s,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}this.text_!==""&&this.drawText_(e.getCenter(),0,2,2)}}setStyle(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())}setTransform(e){this.transform_=e}drawGeometry(e){switch(e.getType()){case"Point":this.drawPoint(e);break;case"LineString":this.drawLineString(e);break;case"Polygon":this.drawPolygon(e);break;case"MultiPoint":this.drawMultiPoint(e);break;case"MultiLineString":this.drawMultiLineString(e);break;case"MultiPolygon":this.drawMultiPolygon(e);break;case"GeometryCollection":this.drawGeometryCollection(e);break;case"Circle":this.drawCircle(e);break}}drawFeature(e,n){const r=n.getGeometryFunction()(e);r&&(this.setStyle(n),this.drawGeometry(r))}drawGeometryCollection(e){const n=e.getGeometriesArray();for(let r=0,i=n.length;r<i;++r)this.drawGeometry(n[r])}drawPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const n=e.getFlatCoordinates(),r=e.getStride();this.image_&&this.drawImages_(n,0,n.length,r),this.text_!==""&&this.drawText_(n,0,n.length,r)}drawMultiPoint(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const n=e.getFlatCoordinates(),r=e.getStride();this.image_&&this.drawImages_(n,0,n.length,r),this.text_!==""&&this.drawText_(n,0,n.length,r)}drawLineString(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!intersects(this.extent_,e.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,r=e.getFlatCoordinates();n.beginPath(),this.moveToLineTo_(r,0,r.length,e.getStride(),!1),n.stroke()}if(this.text_!==""){const n=e.getFlatMidpoint();this.drawText_(n,0,2,2)}}}drawMultiLineString(e){this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const n=e.getExtent();if(intersects(this.extent_,n)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const r=this.context_,i=e.getFlatCoordinates();let s=0;const o=e.getEnds(),a=e.getStride();r.beginPath();for(let l=0,u=o.length;l<u;++l)s=this.moveToLineTo_(i,s,o[l],a,!1);r.stroke()}if(this.text_!==""){const r=e.getFlatMidpoints();this.drawText_(r,0,r.length,2)}}}drawPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!intersects(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const n=this.context_;n.beginPath(),this.drawRings_(e.getOrientedFlatCoordinates(),0,e.getEnds(),e.getStride()),this.fillState_&&n.fill(),this.strokeState_&&n.stroke()}if(this.text_!==""){const n=e.getFlatInteriorPoint();this.drawText_(n,0,2,2)}}}drawMultiPolygon(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!intersects(this.extent_,e.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const n=this.context_,r=e.getOrientedFlatCoordinates();let i=0;const s=e.getEndss(),o=e.getStride();n.beginPath();for(let a=0,l=s.length;a<l;++a){const u=s[a];i=this.drawRings_(r,i,u,o)}this.fillState_&&n.fill(),this.strokeState_&&n.stroke()}if(this.text_!==""){const n=e.getFlatInteriorPoints();this.drawText_(n,0,n.length,2)}}}setContextFillState_(e){const n=this.context_,r=this.contextFillState_;r?r.fillStyle!=e.fillStyle&&(r.fillStyle=e.fillStyle,n.fillStyle=e.fillStyle):(n.fillStyle=e.fillStyle,this.contextFillState_={fillStyle:e.fillStyle})}setContextStrokeState_(e){const n=this.context_,r=this.contextStrokeState_;r?(r.lineCap!=e.lineCap&&(r.lineCap=e.lineCap,n.lineCap=e.lineCap),equals$2(r.lineDash,e.lineDash)||n.setLineDash(r.lineDash=e.lineDash),r.lineDashOffset!=e.lineDashOffset&&(r.lineDashOffset=e.lineDashOffset,n.lineDashOffset=e.lineDashOffset),r.lineJoin!=e.lineJoin&&(r.lineJoin=e.lineJoin,n.lineJoin=e.lineJoin),r.lineWidth!=e.lineWidth&&(r.lineWidth=e.lineWidth,n.lineWidth=e.lineWidth),r.miterLimit!=e.miterLimit&&(r.miterLimit=e.miterLimit,n.miterLimit=e.miterLimit),r.strokeStyle!=e.strokeStyle&&(r.strokeStyle=e.strokeStyle,n.strokeStyle=e.strokeStyle)):(n.lineCap=e.lineCap,n.setLineDash(e.lineDash),n.lineDashOffset=e.lineDashOffset,n.lineJoin=e.lineJoin,n.lineWidth=e.lineWidth,n.miterLimit=e.miterLimit,n.strokeStyle=e.strokeStyle,this.contextStrokeState_={lineCap:e.lineCap,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle})}setContextTextState_(e){const n=this.context_,r=this.contextTextState_,i=e.textAlign?e.textAlign:defaultTextAlign;r?(r.font!=e.font&&(r.font=e.font,n.font=e.font),r.textAlign!=i&&(r.textAlign=i,n.textAlign=i),r.textBaseline!=e.textBaseline&&(r.textBaseline=e.textBaseline,n.textBaseline=e.textBaseline)):(n.font=e.font,n.textAlign=i,n.textBaseline=e.textBaseline,this.contextTextState_={font:e.font,textAlign:i,textBaseline:e.textBaseline})}setFillStrokeStyle(e,n){if(!e)this.fillState_=null;else{const r=e.getColor();this.fillState_={fillStyle:asColorLike(r||defaultFillStyle)}}if(!n)this.strokeState_=null;else{const r=n.getColor(),i=n.getLineCap(),s=n.getLineDash(),o=n.getLineDashOffset(),a=n.getLineJoin(),l=n.getWidth(),u=n.getMiterLimit(),c=s||defaultLineDash;this.strokeState_={lineCap:i!==void 0?i:defaultLineCap,lineDash:this.pixelRatio_===1?c:c.map(d=>d*this.pixelRatio_),lineDashOffset:(o||defaultLineDashOffset)*this.pixelRatio_,lineJoin:a!==void 0?a:defaultLineJoin,lineWidth:(l!==void 0?l:defaultLineWidth)*this.pixelRatio_,miterLimit:u!==void 0?u:defaultMiterLimit,strokeStyle:asColorLike(r||defaultStrokeStyle)}}}setImageStyle(e){let n;if(!e||!(n=e.getSize())){this.image_=null;return}const r=e.getPixelRatio(this.pixelRatio_),i=e.getAnchor(),s=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*r,this.imageAnchorY_=i[1]*r,this.imageHeight_=n[1]*r,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const o=e.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/r,o[1]*this.pixelRatio_/r],this.imageWidth_=n[0]*r}setTextStyle(e){if(!e)this.text_="";else{const n=e.getFill();if(!n)this.textFillState_=null;else{const f=n.getColor();this.textFillState_={fillStyle:asColorLike(f||defaultFillStyle)}}const r=e.getStroke();if(!r)this.textStrokeState_=null;else{const f=r.getColor(),p=r.getLineCap(),g=r.getLineDash(),v=r.getLineDashOffset(),m=r.getLineJoin(),y=r.getWidth(),b=r.getMiterLimit();this.textStrokeState_={lineCap:p!==void 0?p:defaultLineCap,lineDash:g||defaultLineDash,lineDashOffset:v||defaultLineDashOffset,lineJoin:m!==void 0?m:defaultLineJoin,lineWidth:y!==void 0?y:defaultLineWidth,miterLimit:b!==void 0?b:defaultMiterLimit,strokeStyle:asColorLike(f||defaultStrokeStyle)}}const i=e.getFont(),s=e.getOffsetX(),o=e.getOffsetY(),a=e.getRotateWithView(),l=e.getRotation(),u=e.getScaleArray(),c=e.getText(),d=e.getTextAlign(),h=e.getTextBaseline();this.textState_={font:i!==void 0?i:defaultFont,textAlign:d!==void 0?d:defaultTextAlign,textBaseline:h!==void 0?h:defaultTextBaseline},this.text_=c!==void 0?Array.isArray(c)?c.reduce((f,p,g)=>f+=g%2?" ":p,""):c:"",this.textOffsetX_=s!==void 0?this.pixelRatio_*s:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*u[0],this.pixelRatio_*u[1]]}}}const HIT_DETECT_RESOLUTION=.5;function createHitDetectionImageData(t,e,n,r,i,s,o,a,l){const u=i,c=t[0]*HIT_DETECT_RESOLUTION,d=t[1]*HIT_DETECT_RESOLUTION,h=createCanvasContext2D(c,d);h.imageSmoothingEnabled=!1;const f=h.canvas,p=new CanvasImmediateRenderer(h,HIT_DETECT_RESOLUTION,i,null,o,a,null),g=n.length,v=Math.floor((256*256*256-1)/g),m={};for(let b=1;b<=g;++b){const _=n[b-1],T=_.getStyleFunction()||r;if(!T)continue;let x=T(_,s);if(!x)continue;Array.isArray(x)||(x=[x]);const w=(b*v).toString(16).padStart(7,"#00000");for(let O=0,S=x.length;O<S;++O){const F=x[O],z=F.getGeometryFunction()(_);if(!z||!intersects(u,z.getExtent()))continue;const Y=F.clone(),ae=Y.getFill();ae&&ae.setColor(w);const j=Y.getStroke();j&&(j.setColor(w),j.setLineDash(null)),Y.setText(void 0);const M=F.getImage();if(M){const V=M.getImageSize();if(!V)continue;const D=createCanvasContext2D(V[0],V[1],void 0,{alpha:!1}),le=D.canvas;D.fillStyle=w,D.fillRect(0,0,le.width,le.height),Y.setImage(new Icon({img:le,anchor:M.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:M.getOrigin(),opacity:1,size:M.getSize(),scale:M.getScale(),rotation:M.getRotation(),rotateWithView:M.getRotateWithView()}))}const $=Y.getZIndex()||0;let oe=m[$];oe||(oe={},m[$]=oe,oe.Polygon=[],oe.Circle=[],oe.LineString=[],oe.Point=[]);const A=z.getType();if(A==="GeometryCollection"){const V=z.getGeometriesArrayRecursive();for(let D=0,le=V.length;D<le;++D){const ie=V[D];oe[ie.getType().replace("Multi","")].push(ie,Y)}}else oe[A.replace("Multi","")].push(z,Y)}}const y=Object.keys(m).map(Number).sort(ascending);for(let b=0,_=y.length;b<_;++b){const T=m[y[b]];for(const x in T){const k=T[x];for(let w=0,O=k.length;w<O;w+=2){p.setStyle(k[w+1]);for(let S=0,F=e.length;S<F;++S)p.setTransform(e[S]),p.drawGeometry(k[w])}}}return h.getImageData(0,0,f.width,f.height)}function hitDetect(t,e,n){const r=[];if(n){const i=Math.floor(Math.round(t[0])*HIT_DETECT_RESOLUTION),s=Math.floor(Math.round(t[1])*HIT_DETECT_RESOLUTION),o=(clamp(i,0,n.width-1)+clamp(s,0,n.height-1)*n.width)*4,a=n.data[o],l=n.data[o+1],c=n.data[o+2]+256*(l+256*a),d=Math.floor((256*256*256-1)/e.length);c&&c%d===0&&r.push(e[c/d-1])}return r}const SIMPLIFY_TOLERANCE=.5,GEOMETRY_RENDERERS={Point:renderPointGeometry,LineString:renderLineStringGeometry,Polygon:renderPolygonGeometry,MultiPoint:renderMultiPointGeometry,MultiLineString:renderMultiLineStringGeometry,MultiPolygon:renderMultiPolygonGeometry,GeometryCollection:renderGeometryCollectionGeometry,Circle:renderCircleGeometry};function defaultOrder(t,e){return parseInt(getUid(t),10)-parseInt(getUid(e),10)}function getSquaredTolerance(t,e){const n=getTolerance(t,e);return n*n}function getTolerance(t,e){return SIMPLIFY_TOLERANCE*t/e}function renderCircleGeometry(t,e,n,r,i){const s=n.getFill(),o=n.getStroke();if(s||o){const l=t.getBuilder(n.getZIndex(),"Circle");l.setFillStrokeStyle(s,o),l.drawCircle(e,r,i)}const a=n.getText();if(a&&a.getText()){const l=t.getBuilder(n.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,r)}}function renderFeature(t,e,n,r,i,s,o,a){const l=[],u=n.getImage();if(u){let h=!0;const f=u.getImageState();f==ImageState.LOADED||f==ImageState.ERROR?h=!1:f==ImageState.IDLE&&u.load(),h&&l.push(u.ready())}const c=n.getFill();c&&c.loading()&&l.push(c.ready());const d=l.length>0;return d&&Promise.all(l).then(()=>i(null)),renderFeatureInternal(t,e,n,r,s,o,a),d}function renderFeatureInternal(t,e,n,r,i,s,o){const a=n.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(r,i);if(n.getRenderer())renderGeometry(t,l,n,e,o);else{const c=GEOMETRY_RENDERERS[l.getType()];c(t,l,n,e,o,s)}}function renderGeometry(t,e,n,r,i){if(e.getType()=="GeometryCollection"){const o=e.getGeometries();for(let a=0,l=o.length;a<l;++a)renderGeometry(t,o[a],n,r,i);return}t.getBuilder(n.getZIndex(),"Default").drawCustom(e,r,n.getRenderer(),n.getHitDetectionRenderer(),i)}function renderGeometryCollectionGeometry(t,e,n,r,i,s){const o=e.getGeometriesArray();let a,l;for(a=0,l=o.length;a<l;++a){const u=GEOMETRY_RENDERERS[o[a].getType()];u(t,o[a],n,r,i,s)}}function renderLineStringGeometry(t,e,n,r,i){const s=n.getStroke();if(s){const a=t.getBuilder(n.getZIndex(),"LineString");a.setFillStrokeStyle(null,s),a.drawLineString(e,r,i)}const o=n.getText();if(o&&o.getText()){const a=t.getBuilder(n.getZIndex(),"Text");a.setTextStyle(o),a.drawText(e,r,i)}}function renderMultiLineStringGeometry(t,e,n,r,i){const s=n.getStroke();if(s){const a=t.getBuilder(n.getZIndex(),"LineString");a.setFillStrokeStyle(null,s),a.drawMultiLineString(e,r,i)}const o=n.getText();if(o&&o.getText()){const a=t.getBuilder(n.getZIndex(),"Text");a.setTextStyle(o),a.drawText(e,r,i)}}function renderMultiPolygonGeometry(t,e,n,r,i){const s=n.getFill(),o=n.getStroke();if(o||s){const l=t.getBuilder(n.getZIndex(),"Polygon");l.setFillStrokeStyle(s,o),l.drawMultiPolygon(e,r,i)}const a=n.getText();if(a&&a.getText()){const l=t.getBuilder(n.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,r,i)}}function renderPointGeometry(t,e,n,r,i,s){const o=n.getImage(),a=n.getText(),l=a&&a.getText(),u=s&&o&&l?{}:void 0;if(o){if(o.getImageState()!=ImageState.LOADED)return;const c=t.getBuilder(n.getZIndex(),"Image");c.setImageStyle(o,u),c.drawPoint(e,r,i)}if(l){const c=t.getBuilder(n.getZIndex(),"Text");c.setTextStyle(a,u),c.drawText(e,r,i)}}function renderMultiPointGeometry(t,e,n,r,i,s){const o=n.getImage(),a=o&&o.getOpacity()!==0,l=n.getText(),u=l&&l.getText(),c=s&&a&&u?{}:void 0;if(a){if(o.getImageState()!=ImageState.LOADED)return;const d=t.getBuilder(n.getZIndex(),"Image");d.setImageStyle(o,c),d.drawMultiPoint(e,r,i)}if(u){const d=t.getBuilder(n.getZIndex(),"Text");d.setTextStyle(l,c),d.drawText(e,r,i)}}function renderPolygonGeometry(t,e,n,r,i){const s=n.getFill(),o=n.getStroke();if(s||o){const l=t.getBuilder(n.getZIndex(),"Polygon");l.setFillStrokeStyle(s,o),l.drawPolygon(e,r,i)}const a=n.getText();if(a&&a.getText()){const l=t.getBuilder(n.getZIndex(),"Text");l.setTextStyle(a),l.drawText(e,r,i)}}class CanvasVectorLayerRenderer extends CanvasLayerRenderer{constructor(e){super(e),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipped_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=createEmpty(),this.wrappedRenderedExtent_=createEmpty(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(e,n,r){const i=n.extent,s=n.viewState,o=s.center,a=s.resolution,l=s.projection,u=s.rotation,c=l.getExtent(),d=this.getLayer().getSource(),h=this.getLayer().getDeclutter(),f=n.pixelRatio,p=n.viewHints,g=!(p[ViewHint.ANIMATING]||p[ViewHint.INTERACTING]),v=this.context,m=Math.round(getWidth(i)/a*f),y=Math.round(getHeight(i)/a*f),b=d.getWrapX()&&l.canWrapX(),_=b?getWidth(c):null,T=b?Math.ceil((i[2]-c[2])/_)+1:1;let x=b?Math.floor((i[0]-c[0])/_):0;do{let k=this.getRenderTransform(o,a,0,f,m,y,x*_);n.declutter&&(k=k.slice(0)),e.execute(v,[v.canvas.width,v.canvas.height],k,u,g,r===void 0?ALL:r?DECLUTTER:NON_DECLUTTER,r?h&&n.declutter[h]:void 0)}while(++x<T)}setDrawContext_(){this.opacity_!==1&&(this.targetContext_=this.context,this.context=createCanvasContext2D(this.context.canvas.width,this.context.canvas.height,canvasPool$1))}resetDrawContext_(){if(this.opacity_!==1){const e=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=e,releaseCanvas$1(this.context),canvasPool$1.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(e){!this.replayGroup_||!this.getLayer().getDeclutter()||this.renderWorlds(this.replayGroup_,e,!0)}renderDeferredInternal(e){this.replayGroup_&&(this.replayGroup_.renderDeferred(),this.clipped_&&this.context.restore(),this.resetDrawContext_())}renderFrame(e,n){const r=e.layerStatesArray[e.layerIndex];this.opacity_=r.opacity;const i=e.viewState;this.prepareContainer(e,n);const s=this.context,o=this.replayGroup_;let a=o&&!o.isEmpty();if(!a&&!(this.getLayer().hasListener(RenderEventType.PRERENDER)||this.getLayer().hasListener(RenderEventType.POSTRENDER)))return null;if(this.setDrawContext_(),this.preRender(s,e),i.projection,this.clipped_=!1,a&&r.extent&&this.clipping){const l=fromUserExtent(r.extent);a=intersects(l,e.extent),this.clipped_=a&&!containsExtent(l,e.extent),this.clipped_&&this.clipUnrotated(s,e,l)}return a&&this.renderWorlds(o,e,this.getLayer().getDeclutter()?!1:void 0),!e.declutter&&this.clipped_&&s.restore(),this.postRender(s,e),this.renderedRotation_!==i.rotation&&(this.renderedRotation_=i.rotation,this.hitDetectionImageData_=null),e.declutter||this.resetDrawContext_(),this.container}getFeatures(e){return new Promise(n=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const r=this.frameState.size.slice(),i=this.renderedCenter_,s=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,u=this.getLayer(),c=[],d=r[0]*HIT_DETECT_RESOLUTION,h=r[1]*HIT_DETECT_RESOLUTION;c.push(this.getRenderTransform(i,s,o,HIT_DETECT_RESOLUTION,d,h,0).slice());const f=u.getSource(),p=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!containsExtent(p,l)){let g=l[0];const v=getWidth(p);let m=0,y;for(;g<p[0];)--m,y=v*m,c.push(this.getRenderTransform(i,s,o,HIT_DETECT_RESOLUTION,d,h,y).slice()),g+=v;for(m=0,g=l[2];g>p[2];)++m,y=v*m,c.push(this.getRenderTransform(i,s,o,HIT_DETECT_RESOLUTION,d,h,y).slice()),g-=v}this.hitDetectionImageData_=createHitDetectionImageData(r,c,this.renderedFeatures_,u.getStyleFunction(),l,s,o,getSquaredTolerance(s,this.renderedPixelRatio_))}n(hitDetect(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,n,r,i,s){if(!this.replayGroup_)return;const o=n.viewState.resolution,a=n.viewState.rotation,l=this.getLayer(),u={},c=function(h,f,p){const g=getUid(h),v=u[g];if(v){if(v!==!0&&p<v.distanceSq){if(p===0)return u[g]=!0,s.splice(s.lastIndexOf(v),1),i(h,l,f);v.geometry=f,v.distanceSq=p}}else{if(p===0)return u[g]=!0,i(h,l,f);s.push(u[g]={feature:h,layer:l,geometry:f,distanceSq:p,callback:i})}},d=this.getLayer().getDeclutter();return this.replayGroup_.forEachFeatureAtCoordinate(e,o,a,r,c,d?n.declutter[d].all().map(h=>h.value):null)}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const n=this.getLayer(),r=n.getSource();if(!r)return!1;const i=e.viewHints[ViewHint.ANIMATING],s=e.viewHints[ViewHint.INTERACTING],o=n.getUpdateWhileAnimating(),a=n.getUpdateWhileInteracting();if(this.ready&&!o&&i||!a&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=e.extent,u=e.viewState,c=u.projection,d=u.resolution,h=e.pixelRatio,f=n.getRevision(),p=n.getRenderBuffer();let g=n.getRenderOrder();g===void 0&&(g=defaultOrder);const v=u.center.slice(),m=buffer(l,p*d),y=m.slice(),b=[m.slice()],_=c.getExtent();if(r.getWrapX()&&c.canWrapX()&&!containsExtent(_,e.extent)){const ae=getWidth(_),j=Math.max(getWidth(m)/2,ae);m[0]=_[0]-j,m[2]=_[2]+j,wrapX$1(v,c);const M=wrapX$2(b[0],c);M[0]<_[0]&&M[2]<_[2]?b.push([M[0]+ae,M[1],M[2]+ae,M[3]]):M[0]>_[0]&&M[2]>_[2]&&b.push([M[0]-ae,M[1],M[2]-ae,M[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==g&&this.renderedFrameDeclutter_===!!e.declutter&&containsExtent(this.wrappedRenderedExtent_,m))return equals$2(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=v,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const T=new BuilderGroup(getTolerance(d,h),m,d,h);let x;for(let ae=0,j=b.length;ae<j;++ae)r.loadFeatures(b[ae],d,c);const k=getSquaredTolerance(d,h);let w=!0;const O=(ae,j)=>{let M;const $=ae.getStyleFunction()||n.getStyleFunction();if($&&(M=$(ae,d)),M){const oe=this.renderFeature(ae,k,M,T,x,this.getLayer().getDeclutter(),j);w=w&&!oe}},S=toUserExtent(m),F=r.getFeaturesInExtent(S);g&&F.sort(g);for(let ae=0,j=F.length;ae<j;++ae)O(F[ae],ae);this.renderedFeatures_=F,this.ready=w;const z=T.finish(),Y=new ExecutorGroup(m,d,h,r.getOverlaps(),z,n.getRenderBuffer(),!!e.declutter);return this.renderedResolution_=d,this.renderedRevision_=f,this.renderedRenderOrder_=g,this.renderedFrameDeclutter_=!!e.declutter,this.renderedExtent_=y,this.wrappedRenderedExtent_=m,this.renderedCenter_=v,this.renderedProjection_=c,this.renderedPixelRatio_=h,this.replayGroup_=Y,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(e,n,r,i,s,o,a){if(!r)return!1;let l=!1;if(Array.isArray(r))for(let u=0,c=r.length;u<c;++u)l=renderFeature(i,e,r[u],n,this.boundHandleStyleImageChange_,s,o,a)||l;else l=renderFeature(i,e,r,n,this.boundHandleStyleImageChange_,s,o,a);return l}}class VectorLayer extends BaseVectorLayer{constructor(e){super(e)}createRenderer(){return new CanvasVectorLayerRenderer(this)}}const DrawEventType={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class DrawEvent extends BaseEvent{constructor(e,n){super(e),this.feature=n}}function getTraceTargets(t,e){const n=[];for(let r=0;r<e.length;++r){const s=e[r].getGeometry();appendGeometryTraceTargets(t,s,n)}return n}function getSquaredDistance(t,e){return squaredDistance$1(t[0],t[1],e[0],e[1])}function getCoordinate(t,e){const n=t.length;return e<0?t[e+n]:e>=n?t[e-n]:t[e]}function getCumulativeSquaredDistance(t,e,n){let r,i;e<n?(r=e,i=n):(r=n,i=e);const s=Math.ceil(r),o=Math.floor(i);if(s>o){const l=interpolateCoordinate(t,r),u=interpolateCoordinate(t,i);return getSquaredDistance(l,u)}let a=0;if(r<s){const l=interpolateCoordinate(t,r),u=getCoordinate(t,s);a+=getSquaredDistance(l,u)}if(o<i){const l=getCoordinate(t,o),u=interpolateCoordinate(t,i);a+=getSquaredDistance(l,u)}for(let l=s;l<o-1;++l){const u=getCoordinate(t,l),c=getCoordinate(t,l+1);a+=getSquaredDistance(u,c)}return a}function appendGeometryTraceTargets(t,e,n){if(e instanceof LineString){appendTraceTarget(t,e.getCoordinates(),!1,n);return}if(e instanceof MultiLineString){const r=e.getCoordinates();for(let i=0,s=r.length;i<s;++i)appendTraceTarget(t,r[i],!1,n);return}if(e instanceof Polygon){const r=e.getCoordinates();for(let i=0,s=r.length;i<s;++i)appendTraceTarget(t,r[i],!0,n);return}if(e instanceof MultiPolygon){const r=e.getCoordinates();for(let i=0,s=r.length;i<s;++i){const o=r[i];for(let a=0,l=o.length;a<l;++a)appendTraceTarget(t,o[a],!0,n)}return}if(e instanceof GeometryCollection){const r=e.getGeometries();for(let i=0;i<r.length;++i)appendGeometryTraceTargets(t,r[i],n);return}}const sharedUpdateInfo={index:-1,endIndex:NaN};function getTraceTargetUpdate(t,e,n,r){const i=t[0],s=t[1];let o=1/0,a=-1,l=NaN;for(let d=0;d<e.targets.length;++d){const h=e.targets[d],f=h.coordinates;let p=1/0,g;for(let v=0;v<f.length-1;++v){const m=f[v],y=f[v+1],b=getPointSegmentRelationship(i,s,m,y);b.squaredDistance<p&&(p=b.squaredDistance,g=v+b.along)}p<o&&(o=p,h.ring&&e.targetIndex===d&&(h.endIndex>h.startIndex?g<h.startIndex&&(g+=f.length):h.endIndex<h.startIndex&&g>h.startIndex&&(g-=f.length)),l=g,a=d)}const u=e.targets[a];let c=u.ring;if(e.targetIndex===a&&c){const d=interpolateCoordinate(u.coordinates,l),h=n.getPixelFromCoordinate(d);distance(h,e.startPx)>r&&(c=!1)}if(c){const d=u.coordinates,h=d.length,f=u.startIndex,p=l;if(f<p){const g=getCumulativeSquaredDistance(d,f,p);getCumulativeSquaredDistance(d,f,p-h)<g&&(l-=h)}else{const g=getCumulativeSquaredDistance(d,f,p);getCumulativeSquaredDistance(d,f,p+h)<g&&(l+=h)}}return sharedUpdateInfo.index=a,sharedUpdateInfo.endIndex=l,sharedUpdateInfo}function appendTraceTarget(t,e,n,r){const i=t[0],s=t[1];for(let o=0,a=e.length-1;o<a;++o){const l=e[o],u=e[o+1],c=getPointSegmentRelationship(i,s,l,u);if(c.squaredDistance===0){const d=o+c.along;r.push({coordinates:e,ring:n,startIndex:d,endIndex:d});return}}}const sharedRel={along:0,squaredDistance:0};function getPointSegmentRelationship(t,e,n,r){const i=n[0],s=n[1],o=r[0],a=r[1],l=o-i,u=a-s;let c=0,d=i,h=s;return(l!==0||u!==0)&&(c=clamp(((t-i)*l+(e-s)*u)/(l*l+u*u),0,1),d+=l*c,h+=u*c),sharedRel.along=c,sharedRel.squaredDistance=toFixed(squaredDistance$1(t,e,d,h),10),sharedRel}function interpolateCoordinate(t,e){const n=t.length;let r=Math.floor(e);const i=e-r;r>=n?r-=n:r<0&&(r+=n);let s=r+1;s>=n&&(s-=n);const o=t[r],a=o[0],l=o[1],u=t[s],c=u[0]-a,d=u[1]-l;return[a+c*i,l+d*i]}class Draw extends PointerInteraction{constructor(e){const n=e;n.stopDown||(n.stopDown=FALSE),super(n),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=e.source?e.source:null,this.features_=e.features?e.features:null,this.snapTolerance_=e.snapTolerance?e.snapTolerance:12,this.type_=e.type,this.mode_=getMode(this.type_),this.stopClick_=!!e.stopClick,this.minPoints_=e.minPoints?e.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:e.maxPoints?e.maxPoints:1/0,this.finishCondition_=e.finishCondition?e.finishCondition:TRUE,this.geometryLayout_=e.geometryLayout?e.geometryLayout:"XY";let r=e.geometryFunction;if(!r){const i=this.mode_;if(i==="Circle")r=(s,o,a)=>{const l=o||new Circle([NaN,NaN]),u=fromUserCoordinate(s[0]),c=squaredDistance(u,fromUserCoordinate(s[s.length-1]));return l.setCenterAndRadius(u,Math.sqrt(c),this.geometryLayout_),l};else{let s;i==="Point"?s=Point:i==="LineString"?s=LineString:i==="Polygon"&&(s=Polygon),r=(o,a,l)=>(a?i==="Polygon"?o[0].length?a.setCoordinates([o[0].concat([o[0][0]])],this.geometryLayout_):a.setCoordinates([],this.geometryLayout_):a.setCoordinates(o,this.geometryLayout_):a=new s(o,this.geometryLayout_),a)}}this.geometryFunction_=r,this.dragVertexDelay_=e.dragVertexDelay!==void 0?e.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,this.overlay_=new VectorLayer({source:new VectorSource({useSpatialIndex:!1,wrapX:e.wrapX?e.wrapX:!1}),style:e.style?e.style:getDefaultStyleFunction(),updateWhileInteracting:!0}),this.geometryName_=e.geometryName,this.condition_=e.condition?e.condition:noModifierKeys,this.freehandCondition_,e.freehand?this.freehandCondition_=always$1:this.freehandCondition_=e.freehandCondition?e.freehandCondition:shiftKeyOnly,this.traceCondition_,this.setTrace(e.trace||!1),this.traceState_={active:!1},this.traceSource_=e.traceSource||e.source||null,this.addChangeListener(InteractionProperty.ACTIVE,this.updateState_)}setTrace(e){let n;e?e===!0?n=always$1:n=e:n=never,this.traceCondition_=n}setMap(e){super.setMap(e),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(e){e.originalEvent.type===EventType.CONTEXTMENU&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(e);let n=e.type===MapBrowserEventType.POINTERMOVE,r=!0;return!this.freehand_&&this.lastDragTime_&&e.type===MapBrowserEventType.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,n=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===MapBrowserEventType.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(e.coordinate),r=!1):this.freehand_&&e.type===MapBrowserEventType.POINTERDOWN?r=!1:n&&this.getPointerCount()<2?(r=e.type===MapBrowserEventType.POINTERMOVE,r&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):(e.originalEvent.pointerType==="mouse"||e.type===MapBrowserEventType.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(e)):e.type===MapBrowserEventType.DBLCLICK&&(r=!1),super.handleEvent(e)&&r}handleDownEvent(e){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=e.pixel,this.finishCoordinate_||this.startDrawing_(e.coordinate),!0):this.condition_(e)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(()=>{this.handlePointerMove_(new MapBrowserEvent(MapBrowserEventType.POINTERMOVE,e.map,e.originalEvent,!1,e.frameState))},this.dragVertexDelay_),this.downPx_=e.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(e){if(!this.traceSource_||!this.traceCondition_(e))return;if(this.traceState_.active){this.deactivateTrace_();return}const n=this.getMap(),r=n.getCoordinateFromPixel([e.pixel[0]-this.snapTolerance_,e.pixel[1]+this.snapTolerance_]),i=n.getCoordinateFromPixel([e.pixel[0]+this.snapTolerance_,e.pixel[1]-this.snapTolerance_]),s=boundingExtent([r,i]),o=this.traceSource_.getFeaturesInExtent(s);if(o.length===0)return;const a=getTraceTargets(e.coordinate,o);a.length&&(this.traceState_={active:!0,startPx:e.pixel.slice(),targets:a,targetIndex:-1})}addOrRemoveTracedCoordinates_(e,n){const r=e.startIndex<=e.endIndex,i=e.startIndex<=n;r===i?r&&n>e.endIndex||!r&&n<e.endIndex?this.addTracedCoordinates_(e,e.endIndex,n):(r&&n<e.endIndex||!r&&n>e.endIndex)&&this.removeTracedCoordinates_(n,e.endIndex):(this.removeTracedCoordinates_(e.startIndex,e.endIndex),this.addTracedCoordinates_(e,e.startIndex,n))}removeTracedCoordinates_(e,n){if(e===n)return;let r=0;if(e<n){const i=Math.ceil(e);let s=Math.floor(n);s===n&&(s-=1),r=s-i+1}else{const i=Math.floor(e);let s=Math.ceil(n);s===n&&(s+=1),r=i-s+1}r>0&&this.removeLastPoints_(r)}addTracedCoordinates_(e,n,r){if(n===r)return;const i=[];if(n<r){const s=Math.ceil(n);let o=Math.floor(r);o===r&&(o-=1);for(let a=s;a<=o;++a)i.push(getCoordinate(e.coordinates,a))}else{const s=Math.floor(n);let o=Math.ceil(r);o===r&&(o+=1);for(let a=s;a>=o;--a)i.push(getCoordinate(e.coordinates,a))}i.length&&this.appendCoordinates(i)}updateTrace_(e){const n=this.traceState_;if(!n.active||n.targetIndex===-1&&distance(n.startPx,e.pixel)<this.snapTolerance_)return;const r=getTraceTargetUpdate(e.coordinate,n,this.getMap(),this.snapTolerance_);if(n.targetIndex!==r.index){if(n.targetIndex!==-1){const l=n.targets[n.targetIndex];this.removeTracedCoordinates_(l.startIndex,l.endIndex)}const a=n.targets[r.index];this.addTracedCoordinates_(a,a.startIndex,r.endIndex)}else{const a=n.targets[n.targetIndex];this.addOrRemoveTracedCoordinates_(a,r.endIndex)}n.targetIndex=r.index;const i=n.targets[n.targetIndex];i.endIndex=r.endIndex;const s=interpolateCoordinate(i.coordinates,i.endIndex),o=this.getMap().getPixelFromCoordinate(s);e.coordinate=s,e.pixel=[Math.round(o[0]),Math.round(o[1])]}handleUpEvent(e){let n=!0;if(this.getPointerCount()===0){this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(e);const r=this.traceState_.active;if(this.toggleTraceState_(e),this.shouldHandle_){const i=!this.finishCoordinate_;i&&this.startDrawing_(e.coordinate),!i&&this.freehand_?this.finishDrawing():!this.freehand_&&(!i||this.mode_==="Point")&&(this.atFinish_(e.pixel,r)?this.finishCondition_(e)&&this.finishDrawing():this.addToDrawing_(e.coordinate)),n=!1}else this.freehand_&&this.abortDrawing()}return!n&&this.stopClick_&&e.preventDefault(),n}handlePointerMove_(e){if(this.pointerType_=e.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const n=this.downPx_,r=e.pixel,i=n[0]-r[0],s=n[1]-r[1],o=i*i+s*s;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}if(!this.finishCoordinate_){this.createOrUpdateSketchPoint_(e.coordinate.slice());return}this.updateTrace_(e),this.modifyDrawing_(e.coordinate)}atFinish_(e,n){let r=!1;if(this.sketchFeature_){let i=!1,s=[this.finishCoordinate_];const o=this.mode_;if(o==="Point")r=!0;else if(o==="Circle")r=this.sketchCoords_.length===2;else if(o==="LineString")i=!n&&this.sketchCoords_.length>this.minPoints_;else if(o==="Polygon"){const a=this.sketchCoords_;i=a[0].length>this.minPoints_,s=[a[0][0],a[0][a[0].length-2]],n?s=[a[0][0]]:s=[a[0][0],a[0][a[0].length-2]]}if(i){const a=this.getMap();for(let l=0,u=s.length;l<u;l++){const c=s[l],d=a.getPixelFromCoordinate(c),h=e[0]-d[0],f=e[1]-d[1],p=this.freehand_?1:this.snapTolerance_;if(r=Math.sqrt(h*h+f*f)<=p,r){this.finishCoordinate_=c;break}}}}return r}createOrUpdateSketchPoint_(e){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(e):(this.sketchPoint_=new Feature(new Point(e)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(e){this.sketchLine_||(this.sketchLine_=new Feature);const n=e.getLinearRing(0);let r=this.sketchLine_.getGeometry();r?(r.setFlatCoordinates(n.getLayout(),n.getFlatCoordinates()),r.changed()):(r=new LineString(n.getFlatCoordinates(),n.getLayout()),this.sketchLine_.setGeometry(r))}startDrawing_(e){const n=this.getMap().getView().getProjection(),r=getStrideForLayout(this.geometryLayout_);for(;e.length<r;)e.push(0);this.finishCoordinate_=e,this.mode_==="Point"?this.sketchCoords_=e.slice():this.mode_==="Polygon"?(this.sketchCoords_=[[e.slice(),e.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[e.slice(),e.slice()],this.sketchLineCoords_&&(this.sketchLine_=new Feature(new LineString(this.sketchLineCoords_)));const i=this.geometryFunction_(this.sketchCoords_,void 0,n);this.sketchFeature_=new Feature,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART,this.sketchFeature_))}modifyDrawing_(e){const n=this.getMap(),r=this.sketchFeature_.getGeometry(),i=n.getView().getProjection(),s=getStrideForLayout(this.geometryLayout_);let o,a;for(;e.length<s;)e.push(0);this.mode_==="Point"?a=this.sketchCoords_:this.mode_==="Polygon"?(o=this.sketchCoords_[0],a=o[o.length-1],this.atFinish_(n.getPixelFromCoordinate(e))&&(e=this.finishCoordinate_.slice())):(o=this.sketchCoords_,a=o[o.length-1]),a[0]=e[0],a[1]=e[1],this.geometryFunction_(this.sketchCoords_,r,i),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(e),r.getType()==="Polygon"&&this.mode_!=="Polygon"?this.createOrUpdateCustomSketchLine_(r):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(e){const n=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection();let i,s;const o=this.mode_;return o==="LineString"||o==="Circle"?(this.finishCoordinate_=e.slice(),s=this.sketchCoords_,s.length>=this.maxPoints_&&(this.freehand_?s.pop():i=!0),s.push(e.slice()),this.geometryFunction_(s,n,r)):o==="Polygon"&&(s=this.sketchCoords_[0],s.length>=this.maxPoints_&&(this.freehand_?s.pop():i=!0),s.push(e.slice()),i&&(this.finishCoordinate_=s[0]),this.geometryFunction_(this.sketchCoords_,n,r)),this.createOrUpdateSketchPoint_(e.slice()),this.updateSketchFeatures_(),i?this.finishDrawing():this.sketchFeature_}removeLastPoints_(e){if(!this.sketchFeature_)return;const n=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection(),i=this.mode_;for(let s=0;s<e;++s){let o;if(i==="LineString"||i==="Circle"){if(o=this.sketchCoords_,o.splice(-2,1),o.length>=2){this.finishCoordinate_=o[o.length-2].slice();const a=this.finishCoordinate_.slice();o[o.length-1]=a,this.createOrUpdateSketchPoint_(a)}this.geometryFunction_(o,n,r),n.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(n)}else if(i==="Polygon"){o=this.sketchCoords_[0],o.splice(-2,1);const a=this.sketchLine_.getGeometry();if(o.length>=2){const l=o[o.length-2].slice();o[o.length-1]=l,this.createOrUpdateSketchPoint_(l)}a.setCoordinates(o),this.geometryFunction_(this.sketchCoords_,n,r)}if(o.length===1){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const e=this.abortDrawing_();if(!e)return null;let n=this.sketchCoords_;const r=e.getGeometry(),i=this.getMap().getView().getProjection();return this.mode_==="LineString"?(n.pop(),this.geometryFunction_(n,r,i)):this.mode_==="Polygon"&&(n[0].pop(),this.geometryFunction_(n,r,i),n=r.getCoordinates()),this.type_==="MultiPoint"?e.setGeometry(new MultiPoint([n])):this.type_==="MultiLineString"?e.setGeometry(new MultiLineString([n])):this.type_==="MultiPolygon"&&e.setGeometry(new MultiPolygon([n])),this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND,e)),this.features_&&this.features_.push(e),this.source_&&this.source_.addFeature(e),e}abortDrawing_(){this.finishCoordinate_=null;const e=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),e}abortDrawing(){const e=this.abortDrawing_();e&&this.dispatchEvent(new DrawEvent(DrawEventType.DRAWABORT,e))}appendCoordinates(e){const n=this.mode_,r=!this.sketchFeature_;r&&this.startDrawing_(e[0]);let i;if(n==="LineString"||n==="Circle")i=this.sketchCoords_;else if(n==="Polygon")i=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;r&&i.shift(),i.pop();for(let o=0;o<e.length;o++)this.addToDrawing_(e[o]);const s=e[e.length-1];this.sketchFeature_=this.addToDrawing_(s),this.modifyDrawing_(s)}extend(e){const r=e.getGeometry();this.sketchFeature_=e,this.sketchCoords_=r.getCoordinates();const i=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=i.slice(),this.sketchCoords_.push(i.slice()),this.sketchPoint_=new Feature(new Point(i)),this.updateSketchFeatures_(),this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART,this.sketchFeature_))}updateSketchFeatures_(){const e=[];this.sketchFeature_&&e.push(this.sketchFeature_),this.sketchLine_&&e.push(this.sketchLine_),this.sketchPoint_&&e.push(this.sketchPoint_);const n=this.overlay_.getSource();n.clear(!0),n.addFeatures(e)}updateState_(){const e=this.getMap(),n=this.getActive();(!e||!n)&&this.abortDrawing(),this.overlay_.setMap(n?e:null)}}function getDefaultStyleFunction(){const t=createEditingStyle();return function(e,n){return t[e.getGeometry().getType()]}}function getMode(t){switch(t){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+t)}}const Key={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class KeyboardPan extends Interaction{constructor(e){super(),e=e||{},this.defaultCondition_=function(n){return noModifierKeys(n)&&targetNotEditable(n)},this.condition_=e.condition!==void 0?e.condition:this.defaultCondition_,this.duration_=e.duration!==void 0?e.duration:100,this.pixelDelta_=e.pixelDelta!==void 0?e.pixelDelta:128}handleEvent(e){let n=!1;if(e.type==EventType.KEYDOWN){const r=e.originalEvent,i=r.key;if(this.condition_(e)&&(i==Key.DOWN||i==Key.LEFT||i==Key.RIGHT||i==Key.UP)){const o=e.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,u=0;i==Key.DOWN?u=-a:i==Key.LEFT?l=-a:i==Key.RIGHT?l=a:u=a;const c=[l,u];rotate$1(c,o.getRotation()),pan(o,c,this.duration_),r.preventDefault(),n=!0}}return!n}}class KeyboardZoom extends Interaction{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(n){return!platformModifierKey(n)&&targetNotEditable(n)},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:100}handleEvent(e){let n=!1;if(e.type==EventType.KEYDOWN||e.type==EventType.KEYPRESS){const r=e.originalEvent,i=r.key;if(this.condition_(e)&&(i==="+"||i==="-")){const s=e.map,o=i==="+"?this.delta_:-this.delta_,a=s.getView();zoomByDelta(a,o,void 0,this.duration_),r.preventDefault(),n=!0}}return!n}}const MapEventType={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"};class MouseWheelZoom extends Interaction{constructor(e){e=e||{},super(e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=e.maxDelta!==void 0?e.maxDelta:1,this.duration_=e.duration!==void 0?e.duration:250,this.timeout_=e.timeout!==void 0?e.timeout:80,this.useAnchor_=e.useAnchor!==void 0?e.useAnchor:!0,this.constrainResolution_=e.constrainResolution!==void 0?e.constrainResolution:!1;const n=e.condition?e.condition:always$1;this.condition_=e.onFocusOnly?all(focusWithTabindex,n):n,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const e=this.getMap();if(!e)return;e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(e){if(!this.condition_(e)||e.type!==EventType.WHEEL)return!0;const r=e.map,i=e.originalEvent;i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.pixel);let s;if(e.type==EventType.WHEEL&&(s=i.deltaY,FIREFOX&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=DEVICE_PIXEL_RATIO),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),s===0)return!1;this.lastDelta_=s;const o=Date.now();this.startTime_===void 0&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const a=r.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_?r.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=o,!1;this.totalDelta_+=s;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),l),!1}handleWheelZoom_(e){const n=e.getView();n.getAnimating()&&n.cancelAnimations();let r=-clamp(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(r=r?r>0?1:-1:0),zoomByDelta(n,r,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}}class PinchRotate extends PointerInteraction{constructor(e){e=e||{};const n=e;n.stopDown||(n.stopDown=FALSE),super(n),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=e.threshold!==void 0?e.threshold:.3,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){let n=0;const r=this.targetPointers[0],i=this.targetPointers[1],s=Math.atan2(i.clientY-r.clientY,i.clientX-r.clientX);if(this.lastAngle_!==void 0){const l=s-this.lastAngle_;this.rotationDelta_+=l,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),n=l}this.lastAngle_=s;const o=e.map,a=o.getView();a.getConstraints().rotation!==disable&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(centroid(this.targetPointers))),this.rotating_&&(o.render(),a.adjustRotationInternal(n,this.anchor_)))}handleUpEvent(e){return this.targetPointers.length<2?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){if(this.targetPointers.length>=2){const n=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1}}class PinchZoom extends PointerInteraction{constructor(e){e=e||{};const n=e;n.stopDown||(n.stopDown=FALSE),super(n),this.anchor_=null,this.duration_=e.duration!==void 0?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let n=1;const r=this.targetPointers[0],i=this.targetPointers[1],s=r.clientX-i.clientX,o=r.clientY-i.clientY,a=Math.sqrt(s*s+o*o);this.lastDistance_!==void 0&&(n=this.lastDistance_/a),this.lastDistance_=a;const l=e.map,u=l.getView();n!=1&&(this.lastScaleDelta_=n),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(centroid(this.targetPointers))),l.render(),u.adjustResolutionInternal(n,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){const r=e.map.getView(),i=this.lastScaleDelta_>1?1:-1;return r.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){const n=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1}}class Kinetic{constructor(e,n,r){this.decay_=e,this.minVelocity_=n,this.delay_=r,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,n){this.points_.push(e,n,Date.now())}end(){if(this.points_.length<6)return!1;const e=Date.now()-this.delay_,n=this.points_.length-3;if(this.points_[n+2]<e)return!1;let r=n-3;for(;r>0&&this.points_[r+2]>e;)r-=3;const i=this.points_[n+2]-this.points_[r+2];if(i<1e3/60)return!1;const s=this.points_[n]-this.points_[r],o=this.points_[n+1]-this.points_[r+1];return this.angle_=Math.atan2(o,s),this.initialVelocity_=Math.sqrt(s*s+o*o)/i,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}function defaults$1(t){t=t||{};const e=new Collection,n=new Kinetic(-.005,.05,100);return(t.altShiftDragRotate!==void 0?t.altShiftDragRotate:!0)&&e.push(new DragRotate),(t.doubleClickZoom!==void 0?t.doubleClickZoom:!0)&&e.push(new DoubleClickZoom({delta:t.zoomDelta,duration:t.zoomDuration})),(t.dragPan!==void 0?t.dragPan:!0)&&e.push(new DragPan({onFocusOnly:t.onFocusOnly,kinetic:n})),(t.pinchRotate!==void 0?t.pinchRotate:!0)&&e.push(new PinchRotate),(t.pinchZoom!==void 0?t.pinchZoom:!0)&&e.push(new PinchZoom({duration:t.zoomDuration})),(t.keyboard!==void 0?t.keyboard:!0)&&(e.push(new KeyboardPan),e.push(new KeyboardZoom({delta:t.zoomDelta,duration:t.zoomDuration}))),(t.mouseWheelZoom!==void 0?t.mouseWheelZoom:!0)&&e.push(new MouseWheelZoom({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(t.shiftDragZoom!==void 0?t.shiftDragZoom:!0)&&e.push(new DragZoom({duration:t.zoomDuration})),e}const TileState={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Tile extends Target{constructor(e,n,r){super(),r=r||{},this.tileCoord=e,this.state=n,this.key="",this.transition_=r.transition===void 0?250:r.transition,this.transitionStarts_={},this.interpolate=!!r.interpolate}changed(){this.dispatchEvent(EventType.CHANGE)}release(){this.state===TileState.ERROR&&this.setState(TileState.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(this.state!==TileState.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}load(){abstract()}getAlpha(e,n){if(!this.transition_)return 1;let r=this.transitionStarts_[e];if(!r)r=n,this.transitionStarts_[e]=r;else if(r===-1)return 1;const i=n-r+1e3/60;return i>=this.transition_?1:easeIn(i/this.transition_)}inTransition(e){return this.transition_?this.transitionStarts_[e]!==-1:!1}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}class ImageTile extends Tile{constructor(e,n,r,i,s,o){super(e,n,o),this.crossOrigin_=i,this.src_=r,this.key=r,this.image_=new Image,i!==null&&(this.image_.crossOrigin=i),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(e){this.image_=e,this.state=TileState.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=TileState.ERROR,this.unlistenImage_(),this.image_=getBlankImage(),this.changed()}handleImageLoad_(){const e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=TileState.LOADED:this.state=TileState.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==TileState.ERROR&&(this.state=TileState.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==TileState.IDLE&&(this.state=TileState.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=listenImage(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}}function getBlankImage(){const t=createCanvasContext2D(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}class MapRenderer extends Disposable{constructor(e){super(),this.map_=e}dispatchRenderEvent(e,n){abstract()}calculateMatrices2D(e){const n=e.viewState,r=e.coordinateToPixelTransform,i=e.pixelToCoordinateTransform;compose(r,e.size[0]/2,e.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),makeInverse(i,r)}forEachFeatureAtCoordinate(e,n,r,i,s,o,a,l){let u;const c=n.viewState;function d(_,T,x,k){return s.call(o,T,_?x:null,k)}const h=c.projection,f=wrapX$1(e.slice(),h),p=[[0,0]];if(h.canWrapX()&&i){const _=h.getExtent(),T=getWidth(_);p.push([-T,0],[T,0])}const g=n.layerStatesArray,v=g.length,m=[],y=[];for(let _=0;_<p.length;_++)for(let T=v-1;T>=0;--T){const x=g[T],k=x.layer;if(k.hasRenderer()&&inView(x,c)&&a.call(l,k)){const w=k.getRenderer(),O=k.getSource();if(w&&O){const S=O.getWrapX()?f:e,F=d.bind(null,x.managed);y[0]=S[0]+p[_][0],y[1]=S[1]+p[_][1],u=w.forEachFeatureAtCoordinate(y,n,r,F,m)}if(u)return u}}if(m.length===0)return;const b=1/m.length;return m.forEach((_,T)=>_.distanceSq+=T*b),m.sort((_,T)=>_.distanceSq-T.distanceSq),m.some(_=>u=_.callback(_.feature,_.layer,_.geometry)),u}hasFeatureAtCoordinate(e,n,r,i,s,o){return this.forEachFeatureAtCoordinate(e,n,r,i,TRUE,this,s,o)!==void 0}getMap(){return this.map_}renderFrame(e){abstract()}scheduleExpireIconCache(e){shared.canExpireCache()&&e.postRenderFunctions.push(expireIconCache)}}function expireIconCache(t,e){shared.expire()}class CompositeMapRenderer extends MapRenderer{constructor(e){super(e),this.fontChangeListenerKey_=listen(checkedFonts,ObjectEventType.PROPERTYCHANGE,e.redrawText,e),this.element_=document.createElement("div");const n=this.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",this.element_.className=CLASS_UNSELECTABLE+" ol-layers";const r=e.getViewport();r.insertBefore(this.element_,r.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(e,n){const r=this.getMap();if(r.hasListener(e)){const i=new RenderEvent(e,void 0,n);r.dispatchEvent(i)}}disposeInternal(){unlistenByKey(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(e){if(!e){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(e),this.dispatchRenderEvent(RenderEventType.PRECOMPOSE,e);const n=e.layerStatesArray.sort((a,l)=>a.zIndex-l.zIndex);n.some(a=>a.layer instanceof BaseVectorLayer&&a.layer.getDeclutter())&&(e.declutter={});const i=e.viewState;this.children_.length=0;const s=[];let o=null;for(let a=0,l=n.length;a<l;++a){const u=n[a];e.layerIndex=a;const c=u.layer,d=c.getSourceState();if(!inView(u,i)||d!="ready"&&d!="undefined"){c.unrender();continue}const h=c.render(e,o);h&&(h!==o&&(this.children_.push(h),o=h),s.push(u))}this.declutter(e,s),replaceChildren(this.element_,this.children_),this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE,e),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(e)}declutter(e,n){if(e.declutter){for(let r=n.length-1;r>=0;--r){const i=n[r],s=i.layer;s.getDeclutter()&&s.renderDeclutter(e,i)}n.forEach(r=>r.layer.renderDeferred(e))}}}class GroupEvent extends BaseEvent{constructor(e,n){super(e),this.layer=n}}const Property$1={LAYERS:"layers"};class LayerGroup extends BaseLayer{constructor(e){e=e||{};const n=Object.assign({},e);delete n.layers;let r=e.layers;super(n),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Property$1.LAYERS,this.handleLayersChanged_),r?Array.isArray(r)?r=new Collection(r.slice(),{unique:!0}):assert(typeof r.getArray=="function","Expected `layers` to be an array or a `Collection`"):r=new Collection(void 0,{unique:!0}),this.setLayers(r)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(unlistenByKey),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(listen(e,CollectionEventType.ADD,this.handleLayersAdd_,this),listen(e,CollectionEventType.REMOVE,this.handleLayersRemove_,this));for(const r in this.listenerKeys_)this.listenerKeys_[r].forEach(unlistenByKey);clear(this.listenerKeys_);const n=e.getArray();for(let r=0,i=n.length;r<i;r++){const s=n[r];this.registerLayerListeners_(s),this.dispatchEvent(new GroupEvent("addlayer",s))}this.changed()}registerLayerListeners_(e){const n=[listen(e,ObjectEventType.PROPERTYCHANGE,this.handleLayerChange_,this),listen(e,EventType.CHANGE,this.handleLayerChange_,this)];e instanceof LayerGroup&&n.push(listen(e,"addlayer",this.handleLayerGroupAdd_,this),listen(e,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[getUid(e)]=n}handleLayerGroupAdd_(e){this.dispatchEvent(new GroupEvent("addlayer",e.layer))}handleLayerGroupRemove_(e){this.dispatchEvent(new GroupEvent("removelayer",e.layer))}handleLayersAdd_(e){const n=e.element;this.registerLayerListeners_(n),this.dispatchEvent(new GroupEvent("addlayer",n)),this.changed()}handleLayersRemove_(e){const n=e.element,r=getUid(n);this.listenerKeys_[r].forEach(unlistenByKey),delete this.listenerKeys_[r],this.dispatchEvent(new GroupEvent("removelayer",n)),this.changed()}getLayers(){return this.get(Property$1.LAYERS)}setLayers(e){const n=this.getLayers();if(n){const r=n.getArray();for(let i=0,s=r.length;i<s;++i)this.dispatchEvent(new GroupEvent("removelayer",r[i]))}this.set(Property$1.LAYERS,e)}getLayersArray(e){return e=e!==void 0?e:[],this.getLayers().forEach(function(n){n.getLayersArray(e)}),e}getLayerStatesArray(e){const n=e!==void 0?e:[],r=n.length;this.getLayers().forEach(function(o){o.getLayerStatesArray(n)});const i=this.getLayerState();let s=i.zIndex;!e&&i.zIndex===void 0&&(s=0);for(let o=r,a=n.length;o<a;o++){const l=n[o];l.opacity*=i.opacity,l.visible=l.visible&&i.visible,l.maxResolution=Math.min(l.maxResolution,i.maxResolution),l.minResolution=Math.max(l.minResolution,i.minResolution),l.minZoom=Math.max(l.minZoom,i.minZoom),l.maxZoom=Math.min(l.maxZoom,i.maxZoom),i.extent!==void 0&&(l.extent!==void 0?l.extent=getIntersection(l.extent,i.extent):l.extent=i.extent),l.zIndex===void 0&&(l.zIndex=s)}return n}getSourceState(){return"ready"}}const PointerEventType={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class MapBrowserEventHandler extends Target{constructor(e,n){super(e),this.map_=e,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=n===void 0?1:n,this.down_=null;const r=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=r,this.pointerdownListenerKey_=listen(r,PointerEventType.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=listen(r,PointerEventType.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(EventType.TOUCHMOVE,this.boundHandleTouchMove_,PASSIVE_EVENT_LISTENERS?{passive:!1}:!1)}emulateClick_(e){let n=new MapBrowserEvent(MapBrowserEventType.CLICK,this.map_,e);this.dispatchEvent(n),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,n=new MapBrowserEvent(MapBrowserEventType.DBLCLICK,this.map_,e),this.dispatchEvent(n)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;const r=new MapBrowserEvent(MapBrowserEventType.SINGLECLICK,this.map_,e);this.dispatchEvent(r)},250)}updateActivePointers_(e){const n=e,r=n.pointerId;if(n.type==MapBrowserEventType.POINTERUP||n.type==MapBrowserEventType.POINTERCANCEL){delete this.trackedTouches_[r];for(const i in this.trackedTouches_)if(this.trackedTouches_[i].target!==n.target){delete this.trackedTouches_[i];break}}else(n.type==MapBrowserEventType.POINTERDOWN||n.type==MapBrowserEventType.POINTERMOVE)&&(this.trackedTouches_[r]=n);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const n=new MapBrowserEvent(MapBrowserEventType.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(n),this.emulateClicks_&&!n.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return e.button===0}handlePointerDown_(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);const n=new MapBrowserEvent(MapBrowserEventType.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);if(this.dispatchEvent(n),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),this.dragListenerKeys_.length===0){const r=this.map_.getOwnerDocument();this.dragListenerKeys_.push(listen(r,MapBrowserEventType.POINTERMOVE,this.handlePointerMove_,this),listen(r,MapBrowserEventType.POINTERUP,this.handlePointerUp_,this),listen(this.element_,MapBrowserEventType.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==r&&this.dragListenerKeys_.push(listen(this.element_.getRootNode(),MapBrowserEventType.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const n=new MapBrowserEvent(MapBrowserEventType.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(n)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;const n=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new MapBrowserEvent(MapBrowserEventType.POINTERMOVE,this.map_,e,n))}handleTouchMove_(e){const n=this.originalPointerMoveEvent_;(!n||n.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(unlistenByKey(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(EventType.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(unlistenByKey(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const MapProperty={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},DROP=1/0;class PriorityQueue{constructor(e,n){this.priorityFunction_=e,this.keyFunction_=n,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,clear(this.queuedElements_)}dequeue(){const e=this.elements_,n=this.priorities_,r=e[0];e.length==1?(e.length=0,n.length=0):(e[0]=e.pop(),n[0]=n.pop(),this.siftUp_(0));const i=this.keyFunction_(r);return delete this.queuedElements_[i],r}enqueue(e){assert(!(this.keyFunction_(e)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const n=this.priorityFunction_(e);return n!=DROP?(this.elements_.push(e),this.priorities_.push(n),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(e){return e*2+1}getRightChildIndex_(e){return e*2+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return this.elements_.length===0}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){const n=this.elements_,r=this.priorities_,i=n.length,s=n[e],o=r[e],a=e;for(;e<i>>1;){const l=this.getLeftChildIndex_(e),u=this.getRightChildIndex_(e),c=u<i&&r[u]<r[l]?u:l;n[e]=n[c],r[e]=r[c],e=c}n[e]=s,r[e]=o,this.siftDown_(a,e)}siftDown_(e,n){const r=this.elements_,i=this.priorities_,s=r[n],o=i[n];for(;n>e;){const a=this.getParentIndex_(n);if(i[a]>o)r[n]=r[a],i[n]=i[a],n=a;else break}r[n]=s,i[n]=o}reprioritize(){const e=this.priorityFunction_,n=this.elements_,r=this.priorities_;let i=0;const s=n.length;let o,a,l;for(a=0;a<s;++a)o=n[a],l=e(o),l==DROP?delete this.queuedElements_[this.keyFunction_(o)]:(r[i]=l,n[i++]=o);n.length=i,r.length=i,this.heapify_()}}class TileQueue extends PriorityQueue{constructor(e,n){super(function(r){return e.apply(null,r)},function(r){return r[0].getKey()}),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=n,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(e){const n=super.enqueue(e);return n&&e[0].addEventListener(EventType.CHANGE,this.boundHandleTileChange_),n}getTilesLoading(){return this.tilesLoading_}handleTileChange(e){const n=e.target,r=n.getState();if(r===TileState.LOADED||r===TileState.ERROR||r===TileState.EMPTY){r!==TileState.ERROR&&n.removeEventListener(EventType.CHANGE,this.boundHandleTileChange_);const i=n.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(e,n){let r=0;for(;this.tilesLoading_<e&&r<n&&this.getCount()>0;){const i=this.dequeue()[0],s=i.getKey();i.getState()===TileState.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++r,i.load())}}}function getTilePriority(t,e,n,r,i){if(!t||!(n in t.wantedTiles)||!t.wantedTiles[n][e.getKey()])return DROP;const s=t.viewState.center,o=r[0]-s[0],a=r[1]-s[1];return 65536*Math.log(i)+Math.sqrt(o*o+a*a)/i}class Control extends BaseObject{constructor(e){super();const n=e.element;n&&!e.target&&!n.style.pointerEvents&&(n.style.pointerEvents="auto"),this.element=n||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){var e;(e=this.element)==null||e.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(e){var n;this.map_&&((n=this.element)==null||n.remove());for(let r=0,i=this.listenerKeys.length;r<i;++r)unlistenByKey(this.listenerKeys[r]);if(this.listenerKeys.length=0,this.map_=e,e){const r=this.target_??e.getOverlayContainerStopEvent();this.element&&r.appendChild(this.element),this.render!==VOID&&this.listenerKeys.push(listen(e,MapEventType.POSTRENDER,this.render,this)),e.render()}}render(e){}setTarget(e){this.target_=typeof e=="string"?document.getElementById(e):e}}class Attribution extends Control{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=e.collapsed!==void 0?e.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=e.collapsible!==void 0,this.collapsible_=e.collapsible!==void 0?e.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.attributions_=e.attributions;const n=e.className!==void 0?e.className:"ol-attribution",r=e.tipLabel!==void 0?e.tipLabel:"Attributions",i=e.expandClassName!==void 0?e.expandClassName:n+"-expand",s=e.collapseLabel!==void 0?e.collapseLabel:"›",o=e.collapseClassName!==void 0?e.collapseClassName:n+"-collapse";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=o):this.collapseLabel_=s;const a=e.label!==void 0?e.label:"i";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=i):this.label_=a;const l=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=r,this.toggleButton_.appendChild(l),this.toggleButton_.addEventListener(EventType.CLICK,this.handleClick_.bind(this),!1);const u=n+" "+CLASS_UNSELECTABLE+" "+CLASS_CONTROL+(this.collapsed_&&this.collapsible_?" "+CLASS_COLLAPSED:"")+(this.collapsible_?"":" ol-uncollapsible"),c=this.element;c.className=u,c.appendChild(this.toggleButton_),c.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(e){const n=this.getMap().getAllLayers(),r=new Set(n.flatMap(i=>i.getAttributions(e)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(i=>r.add(i)):r.add(this.attributions_)),!this.overrideCollapsible_){const i=!n.some(s=>{var o;return((o=s.getSource())==null?void 0:o.getAttributionsCollapsible())===!1});this.setCollapsible(i)}return Array.from(r)}async updateElement_(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const n=await Promise.all(this.collectSourceAttributions_(e).map(i=>toPromise(()=>i))),r=n.length>0;if(this.renderedVisible_!=r&&(this.element.style.display=r?"":"none",this.renderedVisible_=r),!equals$2(n,this.renderedAttributions_)){removeChildren(this.ulElement_);for(let i=0,s=n.length;i<s;++i){const o=document.createElement("li");o.innerHTML=n[i],this.ulElement_.appendChild(o)}this.renderedAttributions_=n}}handleClick_(e){e.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(CLASS_COLLAPSED),this.collapsed_?replaceNode(this.collapseLabel_,this.label_):replaceNode(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(e){this.collapsible_!==e&&(this.collapsible_=e,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(e){this.userCollapsed_=e,!(!this.collapsible_||this.collapsed_===e)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(e){this.updateElement_(e.frameState)}}class Rotate extends Control{constructor(e){e=e||{},super({element:document.createElement("div"),render:e.render,target:e.target});const n=e.className!==void 0?e.className:"ol-rotate",r=e.label!==void 0?e.label:"⇧",i=e.compassClassName!==void 0?e.compassClassName:"ol-compass";this.label_=null,typeof r=="string"?(this.label_=document.createElement("span"),this.label_.className=i,this.label_.textContent=r):(this.label_=r,this.label_.classList.add(i));const s=e.tipLabel?e.tipLabel:"Reset rotation",o=document.createElement("button");o.className=n+"-reset",o.setAttribute("type","button"),o.title=s,o.appendChild(this.label_),o.addEventListener(EventType.CLICK,this.handleClick_.bind(this),!1);const a=n+" "+CLASS_UNSELECTABLE+" "+CLASS_CONTROL,l=this.element;l.className=a,l.appendChild(o),this.callResetNorth_=e.resetNorth?e.resetNorth:void 0,this.duration_=e.duration!==void 0?e.duration:250,this.autoHide_=e.autoHide!==void 0?e.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(CLASS_HIDDEN)}handleClick_(e){e.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const n=this.getMap().getView();if(!n)return;const r=n.getRotation();r!==void 0&&(this.duration_>0&&r%(2*Math.PI)!==0?n.animate({rotation:0,duration:this.duration_,easing:easeOut}):n.setRotation(0))}render(e){const n=e.frameState;if(!n)return;const r=n.viewState.rotation;if(r!=this.rotation_){const i="rotate("+r+"rad)";if(this.autoHide_){const s=this.element.classList.contains(CLASS_HIDDEN);!s&&r===0?this.element.classList.add(CLASS_HIDDEN):s&&r!==0&&this.element.classList.remove(CLASS_HIDDEN)}this.label_.style.transform=i}this.rotation_=r}}class Zoom extends Control{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});const n=e.className!==void 0?e.className:"ol-zoom",r=e.delta!==void 0?e.delta:1,i=e.zoomInClassName!==void 0?e.zoomInClassName:n+"-in",s=e.zoomOutClassName!==void 0?e.zoomOutClassName:n+"-out",o=e.zoomInLabel!==void 0?e.zoomInLabel:"+",a=e.zoomOutLabel!==void 0?e.zoomOutLabel:"–",l=e.zoomInTipLabel!==void 0?e.zoomInTipLabel:"Zoom in",u=e.zoomOutTipLabel!==void 0?e.zoomOutTipLabel:"Zoom out",c=document.createElement("button");c.className=i,c.setAttribute("type","button"),c.title=l,c.appendChild(typeof o=="string"?document.createTextNode(o):o),c.addEventListener(EventType.CLICK,this.handleClick_.bind(this,r),!1);const d=document.createElement("button");d.className=s,d.setAttribute("type","button"),d.title=u,d.appendChild(typeof a=="string"?document.createTextNode(a):a),d.addEventListener(EventType.CLICK,this.handleClick_.bind(this,-r),!1);const h=n+" "+CLASS_UNSELECTABLE+" "+CLASS_CONTROL,f=this.element;f.className=h,f.appendChild(c),f.appendChild(d),this.duration_=e.duration!==void 0?e.duration:250}handleClick_(e,n){n.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){const r=this.getMap().getView();if(!r)return;const i=r.getZoom();if(i!==void 0){const s=r.getConstrainedZoom(i+e);this.duration_>0?(r.getAnimating()&&r.cancelAnimations(),r.animate({zoom:s,duration:this.duration_,easing:easeOut})):r.setZoom(s)}}}function defaults(t){t=t||{};const e=new Collection;return(t.zoom!==void 0?t.zoom:!0)&&e.push(new Zoom(t.zoomOptions)),(t.rotate!==void 0?t.rotate:!0)&&e.push(new Rotate(t.rotateOptions)),(t.attribution!==void 0?t.attribution:!0)&&e.push(new Attribution(t.attributionOptions)),e}function removeLayerMapProperty(t){if(t instanceof Layer){t.setMapInternal(null);return}t instanceof LayerGroup&&t.getLayers().forEach(removeLayerMapProperty)}function setLayerMapProperty(t,e){if(t instanceof Layer){t.setMapInternal(e);return}if(t instanceof LayerGroup){const n=t.getLayers().getArray();for(let r=0,i=n.length;r<i;++r)setLayerMapProperty(n[r],e)}}let Map$2=class extends BaseObject{constructor(e){super(),e=e||{},this.on,this.once,this.un;const n=createOptionsInternal(e);this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=e.maxTilesLoading!==void 0?e.maxTilesLoading:16,this.pixelRatio_=e.pixelRatio!==void 0?e.pixelRatio:DEVICE_PIXEL_RATIO,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=create$2(),this.pixelToCoordinateTransform_=create$2(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=e.moveTolerance,this.keyboardEventTarget_=n.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver(()=>this.updateSize()),this.controls=n.controls||defaults(),this.interactions=n.interactions||defaults$1({onFocusOnly:!0}),this.overlays_=n.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new TileQueue(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(MapProperty.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(MapProperty.VIEW,this.handleViewChanged_),this.addChangeListener(MapProperty.SIZE,this.handleSizeChanged_),this.addChangeListener(MapProperty.TARGET,this.handleTargetChanged_),this.setProperties(n.values);const r=this;e.view&&!(e.view instanceof View)&&e.view.then(function(i){r.setView(new View(i))}),this.controls.addEventListener(CollectionEventType.ADD,i=>{i.element.setMap(this)}),this.controls.addEventListener(CollectionEventType.REMOVE,i=>{i.element.setMap(null)}),this.interactions.addEventListener(CollectionEventType.ADD,i=>{i.element.setMap(this)}),this.interactions.addEventListener(CollectionEventType.REMOVE,i=>{i.element.setMap(null)}),this.overlays_.addEventListener(CollectionEventType.ADD,i=>{this.addOverlayInternal_(i.element)}),this.overlays_.addEventListener(CollectionEventType.REMOVE,i=>{const s=i.element.getId();s!==void 0&&delete this.overlayIdIndex_[s.toString()],i.element.setMap(null)}),this.controls.forEach(i=>{i.setMap(this)}),this.interactions.forEach(i=>{i.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){setLayerMapProperty(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){const n=e.getId();n!==void 0&&(this.overlayIdIndex_[n.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,n,r){if(!this.frameState_||!this.renderer_)return;const i=this.getCoordinateFromPixelInternal(e);r=r!==void 0?r:{};const s=r.hitTolerance!==void 0?r.hitTolerance:0,o=r.layerFilter!==void 0?r.layerFilter:TRUE,a=r.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,s,a,n,null,o,null)}getFeaturesAtPixel(e,n){const r=[];return this.forEachFeatureAtPixel(e,function(i){r.push(i)},n),r}getAllLayers(){const e=[];function n(r){r.forEach(function(i){i instanceof LayerGroup?n(i.getLayers()):e.push(i)})}return n(this.getLayers()),e}hasFeatureAtPixel(e,n){if(!this.frameState_||!this.renderer_)return!1;const r=this.getCoordinateFromPixelInternal(e);n=n!==void 0?n:{};const i=n.layerFilter!==void 0?n.layerFilter:TRUE,s=n.hitTolerance!==void 0?n.hitTolerance:0,o=n.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(r,this.frameState_,s,o,i,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){const r=this.viewport_.getBoundingClientRect(),i=this.getSize(),s=r.width/i[0],o=r.height/i[1],a="changedTouches"in e?e.changedTouches[0]:e;return[(a.clientX-r.left)/s,(a.clientY-r.top)/o]}getTarget(){return this.get(MapProperty.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return toUserCoordinate(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const n=this.frameState_;return n?apply(n.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){const n=this.overlayIdIndex_[e.toString()];return n!==void 0?n:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(MapProperty.LAYERGROUP)}setLayers(e){const n=this.getLayerGroup();if(e instanceof Collection){n.setLayers(e);return}const r=n.getLayers();r.clear(),r.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const e=this.getLayerGroup().getLayerStatesArray();for(let n=0,r=e.length;n<r;++n){const i=e[n];if(!i.visible)continue;const s=i.layer.getRenderer();if(s&&!s.ready)return!0;const o=i.layer.getSource();if(o&&o.loading)return!0}return!1}getPixelFromCoordinate(e){const n=fromUserCoordinate(e,this.getView().getProjection());return this.getPixelFromCoordinateInternal(n)}getPixelFromCoordinateInternal(e){const n=this.frameState_;return n?apply(n.coordinateToPixelTransform,e.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(MapProperty.SIZE)}getView(){return this.get(MapProperty.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const e=this.getTargetElement();return e?e.ownerDocument:document}getTilePriority(e,n,r,i){return getTilePriority(this.frameState_,e,n,r,i)}handleBrowserEvent(e,n){n=n||e.type;const r=new MapBrowserEvent(n,this,e);this.handleMapBrowserEvent(r)}handleMapBrowserEvent(e){if(!this.frameState_)return;const n=e.originalEvent,r=n.type;if(r===PointerEventType.POINTERDOWN||r===EventType.WHEEL||r===EventType.KEYDOWN){const i=this.getOwnerDocument(),s=this.viewport_.getRootNode?this.viewport_.getRootNode():i,o=n.target,a=s instanceof ShadowRoot?s.host===o?s.host.ownerDocument:s:s===i?i.documentElement:s;if(this.overlayContainerStopEvent_.contains(o)||!a.contains(o))return}if(e.frameState=this.frameState_,this.dispatchEvent(e)!==!1){const i=this.getInteractions().getArray().slice();for(let s=i.length-1;s>=0;s--){const o=i[s];if(o.getMap()!==this||!o.getActive()||!this.getTargetElement())continue;if(!o.handleEvent(e)||e.propagationStopped)break}}}handlePostRender(){const e=this.frameState_,n=this.tileQueue_;if(!n.isEmpty()){let i=this.maxTilesLoading_,s=i;if(e){const o=e.viewHints;if(o[ViewHint.ANIMATING]||o[ViewHint.INTERACTING]){const a=Date.now()-e.time>8;i=a?0:8,s=a?0:2}}n.getTilesLoading()<i&&(n.reprioritize(),n.loadMoreTiles(i,s))}e&&this.renderer_&&!e.animate&&(this.renderComplete_?(this.hasListener(RenderEventType.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE,e),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new MapEvent(MapEventType.LOADEND,this,e)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new MapEvent(MapEventType.LOADSTART,this,e))));const r=this.postRenderFunctions_;if(e)for(let i=0,s=r.length;i<s;++i)r[i](this,e);r.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let r=0,i=this.targetChangeHandlerKeys_.length;r<i;++r)unlistenByKey(this.targetChangeHandlerKeys_[r]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(EventType.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(EventType.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const r=this.targetElement_.getRootNode();r instanceof ShadowRoot&&this.resizeObserver_.unobserve(r.host),this.setSize(void 0)}const e=this.getTarget(),n=typeof e=="string"?document.getElementById(e):e;if(this.targetElement_=n,!n)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{n.appendChild(this.viewport_),this.renderer_||(this.renderer_=new CompositeMapRenderer(this)),this.mapBrowserEventHandler_=new MapBrowserEventHandler(this,this.moveTolerance_);for(const s in MapBrowserEventType)this.mapBrowserEventHandler_.addEventListener(MapBrowserEventType[s],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(EventType.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(EventType.WHEEL,this.boundHandleBrowserEvent_,PASSIVE_EVENT_LISTENERS?{passive:!1}:!1);let r;if(this.keyboardEventTarget_)r=this.keyboardEventTarget_;else{const s=n.getRootNode();r=s instanceof ShadowRoot?s.host:n}this.targetChangeHandlerKeys_=[listen(r,EventType.KEYDOWN,this.handleBrowserEvent,this),listen(r,EventType.KEYPRESS,this.handleBrowserEvent,this)];const i=n.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_.observe(n)}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(unlistenByKey(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(unlistenByKey(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const e=this.getView();e&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=listen(e,ObjectEventType.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=listen(e,EventType.CHANGE,this.handleViewPropertyChanged_,this),e.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey),this.layerGroupPropertyListenerKeys_=null);const e=this.getLayerGroup();e&&(this.handleLayerAdd_(new GroupEvent("addlayer",e)),this.layerGroupPropertyListenerKeys_=[listen(e,ObjectEventType.PROPERTYCHANGE,this.render,this),listen(e,EventType.CHANGE,this.render,this),listen(e,"addlayer",this.handleLayerAdd_,this),listen(e,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const e=this.getLayerGroup().getLayerStatesArray();for(let n=0,r=e.length;n<r;++n){const i=e[n].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(e){return this.getControls().remove(e)}removeInteraction(e){return this.getInteractions().remove(e)}removeLayer(e){return this.getLayerGroup().getLayers().remove(e)}handleLayerRemove_(e){removeLayerMapProperty(e.layer)}removeOverlay(e){return this.getOverlays().remove(e)}renderFrame_(e){const n=this.getSize(),r=this.getView(),i=this.frameState_;let s=null;if(n!==void 0&&hasArea(n)&&r&&r.isDef()){const o=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=r.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:getForViewAndSize(a.center,a.resolution,a.rotation,n),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:n,tileQueue:this.tileQueue_,time:e,usedTiles:{},viewState:a,viewHints:o,wantedTiles:{},mapId:getUid(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;s.nextExtent=getForViewAndSize(a.nextCenter,a.nextResolution,l,n)}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),i&&(!this.previousExtent_||!isEmpty(this.previousExtent_)&&!equals$1(s.extent,this.previousExtent_))&&(this.dispatchEvent(new MapEvent(MapEventType.MOVESTART,this,i)),this.previousExtent_=createOrUpdateEmpty(this.previousExtent_)),this.previousExtent_&&!s.viewHints[ViewHint.ANIMATING]&&!s.viewHints[ViewHint.INTERACTING]&&!equals$1(s.extent,this.previousExtent_)&&(this.dispatchEvent(new MapEvent(MapEventType.MOVEEND,this,s)),clone(s.extent,this.previousExtent_))),this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER,this,s)),this.renderComplete_=(this.hasListener(MapEventType.LOADSTART)||this.hasListener(MapEventType.LOADEND)||this.hasListener(RenderEventType.RENDERCOMPLETE))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(e){const n=this.getLayerGroup();n&&this.handleLayerRemove_(new GroupEvent("removelayer",n)),this.set(MapProperty.LAYERGROUP,e)}setSize(e){this.set(MapProperty.SIZE,e)}setTarget(e){this.set(MapProperty.TARGET,e)}setView(e){if(!e||e instanceof View){this.set(MapProperty.VIEW,e);return}this.set(MapProperty.VIEW,new View);const n=this;e.then(function(r){n.setView(new View(r))})}updateSize(){const e=this.getTargetElement();let n;if(e){const i=getComputedStyle(e),s=e.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),o=e.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);!isNaN(s)&&!isNaN(o)&&(n=[Math.max(0,s),Math.max(0,o)],!hasArea(n)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&warn("No map visible because the map container's width or height are 0."))}const r=this.getSize();n&&(!r||!equals$2(n,r))&&(this.setSize(n),this.updateViewportSize_(n))}updateViewportSize_(e){const n=this.getView();n&&n.setViewportSize(e)}};function createOptionsInternal(t){let e=null;t.keyboardEventTarget!==void 0&&(e=typeof t.keyboardEventTarget=="string"?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const n={},r=t.layers&&typeof t.layers.getLayers=="function"?t.layers:new LayerGroup({layers:t.layers});n[MapProperty.LAYERGROUP]=r,n[MapProperty.TARGET]=t.target,n[MapProperty.VIEW]=t.view instanceof View?t.view:new View;let i;t.controls!==void 0&&(Array.isArray(t.controls)?i=new Collection(t.controls.slice()):(assert(typeof t.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),i=t.controls));let s;t.interactions!==void 0&&(Array.isArray(t.interactions)?s=new Collection(t.interactions.slice()):(assert(typeof t.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),s=t.interactions));let o;return t.overlays!==void 0?Array.isArray(t.overlays)?o=new Collection(t.overlays.slice()):(assert(typeof t.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),o=t.overlays):o=new Collection,{controls:i,interactions:s,keyboardEventTarget:e,overlays:o,values:n}}const Property={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class Overlay extends BaseObject{constructor(e){super(),this.on,this.once,this.un,this.options=e,this.id=e.id,this.insertFirst=e.insertFirst!==void 0?e.insertFirst:!0,this.stopEvent=e.stopEvent!==void 0?e.stopEvent:!0,this.element=document.createElement("div"),this.element.className=e.className!==void 0?e.className:"ol-overlay-container "+CLASS_SELECTABLE,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=e.autoPan===!0?{}:e.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(Property.ELEMENT,this.handleElementChanged),this.addChangeListener(Property.MAP,this.handleMapChanged),this.addChangeListener(Property.OFFSET,this.handleOffsetChanged),this.addChangeListener(Property.POSITION,this.handlePositionChanged),this.addChangeListener(Property.POSITIONING,this.handlePositioningChanged),e.element!==void 0&&this.setElement(e.element),this.setOffset(e.offset!==void 0?e.offset:[0,0]),this.setPositioning(e.positioning||"top-left"),e.position!==void 0&&this.setPosition(e.position)}getElement(){return this.get(Property.ELEMENT)}getId(){return this.id}getMap(){return this.get(Property.MAP)||null}getOffset(){return this.get(Property.OFFSET)}getPosition(){return this.get(Property.POSITION)}getPositioning(){return this.get(Property.POSITIONING)}handleElementChanged(){removeChildren(this.element);const e=this.getElement();e&&this.element.appendChild(e)}handleMapChanged(){var n;this.mapPostrenderListenerKey&&((n=this.element)==null||n.remove(),unlistenByKey(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const e=this.getMap();if(e){this.mapPostrenderListenerKey=listen(e,MapEventType.POSTRENDER,this.render,this),this.updatePixelPosition();const r=this.stopEvent?e.getOverlayContainerStopEvent():e.getOverlayContainer();this.insertFirst?r.insertBefore(this.element,r.childNodes[0]||null):r.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(e){this.set(Property.ELEMENT,e)}setMap(e){this.set(Property.MAP,e)}setOffset(e){this.set(Property.OFFSET,e)}setPosition(e){this.set(Property.POSITION,e)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(e){const n=this.getMap();if(!n||!n.getTargetElement()||!this.get(Property.POSITION))return;const r=this.getRect(n.getTargetElement(),n.getSize()),i=this.getElement(),s=this.getRect(i,[outerWidth(i),outerHeight(i)]);e=e||{};const o=e.margin===void 0?20:e.margin;if(!containsExtent(r,s)){const a=s[0]-r[0],l=r[2]-s[2],u=s[1]-r[1],c=r[3]-s[3],d=[0,0];if(a<0?d[0]=a-o:l<0&&(d[0]=Math.abs(l)+o),u<0?d[1]=u-o:c<0&&(d[1]=Math.abs(c)+o),d[0]!==0||d[1]!==0){const h=n.getView().getCenterInternal(),f=n.getPixelFromCoordinateInternal(h);if(!f)return;const p=[f[0]+d[0],f[1]+d[1]],g=e.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(p),duration:g.duration,easing:g.easing})}}}getRect(e,n){const r=e.getBoundingClientRect(),i=r.left+window.pageXOffset,s=r.top+window.pageYOffset;return[i,s,i+n[0],s+n[1]]}setPositioning(e){this.set(Property.POSITIONING,e)}setVisible(e){this.rendered.visible!==e&&(this.element.style.display=e?"":"none",this.rendered.visible=e)}updatePixelPosition(){const e=this.getMap(),n=this.getPosition();if(!e||!e.isRendered()||!n){this.setVisible(!1);return}const r=e.getPixelFromCoordinate(n),i=e.getSize();this.updateRenderedPosition(r,i)}updateRenderedPosition(e,n){const r=this.element.style,i=this.getOffset(),s=this.getPositioning();this.setVisible(!0);const o=Math.round(e[0]+i[0])+"px",a=Math.round(e[1]+i[1])+"px";let l="0%",u="0%";s=="bottom-right"||s=="center-right"||s=="top-right"?l="-100%":(s=="bottom-center"||s=="center-center"||s=="top-center")&&(l="-50%"),s=="bottom-left"||s=="bottom-center"||s=="bottom-right"?u="-100%":(s=="center-left"||s=="center-center"||s=="center-right")&&(u="-50%");const c=`translate(${l}, ${u}) translate(${o}, ${a})`;this.rendered.transform_!=c&&(this.rendered.transform_=c,r.transform=c)}getOptions(){return this.options}}class LRUCache{constructor(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}deleteOldest(){const e=this.pop();e instanceof Disposable&&e.dispose()}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();)this.deleteOldest()}clear(){for(;this.oldest_;)this.deleteOldest()}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let n=this.oldest_;for(;n;)e(n.value_,n.key_,this),n=n.newer}get(e,n){const r=this.entries_[e];return assert(r!==void 0,"Tried to get a value for a key that does not exist in the cache"),r===this.newest_||(r===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(r.newer.older=r.older,r.older.newer=r.newer),r.newer=null,r.older=this.newest_,this.newest_.newer=r,this.newest_=r),r.value_}remove(e){const n=this.entries_[e];return assert(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_?(this.newest_=n.older,this.newest_&&(this.newest_.newer=null)):n===this.oldest_?(this.oldest_=n.newer,this.oldest_&&(this.oldest_.older=null)):(n.newer.older=n.older,n.older.newer=n.newer),delete this.entries_[e],--this.count_,n.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let n=0,r;for(r=this.newest_;r;r=r.older)e[n++]=r.key_;return e}getValues(){const e=new Array(this.count_);let n=0,r;for(r=this.newest_;r;r=r.older)e[n++]=r.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){var n;return(n=this.entries_[e])==null?void 0:n.value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,n){this.get(e),this.entries_[e].value_=n}set(e,n){assert(!(e in this.entries_),"Tried to set a value for a key that is used already");const r={key_:e,newer:null,older:this.newest_,value_:n};this.newest_?this.newest_.newer=r:this.oldest_=r,this.newest_=r,this.entries_[e]=r,++this.count_}setSize(e){this.highWaterMark=e}}function createOrUpdate$1(t,e,n,r){return r!==void 0?(r[0]=t,r[1]=e,r[2]=n,r):[t,e,n]}function getKeyZXY(t,e,n){return t+"/"+e+"/"+n}function hash(t){return hashZXY(t[0],t[1],t[2])}function hashZXY(t,e,n){return(e<<t)+n}function withinExtentAndZ(t,e){const n=t[0],r=t[1],i=t[2];if(e.getMinZoom()>n||n>e.getMaxZoom())return!1;const s=e.getFullTileRange(n);return s?s.containsXY(r,i):!0}class TileRange{constructor(e,n,r,i){this.minX=e,this.maxX=n,this.minY=r,this.maxY=i}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,n){return this.minX<=e&&e<=this.maxX&&this.minY<=n&&n<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function createOrUpdate(t,e,n,r,i){return i!==void 0?(i.minX=t,i.maxX=e,i.minY=n,i.maxY=r,i):new TileRange(t,e,n,r)}const ARRAY_BUFFER=34962,ELEMENT_ARRAY_BUFFER=34963,STATIC_DRAW=35044,DYNAMIC_DRAW=35048,UNSIGNED_BYTE=5121,UNSIGNED_SHORT=5123,UNSIGNED_INT=5125,FLOAT=5126,CONTEXT_IDS=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function getContext(t,e){e=Object.assign({preserveDrawingBuffer:!0,antialias:!SAFARI_BUG_237906},e);const n=CONTEXT_IDS.length;for(let r=0;r<n;++r)try{const i=t.getContext(CONTEXT_IDS[r],e);if(i)return i}catch{}return null}const BufferUsage={STATIC_DRAW};class WebGLArrayBuffer{constructor(e,n){this.array_=null,this.type_=e,assert(e===ARRAY_BUFFER||e===ELEMENT_ARRAY_BUFFER,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=n!==void 0?n:BufferUsage.STATIC_DRAW}ofSize(e){return this.array_=new(getArrayClassForType(this.type_))(e),this}fromArray(e){return this.array_=getArrayClassForType(this.type_).from(e),this}fromArrayBuffer(e){return this.array_=new(getArrayClassForType(this.type_))(e),this}getType(){return this.type_}getArray(){return this.array_}setArray(e){const n=getArrayClassForType(this.type_);if(!(e instanceof n))throw new Error(`Expected ${n}`);this.array_=e}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}function getArrayClassForType(t){switch(t){case ARRAY_BUFFER:return Float32Array;case ELEMENT_ARRAY_BUFFER:return Uint32Array;default:return Float32Array}}const ContextEventType={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"},DEFAULT_VERTEX_SHADER=`
|
|
49
|
+
precision mediump float;
|
|
50
|
+
|
|
51
|
+
attribute vec2 a_position;
|
|
52
|
+
varying vec2 v_texCoord;
|
|
53
|
+
varying vec2 v_screenCoord;
|
|
54
|
+
|
|
55
|
+
uniform vec2 u_screenSize;
|
|
56
|
+
|
|
57
|
+
void main() {
|
|
58
|
+
v_texCoord = a_position * 0.5 + 0.5;
|
|
59
|
+
v_screenCoord = v_texCoord * u_screenSize;
|
|
60
|
+
gl_Position = vec4(a_position, 0.0, 1.0);
|
|
61
|
+
}
|
|
62
|
+
`,DEFAULT_FRAGMENT_SHADER=`
|
|
63
|
+
precision mediump float;
|
|
64
|
+
|
|
65
|
+
uniform sampler2D u_image;
|
|
66
|
+
uniform float u_opacity;
|
|
67
|
+
|
|
68
|
+
varying vec2 v_texCoord;
|
|
69
|
+
|
|
70
|
+
void main() {
|
|
71
|
+
gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;
|
|
72
|
+
}
|
|
73
|
+
`;class WebGLPostProcessingPass{constructor(e){this.gl_=e.webGlContext;const n=this.gl_;this.scaleRatio_=e.scaleRatio||1,this.renderTargetTexture_=n.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=n.createFramebuffer(),this.depthBuffer_=n.createRenderbuffer();const r=n.createShader(n.VERTEX_SHADER);n.shaderSource(r,e.vertexShader||DEFAULT_VERTEX_SHADER),n.compileShader(r);const i=n.createShader(n.FRAGMENT_SHADER);n.shaderSource(i,e.fragmentShader||DEFAULT_FRAGMENT_SHADER),n.compileShader(i),this.renderTargetProgram_=n.createProgram(),n.attachShader(this.renderTargetProgram_,r),n.attachShader(this.renderTargetProgram_,i),n.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=n.createBuffer();const s=[-1,-1,1,-1,-1,1,1,-1,1,1,-1,1];n.bindBuffer(n.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),n.bufferData(n.ARRAY_BUFFER,new Float32Array(s),n.STATIC_DRAW),this.renderTargetAttribLocation_=n.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=n.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=n.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=n.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],e.uniforms&&Object.keys(e.uniforms).forEach(o=>{this.uniforms_.push({value:e.uniforms[o],location:n.getUniformLocation(this.renderTargetProgram_,o)})})}getRenderTargetTexture(){return this.renderTargetTexture_}getGL(){return this.gl_}init(e){const n=this.getGL(),r=[n.drawingBufferWidth*this.scaleRatio_,n.drawingBufferHeight*this.scaleRatio_];if(n.bindFramebuffer(n.FRAMEBUFFER,this.getFrameBuffer()),n.bindRenderbuffer(n.RENDERBUFFER,this.getDepthBuffer()),n.viewport(0,0,r[0],r[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==r[0]||this.renderTargetTextureSize_[1]!==r[1]){this.renderTargetTextureSize_=r;const i=0,s=n.RGBA,o=0,a=n.RGBA,l=n.UNSIGNED_BYTE,u=null;n.bindTexture(n.TEXTURE_2D,this.renderTargetTexture_),n.texImage2D(n.TEXTURE_2D,i,s,r[0],r[1],o,a,l,u),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.renderTargetTexture_,0),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,r[0],r[1]),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,this.depthBuffer_)}}apply(e,n,r,i){const s=this.getGL(),o=e.size;if(s.bindFramebuffer(s.FRAMEBUFFER,n?n.getFrameBuffer():null),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this.renderTargetTexture_),!n){const l=getUid(s.canvas);if(!e.renderTargets[l]){const u=s.getContextAttributes();u&&u.preserveDrawingBuffer&&(s.clearColor(0,0,0,0),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT)),e.renderTargets[l]=!0}}s.disable(s.DEPTH_TEST),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.bindBuffer(s.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),s.useProgram(this.renderTargetProgram_),s.enableVertexAttribArray(this.renderTargetAttribLocation_),s.vertexAttribPointer(this.renderTargetAttribLocation_,2,s.FLOAT,!1,0,0),s.uniform2f(this.renderTargetUniformLocation_,o[0],o[1]),s.uniform1i(this.renderTargetTextureLocation_,0);const a=e.layerStatesArray[e.layerIndex].opacity;s.uniform1f(this.renderTargetOpacityLocation_,a),this.applyUniforms(e),r&&r(s,e),s.drawArrays(s.TRIANGLES,0,6),i&&i(s,e)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(e){const n=this.getGL();let r,i=1;this.uniforms_.forEach(function(s){if(r=typeof s.value=="function"?s.value(e):s.value,r instanceof HTMLCanvasElement||r instanceof ImageData)s.texture||(s.texture=n.createTexture()),n.activeTexture(n[`TEXTURE${i}`]),n.bindTexture(n.TEXTURE_2D,s.texture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),r instanceof ImageData?n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,r.width,r.height,0,n.UNSIGNED_BYTE,new Uint8Array(r.data)):n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),n.uniform1i(s.location,i++);else if(Array.isArray(r))switch(r.length){case 2:n.uniform2f(s.location,r[0],r[1]);return;case 3:n.uniform3f(s.location,r[0],r[1],r[2]);return;case 4:n.uniform4f(s.location,r[0],r[1],r[2],r[3]);return;default:return}else typeof r=="number"&&n.uniform1f(s.location,r)})}}function create$1(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function fromTransform(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}function orthographic(t,e,n,r,i,s,o){o=o??create$1();const a=1/(t-e),l=1/(n-r),u=1/(i-s);return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*l,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*u,o[11]=0,o[12]=(t+e)*a,o[13]=(r+n)*l,o[14]=(s+i)*u,o[15]=1,o}function scale(t,e,n,r,i){return i=i??create$1(),i[0]=t[0]*e,i[1]=t[1]*e,i[2]=t[2]*e,i[3]=t[3]*e,i[4]=t[4]*n,i[5]=t[5]*n,i[6]=t[6]*n,i[7]=t[7]*n,i[8]=t[8]*r,i[9]=t[9]*r,i[10]=t[10]*r,i[11]=t[11]*r,i[12]=t[12],i[13]=t[13],i[14]=t[14],i[15]=t[15],i}function translate(t,e,n,r,i){i=i??create$1();let s,o,a,l,u,c,d,h,f,p,g,v;return t===i?(i[12]=t[0]*e+t[4]*n+t[8]*r+t[12],i[13]=t[1]*e+t[5]*n+t[9]*r+t[13],i[14]=t[2]*e+t[6]*n+t[10]*r+t[14],i[15]=t[3]*e+t[7]*n+t[11]*r+t[15]):(s=t[0],o=t[1],a=t[2],l=t[3],u=t[4],c=t[5],d=t[6],h=t[7],f=t[8],p=t[9],g=t[10],v=t[11],i[0]=s,i[1]=o,i[2]=a,i[3]=l,i[4]=u,i[5]=c,i[6]=d,i[7]=h,i[8]=f,i[9]=p,i[10]=g,i[11]=v,i[12]=s*e+u*n+f*r+t[12],i[13]=o*e+c*n+p*r+t[13],i[14]=a*e+d*n+g*r+t[14],i[15]=l*e+h*n+v*r+t[15]),i}function translation(t,e,n,r){return r=r??create$1(),r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=t,r[13]=e,r[14]=n,r[15]=1,r}const DefaultUniform={PROJECTION_MATRIX:"u_projectionMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution",ROTATION:"u_rotation",VIEWPORT_SIZE_PX:"u_viewportSizePx",PIXEL_RATIO:"u_pixelRatio",HIT_DETECTION:"u_hitDetection"},AttributeType={UNSIGNED_BYTE,UNSIGNED_SHORT,UNSIGNED_INT,FLOAT},canvasCache={};function getSharedCanvasCacheKey(t){return"shared/"+t}let uniqueCanvasCacheKeyCount=0;function getUniqueCanvasCacheKey(){const t="unique/"+uniqueCanvasCacheKeyCount;return uniqueCanvasCacheKeyCount+=1,t}function getOrCreateContext(t){let e=canvasCache[t];if(!e){const n=document.createElement("canvas");n.width=1,n.height=1,n.style.position="absolute",n.style.left="0",e={users:0,context:getContext(n)},canvasCache[t]=e}return e.users+=1,e.context}function releaseCanvas(t){const e=canvasCache[t];if(!e||(e.users-=1,e.users>0))return;const n=e.context,r=n.getExtension("WEBGL_lose_context");r&&r.loseContext();const i=n.canvas;i.width=1,i.height=1,delete canvasCache[t]}class WebGLHelper extends Disposable{constructor(e){super(),e=e||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=e.canvasCacheKey?getSharedCanvasCacheKey(e.canvasCacheKey):getUniqueCanvasCacheKey(),this.gl_=getOrCreateContext(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const n=this.gl_.canvas;n.addEventListener(ContextEventType.LOST,this.boundHandleWebGLContextLost_),n.addEventListener(ContextEventType.RESTORED,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=create$2(),this.offsetScaleMatrix_=create$2(),this.tmpMat4_=create$1(),this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],e.uniforms&&this.setUniforms(e.uniforms),this.postProcessPasses_=e.postProcesses?e.postProcesses.map(r=>new WebGLPostProcessingPass({webGlContext:this.gl_,scaleRatio:r.scaleRatio,vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,uniforms:r.uniforms})):[new WebGLPostProcessingPass({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(e){this.uniforms_=[],this.addUniforms(e)}addUniforms(e){for(const n in e)this.uniforms_.push({name:n,value:e[n]})}canvasCacheKeyMatches(e){return this.canvasCacheKey_===getSharedCanvasCacheKey(e)}getExtension(e){if(e in this.extensionCache_)return this.extensionCache_[e];const n=this.gl_.getExtension(e);return this.extensionCache_[e]=n,n}bindBuffer(e){const n=this.gl_,r=getUid(e);let i=this.bufferCache_[r];if(!i){const s=n.createBuffer();i={buffer:e,webGlBuffer:s},this.bufferCache_[r]=i}n.bindBuffer(e.getType(),i.webGlBuffer)}flushBufferData(e){const n=this.gl_;this.bindBuffer(e),n.bufferData(e.getType(),e.getArray(),e.getUsage())}deleteBuffer(e){const n=getUid(e);delete this.bufferCache_[n]}disposeInternal(){const e=this.gl_.canvas;e.removeEventListener(ContextEventType.LOST,this.boundHandleWebGLContextLost_),e.removeEventListener(ContextEventType.RESTORED,this.boundHandleWebGLContextRestored_),releaseCanvas(this.canvasCacheKey_),delete this.gl_}prepareDraw(e,n,r){const i=this.gl_,s=this.getCanvas(),o=e.size,a=e.pixelRatio;(s.width!==o[0]*a||s.height!==o[1]*a)&&(s.width=o[0]*a,s.height=o[1]*a,s.style.width=o[0]+"px",s.style.height=o[1]+"px");for(let l=this.postProcessPasses_.length-1;l>=0;l--)this.postProcessPasses_[l].init(e);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.depthRange(0,1),i.clearDepth(1),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,n?i.ZERO:i.ONE_MINUS_SRC_ALPHA),r?(i.enable(i.DEPTH_TEST),i.depthFunc(i.LEQUAL)):i.disable(i.DEPTH_TEST)}bindFrameBuffer(e,n){const r=this.getGL();r.bindFramebuffer(r.FRAMEBUFFER,e),n&&r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,n,0)}bindInitialFrameBuffer(){const e=this.getGL(),n=this.postProcessPasses_[0].getFrameBuffer();e.bindFramebuffer(e.FRAMEBUFFER,n);const r=this.postProcessPasses_[0].getRenderTargetTexture();e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0)}bindTexture(e,n,r){const i=this.gl_;i.activeTexture(i.TEXTURE0+n),i.bindTexture(i.TEXTURE_2D,e),i.uniform1i(this.getUniformLocation(r),n)}bindAttribute(e,n,r){const i=this.getGL();this.bindBuffer(e);const s=this.getAttributeLocation(n);i.enableVertexAttribArray(s),i.vertexAttribPointer(s,r,i.FLOAT,!1,0,0)}prepareDrawToRenderTarget(e,n,r,i){const s=this.gl_,o=n.getSize();s.bindFramebuffer(s.FRAMEBUFFER,n.getFramebuffer()),s.bindRenderbuffer(s.RENDERBUFFER,n.getDepthbuffer()),s.viewport(0,0,o[0],o[1]),s.bindTexture(s.TEXTURE_2D,n.getTexture()),s.clearColor(0,0,0,0),s.depthRange(0,1),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.enable(s.BLEND),s.blendFunc(s.ONE,r?s.ZERO:s.ONE_MINUS_SRC_ALPHA),i?(s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL)):s.disable(s.DEPTH_TEST)}drawElements(e,n){const r=this.gl_;this.getExtension("OES_element_index_uint");const i=r.UNSIGNED_INT,s=4,o=n-e,a=e*s;r.drawElements(r.TRIANGLES,o,i,a)}finalizeDraw(e,n,r){for(let i=0,s=this.postProcessPasses_.length;i<s;i++)i===s-1?this.postProcessPasses_[i].apply(e,null,n,r):this.postProcessPasses_[i].apply(e,this.postProcessPasses_[i+1])}getCanvas(){return this.gl_.canvas}getGL(){return this.gl_}applyFrameState(e){const n=e.size,r=e.viewState.rotation,i=e.pixelRatio;this.setUniformFloatValue(DefaultUniform.TIME,(Date.now()-this.startTime_)*.001),this.setUniformFloatValue(DefaultUniform.ZOOM,e.viewState.zoom),this.setUniformFloatValue(DefaultUniform.RESOLUTION,e.viewState.resolution),this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO,i),this.setUniformFloatVec2(DefaultUniform.VIEWPORT_SIZE_PX,[n[0],n[1]]),this.setUniformFloatValue(DefaultUniform.ROTATION,r)}applyHitDetectionUniform(e){const n=this.getUniformLocation(DefaultUniform.HIT_DETECTION);this.getGL().uniform1i(n,e?1:0),e&&this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO,.5)}applyUniforms(e){const n=this.gl_;let r,i=0;this.uniforms_.forEach(s=>{if(r=typeof s.value=="function"?s.value(e):s.value,r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof ImageData||r instanceof WebGLTexture){r instanceof WebGLTexture&&!s.texture?(s.prevValue=void 0,s.texture=r):s.texture||(s.prevValue=void 0,s.texture=n.createTexture()),this.bindTexture(s.texture,i,s.name),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);const o=!(r instanceof HTMLImageElement)||r.complete;!(r instanceof WebGLTexture)&&o&&s.prevValue!==r&&(s.prevValue=r,n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r)),i++}else if(Array.isArray(r)&&r.length===6)this.setUniformMatrixValue(s.name,fromTransform(this.tmpMat4_,r));else if(Array.isArray(r)&&r.length<=4)switch(r.length){case 2:n.uniform2f(this.getUniformLocation(s.name),r[0],r[1]);return;case 3:n.uniform3f(this.getUniformLocation(s.name),r[0],r[1],r[2]);return;case 4:n.uniform4f(this.getUniformLocation(s.name),r[0],r[1],r[2],r[3]);return;default:return}else typeof r=="number"&&n.uniform1f(this.getUniformLocation(s.name),r)})}useProgram(e,n){this.gl_.useProgram(e),this.currentProgram_=e,n&&(this.applyFrameState(n),this.applyUniforms(n))}compileShader(e,n){const r=this.gl_,i=r.createShader(n);return r.shaderSource(i,e),r.compileShader(i),i}getProgram(e,n){const r=this.gl_,i=this.compileShader(e,r.FRAGMENT_SHADER),s=this.compileShader(n,r.VERTEX_SHADER),o=r.createProgram();if(r.attachShader(o,i),r.attachShader(o,s),r.linkProgram(o),!r.getShaderParameter(i,r.COMPILE_STATUS)){const a=`Fragment shader compilation failed: ${r.getShaderInfoLog(i)}`;throw new Error(a)}if(r.deleteShader(i),!r.getShaderParameter(s,r.COMPILE_STATUS)){const a=`Vertex shader compilation failed: ${r.getShaderInfoLog(s)}`;throw new Error(a)}if(r.deleteShader(s),!r.getProgramParameter(o,r.LINK_STATUS)){const a=`GL program linking failed: ${r.getProgramInfoLog(o)}`;throw new Error(a)}return o}getUniformLocation(e){const n=getUid(this.currentProgram_);return this.uniformLocationsByProgram_[n]===void 0&&(this.uniformLocationsByProgram_[n]={}),this.uniformLocationsByProgram_[n][e]===void 0&&(this.uniformLocationsByProgram_[n][e]=this.gl_.getUniformLocation(this.currentProgram_,e)),this.uniformLocationsByProgram_[n][e]}getAttributeLocation(e){const n=getUid(this.currentProgram_);return this.attribLocationsByProgram_[n]===void 0&&(this.attribLocationsByProgram_[n]={}),this.attribLocationsByProgram_[n][e]===void 0&&(this.attribLocationsByProgram_[n][e]=this.gl_.getAttribLocation(this.currentProgram_,e)),this.attribLocationsByProgram_[n][e]}makeProjectionTransform(e,n){const r=e.size,i=e.viewState.rotation,s=e.viewState.resolution,o=e.viewState.center;return compose(n,0,0,2/(s*r[0]),2/(s*r[1]),-i,-o[0],-o[1]),n}setUniformFloatValue(e,n){this.gl_.uniform1f(this.getUniformLocation(e),n)}setUniformFloatVec2(e,n){this.gl_.uniform2fv(this.getUniformLocation(e),n)}setUniformFloatVec4(e,n){this.gl_.uniform4fv(this.getUniformLocation(e),n)}setUniformMatrixValue(e,n){this.gl_.uniformMatrix4fv(this.getUniformLocation(e),!1,n)}enableAttributeArray_(e,n,r,i,s){const o=this.getAttributeLocation(e);o<0||(this.gl_.enableVertexAttribArray(o),this.gl_.vertexAttribPointer(o,n,r,!1,i,s))}enableAttributes(e){const n=computeAttributesStride(e);let r=0;for(let i=0;i<e.length;i++){const s=e[i];this.enableAttributeArray_(s.name,s.size,s.type||FLOAT,n,r),r+=s.size*getByteSizeFromType(s.type)}}handleWebGLContextLost(e){clear(this.bufferCache_),this.currentProgram_=null,e.preventDefault()}handleWebGLContextRestored(){this.needsToBeRecreated_=!0}needsToBeRecreated(){return this.needsToBeRecreated_}createTexture(e,n,r,i){const s=this.gl_;r=r||s.createTexture();const o=i?s.NEAREST:s.LINEAR;s.bindTexture(s.TEXTURE_2D,r),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,o),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,o),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,s.CLAMP_TO_EDGE),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,s.CLAMP_TO_EDGE);const a=0,l=s.RGBA,u=0,c=s.RGBA,d=s.UNSIGNED_BYTE;return n instanceof Uint8Array?s.texImage2D(s.TEXTURE_2D,a,l,e[0],e[1],u,c,d,n):n?s.texImage2D(s.TEXTURE_2D,a,l,c,d,n):s.texImage2D(s.TEXTURE_2D,a,l,e[0],e[1],u,c,d,null),r}}function computeAttributesStride(t){let e=0;for(let n=0;n<t.length;n++){const r=t[n];e+=r.size*getByteSizeFromType(r.type)}return e}function getByteSizeFromType(t){switch(t){case AttributeType.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case AttributeType.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case AttributeType.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case AttributeType.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}class WebGLLayerRenderer extends LayerRenderer{constructor(e,n){super(e),n=n||{},this.inversePixelTransform_=create$2(),this.postProcesses_=n.postProcesses,this.uniforms_=n.uniforms,this.helper,this.onMapChanged_=()=>{this.clearCache(),this.removeHelper()},e.addChangeListener(LayerProperty.MAP,this.onMapChanged_),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(e,n){const r=this.getLayer();if(r.hasListener(RenderEventType.PRECOMPOSE)){const i=new RenderEvent(RenderEventType.PRECOMPOSE,void 0,n,e);r.dispatchEvent(i)}}dispatchPostComposeEvent(e,n){const r=this.getLayer();if(r.hasListener(RenderEventType.POSTCOMPOSE)){const i=new RenderEvent(RenderEventType.POSTCOMPOSE,void 0,n,e);r.dispatchEvent(i)}}reset(e){this.uniforms_=e.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(e){if(this.getLayer().getRenderSource()){let n=!0,r=-1,i;for(let o=0,a=e.layerStatesArray.length;o<a;o++){const l=e.layerStatesArray[o].layer,u=l.getRenderer();if(!(u instanceof WebGLLayerRenderer)){n=!0;continue}const c=l.getClassName();if((n||c!==i)&&(r+=1,n=!1),i=c,u===this)break}const s="map/"+e.mapId+"/group/"+r;(!this.helper||!this.helper.canvasCacheKeyMatches(s)||this.helper.needsToBeRecreated())&&(this.removeHelper(),this.helper=new WebGLHelper({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:s}),i&&(this.helper.getCanvas().className=i),this.afterHelperCreated())}return this.prepareFrameInternal(e)}afterHelperCreated(){}prepareFrameInternal(e){return!0}clearCache(){}disposeInternal(){var e;this.clearCache(),this.removeHelper(),(e=this.getLayer())==null||e.removeChangeListener(LayerProperty.MAP,this.onMapChanged_),super.disposeInternal()}dispatchRenderEvent_(e,n,r){const i=this.getLayer();if(i.hasListener(e)){compose(this.inversePixelTransform_,0,0,r.pixelRatio,-r.pixelRatio,0,0,-r.size[1]);const s=new RenderEvent(e,this.inversePixelTransform_,r,n);i.dispatchEvent(s)}}preRender(e,n){this.dispatchRenderEvent_(RenderEventType.PRERENDER,e,n)}postRender(e,n){this.dispatchRenderEvent_(RenderEventType.POSTRENDER,e,n)}}const tmpArray4=new Uint8Array(4);class WebGLRenderTarget{constructor(e,n){this.helper_=e;const r=e.getGL();this.texture_=r.createTexture(),this.framebuffer_=r.createFramebuffer(),this.depthbuffer_=r.createRenderbuffer(),this.size_=n||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(e){equals$2(e,this.size_)||(this.size_[0]=e[0],this.size_[1]=e[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const e=this.size_,n=this.helper_.getGL();n.bindFramebuffer(n.FRAMEBUFFER,this.framebuffer_),n.readPixels(0,0,e[0],e[1],n.RGBA,n.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(e,n){if(e<0||n<0||e>this.size_[0]||n>=this.size_[1])return tmpArray4[0]=0,tmpArray4[1]=0,tmpArray4[2]=0,tmpArray4[3]=0,tmpArray4;this.readAll();const r=Math.floor(e)+(this.size_[1]-Math.floor(n)-1)*this.size_[0];return tmpArray4[0]=this.data_[r*4],tmpArray4[1]=this.data_[r*4+1],tmpArray4[2]=this.data_[r*4+2],tmpArray4[3]=this.data_[r*4+3],tmpArray4}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const e=this.size_,n=this.helper_.getGL();this.texture_=this.helper_.createTexture(e,null,this.texture_),n.bindFramebuffer(n.FRAMEBUFFER,this.framebuffer_),n.viewport(0,0,e[0],e[1]),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.texture_,0),n.bindRenderbuffer(n.RENDERBUFFER,this.depthbuffer_),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,e[0],e[1]),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(e[0]*e[1]*4)}}const WebGLWorkerMessageType={GENERATE_POINT_BUFFERS:"GENERATE_POINT_BUFFERS"},LINESTRING_ANGLE_COSINE_CUTOFF=.985;function colorEncodeId(t,e){e=e||[];const n=256,r=n-1;return e[0]=Math.floor(t/n/n/n)/r,e[1]=Math.floor(t/n/n)%n/r,e[2]=Math.floor(t/n)%n/r,e[3]=t%n/r,e}function colorDecodeId(t){let e=0;const n=256,r=n-1;return e+=Math.round(t[0]*n*n*n*r),e+=Math.round(t[1]*n*n*r),e+=Math.round(t[2]*n*r),e+=Math.round(t[3]*r),e}function create(){const t='const t="GENERATE_POLYGON_BUFFERS",e="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS";function r(t,e){const n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function x(t,e){const n=(r=e)[0]*r[3]-r[1]*r[2];var r;!function(t,e){if(!t)throw new Error(e)}(0!==n,"Transformation matrix cannot be inverted");const x=e[0],o=e[1],u=e[2],i=e[3],f=e[4],s=e[5];return t[0]=i/n,t[1]=-o/n,t[2]=-u/n,t[3]=x/n,t[4]=(u*s-i*f)/n,t[5]=-(x*s-o*f)/n,t}function o(t,e,n=2){const r=e&&e.length,x=r?e[0]*n:t.length;let o=u(t,0,x,n,!0);const i=[];if(!o||o.next===o.prev)return i;let s,l,c;if(r&&(o=function(t,e,n,r){const x=[];for(let n=0,o=e.length;n<o;n++){const i=u(t,e[n]*r,n<o-1?e[n+1]*r:t.length,r,!1);i===i.next&&(i.steiner=!0),x.push(g(i))}x.sort(y);for(let t=0;t<x.length;t++)n=h(x[t],n);return n}(t,e,o,n)),t.length>80*n){s=1/0,l=1/0;let e=-1/0,r=-1/0;for(let o=n;o<x;o+=n){const n=t[o],x=t[o+1];n<s&&(s=n),x<l&&(l=x),n>e&&(e=n),x>r&&(r=x)}c=Math.max(e-s,r-l),c=0!==c?32767/c:0}return f(o,i,n,s,l,c,0),i}function u(t,e,n,r,x){let o;if(x===function(t,e,n,r){let x=0;for(let o=e,u=n-r;o<n;o+=r)x+=(t[u]-t[o])*(t[o+1]+t[u+1]),u=o;return x}(t,e,n,r)>0)for(let x=e;x<n;x+=r)o=z(x/r|0,t[x],t[x+1],o);else for(let x=n-r;x>=e;x-=r)o=z(x/r|0,t[x],t[x+1],o);return o&&M(o,o.next)&&(F(o),o=o.next),o}function i(t,e){if(!t)return t;e||(e=t);let n,r=t;do{if(n=!1,r.steiner||!M(r,r.next)&&0!==d(r.prev,r,r.next))r=r.next;else{if(F(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function f(t,e,n,r,x,o,u){if(!t)return;!u&&o&&function(t,e,n,r){let x=t;do{0===x.z&&(x.z=v(x.x,x.y,e,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==t);x.prevZ.nextZ=null,x.prevZ=null,function(t){let e,n=1;do{let r,x=t;t=null;let o=null;for(e=0;x;){e++;let u=x,i=0;for(let t=0;t<n&&(i++,u=u.nextZ,u);t++);let f=n;for(;i>0||f>0&&u;)0!==i&&(0===f||!u||x.z<=u.z)?(r=x,x=x.nextZ,i--):(r=u,u=u.nextZ,f--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;x=u}o.nextZ=null,n*=2}while(e>1)}(x)}(t,r,x,o);let y=t;for(;t.prev!==t.next;){const h=t.prev,p=t.next;if(o?l(t,r,x,o):s(t))e.push(h.i,t.i,p.i),F(t),t=p.next,y=p.next;else if((t=p)===y){u?1===u?f(t=c(i(t),e),e,n,r,x,o,2):2===u&&a(t,e,n,r,x,o):f(i(t),e,n,r,x,o,1);break}}}function s(t){const e=t.prev,n=t,r=t.next;if(d(e,n,r)>=0)return!1;const x=e.x,o=n.x,u=r.x,i=e.y,f=n.y,s=r.y,l=x<o?x<u?x:u:o<u?o:u,c=i<f?i<s?i:s:f<s?f:s,a=x>o?x>u?x:u:o>u?o:u,y=i>f?i>s?i:s:f>s?f:s;let h=r.next;for(;h!==e;){if(h.x>=l&&h.x<=a&&h.y>=c&&h.y<=y&&b(x,i,o,f,u,s,h.x,h.y)&&d(h.prev,h,h.next)>=0)return!1;h=h.next}return!0}function l(t,e,n,r){const x=t.prev,o=t,u=t.next;if(d(x,o,u)>=0)return!1;const i=x.x,f=o.x,s=u.x,l=x.y,c=o.y,a=u.y,y=i<f?i<s?i:s:f<s?f:s,h=l<c?l<a?l:a:c<a?c:a,p=i>f?i>s?i:s:f>s?f:s,g=l>c?l>a?l:a:c>a?c:a,Z=v(y,h,e,n,r),M=v(p,g,e,n,r);let w=t.prevZ,m=t.nextZ;for(;w&&w.z>=Z&&m&&m.z<=M;){if(w.x>=y&&w.x<=p&&w.y>=h&&w.y<=g&&w!==x&&w!==u&&b(i,l,f,c,s,a,w.x,w.y)&&d(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,m.x>=y&&m.x<=p&&m.y>=h&&m.y<=g&&m!==x&&m!==u&&b(i,l,f,c,s,a,m.x,m.y)&&d(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;w&&w.z>=Z;){if(w.x>=y&&w.x<=p&&w.y>=h&&w.y<=g&&w!==x&&w!==u&&b(i,l,f,c,s,a,w.x,w.y)&&d(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;m&&m.z<=M;){if(m.x>=y&&m.x<=p&&m.y>=h&&m.y<=g&&m!==x&&m!==u&&b(i,l,f,c,s,a,m.x,m.y)&&d(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function c(t,e){let n=t;do{const r=n.prev,x=n.next.next;!M(r,x)&&w(r,n,n.next,x)&&E(r,x)&&E(x,r)&&(e.push(r.i,n.i,x.i),F(n),F(n.next),n=t=x),n=n.next}while(n!==t);return i(n)}function a(t,e,n,r,x,o){let u=t;do{let t=u.next.next;for(;t!==u.prev;){if(u.i!==t.i&&Z(u,t)){let s=I(u,t);return u=i(u,u.next),s=i(s,s.next),f(u,e,n,r,x,o,0),void f(s,e,n,r,x,o,0)}t=t.next}u=u.next}while(u!==t)}function y(t,e){return t.x-e.x}function h(t,e){const n=function(t,e){let n=e;const r=t.x,x=t.y;let o,u=-1/0;do{if(x<=n.y&&x>=n.next.y&&n.next.y!==n.y){const t=n.x+(x-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>u&&(u=t,o=n.x<n.next.x?n:n.next,t===r))return o}n=n.next}while(n!==e);if(!o)return null;const i=o,f=o.x,s=o.y;let l=1/0;n=o;do{if(r>=n.x&&n.x>=f&&r!==n.x&&b(x<s?r:u,x,f,s,x<s?u:r,x,n.x,n.y)){const e=Math.abs(x-n.y)/(r-n.x);E(n,t)&&(e<l||e===l&&(n.x>o.x||n.x===o.x&&p(o,n)))&&(o=n,l=e)}n=n.next}while(n!==i);return o}(t,e);if(!n)return e;const r=I(n,t);return i(r,r.next),i(n,n.next)}function p(t,e){return d(t.prev,t,e.prev)<0&&d(e.next,t,t.next)<0}function v(t,e,n,r,x){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function b(t,e,n,r,x,o,u,i){return(x-u)*(e-i)>=(t-u)*(o-i)&&(t-u)*(r-i)>=(n-u)*(e-i)&&(n-u)*(o-i)>=(x-u)*(r-i)}function Z(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&w(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){let n=t,r=!1;const x=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&x<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(d(t.prev,t,e.prev)||d(t,e.prev,e))||M(t,e)&&d(t.prev,t,t.next)>0&&d(e.prev,e,e.next)>0)}function d(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function M(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,n,r){const x=A(d(t,e,n)),o=A(d(t,e,r)),u=A(d(n,r,t)),i=A(d(n,r,e));return x!==o&&u!==i||(!(0!==x||!m(t,n,e))||(!(0!==o||!m(t,r,e))||(!(0!==u||!m(n,t,r))||!(0!==i||!m(n,e,r)))))}function m(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function A(t){return t>0?1:t<0?-1:0}function E(t,e){return d(t.prev,t,t.next)<0?d(t,e,t.next)>=0&&d(t,t.prev,e)>=0:d(t,e,t.prev)<0||d(t,t.next,e)<0}function I(t,e){const n=P(t.i,t.x,t.y),r=P(e.i,e.x,e.y),x=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=x,x.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function z(t,e,n,r){const x=P(t,e,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function F(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function P(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}new Array(6);const B=[],N={vertexPosition:0,indexPosition:0};function R(t,e,n,r,x){t[e+0]=n,t[e+1]=r,t[e+2]=x}function S(t,e,n,r,x,o){const u=3+x,i=t[e+0],f=t[e+1],s=B;s.length=x;for(let n=0;n<s.length;n++)s[n]=t[e+2+n];let l=o?o.vertexPosition:0,c=o?o.indexPosition:0;const a=l/u;return R(n,l,i,f,0),s.length&&n.set(s,l+3),l+=u,R(n,l,i,f,1),s.length&&n.set(s,l+3),l+=u,R(n,l,i,f,2),s.length&&n.set(s,l+3),l+=u,R(n,l,i,f,3),s.length&&n.set(s,l+3),l+=u,r[c++]=a,r[c++]=a+1,r[c++]=a+3,r[c++]=a+1,r[c++]=a+2,r[c++]=a+3,N.vertexPosition=l,N.indexPosition=c,N}function T(t,e,n,x,o,u,i,f,s,l,c){const a=10+f.length,y=u.length/a,h=[t[e+0],t[e+1]],p=[t[n],t[n+1]],v=t[e+2],g=t[n+2],b=r(s,[...h]),Z=r(s,[...p]);function d(t,e,n){const r=Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])),x=[(e[0]-t[0])/r,(e[1]-t[1])/r],o=[-x[1],x[0]],u=Math.sqrt((n[0]-t[0])*(n[0]-t[0])+(n[1]-t[1])*(n[1]-t[1])),i=[(n[0]-t[0])/u,(n[1]-t[1])/u],f=0===r||0===u?0:Math.acos((s=i[0]*x[0]+i[1]*x[1],l=-1,c=1,Math.min(Math.max(s,l),c)));var s,l,c;return i[0]*o[0]+i[1]*o[1]>0?f:2*Math.PI-f}let M=-1,w=-1,m=c;const A=null!==o;if(null!==x){M=d(b,Z,r(s,[...[t[x],t[x+1]]])),Math.cos(M)<=.985&&(m+=Math.tan((M-Math.PI)/2))}if(A){w=d(Z,b,r(s,[...[t[o],t[o+1]]])),Math.cos(w)<=.985&&(m+=Math.tan((Math.PI-w)/2))}function E(t,e){return 0===e?1e4*t:Math.sign(e)*(1e4*t+Math.abs(e))}return u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(0,c)),u.push(...f),u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(1,c)),u.push(...f),u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(2,c)),u.push(...f),u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(3,c)),u.push(...f),i.push(y,y+1,y+2,y+1,y+3,y+2),{length:l+Math.sqrt((Z[0]-b[0])*(Z[0]-b[0])+(Z[1]-b[1])*(Z[1]-b[1])),angle:m}}function _(t,e,n,r,x){const u=2+x;let i=e;const f=t.slice(i,i+x);i+=x;const s=t[i++];let l=0;const c=new Array(s-1);for(let e=0;e<s;e++)l+=t[i++],e<s-1&&(c[e]=l);const a=t.slice(i,i+2*l),y=o(a,c,2);for(let t=0;t<y.length;t++)r.push(y[t]+n.length/u);for(let t=0;t<a.length;t+=2)n.push(a[t],a[t+1],...f);return i+2*l}const O=self;O.onmessage=r=>{const o=r.data;switch(o.type){case e:{const t=3,e=2,n=o.customAttributesSize,r=e+n,x=new Float32Array(o.renderInstructions),u=x.length/r,i=4*u*(n+t),f=new Uint32Array(6*u),s=new Float32Array(i);let l;for(let t=0;t<x.length;t+=r)l=S(x,t,s,f,n,l);const c=Object.assign({vertexBuffer:s.buffer,indexBuffer:f.buffer,renderInstructions:x.buffer},o);O.postMessage(c,[s.buffer,f.buffer,x.buffer]);break}case n:{const t=[],e=[],n=o.customAttributesSize,r=3,u=new Float32Array(o.renderInstructions);let i=0;const f=[1,0,0,1,0,0];let s,l;for(x(f,o.renderInstructionsTransform);i<u.length;){l=Array.from(u.slice(i,i+n)),i+=n,s=u[i++];const x=i,o=i+(s-1)*r,c=u[x]===u[o]&&u[x+1]===u[o+1];let a=0,y=0;for(let n=0;n<s-1;n++){let h=null;n>0?h=i+(n-1)*r:c&&(h=o-r);let p=null;n<s-2?p=i+(n+2)*r:c&&(p=x+r);const v=T(u,i+n*r,i+(n+1)*r,h,p,t,e,l,f,a,y);a=v.length,y=v.angle}i+=s*r}const c=Uint32Array.from(e),a=Float32Array.from(t),y=Object.assign({vertexBuffer:a.buffer,indexBuffer:c.buffer,renderInstructions:u.buffer},o);O.postMessage(y,[a.buffer,c.buffer,u.buffer]);break}case t:{const t=[],e=[],n=o.customAttributesSize,r=new Float32Array(o.renderInstructions);let x=0;for(;x<r.length;)x=_(r,x,t,e,n);const u=Uint32Array.from(e),i=Float32Array.from(t),f=Object.assign({vertexBuffer:i.buffer,indexBuffer:u.buffer,renderInstructions:r.buffer},o);O.postMessage(f,[i.buffer,u.buffer,r.buffer]);break}}};';return new Worker(typeof Blob>"u"?"data:application/javascript;base64,"+Buffer.from(t,"binary").toString("base64"):URL.createObjectURL(new Blob([t],{type:"application/javascript"})))}function getWorldParameters(t,e){const n=t.viewState.projection,i=e.getSource().getWrapX()&&n.canWrapX(),s=n.getExtent(),o=t.extent,a=i?getWidth(s):null,l=i?Math.ceil((o[2]-s[2])/a)+1:1;return[i?Math.floor((o[0]-s[0])/a):0,l,a]}class WebGLPointsLayerRenderer extends WebGLLayerRenderer{constructor(e,n){const r=n.uniforms||{},i=create$2();r[DefaultUniform.PROJECTION_MATRIX]=i,super(e,{uniforms:r,postProcesses:n.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new WebGLArrayBuffer(ARRAY_BUFFER,DYNAMIC_DRAW),this.indicesBuffer_=new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER,DYNAMIC_DRAW),this.vertexShader_=n.vertexShader,this.fragmentShader_=n.fragmentShader,this.program_,this.hitDetectionEnabled_=n.hitDetectionEnabled??!0;const s=n.attributes?n.attributes.map(function(a){return{name:"a_"+a.name,size:1,type:AttributeType.FLOAT}}):[];this.attributes=[{name:"a_position",size:2,type:AttributeType.FLOAT},{name:"a_index",size:1,type:AttributeType.FLOAT}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_hitColor",size:4,type:AttributeType.FLOAT}),this.attributes.push({name:"a_featureUid",size:1,type:AttributeType.FLOAT})),this.attributes.push(...s),this.customAttributes=n.attributes?n.attributes:[],this.previousExtent_=createEmpty(),this.currentTransform_=i,this.renderTransform_=create$2(),this.invertRenderTransform_=create$2(),this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=create(),this.worker_.addEventListener("message",a=>{const l=a.data;if(l.type===WebGLWorkerMessageType.GENERATE_POINT_BUFFERS){const u=l.projectionTransform;this.verticesBuffer_.fromArrayBuffer(l.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(l.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=u,makeInverse(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(a.data.renderInstructions),l.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}}),this.featureCache_={},this.featureCount_=0;const o=this.getLayer().getSource();this.sourceListenKeys_=[listen(o,VectorEventType.ADDFEATURE,this.handleSourceFeatureAdded_,this),listen(o,VectorEventType.CHANGEFEATURE,this.handleSourceFeatureChanged_,this),listen(o,VectorEventType.REMOVEFEATURE,this.handleSourceFeatureDelete_,this),listen(o,VectorEventType.CLEAR,this.handleSourceFeatureClear_,this)],o.forEachFeature(a=>{this.featureCache_[getUid(a)]={feature:a,properties:a.getProperties(),geometry:a.getGeometry()},this.featureCount_++})}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new WebGLRenderTarget(this.helper)),this.verticesBuffer_.getArray()&&this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.getArray()&&this.helper.flushBufferData(this.indicesBuffer_)}handleSourceFeatureAdded_(e){const n=e.feature;this.featureCache_[getUid(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(e){const n=e.feature;this.featureCache_[getUid(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()}}handleSourceFeatureDelete_(e){const n=e.feature;delete this.featureCache_[getUid(n)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(e){const n=this.helper.getGL();this.preRender(n,e);const[r,i,s]=getWorldParameters(e,this.getLayer());return this.renderWorlds(e,!1,r,i,s),this.helper.finalizeDraw(e,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent),this.hitDetectionEnabled_&&(this.renderWorlds(e,!0,r,i,s),this.hitRenderTarget_.clearCachedData()),this.postRender(n,e),this.helper.getCanvas()}prepareFrameInternal(e){const n=this.getLayer(),r=n.getSource(),i=e.viewState,s=!e.viewHints[ViewHint.ANIMATING]&&!e.viewHints[ViewHint.INTERACTING],o=!equals$1(this.previousExtent_,e.extent),a=this.sourceRevision_<r.getRevision();if(a&&(this.sourceRevision_=r.getRevision()),s&&(o||a)){const l=i.projection,u=i.resolution,c=n instanceof BaseVectorLayer?n.getRenderBuffer():0,d=buffer(e.extent,c*u);r.loadFeatures(d,u,l),this.rebuildBuffers_(e),this.previousExtent_=e.extent.slice()}return this.helper.useProgram(this.program_,e),this.helper.prepareDraw(e),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0}rebuildBuffers_(e){const n=create$2();this.helper.makeProjectionTransform(e,n);const i=(this.hitDetectionEnabled_?7:2)+this.customAttributes.length,s=i*this.featureCount_;(!this.renderInstructions_||this.renderInstructions_.length!==s)&&(this.renderInstructions_=new Float32Array(s));let o,a;const l=[],u=[];let c=-1;for(const h in this.featureCache_)if(o=this.featureCache_[h],a=o.geometry,!(!a||a.getType()!=="Point")){if(l[0]=a.getFlatCoordinates()[0],l[1]=a.getFlatCoordinates()[1],apply(n,l),this.renderInstructions_[++c]=l[0],this.renderInstructions_[++c]=l[1],this.hitDetectionEnabled_){const f=colorEncodeId(c+5,u);this.renderInstructions_[++c]=f[0],this.renderInstructions_[++c]=f[1],this.renderInstructions_[++c]=f[2],this.renderInstructions_[++c]=f[3],this.renderInstructions_[++c]=Number(h)}for(let f=0;f<this.customAttributes.length;f++){const p=this.customAttributes[f].callback(o.feature,o.properties);this.renderInstructions_[++c]=p}}const d={id:++this.lastSentId,type:WebGLWorkerMessageType.GENERATE_POINT_BUFFERS,renderInstructions:this.renderInstructions_.buffer,customAttributesSize:i-2};d.projectionTransform=n,this.ready=!1,this.worker_.postMessage(d,[this.renderInstructions_.buffer]),this.renderInstructions_=null}forEachFeatureAtCoordinate(e,n,r,i,s){if(assert(this.hitDetectionEnabled_,"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has been disabled using the `disableHitDetection: true` option."),!this.renderInstructions_||!this.hitDetectionEnabled_)return;const o=apply(n.coordinateToPixelTransform,e.slice()),a=this.hitRenderTarget_.readPixel(o[0]/2,o[1]/2),l=[a[0]/255,a[1]/255,a[2]/255,a[3]/255],u=colorDecodeId(l),c=this.renderInstructions_[u],d=Math.floor(c).toString(),f=this.getLayer().getSource().getFeatureByUid(d);if(f)return i(f,this.getLayer(),null)}renderWorlds(e,n,r,i,s){let o=r;this.helper.useProgram(this.program_,e),n&&(this.hitRenderTarget_.setSize([Math.floor(e.size[0]/2),Math.floor(e.size[1]/2)]),this.helper.prepareDrawToRenderTarget(e,this.hitRenderTarget_,!0)),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes);do{this.helper.makeProjectionTransform(e,this.currentTransform_),translate$2(this.currentTransform_,o*s,0),multiply(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(e),this.helper.applyHitDetectionUniform(n);const a=this.indicesBuffer_.getSize();this.helper.drawElements(0,a)}while(++o<i)}disposeInternal(){this.worker_.terminate(),this.sourceListenKeys_.forEach(function(e){unlistenByKey(e)}),this.sourceListenKeys_=null,super.disposeInternal()}renderDeclutter(){}}class PaletteTexture{constructor(e,n){this.name=e,this.data=n,this.texture_=null}getTexture(e){if(!this.texture_){const n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.data.length/4,1,0,e.RGBA,e.UNSIGNED_BYTE,this.data),this.texture_=n}return this.texture_}delete(e){this.texture_&&e.deleteTexture(this.texture_),this.texture_=null}}const ERROR_THRESHOLD=.5;function asImageLike(t){return t instanceof Image||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageBitmap?t:null}function asArrayLike(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t instanceof DataView?t:null}const disposedError=new Error("disposed");let sharedContext=null;function toArray(t){sharedContext||(sharedContext=createCanvasContext2D(t.width,t.height,void 0,{willReadFrequently:!0}));const e=sharedContext.canvas,n=t.width;e.width!==n&&(e.width=n);const r=t.height;return e.height!==r&&(e.height=r),sharedContext.clearRect(0,0,n,r),sharedContext.drawImage(t,0,0),sharedContext.getImageData(0,0,n,r).data}const defaultSize=[256,256];class DataTile extends Tile{constructor(e){const n=TileState.IDLE;super(e.tileCoord,n,{transition:e.transition,interpolate:e.interpolate}),this.loader_=e.loader,this.data_=null,this.error_=null,this.size_=e.size||null,this.controller_=e.controller||null}getSize(){if(this.size_)return this.size_;const e=asImageLike(this.data_);return e?[e.width,e.height]:defaultSize}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==TileState.IDLE&&this.state!==TileState.ERROR)return;this.state=TileState.LOADING,this.changed();const e=this;this.loader_().then(function(n){e.data_=n,e.state=TileState.LOADED,e.changed()}).catch(function(n){e.error_=n,e.state=TileState.ERROR,e.changed()})}disposeInternal(){this.controller_&&(this.controller_.abort(disposedError),this.controller_=null),super.disposeInternal()}}const MAX_SUBDIVISION=10,MAX_TRIANGLE_WIDTH=.25;class Triangulation{constructor(e,n,r,i,s,o,a){this.sourceProj_=e,this.targetProj_=n;let l={};const u=a?createTransformFromCoordinateTransform(b=>apply(a,transform(b,this.targetProj_,this.sourceProj_))):getTransform(this.targetProj_,this.sourceProj_);this.transformInv_=function(b){const _=b[0]+"/"+b[1];return l[_]||(l[_]=u(b)),l[_]},this.maxSourceExtent_=i,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&getWidth(i)>=getWidth(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?getWidth(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?getWidth(this.targetProj_.getExtent()):null;const c=getTopLeft(r),d=getTopRight(r),h=getBottomRight(r),f=getBottomLeft(r),p=this.transformInv_(c),g=this.transformInv_(d),v=this.transformInv_(h),m=this.transformInv_(f),y=MAX_SUBDIVISION+(o?Math.max(0,Math.ceil(Math.log2(getArea(r)/(o*o*256*256)))):0);if(this.addQuad_(c,d,h,f,p,g,v,m,y),this.wrapsXInSource_){let b=1/0;this.triangles_.forEach(function(_,T,x){b=Math.min(b,_.source[0][0],_.source[1][0],_.source[2][0])}),this.triangles_.forEach(_=>{if(Math.max(_.source[0][0],_.source[1][0],_.source[2][0])-b>this.sourceWorldWidth_/2){const T=[[_.source[0][0],_.source[0][1]],[_.source[1][0],_.source[1][1]],[_.source[2][0],_.source[2][1]]];T[0][0]-b>this.sourceWorldWidth_/2&&(T[0][0]-=this.sourceWorldWidth_),T[1][0]-b>this.sourceWorldWidth_/2&&(T[1][0]-=this.sourceWorldWidth_),T[2][0]-b>this.sourceWorldWidth_/2&&(T[2][0]-=this.sourceWorldWidth_);const x=Math.min(T[0][0],T[1][0],T[2][0]);Math.max(T[0][0],T[1][0],T[2][0])-x<this.sourceWorldWidth_/2&&(_.source=T)}})}l={}}addTriangle_(e,n,r,i,s,o){this.triangles_.push({source:[i,s,o],target:[e,n,r]})}addQuad_(e,n,r,i,s,o,a,l,u){const c=boundingExtent([s,o,a,l]),d=this.sourceWorldWidth_?getWidth(c)/this.sourceWorldWidth_:null,h=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&d>.5&&d<1;let p=!1;if(u>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const v=boundingExtent([e,n,r,i]);p=getWidth(v)/this.targetWorldWidth_>MAX_TRIANGLE_WIDTH||p}!f&&this.sourceProj_.isGlobal()&&d&&(p=d>MAX_TRIANGLE_WIDTH||p)}if(!p&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3])&&!intersects(c,this.maxSourceExtent_))return;let g=0;if(!p&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(u>0)p=!0;else if(g=(!isFinite(s[0])||!isFinite(s[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),g!=1&&g!=2&&g!=4&&g!=8)return}if(u>0){if(!p){const v=[(e[0]+r[0])/2,(e[1]+r[1])/2],m=this.transformInv_(v);let y;f?y=(modulo(s[0],h)+modulo(a[0],h))/2-modulo(m[0],h):y=(s[0]+a[0])/2-m[0];const b=(s[1]+a[1])/2-m[1];p=y*y+b*b>this.errorThresholdSquared_}if(p){if(Math.abs(e[0]-r[0])<=Math.abs(e[1]-r[1])){const v=[(n[0]+r[0])/2,(n[1]+r[1])/2],m=this.transformInv_(v),y=[(i[0]+e[0])/2,(i[1]+e[1])/2],b=this.transformInv_(y);this.addQuad_(e,n,v,y,s,o,m,b,u-1),this.addQuad_(y,v,r,i,b,m,a,l,u-1)}else{const v=[(e[0]+n[0])/2,(e[1]+n[1])/2],m=this.transformInv_(v),y=[(r[0]+i[0])/2,(r[1]+i[1])/2],b=this.transformInv_(y);this.addQuad_(e,v,y,i,s,m,b,l,u-1),this.addQuad_(v,n,r,y,m,o,a,b,u-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}g&11||this.addTriangle_(e,r,i,s,a,l),g&14||this.addTriangle_(e,r,n,s,a,o),g&&(g&13||this.addTriangle_(n,i,e,o,l,s),g&7||this.addTriangle_(n,i,r,o,l,a))}calculateSourceExtent(){const e=createEmpty();return this.triangles_.forEach(function(n,r,i){const s=n.source;extendCoordinate(e,s[0]),extendCoordinate(e,s[1]),extendCoordinate(e,s[2])}),e}getTriangles(){return this.triangles_}}let brokenDiagonalRendering_;const canvasPool=[];function drawTestTriangle(t,e,n,r,i){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(r,i),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,r)+1,Math.max(n,i)),t.restore()}function verifyBrokenDiagonalRendering(t,e){return Math.abs(t[e*4]-210)>2||Math.abs(t[e*4+3]-.75*255)>2}function isBrokenDiagonalRendering(){if(brokenDiagonalRendering_===void 0){const t=createCanvasContext2D(6,6,canvasPool);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",drawTestTriangle(t,4,5,4,0),drawTestTriangle(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;brokenDiagonalRendering_=verifyBrokenDiagonalRendering(e,0)||verifyBrokenDiagonalRendering(e,4)||verifyBrokenDiagonalRendering(e,8),releaseCanvas$1(t),canvasPool.push(t.canvas)}return brokenDiagonalRendering_}function calculateSourceResolution(t,e,n,r){const i=transform(n,e,t);let s=getPointResolution(e,r,n);const o=e.getMetersPerUnit();o!==void 0&&(s*=o);const a=t.getMetersPerUnit();a!==void 0&&(s/=a);const l=t.getExtent();if(!l||containsCoordinate(l,i)){const u=getPointResolution(t,s,i)/s;isFinite(u)&&u>0&&(s/=u)}return s}function calculateSourceExtentResolution(t,e,n,r){const i=getCenter(n);let s=calculateSourceResolution(t,e,i,r);return(!isFinite(s)||s<=0)&&forEachCorner(n,function(o){return s=calculateSourceResolution(t,e,o,r),isFinite(s)&&s>0}),s}function render$1(t,e,n,r,i,s,o,a,l,u,c,d,h,f){const p=createCanvasContext2D(Math.round(n*t),Math.round(n*e),canvasPool);if(d||(p.imageSmoothingEnabled=!1),l.length===0)return p.canvas;p.scale(n,n);function g(T){return Math.round(T*n)/n}p.globalCompositeOperation="lighter";const v=createEmpty();l.forEach(function(T,x,k){extend(v,T.extent)});let m;const y=n/r,b=(d?1:1+Math.pow(2,-24))/y;{if(m=createCanvasContext2D(Math.round(getWidth(v)*y),Math.round(getHeight(v)*y),canvasPool),d||(m.imageSmoothingEnabled=!1),i&&f){const T=(i[0]-v[0])*y,x=-(i[3]-v[3])*y,k=getWidth(i)*y,w=getHeight(i)*y;m.rect(T,x,k,w),m.clip()}l.forEach(function(T,x,k){if(T.image.width>0&&T.image.height>0){if(T.clipExtent){m.save();const z=(T.clipExtent[0]-v[0])*y,Y=-(T.clipExtent[3]-v[3])*y,ae=getWidth(T.clipExtent)*y,j=getHeight(T.clipExtent)*y;m.rect(d?z:Math.round(z),d?Y:Math.round(Y),d?ae:Math.round(z+ae)-Math.round(z),d?j:Math.round(Y+j)-Math.round(Y)),m.clip()}const w=(T.extent[0]-v[0])*y,O=-(T.extent[3]-v[3])*y,S=getWidth(T.extent)*y,F=getHeight(T.extent)*y;m.drawImage(T.image,u,u,T.image.width-2*u,T.image.height-2*u,d?w:Math.round(w),d?O:Math.round(O),d?S:Math.round(w+S)-Math.round(w),d?F:Math.round(O+F)-Math.round(O)),T.clipExtent&&m.restore()}})}const _=getTopLeft(o);return a.getTriangles().forEach(function(T,x,k){const w=T.source,O=T.target;let S=w[0][0],F=w[0][1],z=w[1][0],Y=w[1][1],ae=w[2][0],j=w[2][1];const M=g((O[0][0]-_[0])/s),$=g(-(O[0][1]-_[1])/s),oe=g((O[1][0]-_[0])/s),A=g(-(O[1][1]-_[1])/s),V=g((O[2][0]-_[0])/s),D=g(-(O[2][1]-_[1])/s),le=S,ie=F;S=0,F=0,z-=le,Y-=ie,ae-=le,j-=ie;const re=[[z,Y,0,0,oe-M],[ae,j,0,0,V-M],[0,0,z,Y,A-$],[0,0,ae,j,D-$]],pe=solveLinearSystem(re);if(!pe)return;if(p.save(),p.beginPath(),isBrokenDiagonalRendering()||!d){p.moveTo(oe,A);const Ie=4,_e=M-oe,Ne=$-A;for(let $e=0;$e<Ie;$e++)p.lineTo(oe+g(($e+1)*_e/Ie),A+g($e*Ne/(Ie-1))),$e!=Ie-1&&p.lineTo(oe+g(($e+1)*_e/Ie),A+g(($e+1)*Ne/(Ie-1)));p.lineTo(V,D)}else p.moveTo(oe,A),p.lineTo(M,$),p.lineTo(V,D);p.clip(),p.transform(pe[0],pe[2],pe[1],pe[3],M,$),p.translate(v[0]-le,v[3]-ie);let xe;if(m)xe=m.canvas,p.scale(b,-b);else{const Ie=l[0],_e=Ie.extent;xe=Ie.image,p.scale(getWidth(_e)/xe.width,-getHeight(_e)/xe.height)}p.drawImage(xe,0,0),p.restore()}),m&&(releaseCanvas$1(m),canvasPool.push(m.canvas)),c&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach(function(T,x,k){const w=T.target,O=(w[0][0]-_[0])/s,S=-(w[0][1]-_[1])/s,F=(w[1][0]-_[0])/s,z=-(w[1][1]-_[1])/s,Y=(w[2][0]-_[0])/s,ae=-(w[2][1]-_[1])/s;p.beginPath(),p.moveTo(F,z),p.lineTo(O,S),p.lineTo(Y,ae),p.closePath(),p.stroke()}),p.restore()),p.canvas}const VERTEX_SHADER=`
|
|
74
|
+
attribute vec4 a_position;
|
|
75
|
+
attribute vec4 a_texcoord;
|
|
76
|
+
|
|
77
|
+
uniform mat4 u_matrix;
|
|
78
|
+
uniform mat4 u_textureMatrix;
|
|
79
|
+
|
|
80
|
+
varying vec2 v_texcoord;
|
|
81
|
+
|
|
82
|
+
void main() {
|
|
83
|
+
gl_Position = u_matrix * a_position;
|
|
84
|
+
vec2 texcoord = (u_textureMatrix * a_texcoord).xy;
|
|
85
|
+
v_texcoord = texcoord;
|
|
86
|
+
}
|
|
87
|
+
`,FRAGMENT_SHADER=`
|
|
88
|
+
precision mediump float;
|
|
89
|
+
|
|
90
|
+
varying vec2 v_texcoord;
|
|
91
|
+
|
|
92
|
+
uniform sampler2D u_texture;
|
|
93
|
+
|
|
94
|
+
void main() {
|
|
95
|
+
if (
|
|
96
|
+
v_texcoord.x < 0.0 ||
|
|
97
|
+
v_texcoord.y < 0.0 ||
|
|
98
|
+
v_texcoord.x > 1.0 ||
|
|
99
|
+
v_texcoord.y > 1.0
|
|
100
|
+
) {
|
|
101
|
+
discard;
|
|
102
|
+
}
|
|
103
|
+
gl_FragColor = texture2D(u_texture, v_texcoord);
|
|
104
|
+
}
|
|
105
|
+
`;class Canvas{constructor(e){this.gl_=e,this.program_=createProgram(e,FRAGMENT_SHADER,VERTEX_SHADER),this.positionLocation=e.getAttribLocation(this.program_,"a_position"),this.texcoordLocation=e.getAttribLocation(this.program_,"a_texcoord"),this.matrixLocation=e.getUniformLocation(this.program_,"u_matrix"),this.textureMatrixLocation=e.getUniformLocation(this.program_,"u_textureMatrix"),this.textureLocation=e.getUniformLocation(this.program_,"u_texture"),this.positionBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.positionBuffer),this.positions=[0,0,0,1,1,0,1,0,0,1,1,1],e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.positions),e.STATIC_DRAW),this.texcoordBuffer=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.texcoordBuffer),this.texcoords=[0,0,0,1,1,0,1,0,0,1,1,1],e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.texcoords),e.STATIC_DRAW)}drawImage(e,n,r,i,s,o,a,l,u,c,d,h,f){const p=this.gl_;l===void 0&&(l=i),u===void 0&&(u=s),o===void 0&&(o=n),a===void 0&&(a=r),c===void 0&&(c=o),d===void 0&&(d=a),h===void 0&&(h=p.canvas.width),f===void 0&&(f=p.canvas.height),p.bindTexture(p.TEXTURE_2D,e),p.useProgram(this.program_),p.bindBuffer(p.ARRAY_BUFFER,this.positionBuffer),p.enableVertexAttribArray(this.positionLocation),p.vertexAttribPointer(this.positionLocation,2,p.FLOAT,!1,0,0),p.bindBuffer(p.ARRAY_BUFFER,this.texcoordBuffer),p.enableVertexAttribArray(this.texcoordLocation),p.vertexAttribPointer(this.texcoordLocation,2,p.FLOAT,!1,0,0);let g=orthographic(0,h,0,f,-1,1);g=translate(g,l,u,0),g=scale(g,c,d,1),p.uniformMatrix4fv(this.matrixLocation,!1,g);let v=translation(i/n,s/r,0);v=scale(v,o/n,a/r,1),p.uniformMatrix4fv(this.textureMatrixLocation,!1,v),p.uniform1i(this.textureLocation,0),p.drawArrays(p.TRIANGLES,0,this.positions.length/2)}}function createShader(t,e,n){const r=t.createShader(e);if(r===null)throw new Error("Shader compilation failed");if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS)){const i=t.getShaderInfoLog(r);throw i===null?new Error("Shader info log creation failed"):new Error(i)}return r}function createProgram(t,e,n){const r=t.createProgram(),i=createShader(t,t.VERTEX_SHADER,n),s=createShader(t,t.FRAGMENT_SHADER,e);if(r===null)throw new Error("Program creation failed");if(t.attachShader(r,i),t.attachShader(r,s),t.linkProgram(r),!t.getProgramParameter(r,t.LINK_STATUS))throw t.getProgramInfoLog(r)===null?new Error("Program info log creation failed"):new Error;return r}const EDGE_VERTEX_SHADER=`
|
|
106
|
+
attribute vec4 a_position;
|
|
107
|
+
|
|
108
|
+
uniform mat4 u_matrix;
|
|
109
|
+
|
|
110
|
+
void main() {
|
|
111
|
+
gl_Position = u_matrix * a_position;
|
|
112
|
+
}
|
|
113
|
+
`,EDGE_FRAGMENT_SHADER=`
|
|
114
|
+
precision mediump float;
|
|
115
|
+
|
|
116
|
+
uniform vec4 u_val;
|
|
117
|
+
void main() {
|
|
118
|
+
gl_FragColor = u_val;
|
|
119
|
+
}
|
|
120
|
+
`,TRIANGLE_VERTEX_SHADER=`
|
|
121
|
+
attribute vec4 a_position;
|
|
122
|
+
attribute vec2 a_texcoord;
|
|
123
|
+
|
|
124
|
+
varying vec2 v_texcoord;
|
|
125
|
+
|
|
126
|
+
uniform mat4 u_matrix;
|
|
127
|
+
|
|
128
|
+
void main() {
|
|
129
|
+
gl_Position = u_matrix * a_position;
|
|
130
|
+
v_texcoord = a_texcoord;
|
|
131
|
+
}
|
|
132
|
+
`,TRIANGLE_FRAGMENT_SHADER=`
|
|
133
|
+
precision mediump float;
|
|
134
|
+
|
|
135
|
+
varying vec2 v_texcoord;
|
|
136
|
+
|
|
137
|
+
uniform sampler2D u_texture;
|
|
138
|
+
|
|
139
|
+
void main() {
|
|
140
|
+
if (v_texcoord.x < 0.0 || v_texcoord.x > 1.0 || v_texcoord.y < 0.0 || v_texcoord.y > 1.0) {
|
|
141
|
+
discard;
|
|
142
|
+
}
|
|
143
|
+
gl_FragColor = texture2D(u_texture, v_texcoord);
|
|
144
|
+
}
|
|
145
|
+
`;function createCanvasContextWebGL(t,e,n,r){let i;return n&&n.length?i=n.shift():WORKER_OFFSCREEN_CANVAS?i=new OffscreenCanvas(t||300,e||300):i=document.createElement("canvas"),t&&(i.width=t),e&&(i.height=e),i.getContext("webgl",r)}function releaseGLCanvas(t){const e=t.canvas;e.width=1,e.height=1,t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}const canvasGLPool=[];function render(t,e,n,r,i,s,o,a,l,u,c,d,h,f){const p=Math.round(r*e),g=Math.round(r*n);t.canvas.width=p,t.canvas.height=g;let v,m;if(m=t.createTexture(),t.bindTexture(t.TEXTURE_2D,m),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),h?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST)),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,p,g,0,t.RGBA,c,null),v=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,v),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,m,0),v===null)throw new Error("Could not create framebuffer");if(m===null)throw new Error("Could not create texture");if(l.length===0)return{width:p,height:g,framebuffer:v,texture:m};const y=createEmpty();l.forEach(function(S,F,z){extend(y,S.extent)});let b,_,T;const x=1/i;{if(b=t.createTexture(),m===null)throw new Error("Could not create texture");_=Math.round(getWidth(y)*x),T=Math.round(getHeight(y)*x);const S=t.getParameter(t.MAX_TEXTURE_SIZE),F=Math.max(_,T),z=F>S?S/F:1,Y=Math.round(_*z),ae=Math.round(T*z);t.bindTexture(t.TEXTURE_2D,b),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),h?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST)),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,Y,ae,0,t.RGBA,c,null);const j=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,j),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,b,0);const M=new Canvas(t);l.forEach(function($,oe,A){const V=($.extent[0]-y[0])*x*z,D=-($.extent[3]-y[3])*x*z,le=getWidth($.extent)*x*z,ie=getHeight($.extent)*x*z;if(t.bindFramebuffer(t.FRAMEBUFFER,j),t.viewport(0,0,Y,ae),$.clipExtent){const re=($.clipExtent[0]-y[0])*x*z,pe=-($.clipExtent[3]-y[3])*x*z,xe=getWidth($.clipExtent)*x*z,Ie=getHeight($.clipExtent)*x*z;t.enable(t.SCISSOR_TEST),t.scissor(h?re:Math.round(re),h?pe:Math.round(pe),h?xe:Math.round(re+xe)-Math.round(re),h?Ie:Math.round(pe+Ie)-Math.round(pe))}M.drawImage($.texture,$.width,$.height,u,u,$.width-2*u,$.height-2*u,h?V:Math.round(V),h?D:Math.round(D),h?le:Math.round(V+le)-Math.round(V),h?ie:Math.round(D+ie)-Math.round(D),Y,ae),t.disable(t.SCISSOR_TEST)}),t.deleteFramebuffer(j)}const k=getTopLeft(o),w=getTopLeft(y),O=S=>{const F=(S[0][0]-k[0])/s*r,z=-(S[0][1]-k[1])/s*r,Y=(S[1][0]-k[0])/s*r,ae=-(S[1][1]-k[1])/s*r,j=(S[2][0]-k[0])/s*r,M=-(S[2][1]-k[1])/s*r;return{u1:Y,v1:ae,u0:F,v0:z,u2:j,v2:M}};t.bindFramebuffer(t.FRAMEBUFFER,v),t.viewport(0,0,p,g);{const S=[],F=[],z=createProgram(t,TRIANGLE_FRAGMENT_SHADER,TRIANGLE_VERTEX_SHADER);t.useProgram(z);const Y=t.getUniformLocation(z,"u_texture");t.bindTexture(t.TEXTURE_2D,b),t.uniform1i(Y,0),a.getTriangles().forEach(function(V,D,le){const ie=V.source,re=V.target,{u1:pe,v1:xe,u0:Ie,v0:_e,u2:Ne,v2:$e}=O(re),Ue=(ie[0][0]-w[0])/i/_,At=-(ie[0][1]-w[1])/i/T,kt=(ie[1][0]-w[0])/i/_,En=-(ie[1][1]-w[1])/i/T,Tn=(ie[2][0]-w[0])/i/_,bn=-(ie[2][1]-w[1])/i/T;S.push(pe,xe,Ie,_e,Ne,$e),F.push(kt,En,Ue,At,Tn,bn)});const ae=orthographic(0,p,g,0,-1,1),j=t.getUniformLocation(z,"u_matrix");t.uniformMatrix4fv(j,!1,ae);const M=t.getAttribLocation(z,"a_position"),$=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,$),t.bufferData(t.ARRAY_BUFFER,new Float32Array(S),t.STATIC_DRAW),t.vertexAttribPointer(M,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(M);const oe=t.getAttribLocation(z,"a_texcoord"),A=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,A),t.bufferData(t.ARRAY_BUFFER,new Float32Array(F),t.STATIC_DRAW),t.vertexAttribPointer(oe,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(oe),t.drawArrays(t.TRIANGLES,0,S.length/2)}if(d){const S=createProgram(t,EDGE_FRAGMENT_SHADER,EDGE_VERTEX_SHADER);t.useProgram(S);const F=orthographic(0,p,g,0,-1,1),z=t.getUniformLocation(S,"u_matrix");t.uniformMatrix4fv(z,!1,F);const Y=Array.isArray(d)?d:[0,0,0,255],ae=t.getUniformLocation(S,"u_val");t.uniform4fv(ae,Y);const j=t.getAttribLocation(S,"a_position"),M=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,M),t.vertexAttribPointer(j,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(j);const $=a.getTriangles().reduce(function(oe,A){const V=A.target,{u1:D,v1:le,u0:ie,v0:re,u2:pe,v2:xe}=O(V);return oe.concat([D,le,ie,re,ie,re,pe,xe,pe,xe,D,le])},[]);t.bufferData(t.ARRAY_BUFFER,new Float32Array($),t.STATIC_DRAW),t.drawArrays(t.LINES,0,$.length/2)}return{width:p,height:g,framebuffer:v,texture:m}}class ReprojDataTile extends DataTile{constructor(e){super({tileCoord:e.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:e.interpolate,transition:e.transition}),this.renderEdges_=e.renderEdges!==void 0?e.renderEdges:!1,this.pixelRatio_=e.pixelRatio,this.gutter_=e.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=e.sourceTileGrid,this.targetTileGrid_=e.targetTileGrid,this.wrappedTileCoord_=e.wrappedTileCoord||e.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const n=e.sourceProj,r=n.getExtent(),i=e.sourceTileGrid.getExtent();this.clipExtent_=n.canWrapX()?i?getIntersection(r,i):r:i;const s=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),o=this.targetTileGrid_.getExtent();let a=this.sourceTileGrid_.getExtent();const l=o?getIntersection(s,o):s;if(getArea(l)===0){this.state=TileState.EMPTY;return}r&&(a?a=getIntersection(a,r):a=r);const u=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),c=e.targetProj,d=calculateSourceExtentResolution(n,c,l,u);if(!isFinite(d)||d<=0){this.state=TileState.EMPTY;return}const h=e.errorThreshold!==void 0?e.errorThreshold:ERROR_THRESHOLD;if(this.triangulation_=new Triangulation(n,c,l,a,d*h,u,e.transformMatrix),this.triangulation_.getTriangles().length===0){this.state=TileState.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(d);let f=this.triangulation_.calculateSourceExtent();if(a&&(n.canWrapX()?(f[1]=clamp(f[1],a[1],a[3]),f[3]=clamp(f[3],a[1],a[3])):f=getIntersection(f,a)),!getArea(f))this.state=TileState.EMPTY;else{let p=0,g=0;n.canWrapX()&&(p=getWidth(r),g=Math.floor((f[0]-r[0])/p)),wrapAndSliceX(f.slice(),n,!0).forEach(m=>{const y=this.sourceTileGrid_.getTileRangeForExtentAndZ(m,this.sourceZ_),b=e.getTileFunction;for(let _=y.minX;_<=y.maxX;_++)for(let T=y.minY;T<=y.maxY;T++){const x=b(this.sourceZ_,_,T,this.pixelRatio_);if(x){const k=g*p;this.sourceTiles_.push({tile:x,offset:k})}}++g}),this.sourceTiles_.length===0&&(this.state=TileState.EMPTY)}}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const e=[];let n=!1;if(this.sourceTiles_.forEach(_=>{var D;const T=_.tile;if(!T||T.getState()!==TileState.LOADED)return;const x=T.getSize(),k=this.gutter_;let w;const O=asArrayLike(T.getData());O?w=O:(n=!0,w=toArray(asImageLike(T.getData())));const S=[x[0]+2*k,x[1]+2*k],F=w instanceof Float32Array,z=S[0]*S[1],Y=F?Float32Array:Uint8ClampedArray,ae=new Y(w.buffer),j=Y.BYTES_PER_ELEMENT,M=j*ae.length/z,$=ae.byteLength/S[1],oe=Math.floor($/j/S[0]),A=this.sourceTileGrid_.getTileCoordExtent(T.tileCoord);A[0]+=_.offset,A[2]+=_.offset;const V=(D=this.clipExtent_)==null?void 0:D.slice();V&&(V[0]+=_.offset,V[2]+=_.offset),e.push({extent:A,clipExtent:V,data:ae,dataType:Y,bytesPerPixel:M,pixelSize:S,bandCount:oe})}),this.sourceTiles_.length=0,e.length===0){this.state=TileState.ERROR,this.changed();return}const r=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(r),s=typeof i=="number"?i:i[0],o=typeof i=="number"?i:i[1],a=s*this.pixelRatio_,l=o*this.pixelRatio_,u=this.targetTileGrid_.getResolution(r),c=this.sourceTileGrid_.getResolution(this.sourceZ_),d=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),h=e[0].bandCount,f=new e[0].dataType(h*a*l),p=createCanvasContextWebGL(a,l,canvasGLPool,{premultipliedAlpha:!1,antialias:!1});let g;const v=p.RGBA;let m;e[0].dataType==Float32Array?(m=p.FLOAT,p.getExtension("WEBGL_color_buffer_float"),p.getExtension("OES_texture_float"),p.getExtension("EXT_float_blend"),g=p.getExtension("OES_texture_float_linear")!==null&&this.interpolate):(m=p.UNSIGNED_BYTE,g=this.interpolate);const y=4,b=Math.ceil(h/y);for(let _=b-1;_>=0;--_){const T=[];for(let Y=0,ae=e.length;Y<ae;++Y){const j=e[Y],M=j.pixelSize,$=M[0],oe=M[1],A=new j.dataType(y*$*oe),V=j.data;let D=_*y;for(let ie=0,re=A.length;ie<re;ie+=y)A[ie]=V[D],A[ie+1]=V[D+1],A[ie+2]=V[D+2],A[ie+3]=V[D+3],D+=h;const le=p.createTexture();p.bindTexture(p.TEXTURE_2D,le),g?(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.LINEAR),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.LINEAR)):(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST)),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),p.texImage2D(p.TEXTURE_2D,0,v,$,oe,0,v,m,A),T.push({extent:j.extent,clipExtent:j.clipExtent,texture:le,width:$,height:oe})}const{framebuffer:x,width:k,height:w}=render(p,s,o,this.pixelRatio_,c,u,d,this.triangulation_,T,this.gutter_,m,this.renderEdges_,g),O=k,S=w*y,F=new e[0].dataType(O*S);p.bindFramebuffer(p.FRAMEBUFFER,x),p.readPixels(0,0,k,w,p.RGBA,m,F);let z=_*y;for(let Y=0,ae=F.length;Y<ae;Y+=y){const j=(O-1-(Y/S|0))*S+Y%S;f[z]=F[j],f[z+1]=F[j+1],f[z+2]=F[j+2],f[z+3]=F[j+3],z+=h}}if(releaseGLCanvas(p),canvasGLPool.push(p.canvas),n){const _=createCanvasContext2D(s,o),T=new ImageData(f,s);_.putImageData(T,0,0),this.reprojData_=_.canvas}else this.reprojData_=f;this.reprojSize_=[Math.round(a),Math.round(l)],this.state=TileState.LOADED,this.changed()}load(){if(this.state!==TileState.IDLE&&this.state!==TileState.ERROR)return;this.state=TileState.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:n})=>{const r=n.getState();if(r!==TileState.IDLE&&r!==TileState.LOADING)return;e++;const i=listen(n,EventType.CHANGE,()=>{const s=n.getState();(s==TileState.LOADED||s==TileState.ERROR||s==TileState.EMPTY)&&(unlistenByKey(i),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(i)}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:n}){n.getState()==TileState.IDLE&&n.load()})}unlistenSources_(){this.sourcesListenerKeys_.forEach(unlistenByKey),this.sourcesListenerKeys_=null}}class ReprojTile extends Tile{constructor(e,n,r,i,s,o,a,l,u,c,d,h){super(s,TileState.IDLE,h),this.renderEdges_=d!==void 0?d:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=n,this.targetTileGrid_=i,this.wrappedTileCoord_=o||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=e.canWrapX()?e.getExtent():void 0;const f=i.getTileCoordExtent(this.wrappedTileCoord_),p=this.targetTileGrid_.getExtent();let g=this.sourceTileGrid_.getExtent();const v=p?getIntersection(f,p):f;if(getArea(v)===0){this.state=TileState.EMPTY;return}const m=e.getExtent();m&&(g?g=getIntersection(g,m):g=m);const y=i.getResolution(this.wrappedTileCoord_[0]),b=calculateSourceExtentResolution(e,r,v,y);if(!isFinite(b)||b<=0){this.state=TileState.EMPTY;return}const _=c!==void 0?c:ERROR_THRESHOLD;if(this.triangulation_=new Triangulation(e,r,v,g,b*_,y),this.triangulation_.getTriangles().length===0){this.state=TileState.EMPTY;return}this.sourceZ_=n.getZForResolution(b);let T=this.triangulation_.calculateSourceExtent();if(g&&(e.canWrapX()?(T[1]=clamp(T[1],g[1],g[3]),T[3]=clamp(T[3],g[1],g[3])):T=getIntersection(T,g)),!getArea(T))this.state=TileState.EMPTY;else{let x=0,k=0;e.canWrapX()&&(x=getWidth(m),k=Math.floor((T[0]-m[0])/x)),wrapAndSliceX(T.slice(),e,!0).forEach(O=>{const S=n.getTileRangeForExtentAndZ(O,this.sourceZ_);for(let F=S.minX;F<=S.maxX;F++)for(let z=S.minY;z<=S.maxY;z++){const Y=u(this.sourceZ_,F,z,a);if(Y){const ae=k*x;this.sourceTiles_.push({tile:Y,offset:ae})}}++k}),this.sourceTiles_.length===0&&(this.state=TileState.EMPTY)}}getImage(){return this.canvas_}reproject_(){const e=[];if(this.sourceTiles_.forEach(n=>{var i;const r=n.tile;if(r&&r.getState()==TileState.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(r.tileCoord);s[0]+=n.offset,s[2]+=n.offset;const o=(i=this.clipExtent_)==null?void 0:i.slice();o&&(o[0]+=n.offset,o[2]+=n.offset),e.push({extent:s,clipExtent:o,image:r.getImage()})}}),this.sourceTiles_.length=0,e.length===0)this.state=TileState.ERROR;else{const n=this.wrappedTileCoord_[0],r=this.targetTileGrid_.getTileSize(n),i=typeof r=="number"?r:r[0],s=typeof r=="number"?r:r[1],o=this.targetTileGrid_.getResolution(n),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=render$1(i,s,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=TileState.LOADED}this.changed()}load(){if(this.state==TileState.IDLE){this.state=TileState.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:n})=>{const r=n.getState();if(r==TileState.IDLE||r==TileState.LOADING){e++;const i=listen(n,EventType.CHANGE,s=>{const o=n.getState();(o==TileState.LOADED||o==TileState.ERROR||o==TileState.EMPTY)&&(unlistenByKey(i),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(i)}}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:n},r,i){n.getState()==TileState.IDLE&&n.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(unlistenByKey),this.sourcesListenerKeys_=null}release(){this.canvas_&&(releaseCanvas$1(this.canvas_.getContext("2d")),canvasPool.push(this.canvas_),this.canvas_=null),super.release()}}const Uniforms={TILE_TEXTURE_ARRAY:"u_tileTextures",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight"};function computeOperatorFunctionName(t,e){return`operator_${t}_${Object.keys(e.functions).length}`}function numberToGlsl(t){const e=t.toString();return e.includes(".")?e:e+".0"}function arrayToGlsl(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${t.length}(${t.map(numberToGlsl).join(", ")})`}function colorToGlsl(t){const e=asArray(t),n=e.length>3?e[3]:1;return arrayToGlsl([e[0]/255,e[1]/255,e[2]/255,n])}function sizeToGlsl(t){const e=toSize(t);return arrayToGlsl(e)}const stringToFloatMap={};let stringToFloatCounter=0;function getStringNumberEquivalent(t){return t in stringToFloatMap||(stringToFloatMap[t]=stringToFloatCounter++),stringToFloatMap[t]}function stringToGlsl(t){return numberToGlsl(getStringNumberEquivalent(t))}function uniformNameForVariable(t){return"u_var_"+t}function newCompilationContext(){return{inFragmentShader:!1,variables:{},properties:{},functions:{},bandCount:0,featureId:!1,geometryType:!1}}const GET_BAND_VALUE_FUNC="getBandValue",PALETTE_TEXTURE_ARRAY="u_paletteTextures",FEATURE_ID_PROPERTY_NAME="featureId",GEOMETRY_TYPE_PROPERTY_NAME="geometryType";function buildExpression(t,e,n,r){const i=parse(t,e,n);return compile(i,e,r)}function createCompiler(t){return(e,n,r)=>{const i=n.args.length,s=new Array(i);for(let o=0;o<i;++o)s[o]=compile(n.args[o],r,e);return t(s,e)}}const compilers={[Ops.Get]:(t,e)=>{const r=e.args[0].value;return r in t.properties||(t.properties[r]={name:r,type:e.type}),(t.inFragmentShader?"v_prop_":"a_prop_")+r},[Ops.Id]:t=>(t.featureId=!0,(t.inFragmentShader?"v_":"a_")+FEATURE_ID_PROPERTY_NAME),[Ops.GeometryType]:t=>(t.geometryType=!0,(t.inFragmentShader?"v_":"a_")+GEOMETRY_TYPE_PROPERTY_NAME),[Ops.LineMetric]:()=>"currentLineMetric",[Ops.Var]:(t,e)=>{const r=e.args[0].value;return r in t.variables||(t.variables[r]={name:r,type:e.type}),uniformNameForVariable(r)},[Ops.Resolution]:()=>"u_resolution",[Ops.Zoom]:()=>"u_zoom",[Ops.Time]:()=>"u_time",[Ops.Any]:createCompiler(t=>`(${t.join(" || ")})`),[Ops.All]:createCompiler(t=>`(${t.join(" && ")})`),[Ops.Not]:createCompiler(([t])=>`(!${t})`),[Ops.Equal]:createCompiler(([t,e])=>`(${t} == ${e})`),[Ops.NotEqual]:createCompiler(([t,e])=>`(${t} != ${e})`),[Ops.GreaterThan]:createCompiler(([t,e])=>`(${t} > ${e})`),[Ops.GreaterThanOrEqualTo]:createCompiler(([t,e])=>`(${t} >= ${e})`),[Ops.LessThan]:createCompiler(([t,e])=>`(${t} < ${e})`),[Ops.LessThanOrEqualTo]:createCompiler(([t,e])=>`(${t} <= ${e})`),[Ops.Multiply]:createCompiler(t=>`(${t.join(" * ")})`),[Ops.Divide]:createCompiler(([t,e])=>`(${t} / ${e})`),[Ops.Add]:createCompiler(t=>`(${t.join(" + ")})`),[Ops.Subtract]:createCompiler(([t,e])=>`(${t} - ${e})`),[Ops.Clamp]:createCompiler(([t,e,n])=>`clamp(${t}, ${e}, ${n})`),[Ops.Mod]:createCompiler(([t,e])=>`mod(${t}, ${e})`),[Ops.Pow]:createCompiler(([t,e])=>`pow(${t}, ${e})`),[Ops.Abs]:createCompiler(([t])=>`abs(${t})`),[Ops.Floor]:createCompiler(([t])=>`floor(${t})`),[Ops.Ceil]:createCompiler(([t])=>`ceil(${t})`),[Ops.Round]:createCompiler(([t])=>`floor(${t} + 0.5)`),[Ops.Sin]:createCompiler(([t])=>`sin(${t})`),[Ops.Cos]:createCompiler(([t])=>`cos(${t})`),[Ops.Atan]:createCompiler(([t,e])=>e!==void 0?`atan(${t}, ${e})`:`atan(${t})`),[Ops.Sqrt]:createCompiler(([t])=>`sqrt(${t})`),[Ops.Match]:createCompiler(t=>{const e=t[0],n=t[t.length-1];let r=null;for(let i=t.length-3;i>=1;i-=2){const s=t[i],o=t[i+1];r=`(${e} == ${s} ? ${o} : ${r||n})`}return r}),[Ops.Between]:createCompiler(([t,e,n])=>`(${t} >= ${e} && ${t} <= ${n})`),[Ops.Interpolate]:createCompiler(([t,e,...n])=>{let r="";for(let i=0;i<n.length-2;i+=2){const s=n[i],o=r||n[i+1],a=n[i+2],l=n[i+3];let u;t===numberToGlsl(1)?u=`(${e} - ${s}) / (${a} - ${s})`:u=`(pow(${t}, (${e} - ${s})) - 1.0) / (pow(${t}, (${a} - ${s})) - 1.0)`,r=`mix(${o}, ${l}, clamp(${u}, 0.0, 1.0))`}return r}),[Ops.Case]:createCompiler(t=>{const e=t[t.length-1];let n=null;for(let r=t.length-3;r>=0;r-=2){const i=t[r],s=t[r+1];n=`(${i} ? ${s} : ${n||e})`}return n}),[Ops.In]:createCompiler(([t,...e],n)=>{const r=computeOperatorFunctionName("in",n),i=[];for(let s=0;s<e.length;s+=1)i.push(` if (inputValue == ${e[s]}) { return true; }`);return n.functions[r]=`bool ${r}(float inputValue) {
|
|
146
|
+
${i.join(`
|
|
147
|
+
`)}
|
|
148
|
+
return false;
|
|
149
|
+
}`,`${r}(${t})`}),[Ops.Array]:createCompiler(t=>`vec${t.length}(${t.join(", ")})`),[Ops.Color]:createCompiler(t=>{if(t.length===1)return`vec4(vec3(${t[0]} / 255.0), 1.0)`;if(t.length===2)return`vec4(vec3(${t[0]} / 255.0), ${t[1]})`;const e=t.slice(0,3).map(r=>`${r} / 255.0`);if(t.length===3)return`vec4(${e.join(", ")}, 1.0)`;const n=t[3];return`vec4(${e.join(", ")}, ${n})`}),[Ops.Band]:createCompiler(([t,e,n],r)=>{if(!(GET_BAND_VALUE_FUNC in r.functions)){let i="";const s=r.bandCount||1;for(let o=0;o<s;o++){const a=Math.floor(o/4);let l=o%4;o===s-1&&l===1&&(l=3);const u=`${Uniforms.TILE_TEXTURE_ARRAY}[${a}]`;i+=` if (band == ${o+1}.0) {
|
|
150
|
+
return texture2D(${u}, v_textureCoord + vec2(dx, dy))[${l}];
|
|
151
|
+
}
|
|
152
|
+
`}r.functions[GET_BAND_VALUE_FUNC]=`float getBandValue(float band, float xOffset, float yOffset) {
|
|
153
|
+
float dx = xOffset / ${Uniforms.TEXTURE_PIXEL_WIDTH};
|
|
154
|
+
float dy = yOffset / ${Uniforms.TEXTURE_PIXEL_HEIGHT};
|
|
155
|
+
${i}
|
|
156
|
+
}`}return`${GET_BAND_VALUE_FUNC}(${t}, ${e??"0.0"}, ${n??"0.0"})`}),[Ops.Palette]:(t,e)=>{const[n,...r]=e.args,i=r.length,s=new Uint8Array(i*4);for(let u=0;u<r.length;u++){const c=r[u].value,d=asArray(c),h=u*4;s[h]=d[0],s[h+1]=d[1],s[h+2]=d[2],s[h+3]=d[3]*255}t.paletteTextures||(t.paletteTextures=[]);const o=`${PALETTE_TEXTURE_ARRAY}[${t.paletteTextures.length}]`,a=new PaletteTexture(o,s);t.paletteTextures.push(a);const l=compile(n,NumberType,t);return`texture2D(${o}, vec2((${l} + 0.5) / ${i}.0, 0.5))`}};function compile(t,e,n){if(t instanceof CallExpression){const r=compilers[t.operator];if(r===void 0)throw new Error(`No compiler defined for this operator: ${JSON.stringify(t.operator)}`);return r(n,t,e)}if((t.type&NumberType)>0)return numberToGlsl(t.value);if((t.type&BooleanType)>0)return t.value.toString();if((t.type&StringType)>0)return stringToGlsl(t.value.toString());if((t.type&ColorType)>0)return colorToGlsl(t.value);if((t.type&NumberArrayType)>0)return arrayToGlsl(t.value);if((t.type&SizeType)>0)return sizeToGlsl(t.value);throw new Error(`Unexpected expression ${t.value} (expected type ${typeName(e)})`)}function createDefaultStyle(){return{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"#3399CC","stroke-width":1.25,"circle-radius":5,"circle-fill-color":"rgba(255,255,255,0.4)","circle-stroke-width":1.25,"circle-stroke-color":"#3399CC"}}const COMMON_HEADER=`#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
157
|
+
precision highp float;
|
|
158
|
+
#else
|
|
159
|
+
precision mediump float;
|
|
160
|
+
#endif
|
|
161
|
+
uniform mat4 u_projectionMatrix;
|
|
162
|
+
uniform mat4 u_screenToWorldMatrix;
|
|
163
|
+
uniform vec2 u_viewportSizePx;
|
|
164
|
+
uniform float u_pixelRatio;
|
|
165
|
+
uniform float u_globalAlpha;
|
|
166
|
+
uniform float u_time;
|
|
167
|
+
uniform float u_zoom;
|
|
168
|
+
uniform float u_resolution;
|
|
169
|
+
uniform float u_rotation;
|
|
170
|
+
uniform vec4 u_renderExtent;
|
|
171
|
+
uniform vec2 u_patternOrigin;
|
|
172
|
+
uniform float u_depth;
|
|
173
|
+
uniform mediump int u_hitDetection;
|
|
174
|
+
|
|
175
|
+
const float PI = 3.141592653589793238;
|
|
176
|
+
const float TWO_PI = 2.0 * PI;
|
|
177
|
+
float currentLineMetric = 0.; // an actual value will be used in the stroke shaders
|
|
178
|
+
`,DEFAULT_STYLE=createDefaultStyle();class ShaderBuilder{constructor(){this.uniforms_=[],this.attributes_=[],this.varyings_=[],this.hasSymbol_=!1,this.symbolSizeExpression_=`vec2(${numberToGlsl(DEFAULT_STYLE["circle-radius"])} + ${numberToGlsl(DEFAULT_STYLE["circle-stroke-width"]*.5)})`,this.symbolRotationExpression_="0.0",this.symbolOffsetExpression_="vec2(0.0)",this.symbolColorExpression_=colorToGlsl(DEFAULT_STYLE["circle-fill-color"]),this.texCoordExpression_="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression_="false",this.symbolRotateWithView_=!1,this.hasStroke_=!1,this.strokeWidthExpression_=numberToGlsl(DEFAULT_STYLE["stroke-width"]),this.strokeColorExpression_=colorToGlsl(DEFAULT_STYLE["stroke-color"]),this.strokeOffsetExpression_="0.",this.strokeCapExpression_=stringToGlsl("round"),this.strokeJoinExpression_=stringToGlsl("round"),this.strokeMiterLimitExpression_="10.",this.strokeDistanceFieldExpression_="-1000.",this.hasFill_=!1,this.fillColorExpression_=colorToGlsl(DEFAULT_STYLE["fill-color"]),this.vertexShaderFunctions_=[],this.fragmentShaderFunctions_=[]}addUniform(e){return this.uniforms_.push(e),this}addAttribute(e){return this.attributes_.push(e),this}addVarying(e,n,r){return this.varyings_.push({name:e,type:n,expression:r}),this}setSymbolSizeExpression(e){return this.hasSymbol_=!0,this.symbolSizeExpression_=e,this}getSymbolSizeExpression(){return this.symbolSizeExpression_}setSymbolRotationExpression(e){return this.symbolRotationExpression_=e,this}setSymbolOffsetExpression(e){return this.symbolOffsetExpression_=e,this}getSymbolOffsetExpression(){return this.symbolOffsetExpression_}setSymbolColorExpression(e){return this.hasSymbol_=!0,this.symbolColorExpression_=e,this}getSymbolColorExpression(){return this.symbolColorExpression_}setTextureCoordinateExpression(e){return this.texCoordExpression_=e,this}setFragmentDiscardExpression(e){return this.discardExpression_=e,this}getFragmentDiscardExpression(){return this.discardExpression_}setSymbolRotateWithView(e){return this.symbolRotateWithView_=e,this}setStrokeWidthExpression(e){return this.hasStroke_=!0,this.strokeWidthExpression_=e,this}setStrokeColorExpression(e){return this.hasStroke_=!0,this.strokeColorExpression_=e,this}getStrokeColorExpression(){return this.strokeColorExpression_}setStrokeOffsetExpression(e){return this.strokeOffsetExpression_=e,this}setStrokeCapExpression(e){return this.strokeCapExpression_=e,this}setStrokeJoinExpression(e){return this.strokeJoinExpression_=e,this}setStrokeMiterLimitExpression(e){return this.strokeMiterLimitExpression_=e,this}setStrokeDistanceFieldExpression(e){return this.strokeDistanceFieldExpression_=e,this}setFillColorExpression(e){return this.hasFill_=!0,this.fillColorExpression_=e,this}getFillColorExpression(){return this.fillColorExpression_}addVertexShaderFunction(e){this.vertexShaderFunctions_.includes(e)||this.vertexShaderFunctions_.push(e)}addFragmentShaderFunction(e){this.fragmentShaderFunctions_.includes(e)||this.fragmentShaderFunctions_.push(e)}getSymbolVertexShader(){return this.hasSymbol_?`${COMMON_HEADER}
|
|
179
|
+
${this.uniforms_.map(function(e){return"uniform "+e+";"}).join(`
|
|
180
|
+
`)}
|
|
181
|
+
attribute vec2 a_position;
|
|
182
|
+
attribute float a_index;
|
|
183
|
+
attribute vec4 a_hitColor;
|
|
184
|
+
${this.attributes_.map(function(e){return"attribute "+e+";"}).join(`
|
|
185
|
+
`)}
|
|
186
|
+
varying vec2 v_texCoord;
|
|
187
|
+
varying vec2 v_quadCoord;
|
|
188
|
+
varying vec4 v_hitColor;
|
|
189
|
+
varying vec2 v_centerPx;
|
|
190
|
+
varying float v_angle;
|
|
191
|
+
varying vec2 v_quadSizePx;
|
|
192
|
+
${this.varyings_.map(function(e){return"varying "+e.type+" "+e.name+";"}).join(`
|
|
193
|
+
`)}
|
|
194
|
+
${this.vertexShaderFunctions_.join(`
|
|
195
|
+
`)}
|
|
196
|
+
vec2 pxToScreen(vec2 coordPx) {
|
|
197
|
+
vec2 scaled = coordPx / u_viewportSizePx / 0.5;
|
|
198
|
+
return scaled;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
vec2 screenToPx(vec2 coordScreen) {
|
|
202
|
+
return (coordScreen * 0.5 + 0.5) * u_viewportSizePx;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
void main(void) {
|
|
206
|
+
v_quadSizePx = ${this.symbolSizeExpression_};
|
|
207
|
+
vec2 halfSizePx = v_quadSizePx * 0.5;
|
|
208
|
+
vec2 centerOffsetPx = ${this.symbolOffsetExpression_};
|
|
209
|
+
vec2 offsetPx = centerOffsetPx;
|
|
210
|
+
if (a_index == 0.0) {
|
|
211
|
+
offsetPx -= halfSizePx;
|
|
212
|
+
} else if (a_index == 1.0) {
|
|
213
|
+
offsetPx += halfSizePx * vec2(1., -1.);
|
|
214
|
+
} else if (a_index == 2.0) {
|
|
215
|
+
offsetPx += halfSizePx;
|
|
216
|
+
} else {
|
|
217
|
+
offsetPx += halfSizePx * vec2(-1., 1.);
|
|
218
|
+
}
|
|
219
|
+
float angle = ${this.symbolRotationExpression_};
|
|
220
|
+
${this.symbolRotateWithView_?"angle += u_rotation;":""}
|
|
221
|
+
float c = cos(-angle);
|
|
222
|
+
float s = sin(-angle);
|
|
223
|
+
offsetPx = vec2(c * offsetPx.x - s * offsetPx.y, s * offsetPx.x + c * offsetPx.y);
|
|
224
|
+
vec4 center = u_projectionMatrix * vec4(a_position, 0.0, 1.0);
|
|
225
|
+
gl_Position = center + vec4(pxToScreen(offsetPx), u_depth, 0.);
|
|
226
|
+
vec4 texCoord = ${this.texCoordExpression_};
|
|
227
|
+
float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;
|
|
228
|
+
float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;
|
|
229
|
+
v_texCoord = vec2(u, v);
|
|
230
|
+
v_hitColor = a_hitColor;
|
|
231
|
+
v_angle = angle;
|
|
232
|
+
c = cos(-v_angle);
|
|
233
|
+
s = sin(-v_angle);
|
|
234
|
+
centerOffsetPx = vec2(c * centerOffsetPx.x - s * centerOffsetPx.y, s * centerOffsetPx.x + c * centerOffsetPx.y);
|
|
235
|
+
v_centerPx = screenToPx(center.xy) + centerOffsetPx;
|
|
236
|
+
${this.varyings_.map(function(e){return" "+e.name+" = "+e.expression+";"}).join(`
|
|
237
|
+
`)}
|
|
238
|
+
}`:null}getSymbolFragmentShader(){return this.hasSymbol_?`${COMMON_HEADER}
|
|
239
|
+
${this.uniforms_.map(function(e){return"uniform "+e+";"}).join(`
|
|
240
|
+
`)}
|
|
241
|
+
varying vec2 v_texCoord;
|
|
242
|
+
varying vec4 v_hitColor;
|
|
243
|
+
varying vec2 v_centerPx;
|
|
244
|
+
varying float v_angle;
|
|
245
|
+
varying vec2 v_quadSizePx;
|
|
246
|
+
${this.varyings_.map(function(e){return"varying "+e.type+" "+e.name+";"}).join(`
|
|
247
|
+
`)}
|
|
248
|
+
${this.fragmentShaderFunctions_.join(`
|
|
249
|
+
`)}
|
|
250
|
+
|
|
251
|
+
void main(void) {
|
|
252
|
+
if (${this.discardExpression_}) { discard; }
|
|
253
|
+
vec2 coordsPx = gl_FragCoord.xy / u_pixelRatio - v_centerPx; // relative to center
|
|
254
|
+
float c = cos(v_angle);
|
|
255
|
+
float s = sin(v_angle);
|
|
256
|
+
coordsPx = vec2(c * coordsPx.x - s * coordsPx.y, s * coordsPx.x + c * coordsPx.y);
|
|
257
|
+
gl_FragColor = ${this.symbolColorExpression_};
|
|
258
|
+
gl_FragColor.rgb *= gl_FragColor.a;
|
|
259
|
+
if (u_hitDetection > 0) {
|
|
260
|
+
if (gl_FragColor.a < 0.05) { discard; };
|
|
261
|
+
gl_FragColor = v_hitColor;
|
|
262
|
+
}
|
|
263
|
+
}`:null}getStrokeVertexShader(){return this.hasStroke_?`${COMMON_HEADER}
|
|
264
|
+
${this.uniforms_.map(function(e){return"uniform "+e+";"}).join(`
|
|
265
|
+
`)}
|
|
266
|
+
attribute vec2 a_segmentStart;
|
|
267
|
+
attribute vec2 a_segmentEnd;
|
|
268
|
+
attribute float a_measureStart;
|
|
269
|
+
attribute float a_measureEnd;
|
|
270
|
+
attribute float a_parameters;
|
|
271
|
+
attribute float a_distance;
|
|
272
|
+
attribute vec2 a_joinAngles;
|
|
273
|
+
attribute vec4 a_hitColor;
|
|
274
|
+
${this.attributes_.map(function(e){return"attribute "+e+";"}).join(`
|
|
275
|
+
`)}
|
|
276
|
+
varying vec2 v_segmentStart;
|
|
277
|
+
varying vec2 v_segmentEnd;
|
|
278
|
+
varying float v_angleStart;
|
|
279
|
+
varying float v_angleEnd;
|
|
280
|
+
varying float v_width;
|
|
281
|
+
varying vec4 v_hitColor;
|
|
282
|
+
varying float v_distanceOffsetPx;
|
|
283
|
+
varying float v_measureStart;
|
|
284
|
+
varying float v_measureEnd;
|
|
285
|
+
${this.varyings_.map(function(e){return"varying "+e.type+" "+e.name+";"}).join(`
|
|
286
|
+
`)}
|
|
287
|
+
${this.vertexShaderFunctions_.join(`
|
|
288
|
+
`)}
|
|
289
|
+
vec2 worldToPx(vec2 worldPos) {
|
|
290
|
+
vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);
|
|
291
|
+
return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
vec4 pxToScreen(vec2 pxPos) {
|
|
295
|
+
vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;
|
|
296
|
+
return vec4(screenPos, u_depth, 1.0);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
bool isCap(float joinAngle) {
|
|
300
|
+
return joinAngle < -0.1;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
vec2 getJoinOffsetDirection(vec2 normalPx, float joinAngle) {
|
|
304
|
+
float halfAngle = joinAngle / 2.0;
|
|
305
|
+
float c = cos(halfAngle);
|
|
306
|
+
float s = sin(halfAngle);
|
|
307
|
+
vec2 angleBisectorNormal = vec2(s * normalPx.x + c * normalPx.y, -c * normalPx.x + s * normalPx.y);
|
|
308
|
+
float length = 1.0 / s;
|
|
309
|
+
return angleBisectorNormal * length;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
vec2 getOffsetPoint(vec2 point, vec2 normal, float joinAngle, float offsetPx) {
|
|
313
|
+
// if on a cap or the join angle is too high, offset the line along the segment normal
|
|
314
|
+
if (cos(joinAngle) > 0.998 || isCap(joinAngle)) {
|
|
315
|
+
return point - normal * offsetPx;
|
|
316
|
+
}
|
|
317
|
+
// offset is applied along the inverted normal (positive offset goes "right" relative to line direction)
|
|
318
|
+
return point - getJoinOffsetDirection(normal, joinAngle) * offsetPx;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
void main(void) {
|
|
322
|
+
v_angleStart = a_joinAngles.x;
|
|
323
|
+
v_angleEnd = a_joinAngles.y;
|
|
324
|
+
float vertexNumber = floor(abs(a_parameters) / 10000. + 0.5);
|
|
325
|
+
currentLineMetric = vertexNumber < 1.5 ? a_measureStart : a_measureEnd;
|
|
326
|
+
// we're reading the fractional part while keeping the sign (so -4.12 gives -0.12, 3.45 gives 0.45)
|
|
327
|
+
float angleTangentSum = fract(abs(a_parameters) / 10000.) * 10000. * sign(a_parameters);
|
|
328
|
+
|
|
329
|
+
float lineWidth = ${this.strokeWidthExpression_};
|
|
330
|
+
float lineOffsetPx = ${this.strokeOffsetExpression_};
|
|
331
|
+
|
|
332
|
+
// compute segment start/end in px with offset
|
|
333
|
+
vec2 segmentStartPx = worldToPx(a_segmentStart);
|
|
334
|
+
vec2 segmentEndPx = worldToPx(a_segmentEnd);
|
|
335
|
+
vec2 tangentPx = normalize(segmentEndPx - segmentStartPx);
|
|
336
|
+
vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);
|
|
337
|
+
segmentStartPx = getOffsetPoint(segmentStartPx, normalPx, v_angleStart, lineOffsetPx),
|
|
338
|
+
segmentEndPx = getOffsetPoint(segmentEndPx, normalPx, v_angleEnd, lineOffsetPx);
|
|
339
|
+
|
|
340
|
+
// compute current vertex position
|
|
341
|
+
float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0;
|
|
342
|
+
float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0;
|
|
343
|
+
float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd;
|
|
344
|
+
vec2 joinDirection;
|
|
345
|
+
vec2 positionPx = vertexNumber < 1.5 ? segmentStartPx : segmentEndPx;
|
|
346
|
+
// if angle is too high, do not make a proper join
|
|
347
|
+
if (cos(angle) > ${LINESTRING_ANGLE_COSINE_CUTOFF} || isCap(angle)) {
|
|
348
|
+
joinDirection = normalPx * normalDir - tangentPx * tangentDir;
|
|
349
|
+
} else {
|
|
350
|
+
joinDirection = getJoinOffsetDirection(normalPx * normalDir, angle);
|
|
351
|
+
}
|
|
352
|
+
positionPx = positionPx + joinDirection * (lineWidth * 0.5 + 1.); // adding 1 pixel for antialiasing
|
|
353
|
+
gl_Position = pxToScreen(positionPx);
|
|
354
|
+
|
|
355
|
+
v_segmentStart = segmentStartPx;
|
|
356
|
+
v_segmentEnd = segmentEndPx;
|
|
357
|
+
v_width = lineWidth;
|
|
358
|
+
v_hitColor = a_hitColor;
|
|
359
|
+
v_distanceOffsetPx = a_distance / u_resolution - (lineOffsetPx * angleTangentSum);
|
|
360
|
+
v_measureStart = a_measureStart;
|
|
361
|
+
v_measureEnd = a_measureEnd;
|
|
362
|
+
${this.varyings_.map(function(e){return" "+e.name+" = "+e.expression+";"}).join(`
|
|
363
|
+
`)}
|
|
364
|
+
}`:null}getStrokeFragmentShader(){return this.hasStroke_?`${COMMON_HEADER}
|
|
365
|
+
${this.uniforms_.map(function(e){return"uniform "+e+";"}).join(`
|
|
366
|
+
`)}
|
|
367
|
+
varying vec2 v_segmentStart;
|
|
368
|
+
varying vec2 v_segmentEnd;
|
|
369
|
+
varying float v_angleStart;
|
|
370
|
+
varying float v_angleEnd;
|
|
371
|
+
varying float v_width;
|
|
372
|
+
varying vec4 v_hitColor;
|
|
373
|
+
varying float v_distanceOffsetPx;
|
|
374
|
+
varying float v_measureStart;
|
|
375
|
+
varying float v_measureEnd;
|
|
376
|
+
${this.varyings_.map(function(e){return"varying "+e.type+" "+e.name+";"}).join(`
|
|
377
|
+
`)}
|
|
378
|
+
${this.fragmentShaderFunctions_.join(`
|
|
379
|
+
`)}
|
|
380
|
+
|
|
381
|
+
vec2 pxToWorld(vec2 pxPos) {
|
|
382
|
+
vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;
|
|
383
|
+
return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
bool isCap(float joinAngle) {
|
|
387
|
+
return joinAngle < -0.1;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
float segmentDistanceField(vec2 point, vec2 start, vec2 end, float width) {
|
|
391
|
+
vec2 tangent = normalize(end - start);
|
|
392
|
+
vec2 normal = vec2(-tangent.y, tangent.x);
|
|
393
|
+
vec2 startToPoint = point - start;
|
|
394
|
+
return abs(dot(startToPoint, normal)) - width * 0.5;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
float buttCapDistanceField(vec2 point, vec2 start, vec2 end) {
|
|
398
|
+
vec2 startToPoint = point - start;
|
|
399
|
+
vec2 tangent = normalize(end - start);
|
|
400
|
+
return dot(startToPoint, -tangent);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
float squareCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {
|
|
404
|
+
return buttCapDistanceField(point, start, end) - width * 0.5;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
float roundCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {
|
|
408
|
+
float onSegment = max(0., 1000. * dot(point - start, end - start)); // this is very high when inside the segment
|
|
409
|
+
return length(point - start) - width * 0.5 - onSegment;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
float roundJoinDistanceField(vec2 point, vec2 start, vec2 end, float width) {
|
|
413
|
+
return roundCapDistanceField(point, start, end, width);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
float bevelJoinField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {
|
|
417
|
+
vec2 startToPoint = point - start;
|
|
418
|
+
vec2 tangent = normalize(end - start);
|
|
419
|
+
float c = cos(joinAngle * 0.5);
|
|
420
|
+
float s = sin(joinAngle * 0.5);
|
|
421
|
+
float direction = -sign(sin(joinAngle));
|
|
422
|
+
vec2 bisector = vec2(c * tangent.x - s * tangent.y, s * tangent.x + c * tangent.y);
|
|
423
|
+
float radius = width * 0.5 * s;
|
|
424
|
+
return dot(startToPoint, bisector * direction) - radius;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
float miterJoinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {
|
|
428
|
+
if (cos(joinAngle) > ${LINESTRING_ANGLE_COSINE_CUTOFF}) { // avoid risking a division by zero
|
|
429
|
+
return bevelJoinField(point, start, end, width, joinAngle);
|
|
430
|
+
}
|
|
431
|
+
float miterLength = 1. / sin(joinAngle * 0.5);
|
|
432
|
+
float miterLimit = ${this.strokeMiterLimitExpression_};
|
|
433
|
+
if (miterLength > miterLimit) {
|
|
434
|
+
return bevelJoinField(point, start, end, width, joinAngle);
|
|
435
|
+
}
|
|
436
|
+
return -1000.;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
float capDistanceField(vec2 point, vec2 start, vec2 end, float width, float capType) {
|
|
440
|
+
if (capType == ${stringToGlsl("butt")}) {
|
|
441
|
+
return buttCapDistanceField(point, start, end);
|
|
442
|
+
} else if (capType == ${stringToGlsl("square")}) {
|
|
443
|
+
return squareCapDistanceField(point, start, end, width);
|
|
444
|
+
}
|
|
445
|
+
return roundCapDistanceField(point, start, end, width);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
float joinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float joinType) {
|
|
449
|
+
if (joinType == ${stringToGlsl("bevel")}) {
|
|
450
|
+
return bevelJoinField(point, start, end, width, joinAngle);
|
|
451
|
+
} else if (joinType == ${stringToGlsl("miter")}) {
|
|
452
|
+
return miterJoinDistanceField(point, start, end, width, joinAngle);
|
|
453
|
+
}
|
|
454
|
+
return roundJoinDistanceField(point, start, end, width);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
float computeSegmentPointDistance(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float capType, float joinType) {
|
|
458
|
+
if (isCap(joinAngle)) {
|
|
459
|
+
return capDistanceField(point, start, end, width, capType);
|
|
460
|
+
}
|
|
461
|
+
return joinDistanceField(point, start, end, width, joinAngle, joinType);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
void main(void) {
|
|
465
|
+
vec2 currentPoint = gl_FragCoord.xy / u_pixelRatio;
|
|
466
|
+
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
467
|
+
vec2 worldPos = pxToWorld(currentPoint);
|
|
468
|
+
if (
|
|
469
|
+
abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (
|
|
470
|
+
worldPos[0] < u_renderExtent[0] ||
|
|
471
|
+
worldPos[1] < u_renderExtent[1] ||
|
|
472
|
+
worldPos[0] > u_renderExtent[2] ||
|
|
473
|
+
worldPos[1] > u_renderExtent[3]
|
|
474
|
+
)
|
|
475
|
+
) {
|
|
476
|
+
discard;
|
|
477
|
+
}
|
|
478
|
+
#endif
|
|
479
|
+
|
|
480
|
+
float segmentLength = length(v_segmentEnd - v_segmentStart);
|
|
481
|
+
vec2 segmentTangent = (v_segmentEnd - v_segmentStart) / segmentLength;
|
|
482
|
+
vec2 segmentNormal = vec2(-segmentTangent.y, segmentTangent.x);
|
|
483
|
+
vec2 startToPoint = currentPoint - v_segmentStart;
|
|
484
|
+
float lengthToPoint = max(0., min(dot(segmentTangent, startToPoint), segmentLength));
|
|
485
|
+
float currentLengthPx = lengthToPoint + v_distanceOffsetPx;
|
|
486
|
+
float currentRadiusPx = abs(dot(segmentNormal, startToPoint));
|
|
487
|
+
float currentRadiusRatio = dot(segmentNormal, startToPoint) * 2. / v_width;
|
|
488
|
+
currentLineMetric = mix(v_measureStart, v_measureEnd, lengthToPoint / segmentLength);
|
|
489
|
+
|
|
490
|
+
if (${this.discardExpression_}) { discard; }
|
|
491
|
+
|
|
492
|
+
vec4 color = ${this.strokeColorExpression_};
|
|
493
|
+
float capType = ${this.strokeCapExpression_};
|
|
494
|
+
float joinType = ${this.strokeJoinExpression_};
|
|
495
|
+
float segmentStartDistance = computeSegmentPointDistance(currentPoint, v_segmentStart, v_segmentEnd, v_width, v_angleStart, capType, joinType);
|
|
496
|
+
float segmentEndDistance = computeSegmentPointDistance(currentPoint, v_segmentEnd, v_segmentStart, v_width, v_angleEnd, capType, joinType);
|
|
497
|
+
float distance = max(
|
|
498
|
+
segmentDistanceField(currentPoint, v_segmentStart, v_segmentEnd, v_width),
|
|
499
|
+
max(segmentStartDistance, segmentEndDistance)
|
|
500
|
+
);
|
|
501
|
+
distance = max(distance, ${this.strokeDistanceFieldExpression_});
|
|
502
|
+
color.a *= smoothstep(0.5, -0.5, distance);
|
|
503
|
+
gl_FragColor = color;
|
|
504
|
+
gl_FragColor.a *= u_globalAlpha;
|
|
505
|
+
gl_FragColor.rgb *= gl_FragColor.a;
|
|
506
|
+
if (u_hitDetection > 0) {
|
|
507
|
+
if (gl_FragColor.a < 0.1) { discard; };
|
|
508
|
+
gl_FragColor = v_hitColor;
|
|
509
|
+
}
|
|
510
|
+
}`:null}getFillVertexShader(){return this.hasFill_?`${COMMON_HEADER}
|
|
511
|
+
${this.uniforms_.map(function(e){return"uniform "+e+";"}).join(`
|
|
512
|
+
`)}
|
|
513
|
+
attribute vec2 a_position;
|
|
514
|
+
attribute vec4 a_hitColor;
|
|
515
|
+
${this.attributes_.map(function(e){return"attribute "+e+";"}).join(`
|
|
516
|
+
`)}
|
|
517
|
+
varying vec4 v_hitColor;
|
|
518
|
+
${this.varyings_.map(function(e){return"varying "+e.type+" "+e.name+";"}).join(`
|
|
519
|
+
`)}
|
|
520
|
+
${this.vertexShaderFunctions_.join(`
|
|
521
|
+
`)}
|
|
522
|
+
void main(void) {
|
|
523
|
+
gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0);
|
|
524
|
+
v_hitColor = a_hitColor;
|
|
525
|
+
${this.varyings_.map(function(e){return" "+e.name+" = "+e.expression+";"}).join(`
|
|
526
|
+
`)}
|
|
527
|
+
}`:null}getFillFragmentShader(){return this.hasFill_?`${COMMON_HEADER}
|
|
528
|
+
${this.uniforms_.map(function(e){return"uniform "+e+";"}).join(`
|
|
529
|
+
`)}
|
|
530
|
+
varying vec4 v_hitColor;
|
|
531
|
+
${this.varyings_.map(function(e){return"varying "+e.type+" "+e.name+";"}).join(`
|
|
532
|
+
`)}
|
|
533
|
+
${this.fragmentShaderFunctions_.join(`
|
|
534
|
+
`)}
|
|
535
|
+
vec2 pxToWorld(vec2 pxPos) {
|
|
536
|
+
vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;
|
|
537
|
+
return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
vec2 worldToPx(vec2 worldPos) {
|
|
541
|
+
vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);
|
|
542
|
+
return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
void main(void) {
|
|
546
|
+
vec2 pxPos = gl_FragCoord.xy / u_pixelRatio;
|
|
547
|
+
vec2 pxOrigin = worldToPx(u_patternOrigin);
|
|
548
|
+
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
549
|
+
vec2 worldPos = pxToWorld(pxPos);
|
|
550
|
+
if (
|
|
551
|
+
abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (
|
|
552
|
+
worldPos[0] < u_renderExtent[0] ||
|
|
553
|
+
worldPos[1] < u_renderExtent[1] ||
|
|
554
|
+
worldPos[0] > u_renderExtent[2] ||
|
|
555
|
+
worldPos[1] > u_renderExtent[3]
|
|
556
|
+
)
|
|
557
|
+
) {
|
|
558
|
+
discard;
|
|
559
|
+
}
|
|
560
|
+
#endif
|
|
561
|
+
if (${this.discardExpression_}) { discard; }
|
|
562
|
+
gl_FragColor = ${this.fillColorExpression_};
|
|
563
|
+
gl_FragColor.a *= u_globalAlpha;
|
|
564
|
+
gl_FragColor.rgb *= gl_FragColor.a;
|
|
565
|
+
if (u_hitDetection > 0) {
|
|
566
|
+
if (gl_FragColor.a < 0.1) { discard; };
|
|
567
|
+
gl_FragColor = v_hitColor;
|
|
568
|
+
}
|
|
569
|
+
}`:null}}const TileProperty={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class BaseTileLayer extends Layer{constructor(e){e=e||{};const n=Object.assign({},e),r=e.cacheSize;delete e.cacheSize,delete n.preload,delete n.useInterimTilesOnError,super(n),this.on,this.once,this.un,this.cacheSize_=r,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(TileProperty.PRELOAD)}setPreload(e){this.set(TileProperty.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}function getCacheKey(t,e,n,r){return`${t},${getKeyZXY(e,n,r)}`}function addTileToLookup(t,e,n){if(!(n in t))return t[n]=new Set([e]),!0;const r=t[n],i=r.has(e);return i||r.add(e),!i}function removeTileFromLookup(t,e,n){const r=t[n];return r?r.delete(e):!1}function getRenderExtent(t,e){const n=t.layerStatesArray[t.layerIndex];n.extent&&(e=getIntersection(e,fromUserExtent(n.extent,t.viewState.projection)));const r=n.layer.getRenderSource();if(!r.getWrapX()){const i=r.getTileGridForProjection(t.viewState.projection).getExtent();i&&(e=getIntersection(e,i))}return e}class CanvasTileLayerRenderer extends CanvasLayerRenderer{constructor(e,n){super(e),n=n||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=createEmpty(),this.tempTileRange_=new TileRange(0,0,0,0),this.tempTileCoord_=createOrUpdate$1(0,0,0);const r=n.cacheSize!==void 0?n.cacheSize:512;this.tileCache_=new LRUCache(r),this.maxStaleKeys=r*.5}getTileCache(){return this.tileCache_}getOrCreateTile(e,n,r,i){const s=this.tileCache_,a=this.getLayer().getSource(),l=getCacheKey(a.getKey(),e,n,r);let u;if(s.containsKey(l))u=s.get(l);else{if(u=a.getTile(e,n,r,i.pixelRatio,i.viewState.projection),!u)return null;s.set(l,u)}return u}getTile(e,n,r,i){const s=this.getOrCreateTile(e,n,r,i);return s||null}getData(e){const n=this.frameState;if(!n)return null;const r=this.getLayer(),i=apply(n.pixelToCoordinateTransform,e.slice()),s=r.getExtent();if(s&&!containsCoordinate(s,i))return null;const o=n.viewState,a=r.getRenderSource(),l=a.getTileGridForProjection(o.projection),u=a.getTilePixelRatio(n.pixelRatio);for(let c=l.getZForResolution(o.resolution);c>=l.getMinZoom();--c){const d=l.getTileCoordForCoordAndZ(i,c),h=this.getTile(c,d[1],d[2],n);if(!h||h.getState()!==TileState.LOADED)continue;const f=l.getOrigin(c),p=toSize(l.getTileSize(c)),g=l.getResolution(c);let v;if(h instanceof ImageTile||h instanceof ReprojTile)v=h.getImage();else if(h instanceof DataTile){if(v=asImageLike(h.getData()),!v)continue}else continue;const m=Math.floor(u*((i[0]-f[0])/g-d[1]*p[0])),y=Math.floor(u*((f[1]-i[1])/g-d[2]*p[1])),b=Math.round(u*a.getGutterForProjection(o.projection));return this.getImageData(v,m+b,y+b)}return null}prepareFrame(e){this.renderedProjection?e.viewState.projection!==this.renderedProjection&&(this.tileCache_.clear(),this.renderedProjection=e.viewState.projection):this.renderedProjection=e.viewState.projection;const n=this.getLayer().getSource();if(!n)return!1;const r=n.getRevision();return this.renderedRevision_?this.renderedRevision_!==r&&(this.renderedRevision_=r,this.renderedSourceKey_===n.getKey()&&this.tileCache_.clear()):this.renderedRevision_=r,!0}enqueueTiles(e,n,r,i,s){const o=e.viewState,a=this.getLayer(),l=a.getRenderSource(),u=l.getTileGridForProjection(o.projection),c=getUid(l);c in e.wantedTiles||(e.wantedTiles[c]={});const d=e.wantedTiles[c],h=a.getMapInternal(),f=Math.max(r-s,u.getMinZoom(),u.getZForResolution(Math.min(a.getMaxResolution(),h?h.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):u.getResolution(0)),l.zDirection));for(let p=r;p>=f;--p){const g=u.getTileRangeForExtentAndZ(n,p,this.tempTileRange_),v=u.getResolution(p);for(let m=g.minX;m<=g.maxX;++m)for(let y=g.minY;y<=g.maxY;++y){const b=this.getTile(p,m,y,e);if(!b||!addTileToLookup(i,b,p))continue;const T=b.getKey();if(d[T]=!0,b.getState()===TileState.IDLE&&!e.tileQueue.isKeyQueued(T)){const x=createOrUpdate$1(p,m,y,this.tempTileCoord_);e.tileQueue.enqueue([b,c,u.getTileCoordCenter(x),v])}}}}findStaleTile_(e,n){const r=this.tileCache_,i=e[0],s=e[1],o=e[2],a=this.getStaleKeys();for(let l=0;l<a.length;++l){const u=getCacheKey(a[l],i,s,o);if(r.containsKey(u)){const c=r.get(u);if(c.getState()===TileState.LOADED)return c.endTransition(getUid(this)),addTileToLookup(n,c,i),!0}}return!1}findAltTiles_(e,n,r,i){const s=e.getTileRangeForTileCoordAndZ(n,r,this.tempTileRange_);if(!s)return!1;let o=!0;const a=this.tileCache_,u=this.getLayer().getRenderSource().getKey();for(let c=s.minX;c<=s.maxX;++c)for(let d=s.minY;d<=s.maxY;++d){const h=getCacheKey(u,r,c,d);let f=!1;if(a.containsKey(h)){const p=a.get(h);p.getState()===TileState.LOADED&&(addTileToLookup(i,p,r),f=!0)}f||(o=!1)}return o}renderFrame(e,n){let r=!0;this.renderComplete=!0;const i=e.layerStatesArray[e.layerIndex],s=e.viewState,o=s.projection,a=s.resolution,l=s.center,u=e.pixelRatio,c=this.getLayer(),d=c.getSource(),h=d.getRevision(),f=d.getTileGridForProjection(o),p=f.getZForResolution(a,d.zDirection),g=f.getResolution(p),v=d.getKey();this.renderedSourceKey_?this.renderedSourceKey_!==v&&(this.prependStaleKey(this.renderedSourceKey_),this.renderedSourceKey_=v):this.renderedSourceKey_=v;let m=e.extent;const y=d.getTilePixelRatio(u);this.prepareContainer(e,n);const b=this.context.canvas.width,_=this.context.canvas.height,T=i.extent&&fromUserExtent(i.extent);T&&(m=getIntersection(m,fromUserExtent(i.extent)));const x=g*b/2/y,k=g*_/2/y,w=[l[0]-x,l[1]-k,l[0]+x,l[1]+k],O={};this.renderedTiles.length=0;const S=c.getPreload();if(e.nextExtent){const V=f.getZForResolution(s.nextResolution,d.zDirection),D=getRenderExtent(e,e.nextExtent);this.enqueueTiles(e,D,V,O,S)}const F=getRenderExtent(e,m);if(this.enqueueTiles(e,F,p,O,0),S>0&&setTimeout(()=>{this.enqueueTiles(e,F,p-1,O,S-1)},0),!(p in O))return this.container;const z=getUid(this),Y=e.time;for(const V of O[p]){const D=V.getState();if((V instanceof ReprojTile||V instanceof ReprojDataTile)&&D===TileState.EMPTY)continue;const le=V.tileCoord;if(D===TileState.LOADED&&V.getAlpha(z,Y)===1){V.endTransition(z);continue}if(D!==TileState.IDLE&&(r=!1),D!==TileState.ERROR&&(this.renderComplete=!1),this.findStaleTile_(le,O)){removeTileFromLookup(O,V,p),e.animate=!0;continue}if(this.findAltTiles_(f,le,p+1,O))continue;const pe=f.getMinZoom();for(let xe=p-1;xe>=pe&&!this.findAltTiles_(f,le,xe,O);--xe);}const ae=g/a*u/y,j=this.getRenderContext(e);compose(this.tempTransform,b/2,_/2,ae,ae,0,-b/2,-_/2),i.extent&&this.clipUnrotated(j,e,T),d.getInterpolate()||(j.imageSmoothingEnabled=!1),this.preRender(j,e);const M=Object.keys(O).map(Number);M.sort(ascending);let $;const oe=[],A=[];for(let V=M.length-1;V>=0;--V){const D=M[V],le=d.getTilePixelSize(D,u,o),re=f.getResolution(D)/g,pe=le[0]*re*ae,xe=le[1]*re*ae,Ie=f.getTileCoordForCoordAndZ(getTopLeft(w),D),_e=f.getTileCoordExtent(Ie),Ne=apply(this.tempTransform,[y*(_e[0]-w[0])/g,y*(w[3]-_e[3])/g]),$e=y*d.getGutterForProjection(o);for(const Ue of O[D]){if(Ue.getState()!==TileState.LOADED)continue;const At=Ue.tileCoord,kt=Ie[1]-At[1],En=Math.round(Ne[0]-(kt-1)*pe),Tn=Ie[2]-At[2],bn=Math.round(Ne[1]-(Tn-1)*xe),Lt=Math.round(Ne[0]-kt*pe),vn=Math.round(Ne[1]-Tn*xe),Et=En-Lt,jt=bn-vn,_n=M.length===1;let kn=!1;$=[Lt,vn,Lt+Et,vn,Lt+Et,vn+jt,Lt,vn+jt];for(let Pn=0,Ce=oe.length;Pn<Ce;++Pn)if(!_n&&D<A[Pn]){const qe=oe[Pn];intersects([Lt,vn,Lt+Et,vn+jt],[qe[0],qe[3],qe[4],qe[7]])&&(kn||(j.save(),kn=!0),j.beginPath(),j.moveTo($[0],$[1]),j.lineTo($[2],$[3]),j.lineTo($[4],$[5]),j.lineTo($[6],$[7]),j.moveTo(qe[6],qe[7]),j.lineTo(qe[4],qe[5]),j.lineTo(qe[2],qe[3]),j.lineTo(qe[0],qe[1]),j.clip())}oe.push($),A.push(D),this.drawTile(Ue,e,Lt,vn,Et,jt,$e,_n),kn&&j.restore(),this.renderedTiles.unshift(Ue),this.updateUsedTiles(e.usedTiles,d,Ue)}}if(this.renderedRevision=h,this.renderedResolution=g,this.extentChanged=!this.renderedExtent_||!equals$1(this.renderedExtent_,w),this.renderedExtent_=w,this.renderedPixelRatio=u,this.postRender(this.context,e),i.extent&&j.restore(),j.imageSmoothingEnabled=!0,this.renderComplete){const V=(D,le)=>{const ie=getUid(d),re=le.wantedTiles[ie],pe=re?Object.keys(re).length:0;this.updateCacheSize(pe),this.tileCache_.expireCache()};e.postRenderFunctions.push(V)}return!this.renderComplete&&!r&&(e.animate=!0),this.container}updateCacheSize(e){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,e*2)}drawTile(e,n,r,i,s,o,a,l){let u;if(e instanceof DataTile){if(u=asImageLike(e.getData()),!u)throw new Error("Rendering array data is not yet supported")}else u=this.getTileImage(e);if(!u)return;const c=this.getRenderContext(n),d=getUid(this),h=n.layerStatesArray[n.layerIndex],f=h.opacity*(l?e.getAlpha(d,n.time):1),p=f!==c.globalAlpha;p&&(c.save(),c.globalAlpha=f),c.drawImage(u,a,a,u.width-2*a,u.height-2*a,r,i,s,o),p&&c.restore(),f!==h.opacity?n.animate=!0:l&&e.endTransition(d)}getImage(){const e=this.context;return e?e.canvas:null}getTileImage(e){return e.getImage()}updateUsedTiles(e,n,r){const i=getUid(n);i in e||(e[i]={}),e[i][r.getKey()]=!0}}class TileLayer extends BaseTileLayer{constructor(e){super(e)}createRenderer(){return new CanvasTileLayerRenderer(this,{cacheSize:this.getCacheSize()})}}function expressionToGlsl(t,e,n){const r=newParsingContext();return buildExpression(e,n,r,t)}function packColor(t){const e=asArray(t),n=e[0]*256,r=e[1],i=e[2]*256,s=Math.round(e[3]*255);return[n+r,i+s]}const UNPACK_COLOR_FN=`vec4 unpackColor(vec2 packedColor) {
|
|
570
|
+
return vec4(
|
|
571
|
+
fract(floor(packedColor[0] / 256.0) / 256.0),
|
|
572
|
+
fract(packedColor[0] / 256.0),
|
|
573
|
+
fract(floor(packedColor[1] / 256.0) / 256.0),
|
|
574
|
+
fract(packedColor[1] / 256.0)
|
|
575
|
+
);
|
|
576
|
+
}`;function getGlslSizeFromType(t){return t===ColorType||t===SizeType?2:t===NumberArrayType?4:1}function getGlslTypeFromType(t){const e=getGlslSizeFromType(t);return e>1?`vec${e}`:"float"}function computeHash(t){return(JSON.stringify(t).split("").reduce((n,r)=>(n<<5)-n+r.charCodeAt(0),0)>>>0).toString()}function parseCommonSymbolProperties(t,e,n,r){if(`${r}radius`in t&&r!=="icon-"){let i=expressionToGlsl(n,t[`${r}radius`],NumberType);if(`${r}radius2`in t){const s=expressionToGlsl(n,t[`${r}radius2`],NumberType);i=`max(${i}, ${s})`}`${r}stroke-width`in t&&(i=`(${i} + ${expressionToGlsl(n,t[`${r}stroke-width`],NumberType)} * 0.5)`),e.setSymbolSizeExpression(`vec2(${i} * 2. + 0.5)`)}if(`${r}scale`in t){const i=expressionToGlsl(n,t[`${r}scale`],SizeType);e.setSymbolSizeExpression(`${e.getSymbolSizeExpression()} * ${i}`)}`${r}displacement`in t&&e.setSymbolOffsetExpression(expressionToGlsl(n,t[`${r}displacement`],NumberArrayType)),`${r}rotation`in t&&e.setSymbolRotationExpression(expressionToGlsl(n,t[`${r}rotation`],NumberType)),`${r}rotate-with-view`in t&&e.setSymbolRotateWithView(!!t[`${r}rotate-with-view`])}function getColorFromDistanceField(t,e,n,r,i){let s="vec4(0.)";if(e!==null&&(s=e),n!==null&&r!==null){const l=`smoothstep(-${r} + 0.63, -${r} - 0.58, ${t})`;s=`mix(${n}, ${s}, ${l})`}const o=`(1.0 - smoothstep(-0.63, 0.58, ${t}))`;let a=`${s} * vec4(1.0, 1.0, 1.0, ${o})`;return i!==null&&(a=`${a} * vec4(1.0, 1.0, 1.0, ${i})`),a}function parseImageProperties(t,e,n,r,i){const s=new Image;s.crossOrigin=t[`${r}cross-origin`]===void 0?"anonymous":t[`${r}cross-origin`],s.src=t[`${r}src`],n[`u_texture${i}_size`]=()=>s.complete?[s.width,s.height]:[0,0],e.addUniform(`vec2 u_texture${i}_size`);const o=`u_texture${i}_size`;return n[`u_texture${i}`]=s,e.addUniform(`sampler2D u_texture${i}`),o}function parseImageOffsetProperties(t,e,n,r,i){let s=expressionToGlsl(n,t[`${e}offset`],NumberArrayType);if(`${e}offset-origin`in t)switch(t[`${e}offset-origin`]){case"top-right":s=`vec2(${r}.x, 0.) + ${i} * vec2(-1., 0.) + ${s} * vec2(-1., 1.)`;break;case"bottom-left":s=`vec2(0., ${r}.y) + ${i} * vec2(0., -1.) + ${s} * vec2(1., -1.)`;break;case"bottom-right":s=`${r} - ${i} - ${s}`;break}return s}function parseCircleProperties(t,e,n,r,i){i.functions.circleDistanceField=`float circleDistanceField(vec2 point, float radius) {
|
|
577
|
+
return length(point) - radius;
|
|
578
|
+
}`,parseCommonSymbolProperties(t,e,r,"circle-");let s=null;"circle-opacity"in t&&(s=expressionToGlsl(i,t["circle-opacity"],NumberType));let o="coordsPx";"circle-scale"in t&&(o=`coordsPx / ${expressionToGlsl(i,t["circle-scale"],SizeType)}`);let a=null;"circle-fill-color"in t&&(a=expressionToGlsl(i,t["circle-fill-color"],ColorType));let l=null;"circle-stroke-color"in t&&(l=expressionToGlsl(i,t["circle-stroke-color"],ColorType));let u=expressionToGlsl(i,t["circle-radius"],NumberType),c=null;"circle-stroke-width"in t&&(c=expressionToGlsl(i,t["circle-stroke-width"],NumberType),u=`(${u} + ${c} * 0.5)`);const d=`circleDistanceField(${o}, ${u})`,h=getColorFromDistanceField(d,a,l,c,s);e.setSymbolColorExpression(h)}function parseShapeProperties(t,e,n,r,i){i.functions.round=`float round(float v) {
|
|
579
|
+
return sign(v) * floor(abs(v) + 0.5);
|
|
580
|
+
}`,i.functions.starDistanceField=`float starDistanceField(vec2 point, float numPoints, float radius, float radius2, float angle) {
|
|
581
|
+
float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle
|
|
582
|
+
float c = cos(startAngle);
|
|
583
|
+
float s = sin(startAngle);
|
|
584
|
+
vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y);
|
|
585
|
+
float alpha = TWO_PI / numPoints; // the angle of one sector
|
|
586
|
+
float beta = atan(pointRotated.y, pointRotated.x);
|
|
587
|
+
float gamma = round(beta / alpha) * alpha; // angle in sector
|
|
588
|
+
c = cos(-gamma);
|
|
589
|
+
s = sin(-gamma);
|
|
590
|
+
vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y));
|
|
591
|
+
vec2 tipToPoint = inSector + vec2(-radius, 0.);
|
|
592
|
+
vec2 edgeNormal = vec2(radius2 * sin(alpha * 0.5), -radius2 * cos(alpha * 0.5) + radius);
|
|
593
|
+
return dot(normalize(edgeNormal), tipToPoint);
|
|
594
|
+
}`,i.functions.regularDistanceField=`float regularDistanceField(vec2 point, float numPoints, float radius, float angle) {
|
|
595
|
+
float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle
|
|
596
|
+
float c = cos(startAngle);
|
|
597
|
+
float s = sin(startAngle);
|
|
598
|
+
vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y);
|
|
599
|
+
float alpha = TWO_PI / numPoints; // the angle of one sector
|
|
600
|
+
float radiusIn = radius * cos(PI / numPoints);
|
|
601
|
+
float beta = atan(pointRotated.y, pointRotated.x);
|
|
602
|
+
float gamma = round((beta - alpha * 0.5) / alpha) * alpha + alpha * 0.5; // angle in sector from mid
|
|
603
|
+
c = cos(-gamma);
|
|
604
|
+
s = sin(-gamma);
|
|
605
|
+
vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y));
|
|
606
|
+
return inSector.x - radiusIn;
|
|
607
|
+
}`,parseCommonSymbolProperties(t,e,r,"shape-");let s=null;"shape-opacity"in t&&(s=expressionToGlsl(i,t["shape-opacity"],NumberType));let o="coordsPx";"shape-scale"in t&&(o=`coordsPx / ${expressionToGlsl(i,t["shape-scale"],SizeType)}`);let a=null;"shape-fill-color"in t&&(a=expressionToGlsl(i,t["shape-fill-color"],ColorType));let l=null;"shape-stroke-color"in t&&(l=expressionToGlsl(i,t["shape-stroke-color"],ColorType));let u=null;"shape-stroke-width"in t&&(u=expressionToGlsl(i,t["shape-stroke-width"],NumberType));const c=expressionToGlsl(i,t["shape-points"],NumberType);let d="0.";"shape-angle"in t&&(d=expressionToGlsl(i,t["shape-angle"],NumberType));let h,f=expressionToGlsl(i,t["shape-radius"],NumberType);if(u!==null&&(f=`${f} + ${u} * 0.5`),"shape-radius2"in t){let g=expressionToGlsl(i,t["shape-radius2"],NumberType);u!==null&&(g=`${g} + ${u} * 0.5`),h=`starDistanceField(${o}, ${c}, ${f}, ${g}, ${d})`}else h=`regularDistanceField(${o}, ${c}, ${f}, ${d})`;const p=getColorFromDistanceField(h,a,l,u,s);e.setSymbolColorExpression(p)}function parseIconProperties(t,e,n,r,i){let s="vec4(1.0)";"icon-color"in t&&(s=expressionToGlsl(i,t["icon-color"],ColorType)),"icon-opacity"in t&&(s=`${s} * vec4(1.0, 1.0, 1.0, ${expressionToGlsl(i,t["icon-opacity"],NumberType)})`);const o=computeHash(t["icon-src"]),a=parseImageProperties(t,e,n,"icon-",o);if(e.setSymbolColorExpression(`${s} * texture2D(u_texture${o}, v_texCoord)`).setSymbolSizeExpression(a),"icon-width"in t&&"icon-height"in t&&e.setSymbolSizeExpression(`vec2(${expressionToGlsl(r,t["icon-width"],NumberType)}, ${expressionToGlsl(r,t["icon-height"],NumberType)})`),"icon-offset"in t&&"icon-size"in t){const l=expressionToGlsl(r,t["icon-size"],NumberArrayType),u=e.getSymbolSizeExpression();e.setSymbolSizeExpression(l);const c=parseImageOffsetProperties(t,"icon-",r,"v_quadSizePx",l);e.setTextureCoordinateExpression(`(vec4((${c}).xyxy) + vec4(0., 0., ${l})) / (${u}).xyxy`)}if(parseCommonSymbolProperties(t,e,r,"icon-"),"icon-anchor"in t){const l=expressionToGlsl(r,t["icon-anchor"],NumberArrayType);let u="1.0";"icon-scale"in t&&(u=expressionToGlsl(r,t["icon-scale"],SizeType));let c;t["icon-anchor-x-units"]==="pixels"&&t["icon-anchor-y-units"]==="pixels"?c=`${l} * ${u}`:t["icon-anchor-x-units"]==="pixels"?c=`${l} * vec2(vec2(${u}).x, v_quadSizePx.y)`:t["icon-anchor-y-units"]==="pixels"?c=`${l} * vec2(v_quadSizePx.x, vec2(${u}).x)`:c=`${l} * v_quadSizePx`;let d=`v_quadSizePx * vec2(0.5, -0.5) + ${c} * vec2(-1., 1.)`;if("icon-anchor-origin"in t)switch(t["icon-anchor-origin"]){case"top-right":d=`v_quadSizePx * -0.5 + ${c}`;break;case"bottom-left":d=`v_quadSizePx * 0.5 - ${c}`;break;case"bottom-right":d=`v_quadSizePx * vec2(-0.5, 0.5) + ${c} * vec2(1., -1.)`;break}e.setSymbolOffsetExpression(`${e.getSymbolOffsetExpression()} + ${d}`)}}function parseStrokeProperties(t,e,n,r,i){if("stroke-color"in t&&e.setStrokeColorExpression(expressionToGlsl(i,t["stroke-color"],ColorType)),"stroke-pattern-src"in t){const s=computeHash(t["stroke-pattern-src"]),o=parseImageProperties(t,e,n,"stroke-pattern-",s);let a=o,l="vec2(0.)";"stroke-pattern-offset"in t&&"stroke-pattern-size"in t&&(a=expressionToGlsl(i,t["stroke-pattern-size"],NumberArrayType),l=parseImageOffsetProperties(t,"stroke-pattern-",i,o,a));let u="0.";"stroke-pattern-spacing"in t&&(u=expressionToGlsl(i,t["stroke-pattern-spacing"],NumberType)),i.functions.sampleStrokePattern=`vec4 sampleStrokePattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, float spacingPx, float currentLengthPx, float currentRadiusRatio, float lineWidth) {
|
|
608
|
+
float currentLengthScaled = currentLengthPx * sampleSize.y / lineWidth;
|
|
609
|
+
float spacingScaled = spacingPx * sampleSize.y / lineWidth;
|
|
610
|
+
float uCoordPx = mod(currentLengthScaled, (sampleSize.x + spacingScaled));
|
|
611
|
+
// make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels
|
|
612
|
+
uCoordPx = clamp(uCoordPx, 0.5, sampleSize.x - 0.5);
|
|
613
|
+
float vCoordPx = (-currentRadiusRatio * 0.5 + 0.5) * sampleSize.y;
|
|
614
|
+
vec2 texCoord = (vec2(uCoordPx, vCoordPx) + textureOffset) / textureSize;
|
|
615
|
+
return texture2D(texture, texCoord);
|
|
616
|
+
}`;const c=`u_texture${s}`;let d="1.";"stroke-color"in t&&(d=e.getStrokeColorExpression()),e.setStrokeColorExpression(`${d} * sampleStrokePattern(${c}, ${o}, ${l}, ${a}, ${u}, currentLengthPx, currentRadiusRatio, v_width)`)}if("stroke-width"in t&&e.setStrokeWidthExpression(expressionToGlsl(r,t["stroke-width"],NumberType)),"stroke-offset"in t&&e.setStrokeOffsetExpression(expressionToGlsl(r,t["stroke-offset"],NumberType)),"stroke-line-cap"in t&&e.setStrokeCapExpression(expressionToGlsl(r,t["stroke-line-cap"],StringType)),"stroke-line-join"in t&&e.setStrokeJoinExpression(expressionToGlsl(r,t["stroke-line-join"],StringType)),"stroke-miter-limit"in t&&e.setStrokeMiterLimitExpression(expressionToGlsl(r,t["stroke-miter-limit"],NumberType)),"stroke-line-dash"in t){i.functions.getSingleDashDistance=`float getSingleDashDistance(float distance, float radius, float dashOffset, float dashLength, float dashLengthTotal, float capType) {
|
|
617
|
+
float localDistance = mod(distance, dashLengthTotal);
|
|
618
|
+
float distanceSegment = abs(localDistance - dashOffset - dashLength * 0.5) - dashLength * 0.5;
|
|
619
|
+
distanceSegment = min(distanceSegment, dashLengthTotal - localDistance);
|
|
620
|
+
if (capType == ${stringToGlsl("square")}) {
|
|
621
|
+
distanceSegment -= v_width * 0.5;
|
|
622
|
+
} else if (capType == ${stringToGlsl("round")}) {
|
|
623
|
+
distanceSegment = min(distanceSegment, sqrt(distanceSegment * distanceSegment + radius * radius) - v_width * 0.5);
|
|
624
|
+
}
|
|
625
|
+
return distanceSegment;
|
|
626
|
+
}`;let s=t["stroke-line-dash"].map(f=>expressionToGlsl(i,f,NumberType));s.length%2===1&&(s=[...s,...s]);let o="0.";"stroke-line-dash-offset"in t&&(o=expressionToGlsl(r,t["stroke-line-dash-offset"],NumberType));const l=`dashDistanceField_${computeHash(t["stroke-line-dash"])}`,u=s.map((f,p)=>`float dashLength${p} = ${f};`),c=s.map((f,p)=>`dashLength${p}`).join(" + ");let d="0.",h=`getSingleDashDistance(distance, radius, ${d}, dashLength0, totalDashLength, capType)`;for(let f=2;f<s.length;f+=2)d=`${d} + dashLength${f-2} + dashLength${f-1}`,h=`min(${h}, getSingleDashDistance(distance, radius, ${d}, dashLength${f}, totalDashLength, capType))`;i.functions[l]=`float ${l}(float distance, float radius, float capType) {
|
|
627
|
+
${u.join(`
|
|
628
|
+
`)}
|
|
629
|
+
float totalDashLength = ${c};
|
|
630
|
+
return ${h};
|
|
631
|
+
}`,e.setStrokeDistanceFieldExpression(`${l}(currentLengthPx + ${o}, currentRadiusPx, capType)`)}}function parseFillProperties(t,e,n,r,i){if("fill-color"in t&&e.setFillColorExpression(expressionToGlsl(i,t["fill-color"],ColorType)),"fill-pattern-src"in t){const s=computeHash(t["fill-pattern-src"]),o=parseImageProperties(t,e,n,"fill-pattern-",s);let a=o,l="vec2(0.)";"fill-pattern-offset"in t&&"fill-pattern-size"in t&&(a=expressionToGlsl(i,t["fill-pattern-size"],NumberArrayType),l=parseImageOffsetProperties(t,"fill-pattern-",i,o,a)),i.functions.sampleFillPattern=`vec4 sampleFillPattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, vec2 pxOrigin, vec2 pxPosition) {
|
|
632
|
+
float scaleRatio = pow(2., mod(u_zoom + 0.5, 1.) - 0.5);
|
|
633
|
+
vec2 pxRelativePos = pxPosition - pxOrigin;
|
|
634
|
+
// rotate the relative position from origin by the current view rotation
|
|
635
|
+
pxRelativePos = vec2(pxRelativePos.x * cos(u_rotation) - pxRelativePos.y * sin(u_rotation), pxRelativePos.x * sin(u_rotation) + pxRelativePos.y * cos(u_rotation));
|
|
636
|
+
// sample position is computed according to the sample offset & size
|
|
637
|
+
vec2 samplePos = mod(pxRelativePos / scaleRatio, sampleSize);
|
|
638
|
+
// also make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels
|
|
639
|
+
samplePos = clamp(samplePos, vec2(0.5), sampleSize - vec2(0.5));
|
|
640
|
+
samplePos.y = sampleSize.y - samplePos.y; // invert y axis so that images appear upright
|
|
641
|
+
return texture2D(texture, (samplePos + textureOffset) / textureSize);
|
|
642
|
+
}`;const u=`u_texture${s}`;let c="1.";"fill-color"in t&&(c=e.getFillColorExpression()),e.setFillColorExpression(`${c} * sampleFillPattern(${u}, ${o}, ${l}, ${a}, pxOrigin, pxPos)`)}}function parseLiteralStyle(t,e){const n=newCompilationContext(),r={...newCompilationContext(),inFragmentShader:!0,variables:n.variables},i=new ShaderBuilder,s={};if("icon-src"in t?parseIconProperties(t,i,s,n,r):"shape-points"in t?parseShapeProperties(t,i,s,n,r):"circle-radius"in t&&parseCircleProperties(t,i,s,n,r),parseStrokeProperties(t,i,s,n,r),parseFillProperties(t,i,s,n,r),t.filter){const l=expressionToGlsl(r,t.filter,BooleanType);i.setFragmentDiscardExpression(`!${l}`)}for(const l in r.variables){const u=r.variables[l],c=uniformNameForVariable(u.name);let d=getGlslTypeFromType(u.type);u.type===ColorType&&(d="vec4"),i.addUniform(`${d} ${c}`),s[c]=()=>{const h=e[u.name];return typeof h=="number"?h:typeof h=="boolean"?h?1:0:u.type===ColorType?asArray(h||"#eee"):typeof h=="string"?getStringNumberEquivalent(h):h}}for(const l in r.properties){const u=r.properties[l];n.properties[l]||(n.properties[l]=u);let c=getGlslTypeFromType(u.type),d=`a_prop_${u.name}`;u.type===ColorType&&(c="vec4",d=`unpackColor(${d})`,i.addVertexShaderFunction(UNPACK_COLOR_FN)),i.addVarying(`v_prop_${u.name}`,c,d)}for(const l in n.properties){const u=n.properties[l];i.addAttribute(`${getGlslTypeFromType(u.type)} a_prop_${u.name}`)}for(const l in n.functions)i.addVertexShaderFunction(n.functions[l]);for(const l in r.functions)i.addFragmentShaderFunction(r.functions[l]);const o={};for(const l in n.properties){const u=n.properties[l],c=d=>{const h=d.get(u.name);return u.type===ColorType?packColor([...asArray(h||"#eee")]):typeof h=="string"?getStringNumberEquivalent(h):typeof h=="boolean"?h?1:0:h};o[`prop_${u.name}`]={size:getGlslSizeFromType(u.type),callback:c}}function a(l,u,c,d){const h=n[l],f=r[l];if(!h&&!f)return;const p=getGlslTypeFromType(c),g=getGlslSizeFromType(c);i.addAttribute(`${p} a_${u}`),f&&i.addVarying(`v_${u}`,p,`a_${u}`),o[u]={size:g,callback:d}}return a("geometryType",GEOMETRY_TYPE_PROPERTY_NAME,StringType,l=>getStringNumberEquivalent(computeGeometryType(l.getGeometry()))),a("featureId",FEATURE_ID_PROPERTY_NAME,StringType|NumberType,l=>{const u=l.getId()??null;return typeof u=="string"?getStringNumberEquivalent(u):u}),{builder:i,attributes:o,uniforms:s}}class WebGLPointsLayer extends Layer{constructor(e){const n=Object.assign({},e);super(n),this.styleVariables_=e.variables||{},this.parseResult_=parseLiteralStyle(e.style,this.styleVariables_),this.hitDetectionDisabled_=!!e.disableHitDetection}createRenderer(){const e=Object.keys(this.parseResult_.attributes).map(n=>({name:n,...this.parseResult_.attributes[n]}));return new WebGLPointsLayerRenderer(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitDetectionEnabled:!this.hitDetectionDisabled_,uniforms:this.parseResult_.uniforms,attributes:e})}updateStyleVariables(e){Object.assign(this.styleVariables_,e),this.changed()}}var CAR_COLOR=(t=>(t[t.BLUE=1]="BLUE",t[t.YELLOW=2]="YELLOW",t[t.Y_GREEN=3]="Y_GREEN",t))(CAR_COLOR||{}),DEVICE_TYPE=(t=>(t[t.HOST=1]="HOST",t[t.TALK=2]="TALK",t[t.STORAGE=3]="STORAGE",t[t.INTERNET=4]="INTERNET",t[t.CAMERA=5]="CAMERA",t[t.LOAD=6]="LOAD",t))(DEVICE_TYPE||{}),LENGTH_UNIT=(t=>(t[t.M=1]="M",t[t.KM=2]="KM",t[t.NM=3]="NM",t))(LENGTH_UNIT||{});const LENGTH_UNIT_LABEL={1:"M",2:"KM",3:"NM"},formatLength=function(t,e){const r=getLength(t);let i="";switch(e){case LENGTH_UNIT.M:i=Math.round(r*100)/100+" m";break;case LENGTH_UNIT.KM:i=Math.round(r/1e3*100)/100+" km";break;case LENGTH_UNIT.NM:i=(Math.round(r/1e3*100)/100/1.852).toFixed(2)+" nm";break}return i},convertSixHundredThousandToLatLng=function(t,e){const n=Number(e)/6e5;return[Number(t)/6e5,n]},mapInstance=vue.ref(),shipsLayer=vue.ref(),largeAmountShipsLayer=vue.ref();vue.ref();const trucksLayer=vue.ref(),shipTrackLineFeatures=vue.ref([]),trackLineVectorSource=vue.ref(),shipTrackVectorLayer=vue.ref();vue.ref(),vue.ref();const labels=vue.ref([]),_hoisted_1$4={key:0,class:"measure-panel"},_hoisted_2$2={class:"d-flex justify-content-between align-content-start w-100"},_hoisted_3$1={class:"measure-history-list"},_hoisted_4={class:"left-panel"},_hoisted_5={class:"text index"},_hoisted_6={class:"text"},_hoisted_7=["onClick"],_sfc_main$6=vue.defineComponent({__name:"measure",props:{visible:{type:Boolean},visibleModifiers:{}},emits:vue.mergeModels(["close"],["update:visible"]),setup(t,{expose:e,emit:n}){const r=n,i=vue.useModel(t,"visible"),s=vue.ref(LENGTH_UNIT.NM),o=vue.ref([]),a=vue.ref(!1),l=new VectorSource;let u,c,d,h,f;const p=new VectorLayer({source:l,style:{"fill-color":"rgba(255, 255, 255, 0.2)","stroke-color":"#ffcc33","stroke-width":2,"circle-radius":7,"circle-fill-color":"#ffcc33"}}),g=function(O){if(O.dragging)return;let S="点击选择起点";u&&(S="单击继续,双击结束"),c&&(c.innerHTML=S,d.setPosition(O.coordinate),c.classList.remove("hidden"))},v=()=>{mapInstance.value&&(mapInstance.value.on("pointermove",g),mapInstance.value.getViewport().addEventListener("mouseout",function(){var O;(O=c==null?void 0:c.classList)==null||O.add("hidden")}),a.value=!0)};let m;const y=new Style({fill:new Fill({color:"rgba(255, 255, 255, 0.2)"}),stroke:new Stroke({color:"rgba(255,204,51)",lineDash:[10,10],width:2}),image:new CircleStyle({radius:5,stroke:new Stroke({color:"rgba(0, 0, 0, 0.7)"}),fill:new Fill({color:"rgba(255, 255, 255, 0.2)"})})});function b(){var O,S;o.value=[],document.querySelectorAll(".ol-tooltip.ol-tooltip-static").forEach(F=>{var z;(z=F==null?void 0:F.parentNode)==null||z.removeChild(F)}),l.clear(),(O=mapInstance.value)==null||O.removeInteraction(m),(S=mapInstance.value)==null||S.removeLayer(p),c!=null&&c.parentNode&&c.parentNode.removeChild(c)}function _(){var S,F;b(),(S=mapInstance.value)==null||S.addLayer(p),m=new Draw({source:l,type:"LineString",style:function(){return y}}),(F=mapInstance.value)==null||F.addInteraction(m),x(),T();let O;m.on("drawstart",function(z){var ae;u=z.feature;let Y;O=(ae=u.getGeometry())==null?void 0:ae.on("change",function(j){const M=j.target;let $=formatLength(M,s.value);Y=M.getLastCoordinate(),h&&$&&(h.innerHTML=$),f.setPosition(Y)})}),m.on("drawend",function(){h&&(h.className="ol-tooltip ol-tooltip-static ol-tooltip-measure"),h!=null&&h.innerHTML&&o.value.push(h==null?void 0:h.innerHTML),f.setOffset([0,-7]),u=null,h=null,x(),O&&unByKey(O)})}function T(){var O;c!=null&&c.parentNode&&c.parentNode.removeChild(c),c=document.createElement("div"),c.className="ol-tooltip hidden",d=new Overlay({element:c,offset:[15,0],positioning:"center-left"}),(O=mapInstance.value)==null||O.addOverlay(d)}function x(){var O;h!=null&&h.parentNode&&h.parentNode.removeChild(h),h=document.createElement("div"),h.className="ol-tooltip ol-tooltip-measure",f=new Overlay({element:h,offset:[0,-15],positioning:"bottom-center",stopEvent:!1,insertFirst:!1}),(O=mapInstance.value)==null||O.addOverlay(f)}const k=O=>{var z,Y;o.value[O]&&o.value.splice(O,1);const S=document.querySelectorAll(".ol-tooltip.ol-tooltip-static.ol-tooltip-measure");S[O]&&((Y=(z=S[O])==null?void 0:z.parentNode)==null||Y.removeChild(S[O]));const F=l.getFeatures();F[O]&&l.removeFeature(F[O])},w=()=>{r("close")};return vue.watch(()=>i,()=>{i&&!a.value&&(v(),_())},{deep:!0,immediate:!0}),e({addInteraction:_,removeInteraction:b}),(O,S)=>{const F=vue.resolveComponent("el-select");return i.value?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$4,[vue.createElementVNode("div",{class:"header"},[S[1]||(S[1]=vue.createElementVNode("div",{class:"title"},"测量",-1)),vue.createElementVNode("i",{onClick:w,class:"map-iconfont icon-close"})]),vue.createElementVNode("div",_hoisted_2$2,[S[2]||(S[2]=vue.createElementVNode("div",{class:"tips"},"在地图上点击多个点测量距离,距离单位",-1)),vue.createVNode(F,{class:"select-length-unit",modelValue:s.value,"onUpdate:modelValue":S[0]||(S[0]=z=>s.value=z)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(LENGTH_UNIT_LABEL),z=>(vue.openBlock(),vue.createBlock(vue.unref(ElOption),{key:vue.unref(LENGTH_UNIT)[z],label:z,value:vue.unref(LENGTH_UNIT)[z]},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),vue.createElementVNode("div",_hoisted_3$1,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.value,(z,Y)=>(vue.openBlock(),vue.createElementBlock("div",{class:"measure-history-item",key:Y},[vue.createElementVNode("div",_hoisted_4,[S[3]||(S[3]=vue.createElementVNode("i",{class:"map-iconfont icon-a-Frame-11"},null,-1)),vue.createElementVNode("span",_hoisted_5,"线段"+vue.toDisplayString(Y+1),1),vue.createElementVNode("span",_hoisted_6,vue.toDisplayString(z),1)]),vue.createElementVNode("div",{class:"delete-button",onClick:ae=>k(Y)},S[4]||(S[4]=[vue.createElementVNode("i",{class:"map-iconfont icon-delete"},null,-1)]),8,_hoisted_7)]))),128))])])):vue.createCommentVNode("",!0)}}}),Measure=_export_sfc(_sfc_main$6,[["__scopeId","data-v-6318713d"]]),_hoisted_1$3={class:"tool-panel"},_hoisted_2$1={class:"tool-components"},_sfc_main$5=vue.defineComponent({__name:"toolPanel",props:{vehicleMode:{}},emits:["switchGreenDot","switchMapTile"],setup(t,{emit:e}){const n=e,r=vue.ref(!1),i=vue.ref(null),s=vue.ref(!0),o=()=>{s.value=!s.value,n("switchGreenDot",s.value)},a=vue.ref(BaseMapType.vector),l=()=>{a.value=a.value===BaseMapType.vector?BaseMapType.satellite:BaseMapType.vector,n("switchMapTile",a.value)},u=()=>{var d,h;r.value?(d=i.value)==null||d.removeInteraction():(h=i.value)==null||h.addInteraction(),r.value=!r.value},c=()=>{var d;(d=i.value)==null||d.removeInteraction(),r.value=!1};return(d,h)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createElementVNode("div",_hoisted_1$3,[d.vehicleMode==="ship"?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["switch-btn",`${r.value&&"active"}`]),onClick:u},h[1]||(h[1]=[vue.createElementVNode("i",{class:"map-iconfont icon-a-Frame1"},null,-1),vue.createElementVNode("div",{class:"button-text"},"测距",-1)]),2)):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:vue.normalizeClass(["switch-btn",{active:s.value}]),onClick:o},h[2]||(h[2]=[vue.createElementVNode("i",{class:"map-iconfont icon-a-Frame19"},null,-1),vue.createElementVNode("div",{class:"button-text"},"绿点",-1)]),2),h[4]||(h[4]=vue.createElementVNode("div",{class:"switch-btn"},[vue.createElementVNode("i",{class:"map-iconfont icon-Frame-13"}),vue.createElementVNode("div",{class:"button-text"},"图层")],-1)),vue.createElementVNode("div",{class:vue.normalizeClass(["switch-btn",{active:a.value===vue.unref(BaseMapType).satellite}]),onClick:l},h[3]||(h[3]=[vue.createElementVNode("i",{class:"map-iconfont icon-space"},null,-1),vue.createElementVNode("div",{class:"button-text"},"卫星",-1)]),2)]),vue.createElementVNode("div",_hoisted_2$1,[r.value?(vue.openBlock(),vue.createBlock(Measure,{key:0,ref_key:"measureRef",ref:i,visible:r.value,"onUpdate:visible":h[0]||(h[0]=f=>r.value=f),onClose:c},null,8,["visible"])):vue.createCommentVNode("",!0)])],64))}}),ToolPanel=_export_sfc(_sfc_main$5,[["__scopeId","data-v-d5e1b71d"]]),UNITS_PROP="units",LEADING_DIGITS=[1,2,5],DEFAULT_DPI=25.4/.28;let ScaleLine$1=class extends Control{constructor(e){e=e||{};const n=document.createElement("div");n.style.pointerEvents="none",super({element:n,render:e.render,target:e.target}),this.on,this.once,this.un;const r=e.className!==void 0?e.className:e.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=r+"-inner",this.element.className=r+" "+CLASS_UNSELECTABLE,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=e.minWidth!==void 0?e.minWidth:64,this.maxWidth_=e.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(UNITS_PROP,this.handleUnitsChanged_),this.setUnits(e.units||"metric"),this.scaleBar_=e.bar||!1,this.scaleBarSteps_=e.steps||4,this.scaleBarText_=e.text||!1,this.dpi_=e.dpi||void 0}getUnits(){return this.get(UNITS_PROP)}handleUnitsChanged_(){this.updateElement_()}setUnits(e){this.set(UNITS_PROP,e)}setDpi(e){this.dpi_=e}updateElement_(){const e=this.viewState_;if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const n=e.center,r=e.projection,i=this.getUnits(),s=i=="degrees"?"degrees":"m";let o=getPointResolution(r,e.resolution,n,s);const a=this.minWidth_*(this.dpi_||DEFAULT_DPI)/DEFAULT_DPI,l=this.maxWidth_!==void 0?this.maxWidth_*(this.dpi_||DEFAULT_DPI)/DEFAULT_DPI:void 0;let u=a*o,c="";if(i=="degrees"){const b=METERS_PER_UNIT$1.degrees;u*=b,u<b/60?(c="″",o*=3600):u<b?(c="′",o*=60):c="°"}else if(i=="imperial")u<.9144?(c="in",o/=.0254):u<1609.344?(c="ft",o/=.3048):(c="mi",o/=1609.344);else if(i=="nautical")o/=1852,c="NM";else if(i=="metric")u<1e-6?(c="nm",o*=1e9):u<.001?(c="μm",o*=1e6):u<1?(c="mm",o*=1e3):u<1e3?c="m":(c="km",o/=1e3);else if(i=="us")u<.9144?(c="in",o*=39.37):u<1609.344?(c="ft",o/=.30480061):(c="mi",o/=1609.3472);else throw new Error("Invalid units");let d=3*Math.floor(Math.log(a*o)/Math.log(10)),h,f,p,g,v,m;for(;;){p=Math.floor(d/3);const b=Math.pow(10,p);if(h=LEADING_DIGITS[(d%3+3)%3]*b,f=Math.round(h/o),isNaN(f)){this.element.style.display="none",this.renderedVisible_=!1;return}if(l!==void 0&&f>=l){h=g,f=v,p=m;break}else if(f>=a)break;g=h,v=f,m=p,++d}const y=this.scaleBar_?this.createScaleBar(f,h,c):h.toFixed(p<0?-p:0)+" "+c;this.renderedHTML_!=y&&(this.innerElement_.innerHTML=y,this.renderedHTML_=y),this.renderedWidth_!=f&&(this.innerElement_.style.width=f+"px",this.renderedWidth_=f),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(e,n,r){const i=this.getScaleForResolution(),s=i<1?Math.round(1/i).toLocaleString()+" : 1":"1 : "+Math.round(i).toLocaleString(),o=this.scaleBarSteps_,a=e/o,l=[this.createMarker("absolute")];for(let c=0;c<o;++c){const d=c%2===0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";l.push(`<div><div class="ol-scale-singlebar ${d}" style="width: ${a}px;"></div>`+this.createMarker("relative")+(c%2===0||o===2?this.createStepText(c,e,!1,n,r):"")+"</div>")}return l.push(this.createStepText(o,e,!0,n,r)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${e}px;">`+s+"</div>":"")+l.join("")}createMarker(e){return`<div class="ol-scale-step-marker" style="position: ${e}; top: ${e==="absolute"?3:-10}px;"></div>`}createStepText(e,n,r,i,s){const a=(e===0?0:Math.round(i/this.scaleBarSteps_*e*100)/100)+(e===0?"":" "+s),l=e===0?-3:n/this.scaleBarSteps_*-1,u=e===0?0:n/this.scaleBarSteps_*2;return`<div class="ol-scale-step-text" style="margin-left: ${l}px;text-align: ${e===0?"left":"center"};min-width: ${u}px;left: ${r?n+"px":"unset"};">`+a+"</div>"}getScaleForResolution(){const e=getPointResolution(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m"),n=this.dpi_||DEFAULT_DPI,r=1e3/25.4;return e*r*n}render(e){const n=e.frameState;n?this.viewState_=n.viewState:this.viewState_=null,this.updateElement_()}};const _hoisted_1$2={id:"scale-line-container"},_sfc_main$4=vue.defineComponent({__name:"scaleLine",setup(t,{expose:e}){const n=new ScaleLine$1({units:"nautical"});return e({setScaleLine:()=>{n.setTarget(document.getElementById("scale-line-container")),mapInstance.value.addControl(n)}}),(i,s)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$2))}}),ScaleLine=_export_sfc(_sfc_main$4,[["__scopeId","data-v-e51b19b1"]]),_hoisted_1$1={class:"zoom"},_sfc_main$3=vue.defineComponent({__name:"zoomControl",props:{map:{type:Object}},setup(t){const e=t,n=()=>{const i=e.map.getView(),s=i.getZoom();i.setZoom(s+1)},r=()=>{const i=e.map.getView(),s=i.getZoom();i.setZoom(s-1)};return(i,s)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1,[vue.createElementVNode("div",{onClick:n,class:"button big-button"},"+"),vue.createElementVNode("div",{onClick:r,class:"button small-button"},"-")]))}}),ZoomControl=_export_sfc(_sfc_main$3,[["__scopeId","data-v-fc659cee"]]),CDN_URL="https://static.zhihaoscm.cn/",tiandituKey="a6e8f78974f2581f2ca00485b40c948f",baseMap={tiandituTile:`http://t0.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tiandituKey}`,tiandituTileMark:`http://t0.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tiandituKey}`,tiandituImgTile:`http://t0.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tiandituKey}`,tiandituImgTileMark:`http://t0.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cia&TILEMATRIXSET=w&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=${tiandituKey}`,greenTile:`${CDN_URL}/map/tile/{z}/{x}/{y}.png`},mapZoom={default:6,min:3,max:18,shipGreenDotMax:11,shipModelMin:16,shipModelMax:18},mapDefaultCenter=[114.84,30.52],projection={data:"EPSG:4326",mercator:"EPSG:3857"},_hoisted_1={class:"copyright"},_hoisted_2={class:"tdt-control-copyright tdt-control"},_hoisted_3=["src"],_sfc_main$2=vue.defineComponent({__name:"copyright",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1,[vue.createElementVNode("div",_hoisted_2,[vue.createElementVNode("img",{src:vue.unref(CDN_URL)+"map/tdt-logo.png",width:"53px",height:"22px",class:"logo",alt:""},null,8,_hoisted_3),n[0]||(n[0]=vue.createElementVNode("div",{class:"copyright-text"},"GS(2024)0568号 - 甲测资字1100471",-1))]),n[1]||(n[1]=vue.createElementVNode("div",{id:"dataSource",class:"tdt-control data-source"},"数据来源:自然资源部 & NavInfo",-1))]))}}),Copyright=_export_sfc(_sfc_main$2,[["__scopeId","data-v-0b80cd67"]]),_sfc_main$1=vue.defineComponent({__name:"fullscreen",props:{pageRef:{type:Object,default:()=>({})}},setup(t){const e=t,n=vue.ref(!1),r=()=>{var i;n.value?document.exitFullscreen():(console.log(e.pageRef),(i=e.pageRef)==null||i.requestFullscreen()),n.value=!n.value};return(i,s)=>(vue.openBlock(),vue.createElementBlock("div",{class:"fullscreen-btn",onClick:r},[vue.createElementVNode("i",{class:vue.normalizeClass(`map-iconfont ${n.value?"icon-quxiaoquanping":"icon-quanping1"} `)},null,2)]))}}),Fullscreen=_export_sfc(_sfc_main$1,[["__scopeId","data-v-adf8fd0c"]]),TileEventType={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},tmpTileCoord=[0,0,0],DECIMALS=5;class TileGrid{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,assert(isSorted(this.resolutions_,(i,s)=>s-i),"`resolutions` must be sorted in descending order");let n;if(!e.origins){for(let i=0,s=this.resolutions_.length-1;i<s;++i)if(!n)n=this.resolutions_[i]/this.resolutions_[i+1];else if(this.resolutions_[i]/this.resolutions_[i+1]!==n){n=void 0;break}}this.zoomFactor_=n,this.maxZoom=this.resolutions_.length-1,this.origin_=e.origin!==void 0?e.origin:null,this.origins_=null,e.origins!==void 0&&(this.origins_=e.origins,assert(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));const r=e.extent;r!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=getTopLeft(r)),assert(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,assert(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:DEFAULT_TILE_SIZE,assert(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=r!==void 0?r:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],e.sizes!==void 0?this.fullTileRanges_=e.sizes.map((i,s)=>{const o=new TileRange(Math.min(0,i[0]),Math.max(i[0]-1,-1),Math.min(0,i[1]),Math.max(i[1]-1,-1));if(r){const a=this.getTileRangeForExtentAndZ(r,s);o.minX=Math.max(a.minX,o.minX),o.maxX=Math.min(a.maxX,o.maxX),o.minY=Math.max(a.minY,o.minY),o.maxY=Math.min(a.maxY,o.maxY)}return o}):r&&this.calculateTileRanges_(r)}forEachTileCoord(e,n,r){const i=this.getTileRangeForExtentAndZ(e,n);for(let s=i.minX,o=i.maxX;s<=o;++s)for(let a=i.minY,l=i.maxY;a<=l;++a)r([n,s,a])}forEachTileCoordParentTileRange(e,n,r,i){let s,o,a,l=null,u=e[0]-1;for(this.zoomFactor_===2?(o=e[1],a=e[2]):l=this.getTileCoordExtent(e,i);u>=this.minZoom;){if(o!==void 0&&a!==void 0?(o=Math.floor(o/2),a=Math.floor(a/2),s=createOrUpdate(o,o,a,a,r)):s=this.getTileRangeForExtentAndZ(l,u,r),n(u,s))return!0;--u}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,n,r){if(e[0]<this.maxZoom){if(this.zoomFactor_===2){const s=e[1]*2,o=e[2]*2;return createOrUpdate(s,s+1,o,o+1,n)}const i=this.getTileCoordExtent(e,r||this.tmpExtent_);return this.getTileRangeForExtentAndZ(i,e[0]+1,n)}return null}getTileRangeForTileCoordAndZ(e,n,r){if(n>this.maxZoom||n<this.minZoom)return null;const i=e[0],s=e[1],o=e[2];if(n===i)return createOrUpdate(s,o,s,o,r);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,n-i),u=Math.floor(s*l),c=Math.floor(o*l);if(n<i)return createOrUpdate(u,u,c,c,r);const d=Math.floor(l*(s+1))-1,h=Math.floor(l*(o+1))-1;return createOrUpdate(u,d,c,h,r)}const a=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,n,r)}getTileRangeForExtentAndZ(e,n,r){this.getTileCoordForXYAndZ_(e[0],e[3],n,!1,tmpTileCoord);const i=tmpTileCoord[1],s=tmpTileCoord[2];this.getTileCoordForXYAndZ_(e[2],e[1],n,!0,tmpTileCoord);const o=tmpTileCoord[1],a=tmpTileCoord[2];return createOrUpdate(i,o,s,a,r)}getTileCoordCenter(e){const n=this.getOrigin(e[0]),r=this.getResolution(e[0]),i=toSize(this.getTileSize(e[0]),this.tmpSize_);return[n[0]+(e[1]+.5)*i[0]*r,n[1]-(e[2]+.5)*i[1]*r]}getTileCoordExtent(e,n){const r=this.getOrigin(e[0]),i=this.getResolution(e[0]),s=toSize(this.getTileSize(e[0]),this.tmpSize_),o=r[0]+e[1]*s[0]*i,a=r[1]-(e[2]+1)*s[1]*i,l=o+s[0]*i,u=a+s[1]*i;return createOrUpdate$2(o,a,l,u,n)}getTileCoordForCoordAndResolution(e,n,r){return this.getTileCoordForXYAndResolution_(e[0],e[1],n,!1,r)}getTileCoordForXYAndResolution_(e,n,r,i,s){const o=this.getZForResolution(r),a=r/this.getResolution(o),l=this.getOrigin(o),u=toSize(this.getTileSize(o),this.tmpSize_);let c=a*(e-l[0])/r/u[0],d=a*(l[1]-n)/r/u[1];return i?(c=ceil(c,DECIMALS)-1,d=ceil(d,DECIMALS)-1):(c=floor(c,DECIMALS),d=floor(d,DECIMALS)),createOrUpdate$1(o,c,d,s)}getTileCoordForXYAndZ_(e,n,r,i,s){const o=this.getOrigin(r),a=this.getResolution(r),l=toSize(this.getTileSize(r),this.tmpSize_);let u=(e-o[0])/a/l[0],c=(o[1]-n)/a/l[1];return i?(u=ceil(u,DECIMALS)-1,c=ceil(c,DECIMALS)-1):(u=floor(u,DECIMALS),c=floor(c,DECIMALS)),createOrUpdate$1(r,u,c,s)}getTileCoordForCoordAndZ(e,n,r){return this.getTileCoordForXYAndZ_(e[0],e[1],n,!1,r)}getTileCoordResolution(e){return this.resolutions_[e[0]]}getTileSize(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]}getFullTileRange(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null}getZForResolution(e,n){const r=linearFindNearest(this.resolutions_,e,n||0);return clamp(r,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(e,n){return intersectsLinearRing(n,0,n.length,2,this.getTileCoordExtent(e))}calculateTileRanges_(e){const n=this.resolutions_.length,r=new Array(n);for(let i=this.minZoom;i<n;++i)r[i]=this.getTileRangeForExtentAndZ(e,i);this.fullTileRanges_=r}}function getForProjection(t){let e=t.getDefaultTileGrid();return e||(e=createForProjection(t),t.setDefaultTileGrid(e)),e}function wrapX(t,e,n){const r=e[0],i=t.getTileCoordCenter(e),s=extentFromProjection(n);if(!containsCoordinate(s,i)){const o=getWidth(s),a=Math.ceil((s[0]-i[0])/o);return i[0]+=o*a,t.getTileCoordForCoordAndZ(i,r)}return e}function createForExtent(t,e,n,r){r=r!==void 0?r:"top-left";const i=resolutionsFromExtent(t,e,n);return new TileGrid({extent:t,origin:getCorner(t,r),resolutions:i,tileSize:n})}function createXYZ(t){const e=t||{},n=e.extent||get$1("EPSG:3857").getExtent(),r={extent:n,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:resolutionsFromExtent(n,e.maxZoom,e.tileSize,e.maxResolution)};return new TileGrid(r)}function resolutionsFromExtent(t,e,n,r){e=e!==void 0?e:DEFAULT_MAX_ZOOM,n=toSize(n!==void 0?n:DEFAULT_TILE_SIZE);const i=getHeight(t),s=getWidth(t);r=r>0?r:Math.max(s/n[0],i/n[1]);const o=e+1,a=new Array(o);for(let l=0;l<o;++l)a[l]=r/Math.pow(2,l);return a}function createForProjection(t,e,n,r){const i=extentFromProjection(t);return createForExtent(i,e,n,r)}function extentFromProjection(t){t=get$1(t);let e=t.getExtent();if(!e){const n=180*METERS_PER_UNIT$1.degrees/t.getMetersPerUnit();e=createOrUpdate$2(-n,-n,n,n)}return e}class TileSource extends Source{constructor(e){super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=e.tilePixelRatio!==void 0?e.tilePixelRatio:1,this.tileGrid=e.tileGrid!==void 0?e.tileGrid:null;const n=[256,256];this.tileGrid&&toSize(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),n),this.tmpSize=[0,0],this.key_=e.key||getUid(this),this.tileOptions={transition:e.transition,interpolate:e.interpolate},this.zDirection=e.zDirection?e.zDirection:0}getGutterForProjection(e){return 0}getKey(){return this.key_}setKey(e){this.key_!==e&&(this.key_=e,this.changed())}getResolutions(e){const n=e?this.getTileGridForProjection(e):this.tileGrid;return n?n.getResolutions():null}getTile(e,n,r,i,s){return abstract()}getTileGrid(){return this.tileGrid}getTileGridForProjection(e){return this.tileGrid?this.tileGrid:getForProjection(e)}getTilePixelRatio(e){return this.tilePixelRatio_}getTilePixelSize(e,n,r){const i=this.getTileGridForProjection(r),s=this.getTilePixelRatio(n),o=toSize(i.getTileSize(e),this.tmpSize);return s==1?o:scale$1(o,s,this.tmpSize)}getTileCoordForTileUrlFunction(e,n){const r=n!==void 0?n:this.getProjection(),i=n!==void 0?this.getTileGridForProjection(r):this.tileGrid||this.getTileGridForProjection(r);return this.getWrapX()&&r.isGlobal()&&(e=wrapX(i,e,r)),withinExtentAndZ(e,i)?e:null}clear(){}refresh(){this.clear(),super.refresh()}}class TileSourceEvent extends BaseEvent{constructor(e,n){super(e),this.tile=n}}const zRegEx=/\{z\}/g,xRegEx=/\{x\}/g,yRegEx=/\{y\}/g,dashYRegEx=/\{-y\}/g;function renderXYZTemplate(t,e,n,r,i){return t.replace(zRegEx,e.toString()).replace(xRegEx,n.toString()).replace(yRegEx,r.toString()).replace(dashYRegEx,function(){if(i===void 0)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(i-r).toString()})}function expandUrl(t){const e=[];let n=/\{([a-z])-([a-z])\}/.exec(t);if(n){const r=n[1].charCodeAt(0),i=n[2].charCodeAt(0);let s;for(s=r;s<=i;++s)e.push(t.replace(n[0],String.fromCharCode(s)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t),n){const r=parseInt(n[2],10);for(let i=parseInt(n[1],10);i<=r;i++)e.push(t.replace(n[0],i.toString()));return e}return e.push(t),e}function createFromTemplate(t,e){return function(n,r,i){if(!n)return;let s;const o=n[0];if(e){const a=e.getFullTileRange(o);a&&(s=a.getHeight()-1)}return renderXYZTemplate(t,o,n[1],n[2],s)}}function createFromTemplates(t,e){const n=t.length,r=new Array(n);for(let i=0;i<n;++i)r[i]=createFromTemplate(t[i],e);return createFromTileUrlFunctions(r)}function createFromTileUrlFunctions(t){return t.length===1?t[0]:function(e,n,r){if(!e)return;const i=hash(e),s=modulo(i,t.length);return t[s](e,n,r)}}class UrlTile extends TileSource{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===UrlTile.prototype.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(this.tileUrlFunction=e.tileUrlFunction),this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(e){const n=e.target,r=getUid(n),i=n.getState();let s;i==TileState.LOADING?(this.tileLoadingKeys_[r]=!0,s=TileEventType.TILELOADSTART):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],s=i==TileState.ERROR?TileEventType.TILELOADERROR:i==TileState.LOADED?TileEventType.TILELOADEND:void 0),s!=null&&this.dispatchEvent(new TileSourceEvent(s,n))}setTileLoadFunction(e){this.tileLoadFunction=e,this.changed()}setTileUrlFunction(e,n){this.tileUrlFunction=e,typeof n<"u"?this.setKey(n):this.changed()}setUrl(e){const n=expandUrl(e);this.urls=n,this.setUrls(n)}setUrls(e){this.urls=e;const n=e.join(`
|
|
643
|
+
`);this.generateTileUrlFunction_?this.setTileUrlFunction(createFromTemplates(e,this.tileGrid),n):this.setKey(n)}tileUrlFunction(e,n,r){}}class TileImage extends UrlTile{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:defaultTileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate!==void 0?e.interpolate:!0,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin!==void 0?e.crossOrigin:null,this.tileClass=e.tileClass!==void 0?e.tileClass:ImageTile,this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(e){return this.getProjection()&&e&&!equivalent(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=":disable-interpolation"),e}getTileGridForProjection(e){const n=this.getProjection();if(this.tileGrid&&(!n||equivalent(n,e)))return this.tileGrid;const r=getUid(e);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=getForProjection(e)),this.tileGridForProjection[r]}createTile_(e,n,r,i,s,o){const a=[e,n,r],l=this.getTileCoordForTileUrlFunction(a,s),u=l?this.tileUrlFunction(l,i,s):void 0,c=new this.tileClass(a,u!==void 0?TileState.IDLE:TileState.EMPTY,u!==void 0?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(EventType.CHANGE,this.handleTileChange.bind(this)),c}getTile(e,n,r,i,s){const o=this.getProjection();if(!o||!s||equivalent(o,s))return this.getTileInternal(e,n,r,i,o||s);const a=[e,n,r],l=this.getKey(),u=this.getTileGridForProjection(o),c=this.getTileGridForProjection(s),d=this.getTileCoordForTileUrlFunction(a,s),h=new ReprojTile(o,u,s,c,a,d,this.getTilePixelRatio(i),this.getGutter(),(f,p,g,v)=>this.getTileInternal(f,p,g,v,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return h.key=l,h}getTileInternal(e,n,r,i,s){const o=this.getKey();return this.createTile_(e,n,r,i,s,o)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,n){const r=get$1(e);if(r){const i=getUid(r);i in this.tileGridForProjection||(this.tileGridForProjection[i]=n)}}}function defaultTileLoadFunction(t,e){t.getImage().src=e}class XYZ extends TileImage{constructor(e){e=e||{};const n=e.projection!==void 0?e.projection:"EPSG:3857",r=e.tileGrid!==void 0?e.tileGrid:createXYZ({extent:extentFromProjection(n),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:n,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:r,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter!==void 0?e.gutter:0}getGutter(){return this.gutter_}}const equatorialCircumference=2003750834e-2;function lonLatToMercator(t){const e=t[0]*equatorialCircumference/180;let n=Math.log(Math.tan((90+t[1])*Math.PI/360))/(Math.PI/180);return n=n*equatorialCircumference/180,[e,n]}function getIconFont(unicode=""){return unicode.indexOf("&")!==-1&&(unicode=unicode.replace("&","&")),unicode.indexOf("&")!==-1&&(unicode=unicode.replace("&","&")),eval('("'+unicode.replace("&#x","\\u").replace(";","")+'")')}const multiplyPixelRatio=t=>{const e=window.devicePixelRatio||1;return t.map(n=>n.map(r=>r*e))},adjustBounds=(t,e)=>e.length===2?[t[0]-e[0],t[1]-e[1],t[2]+e[0],t[3]+e[1]]:[t[0]+e[0],t[1]+e[1],t[2]+e[2],t[3]+e[3]],isOverlapping=(t,e)=>t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1],getIconStyle=t=>new Style({text:new Text({font:"Normal 14px map-iconfont",text:getIconFont(t),fill:new Fill({color:"#fff"}),offsetY:-14}),zIndex:100});function convertToRadians(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function createFeature(t,e,n={}){const r={type:"Feature"};return n.id!==void 0&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties={},r.geometry=t,r}function createPoint(t,e,n){return createFeature({type:"Point",coordinates:t},e,n)}function calculateAngle(t,e,n){const r=convertToRadians(t),i=convertToRadians(e),s=r[0]%360*(Math.PI/180),o=i[0]%360*(Math.PI/180),a=r[1]%360*(Math.PI/180),l=i[1]%360*(Math.PI/180),u=Math.sin(o-s)*Math.cos(l),c=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(o-s);return 180*Math.atan2(u,c)%(2*Math.PI)/Math.PI}const getAngle=(t,e)=>{let n=calculateAngle(createPoint(t),createPoint(e));return n=n<0?360+n:n,n%360*Math.PI/180},labelAlpha=.8,labelFont="500 12px Arial",labelOutSize=2,labelHeight=10,fillRectRadius=(t,e,n,r,i,s,o=4)=>{t.beginPath(),t.moveTo(e+o,n),t.arcTo(e+r,n,e+r,n+o,o),t.arcTo(e+r,n+i,e+r-o,n+i,o),t.arcTo(e,n+i,e,n+i-o,o),t.arcTo(e,n,e+o,n,o),t.closePath(),t.fillStyle=s,t.fill()},getPixelFromCoordinate=t=>{if(!t||t.length===0)throw new Error("Points array is empty or invalid.");let e=1/0,n=1/0,r=-1/0,i=-1/0;for(const[s,o]of t)s<e&&(e=s),o<n&&(n=o),s>r&&(r=s),o>i&&(i=o);return[e,n,r,i]},rotateShapeModel=(t,e)=>{const[n,r]=t[0],i=e*Math.PI/180,s=Math.cos(i),o=Math.sin(i);return t.map(([a,l])=>{const u=a-n,c=l-r,d=u*s-c*o+n,h=u*o+c*s+r;return[d,h]})},getTopLeftPoint=t=>[t[0],t[3]],getBottomLeftPoint=t=>[t[2],t[3]],getBottomRightPoint=t=>[t[2],t[1]],getTopRighttPoint=t=>[t[0],t[1]];function calculateBounds(t,e,n,r,i){let s,o,a,l,u=t[0],c=t[1];switch(e){case 0:s=u+i,o=s+n,l=c-i,a=l-r;break;case 1:s=u+i,o=s+n,l=c+r/2,a=l-r;break;case 2:s=u+i,o=s+n,l=c+i+r,a=l-r;break;case 3:s=u-n/2,o=s+n,l=c+i+r,a=l-r;break;case 4:o=u,s=o-n,l=c+i+r,a=l-r;break;case 5:o=u-i,s=o-n,l=c+r/2,a=l-r;break;case 6:o=u,s=o-n,l=c-i,a=l-r;break;case 7:s=u-n/2,o=s+n,l=c-i,a=l-r}if(!(!s||!a||!o||!l))return[Math.min(s,o),Math.min(a,l),Math.max(s,o),Math.max(a,l)+1]}function calculateAnchorPoint(t,e,n=70,r=20,i=20){let s=[0,0];switch(e){case 0:s[0]=t[0]+i,s[1]=t[1]-i-r/2;break;case 1:s[0]=t[0]+i,s[1]=t[1];break;case 2:s[0]=t[0]+i,s[1]=t[1]+i+r/2;break;case 3:s[0]=t[0],s[1]=t[1]+i+r/4;break;case 4:s[0]=Math.max(t[0]-i,t[0]-n/2),s[1]=t[1]+i+r/4;break;case 5:s[0]=t[0]-i,s[1]=t[1];break;case 6:s[0]=Math.max(t[0]-i,t[0]-n/2),s[1]=t[1]-i-r/4;break;case 7:s[0]=t[0],s[1]=t[1]-i-r/4}return s}function drawLabelBody(t,e,n){if(!t)return;const{font:r,labelOutSize:i=2,labelHeight:s,center:o,text:a,lineLength:l=20}=n;t.save(),r&&(t.font=r);let u=t.measureText(a).width+2*i;t.restore();let c,d=-1,h=s+3*i;if(d=0,c=calculateBounds(o,d,u,h,l),c&&d>-1){let f=getBottomLeftPoint(c),p=getTopRighttPoint(c);return{center:o,x:calculateAnchorPoint(o,d,u,h,l),l:p,r:f,bounds:c,position:d}}return null}const drawText=(t,e,n,r,i,s,o)=>{if(!t)return;t.save();let[a,l]=e;a+=labelOutSize,t.font=labelFont,t.fillStyle=r,t.fillText(n,a,l),t.restore()},drawPolygon=(t,e,n,r,i,s=null,o,a,l,u)=>{if(e&&t){t.save(),t.beginPath(),o&&o!==0&&a==null&&t.rotate(o),s&&t.translate(s[0],s[1]),o&&(a!=null&&a.length)&&t.rotate(o),l&&t.scale(l,l),t.moveTo(e[0][0],e[0][1]);for(let c=1;c<e.length;c++)t.lineTo(e[c][0],e[c][1]);i&&t.closePath(),n&&(t.strokeStyle=n,t.stroke()),r&&i&&(u&&(t.globalAlpha=u),t.fillStyle=r,t.fill()),t.restore()}},drawLabel=(t,e,n,r,i,s,o,a)=>{if(e&&n){let l={font:labelFont,labelOutSize,labelHeight,center:e,text:n},u=drawLabelBody(t,labels.value,l);if(u){const{x:c,bounds:d,l:h}=u,f=[getTopLeftPoint(d),getBottomLeftPoint(d),getBottomRightPoint(d),getTopRighttPoint(d)];labels.value.push(u),drawPolygon(t,[e,c],r,"#000",!1,null,null,null,null,labelAlpha),drawPolygon(t,f,r,s,!0);const[p,g]=h;drawText(t,[p,g+labelOutSize+labelHeight+1],n,i)}}return null},dotImage=new Image;dotImage.src=`${CDN_URL}/map/truck-dot.svg`,dotImage.crossOrigin="anonymous";const dotActiveImage=new Image;dotActiveImage.src=`${CDN_URL}/map/truck-dot-active.svg`,dotActiveImage.crossOrigin="anonymous";const cameraImage=new Image;cameraImage.src=`${CDN_URL}/map/map-camera.svg`,cameraImage.crossOrigin="anonymous";const loadImage=new Image;loadImage.src=`${CDN_URL}/map/map-load.svg`,loadImage.crossOrigin="anonymous";const setTruckStyle=(t,e,n,r)=>new Style({renderer:(i,s)=>{const o=s.context;o.save();let a=1;o.scale(a,a);let[l,u]=i;l=l/a-20,u=u/a;const c=l-70,d=u-68;let h=180;const f=56,p="#FFFFFF";let g=176;const v=52;let m="#164AFF",y="#FFFFFF";n===CAR_COLOR.YELLOW?(g=176,m="#FFC81E",y="rgba(0,0,0,0.88)"):n===CAR_COLOR.Y_GREEN&&(h=200,g=196,m="#8FED7C",y="rgba(0,0,0,0.88)"),r!=null&&r.length&&(h+=r.length*56),fillRectRadius(o,c,d,h,f,p),fillRectRadius(o,c+2,d+2,g,v,m),n===CAR_COLOR.Y_GREEN&&fillRectRadius(o,c+2,d+2,68,v,"#FFC81E"),o.save(),o.restore(),o.fillStyle=y,o.font="bold 28px Arial",o.textAlign="left",o.textBaseline="middle";const b=`${e.slice(0,2)+" · "+e.slice(2)}`;if(o.fillText(b,c+12,d+32),o.save(),o.restore(),r!=null&&r.length){const T=o.measureText(b).width+12;let x=0;r.forEach(k=>{k===DEVICE_TYPE.CAMERA&&(o.drawImage(cameraImage,l-54+T+x*56,u-64,50,50),++x),k===DEVICE_TYPE.LOAD&&(o.drawImage(loadImage,l-54+T+x*56,u-64,50,50),++x)})}const _=dotImage;o.drawImage(_,l+h/2-90,u,50/a,50/a),o.restore()}});vue.ref([]);let truckMarkerList=[],trucksVectorSource;const renderTrucksMarker=t=>{if(deleteAllTruckMarkers(),!!mapInstance.value)return t.forEach(e=>{const n=convertSixHundredThousandToLatLng(e.lon,e.lat),r=new Feature({geometry:new Point(fromLonLat(n))});r.set("data",e),r.setStyle(setTruckStyle(!1,e.vno,e==null?void 0:e.vclColor,e==null?void 0:e.icons)),truckMarkerList.push({name:e.vno,lonlat:n,feature:r})}),trucksVectorSource=new VectorSource({features:truckMarkerList.map(e=>e.feature)}),trucksLayer.value=new VectorLayer({source:trucksVectorSource}),mapInstance.value.addLayer(trucksLayer.value),trucksLayer.value},deleteAllTruckMarkers=()=>{truckMarkerList.forEach(t=>{t.feature&&(trucksVectorSource==null||trucksVectorSource.removeFeature(t.feature))}),truckMarkerList=[]};class ShipMapData{constructor(e,n,r,i,s,o,a,l,u,c,d,h,f,p,g,v,m,y,b=1){On(this,"id");On(this,"mmsi");On(this,"fill");On(this,"shipType");On(this,"name");On(this,"length");On(this,"breadth");On(this,"lon");On(this,"lat");On(this,"createdAt");On(this,"speed");On(this,"from");On(this,"sailStatus");On(this,"hdg");On(this,"cog");On(this,"posType");On(this,"type");On(this,"angle");On(this,"isShow");this.id=e,this.mmsi=n,this.fill=r,this.shipType=i,this.name=s,this.length=o,this.breadth=a,this.lon=l,this.lat=u,this.createdAt=c,this.speed=d,this.from=h,this.sailStatus=f,this.hdg=p,this.cog=g,this.posType=v,this.type=m,this.angle=y,this.isShow=b}}const triangleModel=multiplyPixelRatio([[0,-8],[5,8],[-5,8]]),shipShapeModel=multiplyPixelRatio([[0,-4.545],[-.56,-3.909],[-1,-2.727],[-1,3.636],[-.8,4.545],[.8,4.545],[1,3.636],[1,-2.727],[.56,-3.909],[0,-4.545]]),shipDirectPath={left:{0:[[0,0],[0,-8],[-4,-8]],1:[[0,0],[0,-16],[-6,-16]],2:[[0,0],[0,-24],[-8,-24]]},right:{0:[[0,0],[0,-8],[-4,-8]],1:[[0,0],[0,-16],[-6,-16]],2:[[0,0],[0,-24],[-8,-24]]},front:{0:[[0,0],[0,-8]],1:[[0,0],[0,-16]],2:[[0,0],[0,-24]]}},speedCondition=[[1,10],[10,20],[20,1/0]],drawShipModelByZoom={16:[200,30],17:[50,5],18:[1,1]},setShipStyle=(t,e)=>new Style({renderer:(n,r)=>{const i=r.context,s=r.feature.get("data");try{const o=drawShipBody(i,s,n);o&&drawHeading(i,s,o),drawShipLabel(i,s,n)}catch{return!1}}}),drawShipBody=(t,e,n)=>{if(!mapInstance.value)return;const r=mapInstance.value.getView().getZoom();if(!r)return;let i=[];const[s,o]=drawShipModelByZoom[r]||[0,0],[a,l]=n;if(r<=mapZoom.shipModelMax&&r>mapZoom.shipModelMin&&e.length>=s&&e.breadth>=o){const u=drawCurrentShipShapeModel(e,r);i=rotateShapeModel(u.map(c=>{const[d,h]=c;return[a+d,l+h]}),e.angle)}else n.length===2&&(i=rotateShapeModel(triangleModel.map(u=>{const[c,d]=u;return[a+c,l+d]}),e.angle));if(!(i.length>2))return!1;t.save(),t.beginPath(),t.moveTo(i[0][0],i[0][1]);for(let u=1;u<i.length;u++)t.lineTo(i[u][0],i[u][1]);return t.closePath(),t.strokeStyle="#000",t.lineWidth=1,t.stroke(),t.fillStyle=e.fill,t.fill(),t.restore(),i},drawHeading=(t,e,n)=>{const[r,i]=n[0],s=getShipDirectPath(e);if(s){let o=s.map(function(a){let[l,u]=a;return[l+r,u+i]});if(t.save(),t.beginPath(),e.angle>0){t.translate(r,i);const a=e.angle*Math.PI/180;t.rotate(a),t.translate(-r,-i)}t.moveTo(r,i);for(let a=1;a<o.length;a++){let[l,u]=o[a];t.lineTo(l,u)}t.strokeStyle="#000",t.lineWidth=1,t.stroke(),t.restore()}},drawSelectBounds=(t,e)=>{let[n,r,i,s]=getPixelFromCoordinate(e);const o=4;n-=o,r-=o,i+=o,s+=o,t.save(),t.strokeStyle="#ff0000",t.lineWidth=4;const a=8;t.beginPath(),t.moveTo(n+a,s),t.lineTo(n,s),t.lineTo(n,s-a),t.moveTo(n,r+a),t.lineTo(n,r),t.lineTo(n+a,r),t.moveTo(i-a,r),t.lineTo(i,r),t.lineTo(i,r+a),t.moveTo(i,s-a),t.lineTo(i,s),t.lineTo(i-a,s),t.stroke(),t.restore()},drawShipLabel=(t,e,n)=>{const[r,i]=n,s=r-0,o=i-0,a=e.name;drawLabel(t,[s,o],a,"#fff","#000","#fff")},drawCurrentShipShapeModel=(t,e)=>{let n=0;e===17?n=.425:e===18&&(n=.857);const r=t.length/4*n,i=t.breadth*n;let s=cloneDeep(shipShapeModel);return s=s.map(([o,a])=>[o*i,a*r]),s},getShipDirectPath=t=>{let{speed:e,hdg:n,cog:r}=t,i="",s=null;if(e&&e>1&&(n!==null&&n!=511&&r!==null?r-n>=3?i="left":r-n<=-3?i="right":i="front":i="front",i&&e))for(let o in speedCondition){let a=speedCondition[o];if(e>=a[0]&&e<a[1]){s=shipDirectPath[i][o];break}}return s};class FeatureFormat{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=Feature,this.supportedMediaTypes=null}getReadOptions(e,n){if(n){let r=n.dataProjection?get$1(n.dataProjection):this.readProjection(e);n.extent&&r&&r.getUnits()==="tile-pixels"&&(r=get$1(r),r.setWorldExtent(n.extent)),n={dataProjection:r,featureProjection:n.featureProjection}}return this.adaptOptions(n)}adaptOptions(e){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},e)}getType(){return abstract()}readFeature(e,n){return abstract()}readFeatures(e,n){return abstract()}readGeometry(e,n){return abstract()}readProjection(e){return abstract()}writeFeature(e,n){return abstract()}writeFeatures(e,n){return abstract()}writeGeometry(e,n){return abstract()}}function transformGeometryWithOptions(t,e,n){const r=n?get$1(n.featureProjection):null,i=n?get$1(n.dataProjection):null;let s=t;if(r&&i&&!equivalent(r,i)){e&&(s=t.clone());const o=e?r:i,a=e?i:r;o.getUnits()==="tile-pixels"?s.transform(o,a):s.applyTransform(getTransform(o,a))}if(e&&n&&n.decimals!==void 0){const o=Math.pow(10,n.decimals),a=function(l){for(let u=0,c=l.length;u<c;++u)l[u]=Math.round(l[u]*o)/o;return l};s===t&&(s=t.clone()),s.applyTransform(a)}return s}const GeometryConstructor={Point,LineString,Polygon,MultiPoint,MultiLineString,MultiPolygon};function orientFlatCoordinates(t,e,n){return Array.isArray(e[0])?(linearRingssAreOriented(t,0,e,n)||(t=t.slice(),orientLinearRingsArray(t,0,e,n)),t):(linearRingsAreOriented(t,0,e,n)||(t=t.slice(),orientLinearRings(t,0,e,n)),t)}function createRenderFeature(t,e){var s;const n=t.geometry;if(!n)return[];if(Array.isArray(n))return n.map(o=>createRenderFeature({...t,geometry:o})).flat();const r=n.type==="MultiPolygon"?"Polygon":n.type;if(r==="GeometryCollection"||r==="Circle")throw new Error("Unsupported geometry type: "+r);const i=n.layout.length;return transformGeometryWithOptions(new RenderFeature(r,r==="Polygon"?orientFlatCoordinates(n.flatCoordinates,n.ends,i):n.flatCoordinates,(s=n.ends)==null?void 0:s.flat(),i,t.properties||{},t.id).enableSimplifyTransformed(),!1,e)}function createGeometry(t,e){if(!t)return null;if(Array.isArray(t)){const r=t.map(i=>createGeometry(i,e));return new GeometryCollection(r)}const n=GeometryConstructor[t.type];return transformGeometryWithOptions(new n(t.flatCoordinates,t.layout,t.ends),!1,e)}class JSONFeature extends FeatureFormat{constructor(){super()}getType(){return"json"}readFeature(e,n){return this.readFeatureFromObject(getObject(e),this.getReadOptions(e,n))}readFeatures(e,n){return this.readFeaturesFromObject(getObject(e),this.getReadOptions(e,n))}readFeatureFromObject(e,n){return abstract()}readFeaturesFromObject(e,n){return abstract()}readGeometry(e,n){return this.readGeometryFromObject(getObject(e),this.getReadOptions(e,n))}readGeometryFromObject(e,n){return abstract()}readProjection(e){return this.readProjectionFromObject(getObject(e))}readProjectionFromObject(e){return abstract()}writeFeature(e,n){return JSON.stringify(this.writeFeatureObject(e,n))}writeFeatureObject(e,n){return abstract()}writeFeatures(e,n){return JSON.stringify(this.writeFeaturesObject(e,n))}writeFeaturesObject(e,n){return abstract()}writeGeometry(e,n){return JSON.stringify(this.writeGeometryObject(e,n))}writeGeometryObject(e,n){return abstract()}}function getObject(t){if(typeof t=="string"){const e=JSON.parse(t);return e||null}return t!==null?t:null}class GeoJSON extends JSONFeature{constructor(e){e=e||{},super(),this.dataProjection=get$1(e.dataProjection?e.dataProjection:"EPSG:4326"),e.featureProjection&&(this.defaultFeatureProjection=get$1(e.featureProjection)),e.featureClass&&(this.featureClass=e.featureClass),this.geometryName_=e.geometryName,this.extractGeometryName_=e.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(e,n){let r=null;e.type==="Feature"?r=e:r={type:"Feature",geometry:e,properties:null};const i=readGeometryInternal(r.geometry);if(this.featureClass===RenderFeature)return createRenderFeature({geometry:i,id:r.id,properties:r.properties},n);const s=new Feature;return this.geometryName_?s.setGeometryName(this.geometryName_):this.extractGeometryName_&&r.geometry_name&&s.setGeometryName(r.geometry_name),s.setGeometry(createGeometry(i,n)),"id"in r&&s.setId(r.id),r.properties&&s.setProperties(r.properties,!0),s}readFeaturesFromObject(e,n){const r=e;let i=null;if(r.type==="FeatureCollection"){const s=e;i=[];const o=s.features;for(let a=0,l=o.length;a<l;++a){const u=this.readFeatureFromObject(o[a],n);u&&i.push(u)}}else i=[this.readFeatureFromObject(e,n)];return i.flat()}readGeometryFromObject(e,n){return readGeometry(e,n)}readProjectionFromObject(e){const n=e.crs;let r;if(n)if(n.type=="name")r=get$1(n.properties.name);else if(n.type==="EPSG")r=get$1("EPSG:"+n.properties.code);else throw new Error("Unknown SRS type");else r=this.dataProjection;return r}writeFeatureObject(e,n){n=this.adaptOptions(n);const r={type:"Feature",geometry:null,properties:null},i=e.getId();if(i!==void 0&&(r.id=i),!e.hasProperties())return r;const s=e.getProperties(),o=e.getGeometry();return o&&(r.geometry=writeGeometry(o,n),delete s[e.getGeometryName()]),isEmpty$1(s)||(r.properties=s),r}writeFeaturesObject(e,n){n=this.adaptOptions(n);const r=[];for(let i=0,s=e.length;i<s;++i)r.push(this.writeFeatureObject(e[i],n));return{type:"FeatureCollection",features:r}}writeGeometryObject(e,n){return writeGeometry(e,this.adaptOptions(n))}}function readGeometryInternal(t,e){if(!t)return null;let n;switch(t.type){case"Point":{n=readPointGeometry(t);break}case"LineString":{n=readLineStringGeometry(t);break}case"Polygon":{n=readPolygonGeometry(t);break}case"MultiPoint":{n=readMultiPointGeometry(t);break}case"MultiLineString":{n=readMultiLineStringGeometry(t);break}case"MultiPolygon":{n=readMultiPolygonGeometry(t);break}case"GeometryCollection":{n=readGeometryCollectionGeometry(t);break}default:throw new Error("Unsupported GeoJSON type: "+t.type)}return n}function readGeometry(t,e){const n=readGeometryInternal(t);return createGeometry(n,e)}function readGeometryCollectionGeometry(t,e){return t.geometries.map(function(r){return readGeometryInternal(r)})}function readPointGeometry(t){const e=t.coordinates;return{type:"Point",flatCoordinates:e,layout:getLayoutForStride(e.length)}}function readLineStringGeometry(t){var r;const e=t.coordinates,n=e.flat();return{type:"LineString",flatCoordinates:n,ends:[n.length],layout:getLayoutForStride(((r=e[0])==null?void 0:r.length)||2)}}function readMultiLineStringGeometry(t){var s,o;const e=t.coordinates,n=((o=(s=e[0])==null?void 0:s[0])==null?void 0:o.length)||2,r=[],i=deflateCoordinatesArray(r,0,e,n);return{type:"MultiLineString",flatCoordinates:r,ends:i,layout:getLayoutForStride(n)}}function readMultiPointGeometry(t){var n;const e=t.coordinates;return{type:"MultiPoint",flatCoordinates:e.flat(),layout:getLayoutForStride(((n=e[0])==null?void 0:n.length)||2)}}function readMultiPolygonGeometry(t){var s,o;const e=t.coordinates,n=[],r=((o=(s=e[0])==null?void 0:s[0])==null?void 0:o[0].length)||2,i=deflateMultiCoordinatesArray(n,0,e,r);return{type:"MultiPolygon",flatCoordinates:n,ends:i,layout:getLayoutForStride(r)}}function readPolygonGeometry(t){var s,o;const e=t.coordinates,n=[],r=(o=(s=e[0])==null?void 0:s[0])==null?void 0:o.length,i=deflateCoordinatesArray(n,0,e,r);return{type:"Polygon",flatCoordinates:n,ends:i,layout:getLayoutForStride(r)}}function writeGeometry(t,e){t=transformGeometryWithOptions(t,!0,e);const n=t.getType();let r;switch(n){case"Point":{r=writePointGeometry(t);break}case"LineString":{r=writeLineStringGeometry(t);break}case"Polygon":{r=writePolygonGeometry(t,e);break}case"MultiPoint":{r=writeMultiPointGeometry(t);break}case"MultiLineString":{r=writeMultiLineStringGeometry(t);break}case"MultiPolygon":{r=writeMultiPolygonGeometry(t,e);break}case"GeometryCollection":{r=writeGeometryCollectionGeometry(t,e);break}case"Circle":{r={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+n)}return r}function writeGeometryCollectionGeometry(t,e){return e=Object.assign({},e),delete e.featureProjection,{type:"GeometryCollection",geometries:t.getGeometriesArray().map(function(r){return writeGeometry(r,e)})}}function writeLineStringGeometry(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}function writeMultiLineStringGeometry(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}function writeMultiPointGeometry(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}function writeMultiPolygonGeometry(t,e){let n;return e&&(n=e.rightHanded),{type:"MultiPolygon",coordinates:t.getCoordinates(n)}}function writePointGeometry(t,e){return{type:"Point",coordinates:t.getCoordinates()}}function writePolygonGeometry(t,e){let n;return e&&(n=e.rightHanded),{type:"Polygon",coordinates:t.getCoordinates(n)}}let shipsMarkerList=[],shipsVectorSource,largeAmountShipsSource;const renderShips=t=>{if(!mapInstance.value)return;const e=mapInstance.value.getView().getZoom();if(!(!e||e<=mapZoom.shipGreenDotMax))return e>mapZoom.shipGreenDotMax&&e<mapZoom.shipModelMin||t.length>500?(deleteAllShipMarkers(),renderLargeAmountShips(t)):(largeAmountShipsSource==null||largeAmountShipsSource.clear(),renderShipsMarker(t))},renderLargeAmountShips=t=>{if(!mapInstance.value)return;const e=t.map(n=>({type:"Feature",geometry:{type:"Point",coordinates:[n.lon,n.lat]},properties:n}));return largeAmountShipsSource==null||largeAmountShipsSource.clear(),largeAmountShipsSource=new VectorSource({features:new GeoJSON().readFeatures({type:"FeatureCollection",features:e},{featureProjection:projection.mercator})}),largeAmountShipsLayer.value=new WebGLPointsLayer({source:largeAmountShipsSource,style:{"shape-points":3,"shape-radius":9,"shape-fill-color":"#04C900","shape-rotate-with-view":!1,"shape-rotation":["get","cog",0]}}),mapInstance.value.addLayer(largeAmountShipsLayer.value),largeAmountShipsLayer.value},renderShipsMarker=t=>{if(mapInstance.value)return deleteAllShipMarkers(),t.forEach(e=>{const n=[e.lon,e.lat],r=new Feature({geometry:new Point(fromLonLat(n))}),i=new ShipMapData(e.id,e.id,e.fill||"#04C900","70",e.cnname||e.name,e.len,e.wid,e.lon,e.lat,new Date().getTime(),e.spd,e.from,e.status,Number(e.hdg),e.cog,Number(e.postype),"other",e.cog,1);r.set("data",i),r.setStyle(setShipStyle(!1,e.id)),shipsMarkerList.push({ship:e,lonlat:n,feature:r})}),shipsVectorSource=new VectorSource({features:shipsMarkerList.map(e=>e.feature)}),shipsLayer.value=new VectorLayer({source:shipsVectorSource}),mapInstance.value.addLayer(shipsLayer.value),shipsLayer.value},deleteAllShipMarkers=()=>{shipsMarkerList.forEach(t=>{t.feature&&(shipsVectorSource==null||shipsVectorSource.removeFeature(t.feature))}),shipsMarkerList=[]},findShip=t=>{var e,n,r;return(r=(n=(e=shipsLayer.value)==null?void 0:e.getSource())==null?void 0:n.getFeatures())==null?void 0:r.find(i=>{var s;return((s=i.get("data"))==null?void 0:s.id)===t})},stopIcon="",stopColor="#E31818",slowIcon="",slowColor="#1890FF",dropletsIcon="",trackList$1=vue.ref([]),renderTrackLine=(t,e,n)=>{var s;const r=t[e];if(!r)return;trackList$1.value=r.reverse().map((o,a)=>(o.center=[o.lon,o.lat],o.centerPoint=lonLatToMercator(o.center),o.id=e,o.index=a,o.time=hooks(o.createdAt).format("YYYY-MM-DD HH:mm:ss"),o));let i=trackList$1.value.map(o=>o.centerPoint);if(i.length>=2){let o=new LineString(i);const a=new Feature({geometry:o});a.setStyle(new Style({stroke:new Stroke({color:n,width:2})})),a.setId(e),a.set("type","line");const l=shipTrackLineFeatures.value.findIndex(u=>u.getId()===e);l>=0?shipTrackLineFeatures.value[l]=a:shipTrackLineFeatures.value.push(a),trackLineVectorSource.value=new VectorSource({features:shipTrackLineFeatures.value}),shipTrackVectorLayer.value=new VectorLayer({source:trackLineVectorSource.value,style:{"fill-color":"rgba(255, 255, 255, 0.2)","stroke-color":"#ffcc33","stroke-width":2,"circle-radius":7,"circle-fill-color":"#ffcc33"}}),renderPoint(n),(s=mapInstance.value)==null||s.addLayer(shipTrackVectorLayer.value)}},renderPoint=t=>{if(!mapInstance.value)return;let e=trackList$1.value||[];if(!(e&&e.length>2))return[];let n={16:24,17:15,default:4},r=[],i=e.length;for(let a=0;a<i;a++){e[a].index=a;let l=mapInstance.value.getPixelFromCoordinate(e[a].centerPoint);if(l){let u=l.concat(l);u=adjustBounds(u,[20,20]);let c=mapInstance.value.getView().getZoom();if(!c)return;if(c>15){let h=n[c]||n.default;u=adjustBounds(u,[h,h])}let d=!0;if(e[a].state!=="0"){for(let h=0;h<r.length;h++)if(isOverlapping(u,r[h].bounds)){d=!1;break}}d&&(e[a].bounds=u,r.push(e[a]))}}const s=getIconStyle(stopIcon),o=getIconStyle(slowIcon);r.forEach(a=>{var c,d;let l=new Feature({geometry:new Point(a.centerPoint)});l.set("type","track_point"),l.set("data",a),l.setStyle(new Style({image:new CircleStyle({fill:new Fill({color:t}),stroke:new Stroke({color:"#fff",width:2}),radius:3})})),trackLineVectorSource.value.addFeature(l);const u=new Feature({geometry:new Point(fromLonLat(a.center))});if(u.set("type","track_label"),u.setStyle(setTrackLabelStyle(a,t)),console.log("trackLabelFeature"),trackLineVectorSource.value.addFeature(u),typeof a=="object"&&a.hasOwnProperty("state")){let h=new Feature({geometry:new Point(a.centerPoint)});h.set("type","track_icon");let f=new Style({text:new Text({font:"Normal 22px iconfont",text:getIconFont(dropletsIcon),offsetY:-10}),zIndex:99}),p=[];a.state==="0"?((c=f.getText())==null||c.setFill(new Fill({color:stopColor})),p.push(s)):((d=f.getText())==null||d.setFill(new Fill({color:slowColor})),p.push(o)),p.push(f),h.setStyle(p),trackLineVectorSource.value.addFeature(h)}}),renderArrow(r,t),renderIconPoint()},renderArrow=(t,e)=>{const n=t.length;n||(t.push(trackList$1.value[0]),t.push(trackList$1.value[trackList$1.value.length-1]));for(let r=0;r<n-1;r++){let i,s=t[r],o=(t[r+1].index+s.index)/2;if(o%2===0)i=trackList$1.value[o].centerPoint;else{let a=trackList$1.value[Math.floor(o)],l=trackList$1.value[Math.ceil(o)];if(a&&l){let[u,c]=a.centerPoint,[d,h]=l.centerPoint;i=[(u+d)/2,(c+h)/2]}}if(i){let a=new Feature({geometry:new Point(i)});a.set("type","track_arrow"),a.setStyle(new Style({text:new Text({font:"700 14px iconfont",text:getIconFont(""),fill:new Fill({color:e}),rotation:getAngle(t[r].center,t[r+1].center)})})),trackLineVectorSource.value.addFeature(a)}}},renderIconPoint=()=>{const t="",e="#fcdc3f",n="#ff0000";(trackList$1.value.length<2?[trackList$1.value[0]]:[trackList$1.value[0],trackList$1.value[trackList$1.value.length-1]]).forEach(i=>{let s=new Feature({geometry:new Point(i.centerPoint)});s.set("type","track_begin"),s.set("data",i);const o=i.index===0&&trackList$1.value.length>=2?e:n;s.setStyle(new Style({text:new Text({font:"Normal 14px iconfont",text:getIconFont(t),fill:new Fill({color:o})}),zIndex:101})),trackLineVectorSource.value.addFeature(s)})},setTrackLabelStyle=(t,e)=>new Style({renderer:(n,r)=>{const i=r.context;drawLabel(i,n,t.time,e,"#000","rgba(255,255,255,.8)")}}),showTracks=vue.ref([]),trackList=vue.ref([]),trackLayer=vue.ref(null),trackId=vue.ref(""),cursor=vue.ref(0),renderTrack=(t,e,n,r,i="ship")=>{var c;if(removeAllTrackLayer(),(e==null?void 0:e.length)<2){((c=showTracks.value)==null?void 0:c.findIndex(d=>d.id===t))<0&&showTracks.value.push({id:t,length:""});return}let s={};e.forEach(d=>{d.state?d.state=Number(d.state):delete d.state}),trackId.value=t,s[t]=e,trackList.value=e;const o=["#ff0000","#00ff00","#0079ff","#ffa500","#800080","#008080","#ffc0cb","#800000","#000080","#808000"],a=s[t].map(d=>transform([d.lon,d.lat],projection.data,projection.mercator)),l=new LineString(a),u=formatLength(l,r)||"--";vue.nextTick(()=>{var h;const d=(h=showTracks.value)==null?void 0:h.findIndex(f=>f.id===t);d<0?showTracks.value.push({id:t,length:u}):showTracks.value[d].length=u,renderTrackLine(s,t,n),++cursor.value,cursor.value>o.length&&(cursor.value=0),resetTrackView(t)}).then(()=>{})},removeAllTrackLayer=()=>{var t;(t=trackLayer.value)==null||t.removeAllLayer()},resetTrackView=t=>{var r,i;const e=mapInstance.value.getView(),n=(i=(r=shipTrackLineFeatures.value.find(s=>s.getId()===t))==null?void 0:r.getGeometry())==null?void 0:i.getExtent();if(n!=null&&n.length)try{e.fit(n)}catch(s){console.log(s)}},_sfc_main=vue.defineComponent({__name:"Map",props:{zoom:{},center:{},vehicleMode:{}},emits:["zoomChanged","extentChanged"],setup(t,{expose:e,emit:n}){const r=vue.ref(null),i=vue.ref(null),s=vue.ref(null),o=n,a=t,l=vue.ref(a.zoom||mapZoom.default),u=vue.ref(!1),c=vue.ref(!0),d=vue.ref(!0);let h;(b=>{b[b.tiandituTile=new TileLayer({source:new XYZ({url:baseMap.tiandituTile})})]="tiandituTile",b[b.tiandituTileMark=new TileLayer({source:new XYZ({url:baseMap.tiandituTileMark})})]="tiandituTileMark",b[b.tiandituImgTile=new TileLayer({source:new XYZ({url:baseMap.tiandituImgTile}),visible:!1})]="tiandituImgTile",b[b.tiandituImgTileMark=new TileLayer({source:new XYZ({url:baseMap.tiandituImgTileMark}),visible:!1})]="tiandituImgTileMark",b[b.greenMark=new TileLayer({source:new XYZ({url:baseMap.greenTile})})]="greenMark"})(h||(h={}));const f=()=>{var _;const b={projection:projection.mercator,zoom:a.zoom||mapZoom.default,minZoom:mapZoom.min,maxZoom:mapZoom.max,center:lonLatToMercator(a.center||mapDefaultCenter),constrainResolution:!0,multiWorld:!0};mapInstance.value=new Map$2({target:"map",layers:[h.tiandituTile,h.tiandituTileMark,h.tiandituImgTile,h.tiandituImgTileMark,h.greenMark],view:new View(b)}),i.value.setScaleLine(),console.log(mapInstance.value.getLayers().getArray()),(_=mapInstance.value)==null||_.on("moveend",v)};vue.onMounted(()=>{f()});const p=b=>{var _;(_=mapInstance.value)==null||_.getLayers().forEach(T=>{T.ol_uid===h.greenMark.ol_uid&&(T.setVisible(b),c.value=b)})},g=b=>{var _;console.log("mode",b),(_=mapInstance.value)==null||_.getLayers().forEach(T=>{(T.ol_uid===h.tiandituTile.ol_uid||T.ol_uid===h.tiandituTileMark.ol_uid||T.ol_uid===h.tiandituImgTile.ol_uid||T.ol_uid===h.tiandituImgTileMark.ol_uid)&&T.setVisible(!1),(b===BaseMapType.vector&&T.ol_uid===h.tiandituTile.ol_uid||T.ol_uid===h.tiandituTileMark.ol_uid||b===BaseMapType.satellite&&T.ol_uid===h.tiandituImgTile.ol_uid||T.ol_uid===h.tiandituImgTileMark.ol_uid)&&(console.log(b,T.ol_uid),T.setVisible(!0))})},v=()=>{const b=mapInstance.value.getView(),_=b.getZoom();_&&m(_);const T=b.calculateExtent(mapInstance.value.getSize());T&&_&&y(T,_)},m=b=>{var x;l.value=b;const _=(x=mapInstance.value)==null?void 0:x.getLayers(),T=a.vehicleMode==="ship"?_==null?void 0:_.getArray().find(k=>k.ol_uid===h.greenMark.ol_uid):void 0;!u.value&&c.value&&b<mapZoom.shipGreenDotMax?(d.value=!0,T==null||T.setVisible(!0)):(d.value=!1,T==null||T.setVisible(!1)),o("zoomChanged",b)},y=(b,_)=>{const T=transform([b[0],b[1]],projection.mercator,projection.data),x=transform([b[2],b[3]],projection.mercator,projection.data);o("extentChanged",{extent:[T,x],zoom:_})};return e({mapInstance,initMap:f,renderTrucksMarker,renderShips,renderTrack,closeTrack:()=>{var b;(b=shipTrackVectorLayer.value)==null||b.setVisible(!1)},findShip}),(b,_)=>(vue.openBlock(),vue.createElementBlock("div",{class:"map-page map-container",ref_key:"pageRef",ref:r},[_[0]||(_[0]=vue.createElementVNode("div",{id:"map",class:"map"},null,-1)),vue.createVNode(ToolPanel,{"vehicle-mode":b.vehicleMode,onSwitchGreenDot:p,onSwitchMapTile:g},null,8,["vehicle-mode"]),vue.createVNode(ScaleLine,{ref_key:"scaleLineControl",ref:i},null,512),vue.createVNode(ZoomControl,{ref_key:"zoomControl",ref:s,map:vue.unref(mapInstance)},null,8,["map"]),vue.createVNode(Copyright),vue.createVNode(Fullscreen,{page:r.value},null,8,["page"]),_[1]||(_[1]=vue.createElementVNode("span",{class:"icon map-iconfont",style:{"user-select":"text"}}," ",-1)),_[2]||(_[2]=vue.createElementVNode("span",{class:"icon map-iconfont icon-arrow"},null,-1))],512))}}),Map$1=_export_sfc(_sfc_main,[["__scopeId","data-v-e4db8f6e"]]),ZhMap=withInstall$1(Map$1),components=[ZhBaseInfo,ZhButton,ZhDatePicker,ZhDetailHeader,ZhDetailSubTitle,ZhDialog,ZhEditInfoPair,ZhFileWrapper,ZhGrid,ZhInfoPair,ZhInput,ZhInputNumber,ZhLoading,ZhMessageBox,ZhMoneyInput,ZhPageHeadPanel,ZhToolTips,ZhMap],installer=makeInstaller(components);exports.ZhBaseInfo=ZhBaseInfo,exports.ZhButton=ZhButton,exports.ZhDatePicker=ZhDatePicker,exports.ZhDetailHeader=ZhDetailHeader,exports.ZhDetailSubTitle=ZhDetailSubTitle,exports.ZhDialog=ZhDialog,exports.ZhEditInfoPair=ZhEditInfoPair,exports.ZhFileWrapper=ZhFileWrapper,exports.ZhGrid=ZhGrid,exports.ZhInfoPair=ZhInfoPair,exports.ZhInput=ZhInput,exports.ZhInputNumber=ZhInputNumber,exports.ZhLoading=ZhLoading,exports.ZhMap=ZhMap,exports.ZhMessageBox=ZhMessageBox,exports.ZhMoneyInput=ZhMoneyInput,exports.ZhPageHeadPanel=ZhPageHeadPanel,exports.ZhToolTips=ZhToolTips,exports.default=installer,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|