zhihao-ui 1.2.62 → 1.2.64
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/{BaseItem-LwDwrgaB.js → BaseItem-BtsARxvz.js} +1 -1
- package/dist/es/{DatePicker-CiHfTAmx.js → DatePicker-BCvYHlC7.js} +1 -1
- package/dist/es/{DetailHeader-CIvSMek5.js → DetailHeader-C5LjDuTv.js} +1 -1
- package/dist/es/{DetailSubTitle-CSbm1JsW.js → DetailSubTitle-ak2l4HyV.js} +1 -1
- package/dist/es/{DiyDataTable-CJSAUoe0.js → DiyDataTable-Cgqys5z_.js} +69 -63
- package/dist/es/{EditInfoPair-DddtKjiw.js → EditInfoPair-8SWkyWJC.js} +1 -1
- package/dist/es/{FileWrapper-CGXgxrim.js → FileWrapper-BKxBr28L.js} +1 -1
- package/dist/es/{Grid-BSyMaOwH.js → Grid-C8tYH4s7.js} +1 -1
- package/dist/es/{InfoPair-Dbf4FAxv.js → InfoPair-C3obQrjB.js} +1 -1
- package/dist/es/{Map-dxqSdlvs.js → Map-BpqtL7_q.js} +1 -1
- package/dist/es/{MoneyInput-CdYA3NyX.js → MoneyInput-CxngoHAe.js} +1 -1
- package/dist/es/{Table-CxkfHsJ6.js → Table-BufcZ4Wy.js} +3 -3
- package/dist/es/index.js +14 -14
- package/dist/index.css +1 -1
- package/dist/types/components/DiyDataTable/DiyDataTable.vue.d.ts +6 -1
- package/dist/types/components/DiyDataTable/index.d.ts +6 -1
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/umd/index.umd.cjs
CHANGED
|
@@ -50,7 +50,7 @@ var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}func
|
|
|
50
50
|
[`+g+"] ";for(y in arguments[0])hasOwnProp(arguments[0],y)&&(i+=y+": "+arguments[0][y]+", ");i=i.slice(0,-2)}else i=arguments[g];r.push(i)}warn$1(t+`
|
|
51
51
|
Arguments: `+Array.prototype.slice.call(r).join("")+`
|
|
52
52
|
`+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$4({},t),r;for(r in e)hasOwnProp(e,r)&&(isObject(t[r])&&isObject(e[r])?(n[r]={},extend$4(n[r],t[r]),extend$4(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$4({},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,g=t>=0;return(g?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 g="",y;for(y=0;y<r;y++)g+=isFunction(e[y])?e[y].call(i,t):e[y];return g}}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,g){return n||r||i||g}))}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(g,y){y[e]=toInt(g)}),i=t.length,n=0;n<i;n++)tokens[t[n]]=r}function addWeekParseToken(t,e){addParseToken(t,function(n,r,i,g){i._w=i._w||{},e(n,i._w,i,g)})}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,g,y,k;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}g=n,y=t.month(),k=t.date(),k=k===29&&y===1&&!isLeapYear(g)?28:k,i?r.setUTCFullYear(g,y,k):r.setFullYear(g,y,k)}}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,g,y=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)g=createUTC([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(g,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(g,"").toLocaleLowerCase();return n?e==="MMM"?(i=indexOf.call(this._shortMonthsParse,y),i!==-1?i:null):(i=indexOf.call(this._longMonthsParse,y),i!==-1?i:null):e==="MMM"?(i=indexOf.call(this._shortMonthsParse,y),i!==-1?i:(i=indexOf.call(this._longMonthsParse,y),i!==-1?i:null)):(i=indexOf.call(this._longMonthsParse,y),i!==-1?i:(i=indexOf.call(this._shortMonthsParse,y),i!==-1?i:null))}function localeMonthsParse(t,e,n){var r,i,g;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]&&(g="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(g.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,$){return $.length-L.length}var e=[],n=[],r=[],i,g,y,k;for(i=0;i<12;i++)g=createUTC([2e3,i]),y=regexEscape(this.monthsShort(g,"")),k=regexEscape(this.months(g,"")),e.push(y),n.push(k),r.push(k),r.push(y);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,g,y){var k;return t<100&&t>=0?(k=new Date(t+400,e,n,r,i,g,y),isFinite(k.getFullYear())&&k.setFullYear(t)):k=new Date(t,e,n,r,i,g,y),k}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 g=(7+n-r)%7,y=firstWeekOffset(t,r,i),k=1+7*(e-1)+g+y,L,$;return k<=0?(L=t-1,$=daysInYear(L)+k):k>daysInYear(t)?(L=t+1,$=k-daysInYear(t)):(L=t,$=k),{year:L,dayOfYear:$}}function weekOfYear(t,e,n){var r=firstWeekOffset(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,g,y;return i<1?(y=t.year()-1,g=i+weeksInYear(y,e,n)):i>weeksInYear(t.year(),e,n)?(g=i-weeksInYear(t.year(),e,n),y=t.year()+1):(y=t.year(),g=i),{week:g,year:y}}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,g,y=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)g=createUTC([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(g,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(g,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(g,"").toLocaleLowerCase();return n?e==="dddd"?(i=indexOf.call(this._weekdaysParse,y),i!==-1?i:null):e==="ddd"?(i=indexOf.call(this._shortWeekdaysParse,y),i!==-1?i:null):(i=indexOf.call(this._minWeekdaysParse,y),i!==-1?i:null):e==="dddd"?(i=indexOf.call(this._weekdaysParse,y),i!==-1||(i=indexOf.call(this._shortWeekdaysParse,y),i!==-1)?i:(i=indexOf.call(this._minWeekdaysParse,y),i!==-1?i:null)):e==="ddd"?(i=indexOf.call(this._shortWeekdaysParse,y),i!==-1||(i=indexOf.call(this._weekdaysParse,y),i!==-1)?i:(i=indexOf.call(this._minWeekdaysParse,y),i!==-1?i:null)):(i=indexOf.call(this._minWeekdaysParse,y),i!==-1||(i=indexOf.call(this._weekdaysParse,y),i!==-1)?i:(i=indexOf.call(this._shortWeekdaysParse,y),i!==-1?i:null))}function localeWeekdaysParse(t,e,n){var r,i,g;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]||(g="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(g.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(V,z){return z.length-V.length}var e=[],n=[],r=[],i=[],g,y,k,L,$;for(g=0;g<7;g++)y=createUTC([2e3,1]).day(g),k=regexEscape(this.weekdaysMin(y,"")),L=regexEscape(this.weekdaysShort(y,"")),$=regexEscape(this.weekdays(y,"")),e.push(k),n.push(L),r.push($),i.push(k),i.push(L),i.push($);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,g;e<t.length;){for(g=normalizeLocale(t[e]).split("-"),n=g.length,r=normalizeLocale(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=loadLocale(g.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&commonPrefix(g,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),g,y,k,L,$=isoDates.length,V=isoTimes.length;if(i){for(getParsingFlags(t).iso=!0,e=0,n=$;e<n;e++)if(isoDates[e][1].exec(i[1])){y=isoDates[e][0],g=isoDates[e][2]!==!1;break}if(y==null){t._isValid=!1;return}if(i[3]){for(e=0,n=V;e<n;e++)if(isoTimes[e][1].exec(i[3])){k=(i[2]||" ")+isoTimes[e][0];break}if(k==null){t._isValid=!1;return}}if(!g&&k!=null){t._isValid=!1;return}if(i[4])if(tzRegex.exec(i[4]))L="Z";else{t._isValid=!1;return}t._f=y+(k||"")+(L||""),configFromStringAndFormat(t)}else t._isValid=!1}function extractFromRFC2822Strings(t,e,n,r,i,g){var y=[untruncateYear(t),defaultLocaleMonthsShort.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return g&&y.push(parseInt(g,10)),y}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,g=(r-i)/100;return g*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$3(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,g,y;if(!t._d){for(i=currentDateArray(t),t._w&&t._a[DATE]==null&&t._a[MONTH]==null&&dayOfYearFromWeekInfo(t),t._dayOfYear!=null&&(y=defaults$3(t._a[YEAR],i[YEAR]),(t._dayOfYear>daysInYear(y)||t._dayOfYear===0)&&(getParsingFlags(t)._overflowDayOfYear=!0),n=createUTCDate(y,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),g=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!==g&&(getParsingFlags(t).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(t){var e,n,r,i,g,y,k,L,$;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(g=1,y=4,n=defaults$3(e.GG,t._a[YEAR],weekOfYear(createLocal(),1,4).year),r=defaults$3(e.W,1),i=defaults$3(e.E,1),(i<1||i>7)&&(L=!0)):(g=t._locale._week.dow,y=t._locale._week.doy,$=weekOfYear(createLocal(),g,y),n=defaults$3(e.gg,t._a[YEAR],$.year),r=defaults$3(e.w,$.week),e.d!=null?(i=e.d,(i<0||i>6)&&(L=!0)):e.e!=null?(i=e.e+g,(e.e<0||e.e>6)&&(L=!0)):i=g),r<1||r>weeksInYear(n,g,y)?getParsingFlags(t)._overflowWeeks=!0:L!=null?getParsingFlags(t)._overflowWeekday=!0:(k=dayOfYearFromWeeks(n,r,i,g,y),t._a[YEAR]=k.year,t._dayOfYear=k.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,g,y,k=e.length,L=0,$,V;for(i=expandFormat(t._f,t._locale).match(formattingTokens)||[],V=i.length,n=0;n<V;n++)g=i[n],r=(e.match(getParseRegexForToken(g,t))||[])[0],r&&(y=e.substr(0,e.indexOf(r)),y.length>0&&getParsingFlags(t).unusedInput.push(y),e=e.slice(e.indexOf(r)+r.length),L+=r.length),formatTokenFunctions[g]?(r?getParsingFlags(t).empty=!1:getParsingFlags(t).unusedTokens.push(g),addTimeToArrayFromToken(g,r,t)):t._strict&&!r&&getParsingFlags(t).unusedTokens.push(g);getParsingFlags(t).charsLeftOver=k-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),$=getParsingFlags(t).era,$!==null&&(t._a[YEAR]=t._locale.erasConvertYear($,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,g,y,k=!1,L=t._f.length;if(L===0){getParsingFlags(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<L;i++)g=0,y=!1,e=copyConfig({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],configFromStringAndFormat(e),isValid(e)&&(y=!0),g+=getParsingFlags(e).charsLeftOver,g+=getParsingFlags(e).unusedTokens.length*10,getParsingFlags(e).score=g,k?g<r&&(r=g,n=e):(r==null||g<r||y)&&(r=g,n=e,y&&(k=!0));extend$4(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 g={};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),g._isAMomentObject=!0,g._useUTC=g._isUTC=i,g._l=n,g._i=t,g._f=e,g._strict=r,createFromConfig(g)}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,g=e.week||e.isoWeek||0,y=e.day||0,k=e.hour||0,L=e.minute||0,$=e.second||0,V=e.millisecond||0;this._isValid=isDurationValid(e),this._milliseconds=+V+$*1e3+L*6e4+k*1e3*60*60,this._days=+y+g*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),g=0,y;for(y=0;y<r;y++)toInt(t[y])!==toInt(e[y])&&g++;return g+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,g;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(chunkOffset)||["-",0,0],g=+(i[1]*60)+toInt(i[2]),g===0?0:i[0]==="+"?g:-g)}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,g,y;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)&&(y=momentsDifference(createLocal(n.from),createLocal(n.to)),n={},n.ms=y.milliseconds,n.M=y.months),g=new Duration(n),isDuration(t)&&hasOwnProp(t,"_locale")&&(g._locale=t._locale),isDuration(t)&&hasOwnProp(t,"_isValid")&&(g._isValid=t._isValid),g}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,g;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."),g=n,n=r,r=g),i=createDuration(n,r),addSubtract(this,i,t),this}}function addSubtract(t,e,n,r){var i=e._milliseconds,g=absRound(e._days),y=absRound(e._months);t.isValid()&&(r=r??!0,y&&setMonth(t,get$4(t,"Month")+y*n),g&&set$1$1(t,"Date",get$4(t,"Date")+g*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&hooks.updateOffset(t,g||y))}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,g,y=r.length;for(i=0;i<y;i+=1)g=r[i],n=n||hasOwnProp(t,g);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,g;for(i=0;i<r.length;i+=1)g=r[i],n=n||hasOwnProp(t,g);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",g=e&&(isFunction(e[i])?e[i].call(this,n):e[i]);return this.format(g||this.localeData().calendar(i,this,createLocal(n)))}function clone$2(){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),g=isMoment(e)?e:createLocal(e);return this.isValid()&&i.isValid()&&g.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(g,n):!this.isAfter(g,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,g;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":g=monthDiff(this,r)/12;break;case"month":g=monthDiff(this,r);break;case"quarter":g=monthDiff(this,r)/3;break;case"second":g=(this-r)/1e3;break;case"minute":g=(this-r)/6e4;break;case"hour":g=(this-r)/36e5;break;case"day":g=(this-r-i)/864e5;break;case"week":g=(this-r-i)/6048e5;break;default:g=this-r}return n?g:absFloor(g)}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,g;return e-r<0?(i=t.clone().add(n-1,"months"),g=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),g=(e-r)/(i-r)),-(n+g)||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,g;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",g=e+'[")]',this.format(n+r+i+g)}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$4({},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,g=this._eras||getLocale("en")._eras;for(n=0,r=g.length;n<r;++n){switch(typeof g[n].since){case"string":i=hooks(g[n].since).startOf("day"),g[n].since=i.valueOf();break}switch(typeof g[n].until){case"undefined":g[n].until=1/0;break;case"string":i=hooks(g[n].until).startOf("day").valueOf(),g[n].until=i.valueOf();break}}return g}function localeErasParse(t,e,n){var r,i,g=this.eras(),y,k,L;for(t=t.toUpperCase(),r=0,i=g.length;r<i;++r)if(y=g[r].name.toUpperCase(),k=g[r].abbr.toUpperCase(),L=g[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(k===t)return g[r];break;case"NNNN":if(y===t)return g[r];break;case"NNNNN":if(L===t)return g[r];break}else if([y,k,L].indexOf(t)>=0)return g[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,g,y,k,L,$=this.eras();for(i=0,g=$.length;i<g;++i)y=regexEscape($[i].name),k=regexEscape($[i].abbr),L=regexEscape($[i].narrow),e.push(y),t.push(k),n.push(L),r.push(y),r.push(k),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 g;return t==null?weekOfYear(this,r,i).year:(g=weeksInYear(t,r,i),e>g&&(e=g),setWeekAll.call(this,t,e,n,r,i))}function setWeekAll(t,e,n,r,i){var g=dayOfYearFromWeeks(t,e,n,r,i),y=createUTCDate(g.year,0,g.dayOfYear);return this.year(y.getUTCFullYear()),this.month(y.getUTCMonth()),this.date(y.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$2,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(),g=createUTC().set(r,e);return i[n](g,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(),g=t?i._week.dow:0,y,k=[];if(n!=null)return get$1$1(e,(n+g)%7,r,"day");for(y=0;y<7;y++)k[y]=get$1$1(e,(y+g)%7,r,"day");return k}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,g,y,k,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,g=absFloor(i/60),r.minutes=g%60,y=absFloor(g/60),r.hours=y%24,e+=absFloor(y/24),L=absFloor(daysToMonths(e)),n+=L,e-=absCeil(monthsToDays(L)),k=absFloor(n/12),n%=12,r.days=e,r.months=n,r.years=k,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(),g=round(i.as("s")),y=round(i.as("m")),k=round(i.as("h")),L=round(i.as("d")),$=round(i.as("M")),V=round(i.as("w")),z=round(i.as("y")),j=g<=n.ss&&["s",g]||g<n.s&&["ss",g]||y<=1&&["m"]||y<n.m&&["mm",y]||k<=1&&["h"]||k<n.h&&["hh",k]||L<=1&&["d"]||L<n.d&&["dd",L];return n.w!=null&&(j=j||V<=1&&["w"]||V<n.w&&["ww",V]),j=j||$<=1&&["M"]||$<n.M&&["MM",$]||z<=1&&["y"]||["yy",z],j[2]=e,j[3]=+t>0,j[4]=r,substituteTimeAgo.apply(null,j)}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,g;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(),g=relativeTime$1(this,!n,r,i),n&&(g=i.pastFuture(+this,g)),i.postformat(g)}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,g,y,k=this.asSeconds(),L,$,V,z;return k?(r=absFloor(t/60),i=absFloor(r/60),t%=60,r%=60,g=absFloor(n/12),n%=12,y=t?t.toFixed(3).replace(/\.?0+$/,""):"",L=k<0?"-":"",$=sign(this._months)!==sign(k)?"-":"",V=sign(this._days)!==sign(k)?"-":"",z=sign(this._milliseconds)!==sign(k)?"-":"",L+"P"+(g?$+g+"Y":"")+(n?$+n+"M":"")+(e?V+e+"D":"")+(i||r||t?"T":"")+(i?z+i+"H":"")+(r?z+r+"M":"")+(t?z+y+"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
|
|
53
|
-
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$1="--",LOG_DATE_FORMAT_T="YYYY-MM-DDTHH:mm:ss",LOG_DATE_FORMAT_END="YYYY-MM-DDT23:59:59",DATE_PICKER_FORMAT="YYYY-MM-DD",CDN_URL$1="https://static.zhihaoscm.cn/",dateFormat=(t,e=DATE_PICKER_FORMAT)=>t?hooks(t).format(e).replace("Invalid date",DEFAULT_VALUE$1):DEFAULT_VALUE$1,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 g="";for(let y=0;y<e.length;y++)g+=(n[Math.floor(t*10*Math.pow(10,y))%10]+e[y]).replace(/零./,"");g=g||"整",t=Math.floor(t);for(let y=0;y<r[0].length&&t>0;y++){let k="";for(let L=0;L<r[1].length&&t>0;L++)k=n[t%10]+r[1][L]+k,t=Math.floor(t/10);g=k.replace(/(零.)*零$/,"").replace(/^$/,"零")+r[0][y]+g}return i+g.replace(/(零.)*零元/,"元").replace(/(零.)+/g,"零").replace(/^整$/,"零元整")}function hexToRgb(t){let e=t.replace(/^#/,"");e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),i=parseInt(e.slice(4,6),16);return[n,r,i]}function calculateBrightness(t){const[e,n,r]=t;return .299*e+.587*n+.114*r}function getForegroundColor(t,e=128){t==="white"&&(t="#fff"),t==="black"&&(t="#000");const n=hexToRgb(t);return calculateBrightness(n)>e?"black":"white"}const _sfc_main$u=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=k=>Array.isArray(k)?[dateFormat(k[0],LOG_DATE_FORMAT_T),dateFormat(k[1],LOG_DATE_FORMAT_END)]:k&&dateFormat(k,LOG_DATE_FORMAT_T),g=k=>{const L=i(k);r("update:modelValue",L)},y=k=>{const L=i(k);r("change",L)};return(k,L)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([n.class,"zh-date-picker"])},[vue.createVNode(vue.unref(ElDatePicker),vue.mergeProps(k.$attrs,{style:n.style,"model-value":n.modelValue,"onUpdate:modelValue":g,onChange:y}),null,16,["style","model-value"])],2))}}),ZhDatePicker=withInstall$1(_sfc_main$u),_hoisted_1$k={class:"info-pair"},_hoisted_2$e={class:"info-pair--title"},_hoisted_3$d={key:0,class:"info-pair--title--tip"},_sfc_main$t=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$k,[vue.createElementVNode("div",_hoisted_2$e,[vue.createTextVNode(vue.toDisplayString(e.title)+" ",1),n.tip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$d,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)),1)])],2)]))}}),ZhDetailSubTitle=withInstall$1(_sfc_main$t),_hoisted_1$j={class:"title"},_hoisted_2$d={key:0,class:"sub-title"},_hoisted_3$c={class:"zh-dialog__footer"},_sfc_main$s=vue.defineComponent({name:"ZhDialog",inheritAttrs:!1,__name:"Dialog",props:vue.mergeModels({title:{},subTitle:{},cancelButtonText:{default:"取消"},confirmButtonText:{default:"确定"},confirmButtonDisabled:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!1},size:{default:"middle"},width:{},appendToBody:{type:Boolean},appendTo:{},beforeClose:{},destroyOnClose:{type:Boolean},closeOnPressEscape:{type:Boolean},lockScroll:{type:Boolean},modal:{type:Boolean},openDelay:{},closeDelay:{},top:{},modelValue:{type:Boolean},modalClass:{},zIndex:{},trapFocus:{type:Boolean},headerAriaLevel:{},center:{type:Boolean},alignCenter:{type:Boolean},closeIcon:{},draggable:{type:Boolean},overflow:{type:Boolean},fullscreen:{type:Boolean},showClose:{type:Boolean},ariaLevel:{}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:vue.mergeModels(["submit","close"],["update:modelValue"]),setup(t,{emit:e}){const n=t,r=vue.useModel(t,"modelValue"),i=e,g=()=>{i("close")},y=()=>{i("submit")},k=()=>{i("close")},L={small:"400px",middle:"600px",large:"800px",extraLarge:"920px"},$=vue.computed(()=>n.width?n.width:L[n.size]);return(V,z)=>(vue.openBlock(),vue.createBlock(vue.unref(ElDialog),vue.mergeProps({modelValue:r.value,"onUpdate:modelValue":z[0]||(z[0]=j=>r.value=j),class:"zh-dialog"},V.$attrs,{width:$.value,"close-on-click-modal":V.closeOnClickModal,onClose:k}),{header:vue.withCtx(()=>[vue.renderSlot(V.$slots,"header",{},()=>[vue.createElementVNode("div",_hoisted_1$j,vue.toDisplayString(V.title),1),V.subTitle?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$d,vue.toDisplayString(V.subTitle),1)):vue.createCommentVNode("",!0)])]),footer:vue.withCtx(()=>[vue.renderSlot(V.$slots,"footer",{},()=>[vue.createElementVNode("div",_hoisted_3$c,[vue.createVNode(ZhButton$1,{onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(V.cancelButtonText),1)]),_:1}),vue.createVNode(ZhButton$1,{type:"primary",disabled:V.confirmButtonDisabled,onClick:y},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(V.confirmButtonText),1)]),_:1},8,["disabled"])])])]),default:vue.withCtx(()=>[vue.renderSlot(V.$slots,"default")]),_:3},16,["modelValue","width","close-on-click-modal"]))}}),ZhDialog=withInstall$1(_sfc_main$s),_hoisted_1$i={class:"info-pair"},_hoisted_2$c={class:"info-pair--title"},_hoisted_3$b={key:0,class:"info-pair--title--tip"},_sfc_main$r=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$i,[vue.createElementVNode("div",_hoisted_2$c,[vue.createTextVNode(vue.toDisplayString(e.title)+" ",1),n.tip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$b,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)),1)],!0)],2)]))}}),EditInfoPair=_export_sfc(_sfc_main$r,[["__scopeId","data-v-c62707eb"]]),ZhEditInfoPair=withInstall$1(EditInfoPair),_hoisted_1$h={class:"file_wrapper"},_hoisted_2$b={key:0,class:"header"},_hoisted_3$a={class:"file_main"},_hoisted_4$6={class:"file"},_hoisted_5$6={class:"file_name"},_sfc_main$q=vue.defineComponent({name:"zh-file-wrapper",__name:"FileWrapper",props:{downLoadUrl:{type:String,default:""},canPreview:{type:Boolean,default:!1},fileName:{type:String,default:DEFAULT_VALUE$1},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(g,y)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$h,[n.title?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$b,vue.toDisplayString(n.title),1)):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_3$a,[vue.createElementVNode("div",_hoisted_4$6,[y[0]||(y[0]=vue.createElementVNode("div",{class:"file_type mr-12"},[vue.createElementVNode("i",{class:"iconfont icon-xiangmuguanli"})],-1)),vue.createElementVNode("div",_hoisted_5$6,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(()=>y[1]||(y[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$q,[["__scopeId","data-v-d98ece31"]]),ZhFileWrapper=withInstall$1(FileWrapper),_sfc_main$p=vue.defineComponent({name:"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:16}},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=oe=>{let re=oe.target.innerWidth;switch(!!re){case re<768:i.value="xs";break;case(re>=768&&re<992):i.value="sm";break;case(re>=992&&re<1200):i.value="md";break;case(re>=1200&&re<1920):i.value="lg";break;case re>=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 g=vue.ref(-1);vue.provide("shouldHiddenIndex",g);const y=vue.computed(()=>typeof n.cols=="object"?n.cols[i.value]??n.cols:n.cols);vue.provide("cols",y);const k=vue.useSlots().default(),L=()=>{var ae,ue,de,pe;let oe=[],re=null;k.forEach(le=>{var he;typeof le.type=="object"&&le.type.name==="GridItem"&&((he=le.props)==null?void 0:he.suffix)!==void 0&&(re=le),typeof le.type=="symbol"&&Array.isArray(le.children)&&oe.push(...le.children)});let ie=0;re&&(ie=(((ae=re.props[i.value])==null?void 0:ae.span)??((ue=re.props)==null?void 0:ue.span)??1)+(((de=re.props[i.value])==null?void 0:de.offset)??((pe=re.props)==null?void 0:pe.offset)??0));try{let le=!1;oe.reduce((he=0,_e,Ce)=>{var xe,Ie,Oe,$e;if(he+=(((xe=_e.props[i.value])==null?void 0:xe.span)??((Ie=_e.props)==null?void 0:Ie.span)??1)+(((Oe=_e.props[i.value])==null?void 0:Oe.offset)??(($e=_e.props)==null?void 0:$e.offset)??0),Number(he)>n.collapsedRows*y.value-ie)throw g.value=Ce,le=!0,"find it";return he},0),le||(g.value=-1)}catch{}};vue.watch(()=>i.value,()=>{n.collapsed&&L()}),vue.watch(()=>n.collapsed,oe=>{if(oe)return L();g.value=-1});const $=vue.computed(()=>typeof n.gap=="number"?`${n.gap}px`:Array.isArray(n.gap)?`${n.gap[1]}px ${n.gap[0]}px`:"unset"),V=vue.computed(()=>({display:"grid",gridGap:$.value,gridTemplateColumns:`repeat(${y.value}, minmax(0, 1fr))`})),z=vue.inject("clearGridItemData",()=>{}),j=vue.ref(!1);return vue.onMounted(()=>{j.value=!0}),vue.onBeforeUpdate(()=>{j.value=!1,z()}),vue.onUpdated(()=>{j.value=!0}),vue.provide("isRegistrationComplete",j),e({breakPoint:i}),(oe,re)=>(vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle(V.value)},[vue.renderSlot(oe.$slots,"default")],4))}}),_sfc_main$o=vue.defineComponent({name:"GridItem",__name:"GridItem",props:{offset:{default:0},span:{default:1},suffix:{type:Boolean,default:!1},xs:{default:void 0},sm:{default:void 0},md:{default:void 0},lg:{default:void 0},xl:{default:void 0},label:{}},setup(t){const e=t,n=vue.useAttrs(),r=vue.ref(!0),i=vue.inject("breakPoint",vue.ref("xl")),g=vue.inject("shouldHiddenIndex",vue.ref(-1));vue.watch(()=>[g.value,i.value],de=>{n.index&&(r.value=!(de[0]!==-1&&parseInt(n.index)>=Number(de[0])))},{immediate:!0});const y=vue.inject("gap",0),k=vue.inject("cols",vue.ref(4)),L=vue.computed(()=>{var le,he;let de=((le=e[i.value])==null?void 0:le.span)??e.span,pe=((he=e[i.value])==null?void 0:he.offset)??e.offset;return e.suffix?{gridColumnStart:k.value-de-pe+1,gridColumnEnd:`span ${de+pe}`,marginLeft:pe!==0?`calc(((100% + ${y}px) / ${de+pe}) * ${pe})`:"unset"}:{gridColumn:`span ${de+pe>k.value?k.value:de+pe}/span ${de+pe>k.value?k.value:de+pe}`,marginLeft:pe!==0?`calc(((100% + ${y}px) / ${de+pe}) * ${pe})`:"unset"}}),$=vue.inject("gridItemData",vue.reactive({})),V=vue.inject("isMultiGrid",vue.ref(!1)),z=vue.ref(null),j=vue.ref(0),oe=vue.ref(0),re=vue.inject("registerGridItem",null),ie=vue.inject("getColumnData",null),ae=vue.inject("isRegistrationComplete",vue.ref(!1)),ue=()=>{if(z.value&&re){const de=z.value.parentElement;if(de){const pe=z.value.offsetLeft,le=de.offsetWidth/k.value;oe.value=Math.floor(pe/le)+1,le&&re(oe.value,e.label||"")}}};return vue.watchEffect(()=>{if(V.value&&ae.value&&e.label&&z.value&&(ue(),ie)){const de=ie(oe.value);j.value=de.maxWidth||0}}),vue.watch($,()=>{if(ie){const de=ie(oe.value);de.maxWidth!==j.value&&(j.value=de.maxWidth)}}),(de,pe)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle(L.value),ref_key:"gridItemRef",ref:z},[vue.renderSlot(de.$slots,"default",{maxLabelWidthInCol:j.value,columnIndex:oe.value})],4)),[[vue.vShow,r.value]])}}),DEFAULT_FONT_SIZE=12;function findItemNested(t,e,n,r){return t.reduce((i,g)=>{if(i)return i;if(g[n]===e)return g;if(g[r])return findItemNested(g[r],e,n,r)},null)}function getValueByProp(t,e,n){const r=isUndefined$2(n)?DEFAULT_VALUE$1:n,i=get$5(t,e);return isNil(i)||i===""?r:i}const $get=getValueByProp;function handleProp(t){const e=t.split(".");return e.length==1?t:e[e.length-1]}function filterEnum(t,e,n,r){const i=(n==null?void 0:n.value)??"value",g=(n==null?void 0:n.label)??"label",y=(n==null?void 0:n.children)??"children";let k={};return Array.isArray(e)&&(k=findItemNested(e,t,i,y)),r=="tag"?k!=null&&k.tagType?k.tagType:"":k?k[g]:DEFAULT_VALUE$1}function filterEnumObj(t,e,n){const r="value",i="children";let g={};return Array.isArray(e)&&(g=findItemNested(e,t,r,i)),g}function formatValue(t){return isArray$2(t)?t.length?t.join(" / "):DEFAULT_VALUE$1:t??DEFAULT_VALUE$1}function handleRowAccordingToProp(t,e){return e.includes(".")?(e.split(".").forEach(n=>t=t[n]??DEFAULT_VALUE$1),t):t[e]??DEFAULT_VALUE$1}const getWidthByText=(t,e)=>{const n=e||DEFAULT_FONT_SIZE,i=document.createElement("canvas").getContext("2d");return i.font=`${n}px Microsoft YaHei`,i.measureText(t).width},useColSetting=t=>{const e=t||"zhihao-col-setting",n=()=>{const k=localStorage.getItem(e);return k?JSON.parse(k):{}},r=k=>{localStorage.setItem(e,JSON.stringify(k))};return{getMap:n,setMap:r,getColumnCache:k=>n()[k]||[],setColumnCache:(k,L)=>{const $=n();$[k]=L,r($)},removeColumnCache:k=>{const L=n();delete L[k],r(L)}}},collectGridItems=()=>{let t=vue.reactive({});return{gridItemData:t,registerGridItem:(i,g)=>{var k;if(!g)return;t[i]||(t[i]={labels:[],maxLength:0,maxWidth:0}),(k=t[i])==null||k.labels.push(g),t[i].maxLength=Math.max(g.length,t[i].maxLength);const y=Math.ceil(getWidthByText(g,14));t[i].maxWidth=Math.max(y||0,t[i].maxWidth)},getColumnData:i=>t[i]||{},clearGridItemData:()=>{t=vue.reactive({})}}},_hoisted_1$g={class:"multi-grid"},_sfc_main$n=vue.defineComponent({name:"MultiGrid",__name:"MultiGrid",setup(t){const{getColumnData:e,registerGridItem:n,clearGridItemData:r,gridItemData:i}=collectGridItems();return vue.provide("registerGridItem",n),vue.provide("getColumnData",e),vue.provide("clearGridItemData",r),vue.provide("gridItemData",i),vue.provide("isMultiGrid",vue.ref(!0)),(g,y)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[vue.renderSlot(g.$slots,"default")]))}}),ZhGrid=withInstall$1(_sfc_main$p),ZhGridItem=withInstall$1(_sfc_main$o),ZhMultiGrid=withInstall$1(_sfc_main$n),_hoisted_1$f={class:"info-pair"},_hoisted_2$a={class:"info-pair--title"},_hoisted_3$9={key:0,class:"info-pair--title--tip"},_sfc_main$m=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$f,[vue.createElementVNode("div",_hoisted_2$a,[vue.createTextVNode(vue.toDisplayString(e.title)+" ",1),n.tip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$9,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)),1)],!0)],2)]))}}),InfoPair=_export_sfc(_sfc_main$m,[["__scopeId","data-v-5a1b0655"]]),ZhInfoPair=withInstall$1(InfoPair),_sfc_main$l=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(g,y)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(n.class)},[vue.createVNode(vue.unref(ElInput),vue.mergeProps(g.$attrs,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=k=>r.value=k),size:g.size,onBlur:i}),vue.createSlots({_:2},[vue.renderList(g.$slots,(k,L)=>({name:k,fn:vue.withCtx($=>[vue.renderSlot(g.$slots,k,vue.normalizeProps(vue.guardReactiveProps($)),void 0,!0)])}))]),1040,["modelValue","size"])],2))}}),Input=_export_sfc(_sfc_main$l,[["__scopeId","data-v-ce1df798"]]),ZhInput=withInstall$1(Input),_sfc_main$k=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(),g=($,V=0,z=0,j=0)=>{let oe=($==null?void 0:$.toString())??"",re,ie,ae;return z===0?(oe=oe.replace(/[^\d]/g,""),oe=oe.replace(/^0\d+/g,"0"),V!==0&&(oe=oe.slice(0,V))):(oe=oe.replace(/[^\-\d.]/g,""),oe=oe.replace(/^[^\-\d]/g,""),oe=oe.replace(/\.{2}/g,"."),oe=oe.replace(/^0(\d+)/g,"$1"),re=oe.split(".")||[],re.length>1?(V===0?ie=re[0]:ie=re[0].slice(0,V),ae=re[1].slice(0,z),oe=ie+"."+ae):V!==0&&(oe=oe.slice(0,V))),j!==0&&(oe=oe.slice(0,j)),oe},y=()=>{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()))},k=$=>$?g($,i.integer,i.precision,i.maxLength):"",L=$=>{/^\d+\.0*$/.test(($==null?void 0:$.toString())||"")||$===""?r("update:modelValue",k($)):r("update:modelValue",Number(k($)))};return($,V)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["input-number",n.class]),style:vue.normalizeStyle(n.style)},[vue.createVNode(vue.unref(ElInput),vue.mergeProps($.$attrs,{"model-value":n.modelValue,"onUpdate:modelValue":L,onBlur:y,style:{width:"100%"},formatter:k}),vue.createSlots({_:2},[vue.renderList(Object.keys($.$slots),z=>({name:z,fn:vue.withCtx(j=>[vue.renderSlot($.$slots,z,vue.normalizeProps(vue.guardReactiveProps(j)),void 0,!0)])}))]),1040,["model-value"])],6))}}),InputNumber=_export_sfc(_sfc_main$k,[["__scopeId","data-v-920e8405"]]),ZhInputNumber=withInstall$1(InputNumber),_hoisted_1$e={class:"loading-box"},_sfc_main$j=vue.defineComponent({name:"zh-loading",__name:"Loading",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$e,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$j,[["__scopeId","data-v-d30f17c3"]]),ZhLoading=withInstall$1(Loading),defaultOptions={type:"",showCancelButton:!0,showConfirmButton:!0,cancelButtonText:"取消",confirmButtonText:"确定",closeOnClickModal:!1,closeOnPressEscape:!1,showClose:!0,draggable:!1,center:!1,roundButton:!1},ZhMessageBox$1={confirm(t,e,n={}){return ElMessageBox.confirm(t,e,{...defaultOptions,...n,customClass:"zh-message-box zh-message-confirm"})},alert(t,e,n={}){return ElMessageBox.alert(t,e,{...defaultOptions,...n,showCancelButton:!1,customClass:"zh-message-box zh-message-alert"})},prompt(t,e,n={}){return ElMessageBox.prompt(t,e,{...defaultOptions,...n,customClass:"zh-message-box zh-message-prompt"})}},ZhConfirm=ZhMessageBox$1.confirm,ZhAlert=ZhMessageBox$1.alert,ZhPrompt=ZhMessageBox$1.prompt,ZhMessageBox=withInstall$1(ZhMessageBox$1),_sfc_main$i=vue.defineComponent({name:"zh-money-input",__name:"MoneyInput",props:vue.mergeModels({style:{},class:{},showTooltip:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=vue.useModel(t,"modelValue"),r=vue.computed(()=>{if(n.value)return validateNumber(n.value)&&Number(n.value)>=1e3?digitUppercase(Number(n.value)):""}),i=vue.ref(!1);return(g,y)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),{effect:"dark",content:r.value,placement:"top",visible:g.showTooltip&&i.value&&!!r.value},{default:vue.withCtx(()=>[vue.createVNode(InputNumber,vue.mergeProps(g.$attrs,{modelValue:n.value,"onUpdate:modelValue":y[0]||(y[0]=k=>n.value=k),style:e.style,class:e.class,onFocus:y[1]||(y[1]=()=>i.value=!0),onBlur:y[2]||(y[2]=()=>i.value=!1)}),vue.createSlots({_:2},[vue.renderList(Object.keys(g.$slots),k=>({name:k,fn:vue.withCtx(L=>[vue.renderSlot(g.$slots,k,vue.normalizeProps(vue.guardReactiveProps(L)),void 0,!0)])}))]),1040,["modelValue","style","class"])]),_:3},8,["content","visible"]))}}),MoneyInput=_export_sfc(_sfc_main$i,[["__scopeId","data-v-cfd94d9e"]]),ZhMoneyInput=withInstall$1(MoneyInput),_hoisted_1$d={class:"page-head"},_hoisted_2$9={class:"left-wrap"},_hoisted_3$8={class:"page-name"},_hoisted_4$5={class:"value"},_hoisted_5$5={class:"other-inform"},_hoisted_6$5={class:"label"},_hoisted_7$5={class:"value mg-r-24"},_hoisted_8$3={class:"status"},_sfc_main$h=vue.defineComponent({name:"zh-page-head-panel",__name:"PageHeadPanel",props:{dataSource:{}},setup(t){const e=t,{name:n,no:r,status:i,extendLabel:g,extendValue:y}=vue.toRefs(e.dataSource);return(k,L)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$d,[vue.createElementVNode("div",_hoisted_2$9,[vue.createElementVNode("span",_hoisted_3$8,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$5,vue.toDisplayString(vue.unref(r)),1)])]),vue.createElementVNode("div",_hoisted_5$5,[vue.renderSlot(k.$slots,"extend",{},()=>[vue.createElementVNode("span",_hoisted_6$5,vue.toDisplayString(vue.unref(g)),1),vue.createElementVNode("span",_hoisted_7$5,vue.toDisplayString(vue.unref(y)),1)],!0),vue.createElementVNode("span",_hoisted_8$3,vue.toDisplayString(vue.unref(i)),1)])]))}}),PageHeadPanel=_export_sfc(_sfc_main$h,[["__scopeId","data-v-9f56969d"]]),ZhPageHeadPanel=withInstall$1(PageHeadPanel),_sfc_main$g=vue.defineComponent({name:"zh-tool-tips",__name:"ToolTips",props:{placement:{default:"top"},content:{}},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$g,[["__scopeId","data-v-e5a0ae09"]]),ZhToolTips=withInstall$1(ToolTips),_sfc_main$f=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 g(){n.value=e.labelWidth}function y(){r.value=e.contentWidth}function k(){i.value=e.infoDirection}return vue.watch(()=>e.contentWidth,()=>y(),{immediate:!0}),vue.watch(()=>e.labelWidth,()=>g(),{immediate:!0}),vue.watch(()=>e.infoDirection,()=>k(),{immediate:!0}),(L,$)=>{const V=vue.resolveComponent("grid");return vue.openBlock(),vue.createBlock(V,{cols:L.cols,gap:L.gap},{default:vue.withCtx(()=>[vue.renderSlot(L.$slots,"default")]),_:3},8,["cols","gap"])}}}),ZhBaseInfo=withInstall$1(_sfc_main$f),_hoisted_1$c={class:"common-card"},_hoisted_2$8={class:"detail-header"},_hoisted_3$7={class:"detail-header--left"},_hoisted_4$4={class:"title common-title"},_hoisted_5$4={class:"info-pair--label"},_hoisted_6$4={class:"info-pair--value"},_hoisted_7$4={key:1,class:"detail-header--right"},_hoisted_8$2={class:"info-pair--label"},_hoisted_9$1={class:"info-pair--value"},_sfc_main$e=vue.defineComponent({name:"ZhDetailHeader",__name:"DetailHeader",props:{title:{},leftInfos:{},rightInfos:{},stateMeta:{},stateDesc:{}},setup(t){const e=vue.useSlots(),n=t;return(r,i)=>{var g,y;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$c,[vue.createElementVNode("div",null,[vue.renderSlot(r.$slots,"menu",{},void 0,!0)]),vue.createElementVNode("div",_hoisted_2$8,[vue.createElementVNode("div",_hoisted_3$7,[vue.createElementVNode("div",_hoisted_4$4,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,k=>(vue.openBlock(),vue.createElementBlock("div",{class:"info-pair",key:k.value},[vue.createElementVNode("div",_hoisted_5$4,vue.toDisplayString(k.label),1),vue.createElementVNode("div",_hoisted_6$4,vue.toDisplayString(k.value??vue.unref(DEFAULT_VALUE$1)),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$4,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.rightInfos,k=>(vue.openBlock(),vue.createElementBlock("div",{class:"info-pair",key:k.value},[vue.createElementVNode("div",_hoisted_8$2,vue.toDisplayString(k.label),1),vue.createElementVNode("div",_hoisted_9$1,vue.toDisplayString(k.value??vue.unref(DEFAULT_VALUE$1)),1)]))),128)),r.stateDesc||r.stateMeta?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["state common-title",(g=r.stateMeta)==null?void 0:g.state])},vue.toDisplayString(r.stateDesc||((y=r.stateMeta)==null?void 0:y.intro)),3)):vue.createCommentVNode("",!0)]))])])}}}),DetailHeader=_export_sfc(_sfc_main$e,[["__scopeId","data-v-8b185816"]]),ZhDetailHeader=withInstall$1(DetailHeader);var DIY_DATA_TYPE=(t=>(t.AUTOCOMPLETE="autocomplete",t.FORMAT="format",t.TEXT="text",t))(DIY_DATA_TYPE||{});const _hoisted_1$b={key:0},_hoisted_2$7={key:1,class:"col-edit-header"},_hoisted_3$6=["onClick"],_hoisted_4$3={key:0},_hoisted_5$3={class:"header-operation-container"},_hoisted_6$3={class:"operation-container"},_hoisted_7$3=["onClick"],ZH_DIV="$ZH_DIV$",_sfc_main$d=vue.defineComponent({name:"zh-diy-data-table",__name:"DiyDataTable",props:vue.mergeModels({isEdit:{type:Boolean,default:!1},maxRowLength:{default:50},maxColLength:{default:10},defaultMinWidth:{default:120},beforeAddRow:{},addRowText:{default:"增行"},addColumnText:{default:"增列"},customAddRow:{type:Boolean,default:!0},customAddColumn:{type:Boolean,default:!0}},{rawData:{required:!0},rawDataModifiers:{}}),emits:["update:rawData"],setup(t,{expose:e}){const n=t,r=vue.useModel(t,"rawData"),i=vue.ref([]),g=()=>{if(r.value.length===n.maxRowLength){ElMessage({message:`最多添加${n.maxRowLength}行`,type:"warning"});return}let re={};n.beforeAddRow&&(re=n.beforeAddRow(r.value)),r.value.push(re)},y=()=>{if(i.value.filter(ae=>ae.isAdd).length>=n.maxColLength){ElMessage({message:`最多添加${n.maxColLength}列`,type:"warning"});return}const ie=String(Date.now());i.value.push({prop:ie,label:"",isEditHeader:!0,isAdd:!0,maxlength:15,minWidth:150,headerMaxlength:15})},k=(re,ie)=>{i.value.splice(re,1),r.value.forEach(ae=>{delete ae[ie.prop]})},L=re=>{re===0&&i.value.forEach(ie=>{ie.isSameData&&(r.value[1][ie.prop]=r.value[0][ie.prop])}),r.value.splice(re,1)},$=(re,ie,ae)=>{ie(ae.completeList.filter(ue=>ue.includes(re)).map(ue=>({value:ue})))},V=re=>[{validator:(ie,ae,ue)=>{if(!i.value[re].label){ue(new Error("请输入表头"));return}ue()},message:"请输入表头",trigger:["blur","change"]}],z=re=>{const ie=[];return re.required&&ie.push({required:!0,message:"请输入"+re.label,trigger:re.slot?void 0:"blur"}),re.varidate&&ie.push({validator:(ae,ue,de)=>{const pe=re.varidate(ue);pe!==!0?de(new Error(pe)):de()},trigger:re.slot?void 0:"blur"}),ie},j=(re,ie)=>{let ae=re;return ie.isSameData&&(ae=r.value[0]||DEFAULT_VALUE$1),ie.formatter?ie.showFormatter?ie.type===DIY_DATA_TYPE.FORMAT?ie.showFormatter(ie.formatter(ae)):ie.showFormatter(ae[ie.prop]):ie.formatter(ae[ie.prop]):ae[ie.prop]||DEFAULT_VALUE$1},oe=vue.ref();return e({initData:(re,ie)=>{console.log("initData",re,ie),re=cloneDeep(re)||[],re.length===0&&re.push({}),ie=[...ie];for(const ae in re[0])if(!ie.some(ue=>ue.prop===ae)){const ue=Date.now()+ae,de=ae.split(ZH_DIV);if(de.length!==2){console.log("keySplit 失败",ae);continue}const pe=Number(de[1]);ie[pe]={prop:ae,isEditHeader:!0,label:de[0],key:ue,isAdd:!0,maxlength:15,headerMaxlength:15}}r.value=re,i.value=ie},getData:async()=>{await oe.value.validate();for(const ie in i.value){const ae=i.value[ie];for(const ue of i.value)if(ae.prop!==ue.prop&&ae.label===ue.label){ElMessage({message:"所有列的表头不可重复",type:"warning"});return}}const re=cloneDeep(r.value);for(const ie in re){const ae=re[ie];for(const ue in i.value){const de=i.value[ue];if(de.isSameData&&ie!=="0"&&(ae[de.prop]=re[0][de.prop]),de.varidate&&!de.varidate(ae[de.prop]))return;if(de.isAdd){const pe=ae[de.prop];delete ae[de.prop];const le=de.label+ZH_DIV+ue;ae[le]=pe}de.formatter&&de.type===DIY_DATA_TYPE.FORMAT&&(ae[de.prop]=de.formatter(ae))}}return console.log("DiyDataTable 获取数据",re,i.value),{data:re,columns:i.value}},updateColumn:(re,ie)=>{const ae=i.value[re].prop;if(i.value[re]=ie,ae!==ie.prop)for(const ue of r.value)ue[ie.prop]=ue[ae],delete ue[ae]},resetColumns:re=>{const ae=i.value.filter(de=>!de.isAdd).reduce((de,pe)=>(re.some(le=>le.prop===pe.prop)||de.push(pe.prop),de),[]);r.value.forEach(de=>{ae.forEach(pe=>{delete de[pe]})});const ue=re.filter(de=>de.isAdd);i.value=[...re,...ue]},onAddRow:g,onAddColumn:y}),(re,ie)=>(vue.openBlock(),vue.createBlock(vue.unref(ElForm),{class:"diy-data-table",model:t.rawData,ref_key:"formRef",ref:oe},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElTable),vue.mergeProps({data:r.value},re.$attrs),{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElTableColumn),{type:"index",label:"序号",width:"132",fixed:"left"}),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.value,(ae,ue)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTableColumn),{key:ae.key||ue,prop:ae.prop,label:ae.label,width:ae.width,"min-width":ae.minWidth||re.defaultMinWidth,fixed:ae.fixed},{header:vue.withCtx(()=>[re.isEdit?ae.isEditHeader?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$7,[vue.createVNode(vue.unref(ElFormItem),{prop:`columns.${ue}`,rules:V(ue)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElInput),{modelValue:ae.label,"onUpdate:modelValue":de=>ae.label=de,maxlength:ae.headerMaxlength||20,placeholder:"请输入表头"},null,8,["modelValue","onUpdate:modelValue","maxlength"])]),_:2},1032,["prop","rules"]),ae.isAdd?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"iconfont icon-close",onClick:de=>k(ue,ae)},null,8,_hoisted_3$6)):vue.createCommentVNode("",!0)])):(vue.openBlock(),vue.createElementBlock("div",{key:2,class:vue.normalizeClass({"is-required-label":ae.required})},vue.toDisplayString(ae.label),3)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$b,vue.toDisplayString(ae.label),1))]),default:vue.withCtx(de=>[n.isEdit&&(!ae.isSameData||de.$index===0)&&ae.type!==vue.unref(DIY_DATA_TYPE).TEXT?(vue.openBlock(),vue.createBlock(vue.unref(ElFormItem),{key:0,prop:`${de.$index}.${ae.prop}`,rules:z(ae),class:vue.normalizeClass(["col-edit-container",{"close-padding":ae.isAdd}])},{default:vue.withCtx(()=>[ae.type===vue.unref(DIY_DATA_TYPE).FORMAT&&ae.formatter?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$3,vue.toDisplayString(ae.showFormatter?ae.showFormatter(ae.formatter(de.row)):ae.formatter(de.row)),1)):ae.type===vue.unref(DIY_DATA_TYPE).AUTOCOMPLETE?(vue.openBlock(),vue.createBlock(vue.unref(ElAutocomplete),{key:1,modelValue:de.row[ae.prop],"onUpdate:modelValue":pe=>de.row[ae.prop]=pe,placeholder:ae.placeholder||"请输入","fetch-suggestions":(pe,le)=>$(pe,le,ae),maxlength:ae.maxlength||20},null,8,["modelValue","onUpdate:modelValue","placeholder","fetch-suggestions","maxlength"])):ae.slot?vue.renderSlot(re.$slots,ae.slot,{key:2,row:de.row,$index:de.$index},void 0,!0):(vue.openBlock(),vue.createBlock(vue.unref(ElInput),{key:3,modelValue:de.row[ae.prop],"onUpdate:modelValue":pe=>de.row[ae.prop]=pe,placeholder:ae.placeholder||"请输入",formatter:ae.formatter,parser:ae.parser,maxlength:ae.maxlength||20},null,8,["modelValue","onUpdate:modelValue","placeholder","formatter","parser","maxlength"]))]),_:2},1032,["prop","rules","class"])):ae.slot?vue.renderSlot(re.$slots,ae.slot,{key:1,row:de.row,$index:de.$index},void 0,!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:2},[vue.createTextVNode(vue.toDisplayString(j(de.row,ae)),1)],64))]),_:2},1032,["prop","label","width","min-width","fixed"]))),128)),n.isEdit?(vue.openBlock(),vue.createBlock(vue.unref(ElTableColumn),{key:0,width:"150",fixed:"right"},{header:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_5$3,[re.customAddRow?(vue.openBlock(),vue.createBlock(vue.unref(ElButton),{key:0,type:"primary",link:"",onClick:g},{default:vue.withCtx(()=>[ie[0]||(ie[0]=vue.createElementVNode("i",{class:"iconfont icon-Frame1"},null,-1)),vue.createTextVNode(vue.toDisplayString(re.addRowText),1)]),_:1})):vue.createCommentVNode("",!0),re.customAddColumn?(vue.openBlock(),vue.createBlock(vue.unref(ElButton),{key:1,type:"primary",link:"",onClick:y},{default:vue.withCtx(()=>[ie[1]||(ie[1]=vue.createElementVNode("i",{class:"iconfont icon-Frame-11"},null,-1)),vue.createTextVNode(vue.toDisplayString(re.addColumnText),1)]),_:1})):vue.createCommentVNode("",!0)])]),default:vue.withCtx(({$index:ae})=>[vue.createElementVNode("div",_hoisted_6$3,[r.value.length>1?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"iconfont icon-close",onClick:ue=>L(ae)},null,8,_hoisted_7$3)):vue.createCommentVNode("",!0)])]),_:1})):vue.createCommentVNode("",!0)]),_:3},16,["data"])]),_:3},8,["model"]))}}),DiyDataTable=_export_sfc(_sfc_main$d,[["__scopeId","data-v-f5baec5d"]]),ZhDiyDataTable=withInstall$1(DiyDataTable);var BaseMapType=(t=>(t[t.vector=0]="vector",t[t.satellite=1]="satellite",t))(BaseMapType||{}),SEARCH_TYPE=(t=>(t[t.SEARCH_SHIP=0]="SEARCH_SHIP",t[t.SEARCH_PORT=1]="SEARCH_PORT",t[t.SEARCH_CUSTOM=2]="SEARCH_CUSTOM",t))(SEARCH_TYPE||{}),COPY_RIGHT_TYPE=(t=>(t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL",t))(COPY_RIGHT_TYPE||{});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 g=0,y=t.length,k=!1;for(;g<y;)r=g+(y-g>>1),i=+n(t[r],e),i<0?g=r+1:(y=r,k=!i);return k?g:~g}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 g=t[i];if(g===e)return i;if(g<e)return n(e,t[i-1],g)>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$3(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,g){if(g===0)return!0;const y=r(t[g-1],i);return!(y>0||y===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 g=n?new BaseEvent(e):e;g.target||(g.target=this.eventTarget_||this);const y=this.dispatching_||(this.dispatching_={}),k=this.pendingRemovals_||(this.pendingRemovals_={});r in y||(y[r]=0,k[r]=0),++y[r];let L;for(let $=0,V=i.length;$<V;++$)if("handleEvent"in i[$]?L=i[$].handleEvent(g):L=i[$].call(this,g),L===!1||g.propagationStopped){L=!1;break}if(--y[r]===0){let $=k[r];for(delete k[r];$--;)this.removeEventListener(r,VOID);delete y[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 y=n;n=function(){t.removeEventListener(e,n),y.apply(r??this,arguments)}}else r&&r!==t&&(n=n.bind(r));const g={target:t,type:e,listener:n};return t.addEventListener(e,n),g}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 g=0;g<r;++g)i[g]=listen(this,e[g],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 g=0;g<i;++g)r[g]=listenOnce(this,e[g],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,g=e.length;i<g;++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 g=i[e];i[e]=n,g!==n&&this.notify(e,g)}}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,$=e-n+1,V=Math.log(L),z=.5*Math.exp(2*V/3),j=.5*Math.sqrt(V*z*(L-z)/L)*($-L/2<0?-1:1),oe=Math.max(n,Math.floor(e-$*z/L+j)),re=Math.min(r,Math.floor(e+(L-$)*z/L+j));quickselect(t,e,oe,re,i)}const g=t[e];let y=n,k=r;for(swap(t,n,e),i(t[r],g)>0&&swap(t,n,r);y<k;){for(swap(t,y,k),y++,k--;i(t[y],g)<0;)y++;for(;i(t[k],g)>0;)k--}i(t[n],g)===0?swap(t,n,k):(k++,swap(t,k,r)),k<=e&&(n=k+1),e<=k&&(r=k-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,g=[];for(;n;){for(let y=0;y<n.children.length;y++){const k=n.children[y],L=n.leaf?i(k):k;intersects$1(e,L)&&(n.leaf?r.push(k):contains(e,L)?this._all(k,r):g.push(k))}n=g.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 g=n.children[i],y=n.leaf?this.toBBox(g):g;if(intersects$1(e,y)){if(n.leaf||contains(e,y))return!0;r.push(g)}}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),g=[],y=[];let k,L,$;for(;r||g.length;){if(r||(r=g.pop(),L=g[g.length-1],k=y.pop(),$=!0),r.leaf){const V=findItem(e,r.children,n);if(V!==-1)return r.children.splice(V,1),g.push(r),this._condense(g),this}!$&&!r.leaf&&contains(r,i)?(g.push(r),y.push(k),k=0,L=r,r=r.children[0]):L?(k++,r=L.children[k],$=!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 g=r-n+1;let y=this._maxEntries,k;if(g<=y)return k=createNode(e.slice(n,r+1)),calcBBox(k,this.toBBox),k;i||(i=Math.ceil(Math.log(g)/Math.log(y)),y=Math.ceil(g/Math.pow(y,i-1))),k=createNode([]),k.leaf=!1,k.height=i;const L=Math.ceil(g/y),$=L*Math.ceil(Math.sqrt(y));multiSelect(e,n,r,$,this.compareMinX);for(let V=n;V<=r;V+=$){const z=Math.min(V+$-1,r);multiSelect(e,V,z,L,this.compareMinY);for(let j=V;j<=z;j+=L){const oe=Math.min(j+L-1,z);k.children.push(this._build(e,j,oe,i-1))}}return calcBBox(k,this.toBBox),k}_chooseSubtree(e,n,r,i){for(;i.push(n),!(n.leaf||i.length-1===r);){let g=1/0,y=1/0,k;for(let L=0;L<n.children.length;L++){const $=n.children[L],V=bboxArea($),z=enlargedArea(e,$)-V;z<y?(y=z,g=V<g?V:g,k=$):z===y&&V<g&&(g=V,k=$)}n=k||n.children[0]}return n}_insert(e,n,r){const i=r?e:this.toBBox(e),g=[],y=this._chooseSubtree(i,this.data,n,g);for(y.children.push(e),extend$2(y,i);n>=0&&g[n].children.length>this._maxEntries;)this._split(g,n),n--;this._adjustParentBBoxes(i,g,n)}_split(e,n){const r=e[n],i=r.children.length,g=this._minEntries;this._chooseSplitAxis(r,g,i);const y=this._chooseSplitIndex(r,g,i),k=createNode(r.children.splice(y,r.children.length-y));k.height=r.height,k.leaf=r.leaf,calcBBox(r,this.toBBox),calcBBox(k,this.toBBox),n?e[n-1].children.push(k):this._splitRoot(r,k)}_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,g=1/0,y=1/0;for(let k=n;k<=r-n;k++){const L=distBBox(e,0,k,this.toBBox),$=distBBox(e,k,r,this.toBBox),V=intersectionArea(L,$),z=bboxArea(L)+bboxArea($);V<g?(g=V,i=k,y=z<y?z:y):V===g&&z<y&&(y=z,i=k)}return i||r-n}_chooseSplitAxis(e,n,r){const i=e.leaf?this.compareMinX:compareNodeMinX,g=e.leaf?this.compareMinY:compareNodeMinY,y=this._allDistMargin(e,n,r,i),k=this._allDistMargin(e,n,r,g);y<k&&e.children.sort(i)}_allDistMargin(e,n,r,i){e.children.sort(i);const g=this.toBBox,y=distBBox(e,0,n,g),k=distBBox(e,r-n,r,g);let L=bboxMargin(y)+bboxMargin(k);for(let $=n;$<r-n;$++){const V=e.children[$];extend$2(y,e.leaf?g(V):V),L+=bboxMargin(y)}for(let $=r-n-1;$>=n;$--){const V=e.children[$];extend$2(k,e.leaf?g(V):V),L+=bboxMargin(k)}return L}_adjustParentBBoxes(e,n,r){for(let i=r;i>=0;i--)extend$2(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 g=e;g<n;g++){const y=t.children[g];extend$2(i,t.leaf?r(y):y)}return i}function extend$2(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),g=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,g-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 g=[e,n];for(;g.length;){if(n=g.pop(),e=g.pop(),n-e<=r)continue;const y=e+Math.ceil((n-e)/r/2)*r;quickselect(t,y,e,n,i),g.push(e,y,y,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 _boundingExtentXYs(t,e,n){const r=Math.min.apply(null,t),i=Math.min.apply(null,e),g=Math.max.apply(null,t),y=Math.max.apply(null,e);return createOrUpdate$2(r,i,g,y,n)}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$1(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],g=t[3],y=e[0],k=e[1];let L=Relationship.UNKNOWN;return y<n?L=L|Relationship.LEFT:y>i&&(L=L|Relationship.RIGHT),k<r?L=L|Relationship.BELOW:k>g&&(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 g=createOrUpdateEmpty(i);return extendFlatCoordinates(g,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$1(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$1(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[g,y,k,L,$,V,z,j]=getRotatedViewport(t,e,n,r);return createOrUpdate$2(Math.min(g,k,$,z),Math.min(y,L,V,j),Math.max(g,k,$,z),Math.max(y,L,V,j),i)}function getRotatedViewport(t,e,n,r){const i=e*r[0]/2,g=e*r[1]/2,y=Math.cos(n),k=Math.sin(n),L=i*y,$=i*k,V=g*y,z=g*k,j=t[0],oe=t[1];return[j-L+z,oe-$-V,j-L-z,oe-$+V,j+L-z,oe+$+V,j+L+z,oe+$-V,j-L+z,oe-$-V]}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),g=coordinateRelationship(t,n);if(i===Relationship.INTERSECTING||g===Relationship.INTERSECTING)r=!0;else{const y=t[0],k=t[1],L=t[2],$=t[3],V=e[0],z=e[1],j=n[0],oe=n[1],re=(oe-z)/(j-V);let ie,ae;g&Relationship.ABOVE&&!(i&Relationship.ABOVE)&&(ie=j-(oe-$)/re,r=ie>=y&&ie<=L),!r&&g&Relationship.RIGHT&&!(i&Relationship.RIGHT)&&(ae=oe-(j-L)*re,r=ae>=k&&ae<=$),!r&&g&Relationship.BELOW&&!(i&Relationship.BELOW)&&(ie=j-(oe-k)/re,r=ie>=y&&ie<=L),!r&&g&Relationship.LEFT&&!(i&Relationship.LEFT)&&(ae=oe-(j-y)*re,r=ae>=k&&ae<=$)}return r}function applyTransform(t,e,n,r){if(isEmpty(t))return createOrUpdateEmpty(n);let i=[];i=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]],e(i,i,2);const g=[],y=[];for(let k=0,L=i.length;k<L;k+=2)g.push(i[k]),y.push(i[k+1]);return _boundingExtentXYs(g,y,n)}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),y=Math.floor((r[0]-n[0])/i)*i;t[0]-=y,t[2]-=y}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,g=n.length;i<g;i++){const y=e[i],k=n[i],L={minX:y[0],minY:y[1],maxX:y[2],maxY:y[3],value:k};r[i]=L,this.items_[getUid(k)]=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,g=e.length;i<g;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],g=t[3],y=t[4],k=t[5],L=e[0],$=e[1],V=e[2],z=e[3],j=e[4],oe=e[5];return t[0]=n*L+i*$,t[1]=r*L+g*$,t[2]=n*V+i*z,t[3]=r*V+g*z,t[4]=n*j+i*oe+y,t[5]=r*j+g*oe+k,t}function set(t,e,n,r,i,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=g,t[5]=y,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,g,y,k){const L=Math.sin(g),$=Math.cos(g);return t[0]=r*$,t[1]=i*L,t[2]=-r*L,t[3]=i*$,t[4]=y*r*$-k*r*L+e,t[5]=y*i*L+k*i*$+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],g=e[2],y=e[3],k=e[4],L=e[5];return t[0]=y/n,t[1]=-i/n,t[2]=-g/n,t[3]=r/n,t[4]=(g*L-y*k)/n,t[5]=-(r*L-i*k)/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 g=0;g<i;g+=r){e[g]=HALF_SIZE*t[g]/180;let y=RADIUS$1*Math.log(Math.tan(Math.PI*(+t[g+1]+90)/360));y>MAX_SAFE_Y?y=MAX_SAFE_Y:y<-MAX_SAFE_Y&&(y=-MAX_SAFE_Y),e[g+1]=y}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 g=0;g<i;g+=r)e[g]=180*t[g]/HALF_SIZE,e[g+1]=360*Math.atan(Math.exp(t[g+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,g){const y=i-n,k=g-r;if(y!==0||k!==0){const L=((t-n)*y+(e-r)*k)/(y*y+k*k);L>1?(n=i,r=g):L>0&&(n+=y*L,r+=k*L)}return squaredDistance$1(t,e,n,r)}function squaredDistance$1(t,e,n,r){const i=n-t,g=r-e;return i*i+g*g}function solveLinearSystem(t){const e=t.length;for(let r=0;r<e;r++){let i=r,g=Math.abs(t[r][r]);for(let k=r+1;k<e;k++){const L=Math.abs(t[k][r]);L>g&&(g=L,i=k)}if(g===0)return null;const y=t[i];t[i]=t[r],t[r]=y;for(let k=r+1;k<e;k++){const L=-t[k][r]/t[r][r];for(let $=r;$<e+1;$++)r==$?t[k][$]=0:t[k][$]+=L*t[r][$]}}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,g=t[1]*n+t[0]*r;return t[0]=i,t[1]=g,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$1(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]),g=(i-r)/2,y=toRadians(e[0]-t[0])/2,k=Math.sin(g)*Math.sin(g)+Math.sin(y)*Math.sin(y)*Math.cos(r)*Math.cos(i);return 2*n*Math.atan2(Math.sqrt(k),Math.sqrt(1-k))}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 g=0,y,k,L,$,V,z;switch(i){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":{y=t.getCoordinates(),g=getLengthInternal(y,n);break}case"MultiLineString":case"Polygon":{for(y=t.getCoordinates(),L=0,$=y.length;L<$;++L)g+=getLengthInternal(y[L],n);break}case"MultiPolygon":{for(y=t.getCoordinates(),L=0,$=y.length;L<$;++L)for(k=y[L],V=0,z=k.length;V<z;++V)g+=getLengthInternal(k[V],n);break}case"GeometryCollection":{const j=t.getGeometries();for(L=0,$=j.length;L<$;++L)g+=getLength(j[L],e);break}default:throw new Error("Unsupported geometry type: "+i)}return g}function getAreaInternal(t,e){let n=0;const r=t.length;let i=t[r-1][0],g=t[r-1][1];for(let y=0;y<r;y++){const k=t[y][0],L=t[y][1];n+=toRadians(k-i)*(2+Math.sin(toRadians(g))+Math.sin(toRadians(L))),i=k,g=L}return n*e*e/2}function getArea(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 g=0,y,k,L,$,V,z;switch(i){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(y=t.getCoordinates(),g=Math.abs(getAreaInternal(y[0],n)),L=1,$=y.length;L<$;++L)g-=Math.abs(getAreaInternal(y[L],n));break}case"MultiPolygon":{for(y=t.getCoordinates(),L=0,$=y.length;L<$;++L)for(k=y[L],g+=Math.abs(getAreaInternal(k[0],n)),V=1,z=k.length;V<z;++V)g-=Math.abs(getAreaInternal(k[V],n));break}case"GeometryCollection":{const j=t.getGeometries();for(L=0,$=j.length;L<$;++L)g+=getArea(j[L],e);break}default:throw new Error("Unsupported geometry type: "+i)}return g}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$1(t,e,n){const r=t-5e5,y=(n.north?e:e-1e7)/K0/(R*M1),k=y+P2*Math.sin(2*y)+P3*Math.sin(4*y)+P4*Math.sin(6*y)+P5*Math.sin(8*y),L=Math.sin(k),$=L*L,V=Math.cos(k),z=L/V,j=z*z,oe=j*j,re=1-E*$,ie=Math.sqrt(1-E*$),ae=R/ie,ue=(1-E)/re,de=E_P2*V**2,pe=de*de,le=r/(ae*K0),he=le*le,_e=he*le,Ce=_e*le,xe=Ce*le,Ie=xe*le,Oe=k-z/ue*(he/2-Ce/24*(5+3*j+10*de-4*pe-9*E_P2))+Ie/720*(61+90*j+298*de+45*oe-252*E_P2-3*pe);let $e=(le-_e/6*(1+2*j+de)+xe/120*(5-2*de+28*j-3*pe+8*E_P2+24*oe))/V;return $e=wrap($e+toRadians(zoneToCentralLongitude(n.number)),-Math.PI,Math.PI),[toDegrees($e),toDegrees(Oe)]}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),g=Math.cos(r),y=i/g,k=y*y,L=k*k,$=toRadians(t),V=zoneToCentralLongitude(n.number),z=toRadians(V),j=R/Math.sqrt(1-E*i**2),oe=E_P2*g**2,re=g*wrap($-z,-Math.PI,Math.PI),ie=re*re,ae=ie*re,ue=ae*re,de=ue*re,pe=de*re,le=R*(M1*r-M2*Math.sin(2*r)+M3*Math.sin(4*r)-M4*Math.sin(6*r)),he=K0*j*(re+ae/6*(1-k+oe)+de/120*(5-18*k+L+72*oe-58*E_P2))+5e5;let _e=K0*(le+j*y*(ie/2+ue/24*(5-k+9*oe+4*oe**2)+pe/720*(61-58*k+L+600*oe-330*E_P2)));return n.north||(_e+=1e7),[he,_e]}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 g=t.match(i);if(g){e=parseInt(g[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,g){const y=n.length;i=i>1?i:2,g=g??i,r||(i>2?r=n.slice():r=new Array(y));for(let k=0;k<y;k+=g){const L=n[k],$=n[k+1],V=t(L,$,e);r[k]=V[0],r[k+1]=V[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$1,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 g=t.getPointResolutionFunc();if(g){if(i=g(e,n),r&&r!==t.getUnits()){const y=t.getMetersPerUnit();y&&(i=i*y/METERS_PER_UNIT$1[r])}}else{const y=t.getUnits();if(y=="degrees"&&!r||r=="degrees")i=e;else{const k=getTransformFromProjections(t,get$1("EPSG:4326"));if(!k&&y!=="degrees")i=e*t.getMetersPerUnit();else{let $=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];$=k($,$,2);const V=getDistance($.slice(0,2),$.slice(2,4)),z=getDistance($.slice(4,6),$.slice(6,8));i=(V+z)/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(g){add$1(i,g,n),add$1(g,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 g=e.length;r=r!==void 0?r:2,i=i??r,n=n!==void 0?n:new Array(g);for(let y=0;y<g;y+=i){const k=t(e.slice(y,y+r)),L=k.length;for(let $=0,V=i;$<V;++$)n[y+$]=$>=L?e[y+$]:k[$]}return n}}function fromLonLat(t,e){return disableCoordinateWarning(),transform(t,"EPSG:4326","EPSG:3857")}function toLonLat(t,e){const n=transform(t,"EPSG:3857","EPSG:4326"),r=n[0];return(r<-180||r>180)&&(n[0]=modulo(r+180,360)-180),n}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 g=null,y=null;for(const L of transformFactories)g||(g=L(t)),y||(y=L(e));if(!g&&!y)return null;const k="EPSG:4326";if(y)if(g)i=composeTransformFuncs(g.inverse,y.forward);else{const L=get$2(n,k);L&&(i=composeTransformFuncs(L,y.forward))}else{const L=get$2(k,r);L&&(i=composeTransformFuncs(g.inverse,L))}return i&&(addProjection(t),addProjection(e),add$1(t,e,i)),i}function composeTransformFuncs(t,e){return function(n,r,i,g){return r=t(n,r,i,g),e(r,r,i,g)}}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(),g=get$1(n).getCode();throw new Error(`No transform available between ${i} and ${g}`)}return r(t,void 0,t.length)}function transformExtent(t,e,n,r){const i=getTransform(e,n);return applyTransform(t,i,void 0)}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,g,y){g=g||[],y=y||2;let k=0;for(let L=e;L<n;L+=r){const $=t[L],V=t[L+1];g[k++]=i[0]*$+i[2]*V+i[4],g[k++]=i[1]*$+i[3]*V+i[5];for(let z=2;z<y;z++)g[k++]=t[L+z]}return g&&g.length!=k&&(g.length=k),g}function rotate(t,e,n,r,i,g,y){y=y||[];const k=Math.cos(i),L=Math.sin(i),$=g[0],V=g[1];let z=0;for(let j=e;j<n;j+=r){const oe=t[j]-$,re=t[j+1]-V;y[z++]=$+oe*k-re*L,y[z++]=V+oe*L+re*k;for(let ie=j+2;ie<j+r;++ie)y[z++]=t[ie]}return y&&y.length!=z&&(y.length=z),y}function scale$2(t,e,n,r,i,g,y,k){k=k||[];const L=y[0],$=y[1];let V=0;for(let z=e;z<n;z+=r){const j=t[z]-L,oe=t[z+1]-$;k[V++]=L+i*j,k[V++]=$+g*oe;for(let re=z+2;re<z+r;++re)k[V++]=t[re]}return k&&k.length!=V&&(k.length=V),k}function translate$1(t,e,n,r,i,g,y){y=y||[];let k=0;for(let L=e;L<n;L+=r){y[k++]=t[L]+i,y[k++]=t[L+1]+g;for(let $=L+2;$<L+r;++$)y[k++]=t[$]}return y&&y.length!=k&&(y.length=k),y}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(g,y,k){const L=r.getExtent(),$=r.getWorldExtent(),V=getHeight($)/getHeight(L);compose(tmpTransform$1,$[0],$[3],V,-V,0,0,0);const z=transform2D(g,0,g.length,k,tmpTransform$1,y),j=getTransform(r,n);return j?j(z,z,k):z}: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 g=0;g<r;++g){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 g=this.getStride();scale$2(i,0,i.length,g,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,g=n.length;i<g;++i)t[e++]=n[i];return e}function deflateCoordinates(t,e,n,r){for(let i=0,g=n.length;i<g;++i){const y=n[i];for(let k=0;k<r;++k)t[e++]=y[k]}return e}function deflateCoordinatesArray(t,e,n,r,i){i=i||[];let g=0;for(let y=0,k=n.length;y<k;++y){const L=deflateCoordinates(t,e,n[y],r);i[g++]=L,e=L}return i.length=g,i}function deflateMultiCoordinatesArray(t,e,n,r,i){i=i||[];let g=0;for(let y=0,k=n.length;y<k;++y){const L=deflateCoordinatesArray(t,e,n[y],r,i[g]);L.length===0&&(L[0]=e),i[g++]=L,e=L[L.length-1]}return i.length=g,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 g=this.flatCoordinates,y=e-g[0],k=n-g[1],L=y*y+k*k;if(L<i){if(L===0)for(let $=0;$<this.stride;++$)r[$]=g[$];else{const $=this.getRadius()/Math.sqrt(L);r[0]=g[0]+$*y,r[1]=g[1]+$*k;for(let V=2;V<this.stride;++V)r[V]=g[V]}return r.length=this.stride,L}return i}containsXY(e,n){const r=this.flatCoordinates,i=e-r[0],g=n-r[1];return i*i+g*g<=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 g=1;g<n;++g)i[n+g]=e[g];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 g=deflateCoordinate(i,0,e,this.stride);i[g++]=i[0]+n;for(let y=1,k=this.stride;y<k;++y)i[g++]=i[y];i.length=g,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 g=this.geometries_;for(let y=0,k=g.length;y<k;++y)i=g[y].closestPointXY(e,n,r,i);return i}containsXY(e,n){const r=this.geometries_;for(let i=0,g=r.length;i<g;++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$1(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 g=0,y=r.length;g<y;++g){const k=r[g],L=k.getSimplifiedGeometry(e);n.push(L),L!==k&&(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,g=r.length;i<g;++i)r[i].rotate(e,n);this.changed()}scale(e,n,r){r||(r=getCenter(this.getExtent()));const i=this.geometries_;for(let g=0,y=i.length;g<y;++g)i[g].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,g=r.length;i<g;++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,g,y){const k=t[e],L=t[e+1],$=t[n]-k,V=t[n+1]-L;let z;if($===0&&V===0)z=e;else{const j=((i-k)*$+(g-L)*V)/($*$+V*V);if(j>1)z=n;else if(j>0){for(let oe=0;oe<r;++oe)y[oe]=lerp(t[e+oe],t[n+oe],j);y.length=r;return}else z=e}for(let j=0;j<r;++j)y[j]=t[z+j];y.length=r}function maxSquaredDelta(t,e,n,r,i){let g=t[e],y=t[e+1];for(e+=r;e<n;e+=r){const k=t[e],L=t[e+1],$=squaredDistance$1(g,y,k,L);$>i&&(i=$),g=k,y=L}return i}function arrayMaxSquaredDelta(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g){const k=n[g];i=maxSquaredDelta(t,e,k,r,i),e=k}return i}function multiArrayMaxSquaredDelta(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g){const k=n[g];i=arrayMaxSquaredDelta(t,e,k,r,i),e=k[k.length-1]}return i}function assignClosestPoint(t,e,n,r,i,g,y,k,L,$,V){if(e==n)return $;let z,j;if(i===0){if(j=squaredDistance$1(y,k,t[e],t[e+1]),j<$){for(z=0;z<r;++z)L[z]=t[e+z];return L.length=r,j}return $}V=V||[NaN,NaN];let oe=e+r;for(;oe<n;)if(assignClosest(t,oe-r,oe,r,y,k,V),j=squaredDistance$1(y,k,V[0],V[1]),j<$){for($=j,z=0;z<r;++z)L[z]=V[z];L.length=r,oe+=r}else oe+=r*Math.max((Math.sqrt(j)-Math.sqrt($))/i|0,1);if(g&&(assignClosest(t,n-r,e,r,y,k,V),j=squaredDistance$1(y,k,V[0],V[1]),j<$)){for($=j,z=0;z<r;++z)L[z]=V[z];L.length=r}return $}function assignClosestArrayPoint(t,e,n,r,i,g,y,k,L,$,V){V=V||[NaN,NaN];for(let z=0,j=n.length;z<j;++z){const oe=n[z];$=assignClosestPoint(t,e,oe,r,i,g,y,k,L,$,V),e=oe}return $}function assignClosestMultiArrayPoint(t,e,n,r,i,g,y,k,L,$,V){V=V||[NaN,NaN];for(let z=0,j=n.length;z<j;++z){const oe=n[z];$=assignClosestArrayPoint(t,e,oe,r,i,g,y,k,L,$,V),e=oe[oe.length-1]}return $}function douglasPeucker(t,e,n,r,i,g,y){const k=(n-e)/r;if(k<3){for(;e<n;e+=r)g[y++]=t[e],g[y++]=t[e+1];return y}const L=new Array(k);L[0]=1,L[k-1]=1;const $=[e,n-r];let V=0;for(;$.length>0;){const z=$.pop(),j=$.pop();let oe=0;const re=t[j],ie=t[j+1],ae=t[z],ue=t[z+1];for(let de=j+r;de<z;de+=r){const pe=t[de],le=t[de+1],he=squaredSegmentDistance(pe,le,re,ie,ae,ue);he>oe&&(V=de,oe=he)}oe>i&&(L[(V-e)/r]=1,j+r<V&&$.push(j,V),V+r<z&&$.push(V,z))}for(let z=0;z<k;++z)L[z]&&(g[y++]=t[e+z*r],g[y++]=t[e+z*r+1]);return y}function douglasPeuckerArray(t,e,n,r,i,g,y,k){for(let L=0,$=n.length;L<$;++L){const V=n[L];y=douglasPeucker(t,e,V,r,i,g,y),k.push(y),e=V}return y}function snap(t,e){return e*Math.round(t/e)}function quantize(t,e,n,r,i,g,y){if(e==n)return y;let k=snap(t[e],i),L=snap(t[e+1],i);e+=r,g[y++]=k,g[y++]=L;let $,V;do if($=snap(t[e],i),V=snap(t[e+1],i),e+=r,e==n)return g[y++]=$,g[y++]=V,y;while($==k&&V==L);for(;e<n;){const z=snap(t[e],i),j=snap(t[e+1],i);if(e+=r,z==$&&j==V)continue;const oe=$-k,re=V-L,ie=z-k,ae=j-L;if(oe*ae==re*ie&&(oe<0&&ie<oe||oe==ie||oe>0&&ie>oe)&&(re<0&&ae<re||re==ae||re>0&&ae>re)){$=z,V=j;continue}g[y++]=$,g[y++]=V,k=$,L=V,$=z,V=j}return g[y++]=$,g[y++]=V,y}function quantizeArray(t,e,n,r,i,g,y,k){for(let L=0,$=n.length;L<$;++L){const V=n[L];y=quantize(t,e,V,r,i,g,y),k.push(y),e=V}return y}function quantizeMultiArray(t,e,n,r,i,g,y,k){for(let L=0,$=n.length;L<$;++L){const V=n[L],z=[];y=quantizeArray(t,e,V,r,i,g,y,z),k.push(z),e=V[V.length-1]}return y}function inflateCoordinates(t,e,n,r,i){i=i!==void 0?i:[];let g=0;for(let y=e;y<n;y+=r)i[g++]=t.slice(y,y+r);return i.length=g,i}function inflateCoordinatesArray(t,e,n,r,i){i=i!==void 0?i:[];let g=0;for(let y=0,k=n.length;y<k;++y){const L=n[y];i[g++]=inflateCoordinates(t,e,L,r,i[g]),e=L}return i.length=g,i}function inflateMultiCoordinatesArray(t,e,n,r,i){i=i!==void 0?i:[];let g=0;for(let y=0,k=n.length;y<k;++y){const L=n[y];i[g++]=L.length===1&&L[0]===e?[]:inflateCoordinatesArray(t,e,L,r,i[g]),e=L[L.length-1]}return i.length=g,i}function linearRing(t,e,n,r){let i=0;const g=t[n-r],y=t[n-r+1];let k=0,L=0;for(;e<n;e+=r){const $=t[e]-g,V=t[e+1]-y;i+=L*$-k*V,k=$,L=V}return i/2}function linearRings(t,e,n,r){let i=0;for(let g=0,y=n.length;g<y;++g){const k=n[g];i+=linearRing(t,e,k,r),e=k}return i}function linearRingss$1(t,e,n,r){let i=0;for(let g=0,y=n.length;g<y;++g){const k=n[g];i+=linearRings(t,e,k,r),e=k[k.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 g;for(e+=r;e<n;e+=r)if(g=i(t.slice(e-r,e),t.slice(e,e+r)),g)return g;return!1}function interpolatePoint(t,e,n,r,i,g,y){let k,L;const $=(n-e)/r;if($===1)k=e;else if($===2)k=e,L=i;else if($!==0){let V=t[e],z=t[e+1],j=0;const oe=[0];for(let ae=e+r;ae<n;ae+=r){const ue=t[ae],de=t[ae+1];j+=Math.sqrt((ue-V)*(ue-V)+(de-z)*(de-z)),oe.push(j),V=ue,z=de}const re=i*j,ie=binarySearch(oe,re);ie<0?(L=(re-oe[-ie-2])/(oe[-ie-1]-oe[-ie-2]),k=e+(-ie-2)*r):k=e+ie*r}y=y>1?y:2,g=g||new Array(y);for(let V=0;V<y;++V)g[V]=k===void 0?NaN:L===void 0?t[k+V]:lerp(t[k+V],t[k+r+V],L);return g}function lineStringCoordinateAtM(t,e,n,r,i,g){if(n==e)return null;let y;if(i<t[e+r-1])return g?(y=t.slice(e,e+r),y[r-1]=i,y):null;if(t[n-1]<i)return g?(y=t.slice(n-r,n),y[r-1]=i,y):null;if(i==t[e+r-1])return t.slice(e,e+r);let k=e/r,L=n/r;for(;k<L;){const j=k+L>>1;i<t[(j+1)*r-1]?L=j:k=j+1}const $=t[k*r-1];if(i==$)return t.slice((k-1)*r,(k-1)*r+r);const V=t[(k+1)*r-1],z=(i-$)/(V-$);y=[];for(let j=0;j<r-1;++j)y.push(lerp(t[(k-1)*r+j],t[k*r+j],z));return y.push(i),y}function lineStringsCoordinateAtM(t,e,n,r,i,g,y){if(y)return lineStringCoordinateAtM(t,e,n[n.length-1],r,i,g);let k;if(i<t[r-1])return g?(k=t.slice(0,r),k[r-1]=i,k):null;if(t[t.length-1]<i)return g?(k=t.slice(t.length-r),k[r-1]=i,k):null;for(let L=0,$=n.length;L<$;++L){const V=n[L];if(e!=V){if(i<t[e+r-1])return null;if(i<=t[V-1])return lineStringCoordinateAtM(t,e,V,r,i,!1);e=V}}return null}function linearRingContainsExtent(t,e,n,r,i){return!forEachCorner(i,function(y){return!linearRingContainsXY(t,e,n,r,y[0],y[1])})}function linearRingContainsXY(t,e,n,r,i,g){let y=0,k=t[n-r],L=t[n-r+1];for(;e<n;e+=r){const $=t[e],V=t[e+1];L<=g?V>g&&($-k)*(g-L)-(i-k)*(V-L)>0&&y++:V<=g&&($-k)*(g-L)-(i-k)*(V-L)<0&&y--,k=$,L=V}return y!==0}function linearRingsContainsXY(t,e,n,r,i,g){if(n.length===0||!linearRingContainsXY(t,e,n[0],r,i,g))return!1;for(let y=1,k=n.length;y<k;++y)if(linearRingContainsXY(t,n[y-1],n[y],r,i,g))return!1;return!0}function linearRingssContainsXY(t,e,n,r,i,g){if(n.length===0)return!1;for(let y=0,k=n.length;y<k;++y){const L=n[y];if(linearRingsContainsXY(t,e,L,r,i,g))return!0;e=L[L.length-1]}return!1}function intersectsLineString(t,e,n,r,i){const g=extendFlatCoordinates(createEmpty(),t,e,n,r);return intersects(i,g)?containsExtent(i,g)||g[0]>=i[0]&&g[2]<=i[2]||g[1]>=i[1]&&g[3]<=i[3]?!0:forEach(t,e,n,r,function(y,k){return intersectsSegment(i,y,k)}):!1}function intersectsLineStringArray(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g){if(intersectsLineString(t,e,n[g],r,i))return!0;e=n[g]}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 g=1,y=n.length;g<y;++g)if(linearRingContainsExtent(t,n[g-1],n[g],r,i)&&!intersectsLineString(t,n[g-1],n[g],r,i))return!1;return!0}function intersectsLinearRingMultiArray(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g){const k=n[g];if(intersectsLinearRingArray(t,e,k,r,i))return!0;e=k[k.length-1]}return!1}function lineStringLength(t,e,n,r){let i=t[e],g=t[e+1],y=0;for(let k=e+r;k<n;k+=r){const L=t[k],$=t[k+1];y+=Math.sqrt((L-i)*(L-i)+($-g)*($-g)),i=L,g=$}return y}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$3(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,g=[],y=[];for(let L=0,$=i.length;L<$;++L){const V=i[L];extend$3(g,V.getFlatCoordinates()),y.push(g.length)}const k=i.length===0?this.getLayout():i[0].getLayout();this.setFlatCoordinates(k,g),this.ends_=y}}appendLineString(e){extend$3(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 g=0;for(let y=0,k=n.length;y<k;++y){const L=n[y],$=new LineString(e.slice(g,L),r);i.push($),g=L}return i}getFlatMidpoints(){const e=[],n=this.flatCoordinates;let r=0;const i=this.ends_,g=this.stride;for(let y=0,k=i.length;y<k;++y){const L=i[y],$=interpolatePoint(n,r,L,g,.5);extend$3(e,$),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 g=this.flatCoordinates,y=squaredDistance$1(e,n,g[0],g[1]);if(y<i){const k=this.stride;for(let L=0;L<k;++L)r[L]=g[L];return r.length=k,y}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$3(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 g=this.flatCoordinates,y=this.stride;for(let k=0,L=g.length;k<L;k+=y){const $=squaredDistance$1(e,n,g[k],g[k+1]);if($<i){i=$;for(let V=0;V<y;++V)r[V]=g[k+V];r.length=y}}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 g=0,y=e.length;g<y;g+=r){const k=new Point(e.slice(g,g+r),n);i.push(k)}return i}getType(){return"MultiPoint"}intersectsExtent(e){const n=this.flatCoordinates,r=this.stride;for(let i=0,g=n.length;i<g;i+=r){const y=n[i],k=n[i+1];if(containsXY(e,y,k))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,g,y){let k,L,$,V,z,j,oe;const re=i[g+1],ie=[];for(let de=0,pe=n.length;de<pe;++de){const le=n[de];for(V=t[le-r],j=t[le-r+1],k=e;k<le;k+=r)z=t[k],oe=t[k+1],(re<=j&&oe<=re||j<=re&&re<=oe)&&($=(re-j)/(oe-j)*(z-V)+V,ie.push($)),V=z,j=oe}let ae=NaN,ue=-1/0;for(ie.sort(ascending),V=ie[0],k=1,L=ie.length;k<L;++k){z=ie[k];const de=Math.abs(z-V);de>ue&&($=(V+z)/2,linearRingsContainsXY(t,e,n,r,$,re)&&(ae=$,ue=de)),V=z}return isNaN(ae)&&(ae=i[g]),y?(y.push(ae,re,ue),y):[ae,re,ue]}function getInteriorPointsOfMultiArray(t,e,n,r,i){let g=[];for(let y=0,k=n.length;y<k;++y){const L=n[y];g=getInteriorPointOfArray(t,e,L,r,i,2*y,g),e=L[L.length-1]}return g}function coordinates(t,e,n,r){for(;e<n-r;){for(let i=0;i<r;++i){const g=t[e+i];t[e+i]=t[n-r+i],t[n-r+i]=g}e+=r,n-=r}}function linearRingIsClockwise(t,e,n,r){let i=0,g=t[n-r],y=t[n-r+1];for(;e<n;e+=r){const k=t[e],L=t[e+1];i+=(k-g)*(L+y),g=k,y=L}return i===0?void 0:i>0}function linearRingsAreOriented(t,e,n,r,i){i=i!==void 0?i:!1;for(let g=0,y=n.length;g<y;++g){const k=n[g],L=linearRingIsClockwise(t,e,k,r);if(g===0){if(i&&L||!i&&!L)return!1}else if(i&&!L||!i&&L)return!1;e=k}return!0}function linearRingssAreOriented(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g){const k=n[g];if(!linearRingsAreOriented(t,e,k,r,i))return!1;k.length&&(e=k[k.length-1])}return!0}function orientLinearRings(t,e,n,r,i){i=i!==void 0?i:!1;for(let g=0,y=n.length;g<y;++g){const k=n[g],L=linearRingIsClockwise(t,e,k,r);(g===0?i&&L||!i&&!L:i&&!L||!i&&L)&&coordinates(t,e,k,r),e=k}return e}function orientLinearRingsArray(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g)e=orientLinearRings(t,e,n[g],r,i);return e}function inflateEnds(t,e){const n=[];let r=0,i=0,g;for(let y=0,k=e.length;y<k;++y){const L=e[y],$=linearRingIsClockwise(t,r,L,2);if(g===void 0&&(g=$),$===g)n.push(e.slice(i,y+1));else{if(n.length===0)continue;n[n.length-1].push(e[i])}i=y+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$3(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 g=0;for(let y=0,k=r.length;y<k;++y){const L=r[y],$=new LinearRing(n.slice(g,L),e);i.push($),g=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],g=[e,n,e,i,r,i,r,n,e,n];return new Polygon(g,"XY",[g.length])}function linearRingss(t,e,n,r){const i=[];let g=createEmpty();for(let y=0,k=n.length;y<k;++y){const L=n[y];g=createOrUpdateFromFlatCoordinates(t,e,L[0],r),i.push((g[0]+g[2])/2,(g[1]+g[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,g=[],y=[];for(let k=0,L=i.length;k<L;++k){const $=i[k],V=g.length,z=$.getEnds();for(let j=0,oe=z.length;j<oe;++j)z[j]+=V;extend$3(g,$.getFlatCoordinates()),y.push(z)}n=i.length===0?this.getLayout():i[0].getLayout(),e=g,r=y}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$3(this.flatCoordinates,e.getFlatCoordinates()),n=e.getEnds().slice();for(let i=0,g=n.length;i<g;++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 g=this.endss_[e-1];n=g[g.length-1]}const r=this.endss_[e].slice(),i=r[r.length-1];if(n!==0)for(let g=0,y=r.length;g<y;++g)r[g]-=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 g=0;for(let y=0,k=r.length;y<k;++y){const L=r[y].slice(),$=L[L.length-1];if(g!==0)for(let z=0,j=L.length;z<j;++z)L[z]-=g;const V=new Polygon(n.slice(g,$),e,L);i.push(V),g=$}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,g,y){this.styleFunction,this.extent_,this.id_=y,this.type_=e,this.flatCoordinates_=n,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r||null,this.properties_=g,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,g=r.length;i<g;++i){const y=r[i],k=interpolatePoint(e,n,y,2,.5);extend$3(this.flatMidpoints_,k),n=y}}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,g,y){const k=new XMLHttpRequest;k.open("GET",typeof t=="function"?t(n,r,i):t,!0),e.getType()=="arraybuffer"&&(k.responseType="arraybuffer"),k.withCredentials=withCredentials,k.onload=function(L){if(!k.status||k.status>=200&&k.status<300){const $=e.getType();try{let V;$=="text"||$=="json"?V=k.responseText:$=="xml"?V=k.responseXML||k.responseText:$=="arraybuffer"&&(V=k.response),V?g(e.readFeatures(V,{extent:n,featureProjection:i}),e.readProjection(V)):y()}catch{y()}}else y()},k.onerror=y,k.send()}function xhr(t,e){return function(n,r,i,g,y){const k=this;loadFeaturesXhr(t,e,n,r,i,function(L,$){k.addFeatures(L),g!==void 0&&g(L)},y||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 g=this.idIndex_[i];g instanceof RenderFeature?Array.isArray(g)?g.push(n):this.idIndex_[i]=[g,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 g=0,y=e.length;g<y;g++){const k=e[g],L=getUid(k);this.addToIndex_(L,k)&&r.push(k)}for(let g=0,y=r.length;g<y;g++){const k=r[g],L=getUid(k);this.setupChangeEvents_(L,k);const $=k.getGeometry();if($){const V=$.getExtent();n.push(V),i.push(k)}else this.nullGeometryFeatures_[L]=k}if(this.featuresRtree_&&this.featuresRtree_.load(n,i),this.hasListener(VectorEventType.ADDFEATURE))for(let g=0,y=r.length;g<y;g++)this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE,r[g]))}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 g=i.getGeometry();if(g instanceof RenderFeature||g.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 g=n(r);if(g)return g}})}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$3(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(g=>this.featuresRtree_.getInExtent(g)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,n){const r=e[0],i=e[1];let g=null;const y=[NaN,NaN];let k=1/0;const L=[-1/0,-1/0,1/0,1/0];return n=n||TRUE,this.featuresRtree_.forEachInExtent(L,function($){if(n($)){const V=$.getGeometry(),z=k;if(k=V instanceof RenderFeature?0:V.closestPointXY(r,i,y,k),k<z){g=$;const j=Math.sqrt(k);L[0]=r-j,L[1]=i-j,L[2]=r+j,L[3]=i+j}}}),g}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 y=i.getExtent();r in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[r],this.featuresRtree_&&this.featuresRtree_.insert(y,n)):this.featuresRtree_&&this.featuresRtree_.update(y,n)}const g=n.getId();if(g!==void 0){const y=g.toString();this.idIndex_[y]!==n&&(this.removeFromIdIndex_(n),this.idIndex_[y]=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_,g=this.strategy_(e,n,r);for(let y=0,k=g.length;y<k;++y){const L=g[y];i.forEachInExtent(L,function(V){return containsExtent(V.extent,L)})||(++this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADSTART)),this.loader_.call(this,L,n,r,V=>{--this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADEND,void 0,V))},()=>{--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 g=i.toString(),y=this.idIndex_[g];y===e?delete this.idIndex_[g]:Array.isArray(y)&&(y.splice(y.indexOf(e),1),y.length===1&&(this.idIndex_[g]=y[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],g,y,k;return g=n*3.240969941904521+r*-1.537383177570093+i*-.498610760293,y=n*-.96924363628087+r*1.87596750150772+i*.041555057407175,k=n*.055630079696993+r*-.20397695888897+i*1.056971514242878,g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g=g*12.92,y=y>.0031308?1.055*Math.pow(y,1/2.4)-.055:y=y*12.92,k=k>.0031308?1.055*Math.pow(k,1/2.4)-.055:k=k*12.92,g=Math.min(Math.max(0,g),1),y=Math.min(Math.max(0,y),1),k=Math.min(Math.max(0,k),1),[g*255,y*255,k*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 g=n*.41239079926595+r*.35758433938387+i*.18048078840183,y=n*.21263900587151+r*.71516867876775+i*.072192315360733,k=n*.019330818715591+r*.11919477979462+i*.95053215224966;return e=e||xyz.whitepoint[2].E,[g*e[0],y*e[1],k*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,g,y,k,L,$,V,z,j,oe,re,ie;if(g=t[0],y=t[1],k=t[2],g===0)return[0,0,0];var ae=.0011070564598794539;return e=e||"D65",n=n||2,z=xyz.whitepoint[n][e][0],j=xyz.whitepoint[n][e][1],oe=xyz.whitepoint[n][e][2],re=4*z/(z+15*j+3*oe),ie=9*j/(z+15*j+3*oe),r=y/(13*g)+re||0,i=k/(13*g)+ie||0,$=g>8?j*Math.pow((g+16)/116,3):j*g*ae,L=$*9*r/(4*i)||0,V=$*(12-3*r-20*i)/(4*i)||0,[L,$,V]}};xyz.luv=function(t,e,n){var r,i,g,y,k,L,$,V,z,j,oe,re,ie,ae=.008856451679035631,ue=903.2962962962961;e=e||"D65",n=n||2,z=xyz.whitepoint[n][e][0],j=xyz.whitepoint[n][e][1],oe=xyz.whitepoint[n][e][2],re=4*z/(z+15*j+3*oe),ie=9*j/(z+15*j+3*oe),L=t[0],$=t[1],V=t[2],r=4*L/(L+15*$+3*V)||0,i=9*$/(L+15*$+3*V)||0;var de=$/j;return g=de<=ae?ue*de:116*Math.pow(de,1/3)-16,y=13*g*(r-re),k=13*g*(i-ie),[g,y,k]};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,g,y;return y=r/360*2*Math.PI,i=n*Math.cos(y),g=n*Math.sin(y),[e,i,g]},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),g=Math.atan2(r,n),y=g*360/2/Math.PI;return y<0&&(y+=360),[e,i,y]},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 V,z;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 g=t.slice(1),y=g.length,k=y<=4;r=1,k?(n=[parseInt(g[0]+g[0],16),parseInt(g[1]+g[1],16),parseInt(g[2]+g[2],16)],y===4&&(r=parseInt(g[3]+g[3],16)/255)):(n=[parseInt(g[0]+g[1],16),parseInt(g[2]+g[3],16),parseInt(g[4]+g[5],16)],y===8&&(r=parseInt(g[6]+g[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 $=i==="cmyk"?4:i==="gray"?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=n.shift()),n=n.map(function(j,oe){if(j[j.length-1]==="%")return j=parseFloat(j)/100,oe===3?j:i==="rgb"?j*255:i[0]==="h"||i[0]==="l"&&!oe?j*100:i==="lab"?j*125:i==="lch"?oe<2?j*150:j*360:i[0]==="o"&&!oe?j:i==="oklab"?j*.4:i==="oklch"?oe<2?j*.4:j*360:j;if(i[oe]==="h"||oe===2&&i[i.length-1]==="h"){if(baseHues[j]!==void 0)return baseHues[j];if(j.endsWith("deg"))return parseFloat(j);if(j.endsWith("turn"))return parseFloat(j)*360;if(j.endsWith("grad"))return parseFloat(j)*360/400;if(j.endsWith("rad"))return parseFloat(j)*180/Math.PI}return j==="none"?0:parseFloat(j)}),r=n.length>$?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(j){return parseFloat(j)}),i=((z=(V=t.match(/([a-z])/ig))==null?void 0:V.join(""))==null?void 0:z.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,g,y,k,L,$=0;if(n===0)return L=r*255,[L,L,L];for(g=r<.5?r*(1+n):r+n-r*n,i=2*r-g,k=[0,0,0];$<3;)y=e+1/3*-($-1),y<0?y++:y>1&&y--,L=6*y<1?i+(g-i)*6*y:2*y<1?g:3*y<2?i+(g-i)*(2/3-y)*6:i,k[$++]=L*255;return k}};rgb.hsl=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),g=Math.max(e,n,r),y=g-i,k,L,$;return g===i?k=0:e===g?k=(n-r)/y:n===g?k=2+(r-e)/y:r===g&&(k=4+(e-n)/y),k=Math.min(k*60,360),k<0&&(k+=360),$=(i+g)/2,g===i?L=0:$<=.5?L=y/(g+i):L=y/(2-g-i),[k,L*100,$*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],g=e[r];if(!i&&!g)break;if(i!==g){if(!i){t.appendChild(g);continue}if(!g){t.removeChild(i),--r;continue}t.insertBefore(g,i)}}}function listenImage(t,e,n){const r=t;let i=!0,g=!1,y=!1;const k=[listenOnce(r,EventType.LOAD,function(){y=!0,g||e()})];return r.src&&IMAGE_DECODE?(g=!0,r.decode().then(function(){i&&e()}).catch(function(L){i&&(y?e():n())})):k.push(listenOnce(r,EventType.ERROR,n)),function(){i=!1,k.forEach(unlistenByKey)}}function load(t,e){return new Promise((n,r)=>{function i(){y(),n(t)}function g(){y(),r(new Error("Image load error"))}function y(){t.removeEventListener("load",i),t.removeEventListener("error",g)}t.addEventListener("load",i),t.addEventListener("error",g)})}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,g){const y=getCacheKey$1(e,n,r),k=y in this.cache_;this.cache_[y]=i,g&&(i.getImageState()===ImageState.IDLE&&i.load(),i.getImageState()===ImageState.LOADING?i.ready().then(()=>{this.patternCache_[y]=getSharedCanvasContext2D().createPattern(i.getImage(1),"repeat")}):this.patternCache_[y]=getSharedCanvasContext2D().createPattern(i.getImage(1),"repeat")),k||++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,g){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=r,this.canvas_={},this.color_=g,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,g){let y=e===void 0?void 0:shared.get(e,n,i);return y||(y=new IconImage(t,t&&"src"in t?t.src||void 0:e,n,r,i),shared.set(e,n,i,y,g)),g&&y&&!shared.getPattern(e,n,i)&&shared.set(e,n,i,y,g),y}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 g=e[r+1];g!==void 0&&(n[fontRegExMatchIndex[r]]=g)}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 g,y;function k($,V,z){let j=!0;for(let oe=0;oe<r;++oe){const re=n[oe];if(y=measureTextWidth($+" "+V+" "+e+re,i),z!=re){const ie=measureTextWidth($+" "+V+" "+e+z+","+re,i);j=j&&ie!=y}}return!!j}function L(){let $=!0;const V=checkedFonts.getKeys();for(let z=0,j=V.length;z<j;++z){const oe=V[z];if(checkedFonts.get(oe)<100){const[re,ie,ae]=oe.split(`
|
|
53
|
+
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$1="--",LOG_DATE_FORMAT_T="YYYY-MM-DDTHH:mm:ss",LOG_DATE_FORMAT_END="YYYY-MM-DDT23:59:59",DATE_PICKER_FORMAT="YYYY-MM-DD",CDN_URL$1="https://static.zhihaoscm.cn/",dateFormat=(t,e=DATE_PICKER_FORMAT)=>t?hooks(t).format(e).replace("Invalid date",DEFAULT_VALUE$1):DEFAULT_VALUE$1,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 g="";for(let y=0;y<e.length;y++)g+=(n[Math.floor(t*10*Math.pow(10,y))%10]+e[y]).replace(/零./,"");g=g||"整",t=Math.floor(t);for(let y=0;y<r[0].length&&t>0;y++){let k="";for(let L=0;L<r[1].length&&t>0;L++)k=n[t%10]+r[1][L]+k,t=Math.floor(t/10);g=k.replace(/(零.)*零$/,"").replace(/^$/,"零")+r[0][y]+g}return i+g.replace(/(零.)*零元/,"元").replace(/(零.)+/g,"零").replace(/^整$/,"零元整")}function hexToRgb(t){let e=t.replace(/^#/,"");e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const n=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),i=parseInt(e.slice(4,6),16);return[n,r,i]}function calculateBrightness(t){const[e,n,r]=t;return .299*e+.587*n+.114*r}function getForegroundColor(t,e=128){t==="white"&&(t="#fff"),t==="black"&&(t="#000");const n=hexToRgb(t);return calculateBrightness(n)>e?"black":"white"}const _sfc_main$u=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=k=>Array.isArray(k)?[dateFormat(k[0],LOG_DATE_FORMAT_T),dateFormat(k[1],LOG_DATE_FORMAT_END)]:k&&dateFormat(k,LOG_DATE_FORMAT_T),g=k=>{const L=i(k);r("update:modelValue",L)},y=k=>{const L=i(k);r("change",L)};return(k,L)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([n.class,"zh-date-picker"])},[vue.createVNode(vue.unref(ElDatePicker),vue.mergeProps(k.$attrs,{style:n.style,"model-value":n.modelValue,"onUpdate:modelValue":g,onChange:y}),null,16,["style","model-value"])],2))}}),ZhDatePicker=withInstall$1(_sfc_main$u),_hoisted_1$k={class:"info-pair"},_hoisted_2$e={class:"info-pair--title"},_hoisted_3$d={key:0,class:"info-pair--title--tip"},_sfc_main$t=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$k,[vue.createElementVNode("div",_hoisted_2$e,[vue.createTextVNode(vue.toDisplayString(e.title)+" ",1),n.tip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$d,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)),1)])],2)]))}}),ZhDetailSubTitle=withInstall$1(_sfc_main$t),_hoisted_1$j={class:"title"},_hoisted_2$d={key:0,class:"sub-title"},_hoisted_3$c={class:"zh-dialog__footer"},_sfc_main$s=vue.defineComponent({name:"ZhDialog",inheritAttrs:!1,__name:"Dialog",props:vue.mergeModels({title:{},subTitle:{},cancelButtonText:{default:"取消"},confirmButtonText:{default:"确定"},confirmButtonDisabled:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!1},size:{default:"middle"},width:{},appendToBody:{type:Boolean},appendTo:{},beforeClose:{},destroyOnClose:{type:Boolean},closeOnPressEscape:{type:Boolean},lockScroll:{type:Boolean},modal:{type:Boolean},openDelay:{},closeDelay:{},top:{},modelValue:{type:Boolean},modalClass:{},zIndex:{},trapFocus:{type:Boolean},headerAriaLevel:{},center:{type:Boolean},alignCenter:{type:Boolean},closeIcon:{},draggable:{type:Boolean},overflow:{type:Boolean},fullscreen:{type:Boolean},showClose:{type:Boolean},ariaLevel:{}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:vue.mergeModels(["submit","close"],["update:modelValue"]),setup(t,{emit:e}){const n=t,r=vue.useModel(t,"modelValue"),i=e,g=()=>{i("close")},y=()=>{i("submit")},k=()=>{i("close")},L={small:"400px",middle:"600px",large:"800px",extraLarge:"920px"},$=vue.computed(()=>n.width?n.width:L[n.size]);return(V,z)=>(vue.openBlock(),vue.createBlock(vue.unref(ElDialog),vue.mergeProps({modelValue:r.value,"onUpdate:modelValue":z[0]||(z[0]=j=>r.value=j),class:"zh-dialog"},V.$attrs,{width:$.value,"close-on-click-modal":V.closeOnClickModal,onClose:k}),{header:vue.withCtx(()=>[vue.renderSlot(V.$slots,"header",{},()=>[vue.createElementVNode("div",_hoisted_1$j,vue.toDisplayString(V.title),1),V.subTitle?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$d,vue.toDisplayString(V.subTitle),1)):vue.createCommentVNode("",!0)])]),footer:vue.withCtx(()=>[vue.renderSlot(V.$slots,"footer",{},()=>[vue.createElementVNode("div",_hoisted_3$c,[vue.createVNode(ZhButton$1,{onClick:g},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(V.cancelButtonText),1)]),_:1}),vue.createVNode(ZhButton$1,{type:"primary",disabled:V.confirmButtonDisabled,onClick:y},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(V.confirmButtonText),1)]),_:1},8,["disabled"])])])]),default:vue.withCtx(()=>[vue.renderSlot(V.$slots,"default")]),_:3},16,["modelValue","width","close-on-click-modal"]))}}),ZhDialog=withInstall$1(_sfc_main$s),_hoisted_1$i={class:"info-pair"},_hoisted_2$c={class:"info-pair--title"},_hoisted_3$b={key:0,class:"info-pair--title--tip"},_sfc_main$r=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$i,[vue.createElementVNode("div",_hoisted_2$c,[vue.createTextVNode(vue.toDisplayString(e.title)+" ",1),n.tip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$b,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)),1)],!0)],2)]))}}),EditInfoPair=_export_sfc(_sfc_main$r,[["__scopeId","data-v-c62707eb"]]),ZhEditInfoPair=withInstall$1(EditInfoPair),_hoisted_1$h={class:"file_wrapper"},_hoisted_2$b={key:0,class:"header"},_hoisted_3$a={class:"file_main"},_hoisted_4$6={class:"file"},_hoisted_5$6={class:"file_name"},_sfc_main$q=vue.defineComponent({name:"zh-file-wrapper",__name:"FileWrapper",props:{downLoadUrl:{type:String,default:""},canPreview:{type:Boolean,default:!1},fileName:{type:String,default:DEFAULT_VALUE$1},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(g,y)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$h,[n.title?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$b,vue.toDisplayString(n.title),1)):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_3$a,[vue.createElementVNode("div",_hoisted_4$6,[y[0]||(y[0]=vue.createElementVNode("div",{class:"file_type mr-12"},[vue.createElementVNode("i",{class:"iconfont icon-xiangmuguanli"})],-1)),vue.createElementVNode("div",_hoisted_5$6,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(()=>y[1]||(y[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$q,[["__scopeId","data-v-d98ece31"]]),ZhFileWrapper=withInstall$1(FileWrapper),_sfc_main$p=vue.defineComponent({name:"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:16}},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=oe=>{let re=oe.target.innerWidth;switch(!!re){case re<768:i.value="xs";break;case(re>=768&&re<992):i.value="sm";break;case(re>=992&&re<1200):i.value="md";break;case(re>=1200&&re<1920):i.value="lg";break;case re>=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 g=vue.ref(-1);vue.provide("shouldHiddenIndex",g);const y=vue.computed(()=>typeof n.cols=="object"?n.cols[i.value]??n.cols:n.cols);vue.provide("cols",y);const k=vue.useSlots().default(),L=()=>{var ae,ue,de,pe;let oe=[],re=null;k.forEach(le=>{var he;typeof le.type=="object"&&le.type.name==="GridItem"&&((he=le.props)==null?void 0:he.suffix)!==void 0&&(re=le),typeof le.type=="symbol"&&Array.isArray(le.children)&&oe.push(...le.children)});let ie=0;re&&(ie=(((ae=re.props[i.value])==null?void 0:ae.span)??((ue=re.props)==null?void 0:ue.span)??1)+(((de=re.props[i.value])==null?void 0:de.offset)??((pe=re.props)==null?void 0:pe.offset)??0));try{let le=!1;oe.reduce((he=0,_e,Ce)=>{var xe,Ie,Oe,$e;if(he+=(((xe=_e.props[i.value])==null?void 0:xe.span)??((Ie=_e.props)==null?void 0:Ie.span)??1)+(((Oe=_e.props[i.value])==null?void 0:Oe.offset)??(($e=_e.props)==null?void 0:$e.offset)??0),Number(he)>n.collapsedRows*y.value-ie)throw g.value=Ce,le=!0,"find it";return he},0),le||(g.value=-1)}catch{}};vue.watch(()=>i.value,()=>{n.collapsed&&L()}),vue.watch(()=>n.collapsed,oe=>{if(oe)return L();g.value=-1});const $=vue.computed(()=>typeof n.gap=="number"?`${n.gap}px`:Array.isArray(n.gap)?`${n.gap[1]}px ${n.gap[0]}px`:"unset"),V=vue.computed(()=>({display:"grid",gridGap:$.value,gridTemplateColumns:`repeat(${y.value}, minmax(0, 1fr))`})),z=vue.inject("clearGridItemData",()=>{}),j=vue.ref(!1);return vue.onMounted(()=>{j.value=!0}),vue.onBeforeUpdate(()=>{j.value=!1,z()}),vue.onUpdated(()=>{j.value=!0}),vue.provide("isRegistrationComplete",j),e({breakPoint:i}),(oe,re)=>(vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle(V.value)},[vue.renderSlot(oe.$slots,"default")],4))}}),_sfc_main$o=vue.defineComponent({name:"GridItem",__name:"GridItem",props:{offset:{default:0},span:{default:1},suffix:{type:Boolean,default:!1},xs:{default:void 0},sm:{default:void 0},md:{default:void 0},lg:{default:void 0},xl:{default:void 0},label:{}},setup(t){const e=t,n=vue.useAttrs(),r=vue.ref(!0),i=vue.inject("breakPoint",vue.ref("xl")),g=vue.inject("shouldHiddenIndex",vue.ref(-1));vue.watch(()=>[g.value,i.value],de=>{n.index&&(r.value=!(de[0]!==-1&&parseInt(n.index)>=Number(de[0])))},{immediate:!0});const y=vue.inject("gap",0),k=vue.inject("cols",vue.ref(4)),L=vue.computed(()=>{var le,he;let de=((le=e[i.value])==null?void 0:le.span)??e.span,pe=((he=e[i.value])==null?void 0:he.offset)??e.offset;return e.suffix?{gridColumnStart:k.value-de-pe+1,gridColumnEnd:`span ${de+pe}`,marginLeft:pe!==0?`calc(((100% + ${y}px) / ${de+pe}) * ${pe})`:"unset"}:{gridColumn:`span ${de+pe>k.value?k.value:de+pe}/span ${de+pe>k.value?k.value:de+pe}`,marginLeft:pe!==0?`calc(((100% + ${y}px) / ${de+pe}) * ${pe})`:"unset"}}),$=vue.inject("gridItemData",vue.reactive({})),V=vue.inject("isMultiGrid",vue.ref(!1)),z=vue.ref(null),j=vue.ref(0),oe=vue.ref(0),re=vue.inject("registerGridItem",null),ie=vue.inject("getColumnData",null),ae=vue.inject("isRegistrationComplete",vue.ref(!1)),ue=()=>{if(z.value&&re){const de=z.value.parentElement;if(de){const pe=z.value.offsetLeft,le=de.offsetWidth/k.value;oe.value=Math.floor(pe/le)+1,le&&re(oe.value,e.label||"")}}};return vue.watchEffect(()=>{if(V.value&&ae.value&&e.label&&z.value&&(ue(),ie)){const de=ie(oe.value);j.value=de.maxWidth||0}}),vue.watch($,()=>{if(ie){const de=ie(oe.value);de.maxWidth!==j.value&&(j.value=de.maxWidth)}}),(de,pe)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",{style:vue.normalizeStyle(L.value),ref_key:"gridItemRef",ref:z},[vue.renderSlot(de.$slots,"default",{maxLabelWidthInCol:j.value,columnIndex:oe.value})],4)),[[vue.vShow,r.value]])}}),DEFAULT_FONT_SIZE=12;function findItemNested(t,e,n,r){return t.reduce((i,g)=>{if(i)return i;if(g[n]===e)return g;if(g[r])return findItemNested(g[r],e,n,r)},null)}function getValueByProp(t,e,n){const r=isUndefined$2(n)?DEFAULT_VALUE$1:n,i=get$5(t,e);return isNil(i)||i===""?r:i}const $get=getValueByProp;function handleProp(t){const e=t.split(".");return e.length==1?t:e[e.length-1]}function filterEnum(t,e,n,r){const i=(n==null?void 0:n.value)??"value",g=(n==null?void 0:n.label)??"label",y=(n==null?void 0:n.children)??"children";let k={};return Array.isArray(e)&&(k=findItemNested(e,t,i,y)),r=="tag"?k!=null&&k.tagType?k.tagType:"":k?k[g]:DEFAULT_VALUE$1}function filterEnumObj(t,e,n){const r="value",i="children";let g={};return Array.isArray(e)&&(g=findItemNested(e,t,r,i)),g}function formatValue(t){return isArray$2(t)?t.length?t.join(" / "):DEFAULT_VALUE$1:t??DEFAULT_VALUE$1}function handleRowAccordingToProp(t,e){return e.includes(".")?(e.split(".").forEach(n=>t=t[n]??DEFAULT_VALUE$1),t):t[e]??DEFAULT_VALUE$1}const getWidthByText=(t,e)=>{const n=e||DEFAULT_FONT_SIZE,i=document.createElement("canvas").getContext("2d");return i.font=`${n}px Microsoft YaHei`,i.measureText(t).width},useColSetting=t=>{const e=t||"zhihao-col-setting",n=()=>{const k=localStorage.getItem(e);return k?JSON.parse(k):{}},r=k=>{localStorage.setItem(e,JSON.stringify(k))};return{getMap:n,setMap:r,getColumnCache:k=>n()[k]||[],setColumnCache:(k,L)=>{const $=n();$[k]=L,r($)},removeColumnCache:k=>{const L=n();delete L[k],r(L)}}},collectGridItems=()=>{let t=vue.reactive({});return{gridItemData:t,registerGridItem:(i,g)=>{var k;if(!g)return;t[i]||(t[i]={labels:[],maxLength:0,maxWidth:0}),(k=t[i])==null||k.labels.push(g),t[i].maxLength=Math.max(g.length,t[i].maxLength);const y=Math.ceil(getWidthByText(g,14));t[i].maxWidth=Math.max(y||0,t[i].maxWidth)},getColumnData:i=>t[i]||{},clearGridItemData:()=>{t=vue.reactive({})}}},_hoisted_1$g={class:"multi-grid"},_sfc_main$n=vue.defineComponent({name:"MultiGrid",__name:"MultiGrid",setup(t){const{getColumnData:e,registerGridItem:n,clearGridItemData:r,gridItemData:i}=collectGridItems();return vue.provide("registerGridItem",n),vue.provide("getColumnData",e),vue.provide("clearGridItemData",r),vue.provide("gridItemData",i),vue.provide("isMultiGrid",vue.ref(!0)),(g,y)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[vue.renderSlot(g.$slots,"default")]))}}),ZhGrid=withInstall$1(_sfc_main$p),ZhGridItem=withInstall$1(_sfc_main$o),ZhMultiGrid=withInstall$1(_sfc_main$n),_hoisted_1$f={class:"info-pair"},_hoisted_2$a={class:"info-pair--title"},_hoisted_3$9={key:0,class:"info-pair--title--tip"},_sfc_main$m=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$f,[vue.createElementVNode("div",_hoisted_2$a,[vue.createTextVNode(vue.toDisplayString(e.title)+" ",1),n.tip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$9,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)),1)],!0)],2)]))}}),InfoPair=_export_sfc(_sfc_main$m,[["__scopeId","data-v-5a1b0655"]]),ZhInfoPair=withInstall$1(InfoPair),_sfc_main$l=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(g,y)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(n.class)},[vue.createVNode(vue.unref(ElInput),vue.mergeProps(g.$attrs,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=k=>r.value=k),size:g.size,onBlur:i}),vue.createSlots({_:2},[vue.renderList(g.$slots,(k,L)=>({name:k,fn:vue.withCtx($=>[vue.renderSlot(g.$slots,k,vue.normalizeProps(vue.guardReactiveProps($)),void 0,!0)])}))]),1040,["modelValue","size"])],2))}}),Input=_export_sfc(_sfc_main$l,[["__scopeId","data-v-ce1df798"]]),ZhInput=withInstall$1(Input),_sfc_main$k=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(),g=($,V=0,z=0,j=0)=>{let oe=($==null?void 0:$.toString())??"",re,ie,ae;return z===0?(oe=oe.replace(/[^\d]/g,""),oe=oe.replace(/^0\d+/g,"0"),V!==0&&(oe=oe.slice(0,V))):(oe=oe.replace(/[^\-\d.]/g,""),oe=oe.replace(/^[^\-\d]/g,""),oe=oe.replace(/\.{2}/g,"."),oe=oe.replace(/^0(\d+)/g,"$1"),re=oe.split(".")||[],re.length>1?(V===0?ie=re[0]:ie=re[0].slice(0,V),ae=re[1].slice(0,z),oe=ie+"."+ae):V!==0&&(oe=oe.slice(0,V))),j!==0&&(oe=oe.slice(0,j)),oe},y=()=>{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()))},k=$=>$?g($,i.integer,i.precision,i.maxLength):"",L=$=>{/^\d+\.0*$/.test(($==null?void 0:$.toString())||"")||$===""?r("update:modelValue",k($)):r("update:modelValue",Number(k($)))};return($,V)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["input-number",n.class]),style:vue.normalizeStyle(n.style)},[vue.createVNode(vue.unref(ElInput),vue.mergeProps($.$attrs,{"model-value":n.modelValue,"onUpdate:modelValue":L,onBlur:y,style:{width:"100%"},formatter:k}),vue.createSlots({_:2},[vue.renderList(Object.keys($.$slots),z=>({name:z,fn:vue.withCtx(j=>[vue.renderSlot($.$slots,z,vue.normalizeProps(vue.guardReactiveProps(j)),void 0,!0)])}))]),1040,["model-value"])],6))}}),InputNumber=_export_sfc(_sfc_main$k,[["__scopeId","data-v-920e8405"]]),ZhInputNumber=withInstall$1(InputNumber),_hoisted_1$e={class:"loading-box"},_sfc_main$j=vue.defineComponent({name:"zh-loading",__name:"Loading",setup(t){return(e,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$e,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$j,[["__scopeId","data-v-d30f17c3"]]),ZhLoading=withInstall$1(Loading),defaultOptions={type:"",showCancelButton:!0,showConfirmButton:!0,cancelButtonText:"取消",confirmButtonText:"确定",closeOnClickModal:!1,closeOnPressEscape:!1,showClose:!0,draggable:!1,center:!1,roundButton:!1},ZhMessageBox$1={confirm(t,e,n={}){return ElMessageBox.confirm(t,e,{...defaultOptions,...n,customClass:"zh-message-box zh-message-confirm"})},alert(t,e,n={}){return ElMessageBox.alert(t,e,{...defaultOptions,...n,showCancelButton:!1,customClass:"zh-message-box zh-message-alert"})},prompt(t,e,n={}){return ElMessageBox.prompt(t,e,{...defaultOptions,...n,customClass:"zh-message-box zh-message-prompt"})}},ZhConfirm=ZhMessageBox$1.confirm,ZhAlert=ZhMessageBox$1.alert,ZhPrompt=ZhMessageBox$1.prompt,ZhMessageBox=withInstall$1(ZhMessageBox$1),_sfc_main$i=vue.defineComponent({name:"zh-money-input",__name:"MoneyInput",props:vue.mergeModels({style:{},class:{},showTooltip:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=vue.useModel(t,"modelValue"),r=vue.computed(()=>{if(n.value)return validateNumber(n.value)&&Number(n.value)>=1e3?digitUppercase(Number(n.value)):""}),i=vue.ref(!1);return(g,y)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),{effect:"dark",content:r.value,placement:"top",visible:g.showTooltip&&i.value&&!!r.value},{default:vue.withCtx(()=>[vue.createVNode(InputNumber,vue.mergeProps(g.$attrs,{modelValue:n.value,"onUpdate:modelValue":y[0]||(y[0]=k=>n.value=k),style:e.style,class:e.class,onFocus:y[1]||(y[1]=()=>i.value=!0),onBlur:y[2]||(y[2]=()=>i.value=!1)}),vue.createSlots({_:2},[vue.renderList(Object.keys(g.$slots),k=>({name:k,fn:vue.withCtx(L=>[vue.renderSlot(g.$slots,k,vue.normalizeProps(vue.guardReactiveProps(L)),void 0,!0)])}))]),1040,["modelValue","style","class"])]),_:3},8,["content","visible"]))}}),MoneyInput=_export_sfc(_sfc_main$i,[["__scopeId","data-v-cfd94d9e"]]),ZhMoneyInput=withInstall$1(MoneyInput),_hoisted_1$d={class:"page-head"},_hoisted_2$9={class:"left-wrap"},_hoisted_3$8={class:"page-name"},_hoisted_4$5={class:"value"},_hoisted_5$5={class:"other-inform"},_hoisted_6$5={class:"label"},_hoisted_7$5={class:"value mg-r-24"},_hoisted_8$3={class:"status"},_sfc_main$h=vue.defineComponent({name:"zh-page-head-panel",__name:"PageHeadPanel",props:{dataSource:{}},setup(t){const e=t,{name:n,no:r,status:i,extendLabel:g,extendValue:y}=vue.toRefs(e.dataSource);return(k,L)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$d,[vue.createElementVNode("div",_hoisted_2$9,[vue.createElementVNode("span",_hoisted_3$8,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$5,vue.toDisplayString(vue.unref(r)),1)])]),vue.createElementVNode("div",_hoisted_5$5,[vue.renderSlot(k.$slots,"extend",{},()=>[vue.createElementVNode("span",_hoisted_6$5,vue.toDisplayString(vue.unref(g)),1),vue.createElementVNode("span",_hoisted_7$5,vue.toDisplayString(vue.unref(y)),1)],!0),vue.createElementVNode("span",_hoisted_8$3,vue.toDisplayString(vue.unref(i)),1)])]))}}),PageHeadPanel=_export_sfc(_sfc_main$h,[["__scopeId","data-v-9f56969d"]]),ZhPageHeadPanel=withInstall$1(PageHeadPanel),_sfc_main$g=vue.defineComponent({name:"zh-tool-tips",__name:"ToolTips",props:{placement:{default:"top"},content:{}},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$g,[["__scopeId","data-v-e5a0ae09"]]),ZhToolTips=withInstall$1(ToolTips),_sfc_main$f=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 g(){n.value=e.labelWidth}function y(){r.value=e.contentWidth}function k(){i.value=e.infoDirection}return vue.watch(()=>e.contentWidth,()=>y(),{immediate:!0}),vue.watch(()=>e.labelWidth,()=>g(),{immediate:!0}),vue.watch(()=>e.infoDirection,()=>k(),{immediate:!0}),(L,$)=>{const V=vue.resolveComponent("grid");return vue.openBlock(),vue.createBlock(V,{cols:L.cols,gap:L.gap},{default:vue.withCtx(()=>[vue.renderSlot(L.$slots,"default")]),_:3},8,["cols","gap"])}}}),ZhBaseInfo=withInstall$1(_sfc_main$f),_hoisted_1$c={class:"common-card"},_hoisted_2$8={class:"detail-header"},_hoisted_3$7={class:"detail-header--left"},_hoisted_4$4={class:"title common-title"},_hoisted_5$4={class:"info-pair--label"},_hoisted_6$4={class:"info-pair--value"},_hoisted_7$4={key:1,class:"detail-header--right"},_hoisted_8$2={class:"info-pair--label"},_hoisted_9$1={class:"info-pair--value"},_sfc_main$e=vue.defineComponent({name:"ZhDetailHeader",__name:"DetailHeader",props:{title:{},leftInfos:{},rightInfos:{},stateMeta:{},stateDesc:{}},setup(t){const e=vue.useSlots(),n=t;return(r,i)=>{var g,y;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$c,[vue.createElementVNode("div",null,[vue.renderSlot(r.$slots,"menu",{},void 0,!0)]),vue.createElementVNode("div",_hoisted_2$8,[vue.createElementVNode("div",_hoisted_3$7,[vue.createElementVNode("div",_hoisted_4$4,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,k=>(vue.openBlock(),vue.createElementBlock("div",{class:"info-pair",key:k.value},[vue.createElementVNode("div",_hoisted_5$4,vue.toDisplayString(k.label),1),vue.createElementVNode("div",_hoisted_6$4,vue.toDisplayString(k.value??vue.unref(DEFAULT_VALUE$1)),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$4,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.rightInfos,k=>(vue.openBlock(),vue.createElementBlock("div",{class:"info-pair",key:k.value},[vue.createElementVNode("div",_hoisted_8$2,vue.toDisplayString(k.label),1),vue.createElementVNode("div",_hoisted_9$1,vue.toDisplayString(k.value??vue.unref(DEFAULT_VALUE$1)),1)]))),128)),r.stateDesc||r.stateMeta?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(["state common-title",(g=r.stateMeta)==null?void 0:g.state])},vue.toDisplayString(r.stateDesc||((y=r.stateMeta)==null?void 0:y.intro)),3)):vue.createCommentVNode("",!0)]))])])}}}),DetailHeader=_export_sfc(_sfc_main$e,[["__scopeId","data-v-8b185816"]]),ZhDetailHeader=withInstall$1(DetailHeader);var DIY_DATA_TYPE=(t=>(t.AUTOCOMPLETE="autocomplete",t.FORMAT="format",t.TEXT="text",t))(DIY_DATA_TYPE||{});const _hoisted_1$b={key:0},_hoisted_2$7={key:1,class:"col-edit-header"},_hoisted_3$6=["onClick"],_hoisted_4$3={key:0},_hoisted_5$3={class:"header-operation-container"},_hoisted_6$3={class:"operation-container"},_hoisted_7$3=["onClick"],ZH_DIV="$ZH_DIV$",_sfc_main$d=vue.defineComponent({name:"zh-diy-data-table",__name:"DiyDataTable",props:vue.mergeModels({isEdit:{type:Boolean,default:!1},maxRowLength:{default:50},maxColLength:{default:10},defaultMinWidth:{default:120},beforeAddRow:{},addRowText:{default:"增行"},addColumnText:{default:"增列"},customAddRow:{type:Boolean,default:!0},customAddColumn:{type:Boolean,default:!0}},{rawData:{required:!0},rawDataModifiers:{}}),emits:["update:rawData"],setup(t,{expose:e}){const n=t,r=vue.useModel(t,"rawData"),i=vue.ref([]),g=()=>{if(r.value.length===n.maxRowLength){ElMessage({message:`最多添加${n.maxRowLength}行`,type:"warning"});return}let re={};n.beforeAddRow&&(re=n.beforeAddRow(r.value)),r.value.push(re)},y=()=>{if(i.value.filter(ae=>ae.isAdd).length>=n.maxColLength){ElMessage({message:`最多添加${n.maxColLength}列`,type:"warning"});return}const ie=String(Date.now());i.value.push({prop:ie,label:"",isEditHeader:!0,isAdd:!0,maxlength:15,minWidth:150,headerMaxlength:15})},k=(re,ie)=>{i.value.splice(re,1),r.value.forEach(ae=>{delete ae[ie.prop]})},L=re=>{re===0&&i.value.forEach(ie=>{ie.isSameData&&(r.value[1][ie.prop]=r.value[0][ie.prop])}),r.value.splice(re,1)},$=(re,ie,ae)=>{ie(ae.completeList.filter(ue=>ue.includes(re)).map(ue=>({value:ue})))},V=re=>[{validator:(ie,ae,ue)=>{if(!i.value[re].label){ue(new Error("请输入表头"));return}ue()},message:"请输入表头",trigger:["blur","change"]}],z=re=>{const ie=[];return re.required&&ie.push({required:!0,message:"请输入"+re.label,trigger:re.slot?void 0:"blur"}),re.varidate&&ie.push({validator:(ae,ue,de)=>{const pe=re.varidate(ue);pe!==!0?de(new Error(pe)):de()},trigger:re.slot?void 0:"blur"}),ie},j=(re,ie)=>{let ae=re;return ie.isSameData&&(ae=r.value[0]||DEFAULT_VALUE$1),ie.formatter?ie.showFormatter?ie.type===DIY_DATA_TYPE.FORMAT?ie.showFormatter(ie.formatter(ae)):ie.showFormatter(ae[ie.prop]):ie.formatter(ae[ie.prop]):ae[ie.prop]||DEFAULT_VALUE$1},oe=vue.ref();return e({initData:(re,ie)=>{console.log("initData",re,ie),re=cloneDeep(re)||[],re.length===0&&re.push({}),ie=[...ie];for(const ae in re[0])if(!ie.some(ue=>ue.prop===ae)){const ue=Date.now()+ae,de=ae.split(ZH_DIV);if(de.length!==2){console.log("keySplit 失败",ae);continue}const pe=Number(de[1]);ie[pe]={prop:ae,isEditHeader:!0,label:de[0],key:ue,isAdd:!0,maxlength:15,headerMaxlength:15}}r.value=re,i.value=ie},getData:async()=>{await oe.value.validate();for(const ie in i.value){const ae=i.value[ie];for(const ue of i.value)if(ae.prop!==ue.prop&&ae.label===ue.label){ElMessage({message:"所有列的表头不可重复",type:"warning"});return}}const re=cloneDeep(r.value);for(const ie in re){const ae=re[ie];for(const ue in i.value){const de=i.value[ue];if(de.isSameData&&ie!=="0"&&(ae[de.prop]=re[0][de.prop]),de.varidate&&!de.varidate(ae[de.prop]))return;if(de.isAdd){const pe=ae[de.prop];delete ae[de.prop];const le=de.label+ZH_DIV+ue;ae[le]=pe}de.formatter&&de.type===DIY_DATA_TYPE.FORMAT&&(ae[de.prop]=de.formatter(ae))}}return console.log("DiyDataTable 获取数据",re,i.value),{data:re,columns:i.value}},updateColumn:(re,ie)=>{const ae=i.value[re].prop;if(i.value[re]=ie,ae!==ie.prop)for(const ue of r.value)ue[ie.prop]=ue[ae],delete ue[ae]},resetColumns:re=>{const ae=i.value.filter(de=>!de.isAdd).reduce((de,pe)=>(re.some(le=>le.prop===pe.prop)||de.push(pe.prop),de),[]);r.value.forEach(de=>{ae.forEach(pe=>{delete de[pe]})});const ue=re.filter(de=>de.isAdd);i.value=[...re,...ue]},onAddRow:g,onAddColumn:y}),(re,ie)=>(vue.openBlock(),vue.createBlock(vue.unref(ElForm),{class:"diy-data-table",model:t.rawData,ref_key:"formRef",ref:oe},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElTable),vue.mergeProps({data:r.value},re.$attrs),{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElTableColumn),{type:"index",label:"序号",width:"132",fixed:"left"}),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(i.value,(ae,ue)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTableColumn),{key:ae.key||ue,prop:ae.prop,label:ae.label,width:ae.width,"min-width":ae.minWidth||re.defaultMinWidth,fixed:ae.fixed},{header:vue.withCtx(()=>[re.isEdit?ae.isEditHeader?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$7,[vue.createVNode(vue.unref(ElFormItem),{prop:`columns.${ue}`,rules:V(ue)},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElInput),{modelValue:ae.label,"onUpdate:modelValue":de=>ae.label=de,maxlength:ae.headerMaxlength||20,placeholder:"请输入表头"},null,8,["modelValue","onUpdate:modelValue","maxlength"])]),_:2},1032,["prop","rules"]),ae.isAdd?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"iconfont icon-close",onClick:de=>k(ue,ae)},null,8,_hoisted_3$6)):vue.createCommentVNode("",!0)])):(vue.openBlock(),vue.createElementBlock("div",{key:2,class:vue.normalizeClass({"is-required-label":ae.required})},vue.toDisplayString(ae.label),3)):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$b,vue.toDisplayString(ae.label),1))]),default:vue.withCtx(de=>[n.isEdit&&(!ae.isSameData||de.$index===0)&&ae.type!==vue.unref(DIY_DATA_TYPE).TEXT?(vue.openBlock(),vue.createBlock(vue.unref(ElFormItem),{key:0,prop:`${de.$index}.${ae.prop}`,rules:z(ae),class:vue.normalizeClass(["col-edit-container",{"close-padding":ae.isAdd}])},{default:vue.withCtx(()=>[ae.type===vue.unref(DIY_DATA_TYPE).FORMAT&&ae.formatter?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$3,vue.toDisplayString(ae.showFormatter?ae.showFormatter(ae.formatter(de.row)):ae.formatter(de.row)),1)):ae.type===vue.unref(DIY_DATA_TYPE).AUTOCOMPLETE?(vue.openBlock(),vue.createBlock(vue.unref(ElAutocomplete),{key:1,modelValue:de.row[ae.prop],"onUpdate:modelValue":pe=>de.row[ae.prop]=pe,placeholder:ae.placeholder||"请输入","fetch-suggestions":(pe,le)=>$(pe,le,ae),maxlength:ae.maxlength||20},null,8,["modelValue","onUpdate:modelValue","placeholder","fetch-suggestions","maxlength"])):ae.slot?vue.renderSlot(re.$slots,ae.slot,{key:2,row:de.row,$index:de.$index},void 0,!0):(vue.openBlock(),vue.createBlock(vue.unref(ElInput),{key:3,modelValue:de.row[ae.prop],"onUpdate:modelValue":pe=>de.row[ae.prop]=pe,placeholder:ae.placeholder||"请输入",formatter:ae.formatter,parser:ae.parser,maxlength:ae.maxlength||20},null,8,["modelValue","onUpdate:modelValue","placeholder","formatter","parser","maxlength"]))]),_:2},1032,["prop","rules","class"])):ae.slot?vue.renderSlot(re.$slots,ae.slot,{key:1,row:de.row,$index:de.$index},void 0,!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:2},[vue.createTextVNode(vue.toDisplayString(j(de.row,ae)),1)],64))]),_:2},1032,["prop","label","width","min-width","fixed"]))),128)),n.isEdit?(vue.openBlock(),vue.createBlock(vue.unref(ElTableColumn),{key:0,width:"150",fixed:"right"},{header:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_5$3,[re.customAddRow?(vue.openBlock(),vue.createBlock(vue.unref(ElButton),{key:0,type:"primary",link:"",onClick:g},{default:vue.withCtx(()=>[ie[0]||(ie[0]=vue.createElementVNode("i",{class:"iconfont icon-Frame1"},null,-1)),vue.createTextVNode(vue.toDisplayString(re.addRowText),1)]),_:1})):vue.createCommentVNode("",!0),re.customAddColumn?(vue.openBlock(),vue.createBlock(vue.unref(ElButton),{key:1,type:"primary",link:"",onClick:y},{default:vue.withCtx(()=>[ie[1]||(ie[1]=vue.createElementVNode("i",{class:"iconfont icon-Frame-11"},null,-1)),vue.createTextVNode(vue.toDisplayString(re.addColumnText),1)]),_:1})):vue.createCommentVNode("",!0)])]),default:vue.withCtx(({$index:ae})=>[vue.createElementVNode("div",_hoisted_6$3,[re.$slots.operation?vue.renderSlot(re.$slots,"operation",{key:0,row:r.value[ae],$index:ae},void 0,!0):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[r.value.length>1?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:"iconfont icon-close",onClick:ue=>L(ae)},null,8,_hoisted_7$3)):vue.createCommentVNode("",!0)],64))])]),_:3})):vue.createCommentVNode("",!0)]),_:3},16,["data"])]),_:3},8,["model"]))}}),DiyDataTable=_export_sfc(_sfc_main$d,[["__scopeId","data-v-048d82d3"]]),ZhDiyDataTable=withInstall$1(DiyDataTable);var BaseMapType=(t=>(t[t.vector=0]="vector",t[t.satellite=1]="satellite",t))(BaseMapType||{}),SEARCH_TYPE=(t=>(t[t.SEARCH_SHIP=0]="SEARCH_SHIP",t[t.SEARCH_PORT=1]="SEARCH_PORT",t[t.SEARCH_CUSTOM=2]="SEARCH_CUSTOM",t))(SEARCH_TYPE||{}),COPY_RIGHT_TYPE=(t=>(t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL",t))(COPY_RIGHT_TYPE||{});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 g=0,y=t.length,k=!1;for(;g<y;)r=g+(y-g>>1),i=+n(t[r],e),i<0?g=r+1:(y=r,k=!i);return k?g:~g}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 g=t[i];if(g===e)return i;if(g<e)return n(e,t[i-1],g)>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$3(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,g){if(g===0)return!0;const y=r(t[g-1],i);return!(y>0||y===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 g=n?new BaseEvent(e):e;g.target||(g.target=this.eventTarget_||this);const y=this.dispatching_||(this.dispatching_={}),k=this.pendingRemovals_||(this.pendingRemovals_={});r in y||(y[r]=0,k[r]=0),++y[r];let L;for(let $=0,V=i.length;$<V;++$)if("handleEvent"in i[$]?L=i[$].handleEvent(g):L=i[$].call(this,g),L===!1||g.propagationStopped){L=!1;break}if(--y[r]===0){let $=k[r];for(delete k[r];$--;)this.removeEventListener(r,VOID);delete y[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 y=n;n=function(){t.removeEventListener(e,n),y.apply(r??this,arguments)}}else r&&r!==t&&(n=n.bind(r));const g={target:t,type:e,listener:n};return t.addEventListener(e,n),g}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 g=0;g<r;++g)i[g]=listen(this,e[g],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 g=0;g<i;++g)r[g]=listenOnce(this,e[g],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,g=e.length;i<g;++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 g=i[e];i[e]=n,g!==n&&this.notify(e,g)}}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,$=e-n+1,V=Math.log(L),z=.5*Math.exp(2*V/3),j=.5*Math.sqrt(V*z*(L-z)/L)*($-L/2<0?-1:1),oe=Math.max(n,Math.floor(e-$*z/L+j)),re=Math.min(r,Math.floor(e+(L-$)*z/L+j));quickselect(t,e,oe,re,i)}const g=t[e];let y=n,k=r;for(swap(t,n,e),i(t[r],g)>0&&swap(t,n,r);y<k;){for(swap(t,y,k),y++,k--;i(t[y],g)<0;)y++;for(;i(t[k],g)>0;)k--}i(t[n],g)===0?swap(t,n,k):(k++,swap(t,k,r)),k<=e&&(n=k+1),e<=k&&(r=k-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,g=[];for(;n;){for(let y=0;y<n.children.length;y++){const k=n.children[y],L=n.leaf?i(k):k;intersects$1(e,L)&&(n.leaf?r.push(k):contains(e,L)?this._all(k,r):g.push(k))}n=g.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 g=n.children[i],y=n.leaf?this.toBBox(g):g;if(intersects$1(e,y)){if(n.leaf||contains(e,y))return!0;r.push(g)}}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),g=[],y=[];let k,L,$;for(;r||g.length;){if(r||(r=g.pop(),L=g[g.length-1],k=y.pop(),$=!0),r.leaf){const V=findItem(e,r.children,n);if(V!==-1)return r.children.splice(V,1),g.push(r),this._condense(g),this}!$&&!r.leaf&&contains(r,i)?(g.push(r),y.push(k),k=0,L=r,r=r.children[0]):L?(k++,r=L.children[k],$=!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 g=r-n+1;let y=this._maxEntries,k;if(g<=y)return k=createNode(e.slice(n,r+1)),calcBBox(k,this.toBBox),k;i||(i=Math.ceil(Math.log(g)/Math.log(y)),y=Math.ceil(g/Math.pow(y,i-1))),k=createNode([]),k.leaf=!1,k.height=i;const L=Math.ceil(g/y),$=L*Math.ceil(Math.sqrt(y));multiSelect(e,n,r,$,this.compareMinX);for(let V=n;V<=r;V+=$){const z=Math.min(V+$-1,r);multiSelect(e,V,z,L,this.compareMinY);for(let j=V;j<=z;j+=L){const oe=Math.min(j+L-1,z);k.children.push(this._build(e,j,oe,i-1))}}return calcBBox(k,this.toBBox),k}_chooseSubtree(e,n,r,i){for(;i.push(n),!(n.leaf||i.length-1===r);){let g=1/0,y=1/0,k;for(let L=0;L<n.children.length;L++){const $=n.children[L],V=bboxArea($),z=enlargedArea(e,$)-V;z<y?(y=z,g=V<g?V:g,k=$):z===y&&V<g&&(g=V,k=$)}n=k||n.children[0]}return n}_insert(e,n,r){const i=r?e:this.toBBox(e),g=[],y=this._chooseSubtree(i,this.data,n,g);for(y.children.push(e),extend$2(y,i);n>=0&&g[n].children.length>this._maxEntries;)this._split(g,n),n--;this._adjustParentBBoxes(i,g,n)}_split(e,n){const r=e[n],i=r.children.length,g=this._minEntries;this._chooseSplitAxis(r,g,i);const y=this._chooseSplitIndex(r,g,i),k=createNode(r.children.splice(y,r.children.length-y));k.height=r.height,k.leaf=r.leaf,calcBBox(r,this.toBBox),calcBBox(k,this.toBBox),n?e[n-1].children.push(k):this._splitRoot(r,k)}_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,g=1/0,y=1/0;for(let k=n;k<=r-n;k++){const L=distBBox(e,0,k,this.toBBox),$=distBBox(e,k,r,this.toBBox),V=intersectionArea(L,$),z=bboxArea(L)+bboxArea($);V<g?(g=V,i=k,y=z<y?z:y):V===g&&z<y&&(y=z,i=k)}return i||r-n}_chooseSplitAxis(e,n,r){const i=e.leaf?this.compareMinX:compareNodeMinX,g=e.leaf?this.compareMinY:compareNodeMinY,y=this._allDistMargin(e,n,r,i),k=this._allDistMargin(e,n,r,g);y<k&&e.children.sort(i)}_allDistMargin(e,n,r,i){e.children.sort(i);const g=this.toBBox,y=distBBox(e,0,n,g),k=distBBox(e,r-n,r,g);let L=bboxMargin(y)+bboxMargin(k);for(let $=n;$<r-n;$++){const V=e.children[$];extend$2(y,e.leaf?g(V):V),L+=bboxMargin(y)}for(let $=r-n-1;$>=n;$--){const V=e.children[$];extend$2(k,e.leaf?g(V):V),L+=bboxMargin(k)}return L}_adjustParentBBoxes(e,n,r){for(let i=r;i>=0;i--)extend$2(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 g=e;g<n;g++){const y=t.children[g];extend$2(i,t.leaf?r(y):y)}return i}function extend$2(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),g=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,g-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 g=[e,n];for(;g.length;){if(n=g.pop(),e=g.pop(),n-e<=r)continue;const y=e+Math.ceil((n-e)/r/2)*r;quickselect(t,y,e,n,i),g.push(e,y,y,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 _boundingExtentXYs(t,e,n){const r=Math.min.apply(null,t),i=Math.min.apply(null,e),g=Math.max.apply(null,t),y=Math.max.apply(null,e);return createOrUpdate$2(r,i,g,y,n)}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$1(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],g=t[3],y=e[0],k=e[1];let L=Relationship.UNKNOWN;return y<n?L=L|Relationship.LEFT:y>i&&(L=L|Relationship.RIGHT),k<r?L=L|Relationship.BELOW:k>g&&(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 g=createOrUpdateEmpty(i);return extendFlatCoordinates(g,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$1(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$1(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[g,y,k,L,$,V,z,j]=getRotatedViewport(t,e,n,r);return createOrUpdate$2(Math.min(g,k,$,z),Math.min(y,L,V,j),Math.max(g,k,$,z),Math.max(y,L,V,j),i)}function getRotatedViewport(t,e,n,r){const i=e*r[0]/2,g=e*r[1]/2,y=Math.cos(n),k=Math.sin(n),L=i*y,$=i*k,V=g*y,z=g*k,j=t[0],oe=t[1];return[j-L+z,oe-$-V,j-L-z,oe-$+V,j+L-z,oe+$+V,j+L+z,oe+$-V,j-L+z,oe-$-V]}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),g=coordinateRelationship(t,n);if(i===Relationship.INTERSECTING||g===Relationship.INTERSECTING)r=!0;else{const y=t[0],k=t[1],L=t[2],$=t[3],V=e[0],z=e[1],j=n[0],oe=n[1],re=(oe-z)/(j-V);let ie,ae;g&Relationship.ABOVE&&!(i&Relationship.ABOVE)&&(ie=j-(oe-$)/re,r=ie>=y&&ie<=L),!r&&g&Relationship.RIGHT&&!(i&Relationship.RIGHT)&&(ae=oe-(j-L)*re,r=ae>=k&&ae<=$),!r&&g&Relationship.BELOW&&!(i&Relationship.BELOW)&&(ie=j-(oe-k)/re,r=ie>=y&&ie<=L),!r&&g&Relationship.LEFT&&!(i&Relationship.LEFT)&&(ae=oe-(j-y)*re,r=ae>=k&&ae<=$)}return r}function applyTransform(t,e,n,r){if(isEmpty(t))return createOrUpdateEmpty(n);let i=[];i=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]],e(i,i,2);const g=[],y=[];for(let k=0,L=i.length;k<L;k+=2)g.push(i[k]),y.push(i[k+1]);return _boundingExtentXYs(g,y,n)}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),y=Math.floor((r[0]-n[0])/i)*i;t[0]-=y,t[2]-=y}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,g=n.length;i<g;i++){const y=e[i],k=n[i],L={minX:y[0],minY:y[1],maxX:y[2],maxY:y[3],value:k};r[i]=L,this.items_[getUid(k)]=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,g=e.length;i<g;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],g=t[3],y=t[4],k=t[5],L=e[0],$=e[1],V=e[2],z=e[3],j=e[4],oe=e[5];return t[0]=n*L+i*$,t[1]=r*L+g*$,t[2]=n*V+i*z,t[3]=r*V+g*z,t[4]=n*j+i*oe+y,t[5]=r*j+g*oe+k,t}function set(t,e,n,r,i,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=g,t[5]=y,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,g,y,k){const L=Math.sin(g),$=Math.cos(g);return t[0]=r*$,t[1]=i*L,t[2]=-r*L,t[3]=i*$,t[4]=y*r*$-k*r*L+e,t[5]=y*i*L+k*i*$+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],g=e[2],y=e[3],k=e[4],L=e[5];return t[0]=y/n,t[1]=-i/n,t[2]=-g/n,t[3]=r/n,t[4]=(g*L-y*k)/n,t[5]=-(r*L-i*k)/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 g=0;g<i;g+=r){e[g]=HALF_SIZE*t[g]/180;let y=RADIUS$1*Math.log(Math.tan(Math.PI*(+t[g+1]+90)/360));y>MAX_SAFE_Y?y=MAX_SAFE_Y:y<-MAX_SAFE_Y&&(y=-MAX_SAFE_Y),e[g+1]=y}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 g=0;g<i;g+=r)e[g]=180*t[g]/HALF_SIZE,e[g+1]=360*Math.atan(Math.exp(t[g+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,g){const y=i-n,k=g-r;if(y!==0||k!==0){const L=((t-n)*y+(e-r)*k)/(y*y+k*k);L>1?(n=i,r=g):L>0&&(n+=y*L,r+=k*L)}return squaredDistance$1(t,e,n,r)}function squaredDistance$1(t,e,n,r){const i=n-t,g=r-e;return i*i+g*g}function solveLinearSystem(t){const e=t.length;for(let r=0;r<e;r++){let i=r,g=Math.abs(t[r][r]);for(let k=r+1;k<e;k++){const L=Math.abs(t[k][r]);L>g&&(g=L,i=k)}if(g===0)return null;const y=t[i];t[i]=t[r],t[r]=y;for(let k=r+1;k<e;k++){const L=-t[k][r]/t[r][r];for(let $=r;$<e+1;$++)r==$?t[k][$]=0:t[k][$]+=L*t[r][$]}}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,g=t[1]*n+t[0]*r;return t[0]=i,t[1]=g,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$1(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]),g=(i-r)/2,y=toRadians(e[0]-t[0])/2,k=Math.sin(g)*Math.sin(g)+Math.sin(y)*Math.sin(y)*Math.cos(r)*Math.cos(i);return 2*n*Math.atan2(Math.sqrt(k),Math.sqrt(1-k))}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 g=0,y,k,L,$,V,z;switch(i){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":{y=t.getCoordinates(),g=getLengthInternal(y,n);break}case"MultiLineString":case"Polygon":{for(y=t.getCoordinates(),L=0,$=y.length;L<$;++L)g+=getLengthInternal(y[L],n);break}case"MultiPolygon":{for(y=t.getCoordinates(),L=0,$=y.length;L<$;++L)for(k=y[L],V=0,z=k.length;V<z;++V)g+=getLengthInternal(k[V],n);break}case"GeometryCollection":{const j=t.getGeometries();for(L=0,$=j.length;L<$;++L)g+=getLength(j[L],e);break}default:throw new Error("Unsupported geometry type: "+i)}return g}function getAreaInternal(t,e){let n=0;const r=t.length;let i=t[r-1][0],g=t[r-1][1];for(let y=0;y<r;y++){const k=t[y][0],L=t[y][1];n+=toRadians(k-i)*(2+Math.sin(toRadians(g))+Math.sin(toRadians(L))),i=k,g=L}return n*e*e/2}function getArea(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 g=0,y,k,L,$,V,z;switch(i){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(y=t.getCoordinates(),g=Math.abs(getAreaInternal(y[0],n)),L=1,$=y.length;L<$;++L)g-=Math.abs(getAreaInternal(y[L],n));break}case"MultiPolygon":{for(y=t.getCoordinates(),L=0,$=y.length;L<$;++L)for(k=y[L],g+=Math.abs(getAreaInternal(k[0],n)),V=1,z=k.length;V<z;++V)g-=Math.abs(getAreaInternal(k[V],n));break}case"GeometryCollection":{const j=t.getGeometries();for(L=0,$=j.length;L<$;++L)g+=getArea(j[L],e);break}default:throw new Error("Unsupported geometry type: "+i)}return g}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$1(t,e,n){const r=t-5e5,y=(n.north?e:e-1e7)/K0/(R*M1),k=y+P2*Math.sin(2*y)+P3*Math.sin(4*y)+P4*Math.sin(6*y)+P5*Math.sin(8*y),L=Math.sin(k),$=L*L,V=Math.cos(k),z=L/V,j=z*z,oe=j*j,re=1-E*$,ie=Math.sqrt(1-E*$),ae=R/ie,ue=(1-E)/re,de=E_P2*V**2,pe=de*de,le=r/(ae*K0),he=le*le,_e=he*le,Ce=_e*le,xe=Ce*le,Ie=xe*le,Oe=k-z/ue*(he/2-Ce/24*(5+3*j+10*de-4*pe-9*E_P2))+Ie/720*(61+90*j+298*de+45*oe-252*E_P2-3*pe);let $e=(le-_e/6*(1+2*j+de)+xe/120*(5-2*de+28*j-3*pe+8*E_P2+24*oe))/V;return $e=wrap($e+toRadians(zoneToCentralLongitude(n.number)),-Math.PI,Math.PI),[toDegrees($e),toDegrees(Oe)]}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),g=Math.cos(r),y=i/g,k=y*y,L=k*k,$=toRadians(t),V=zoneToCentralLongitude(n.number),z=toRadians(V),j=R/Math.sqrt(1-E*i**2),oe=E_P2*g**2,re=g*wrap($-z,-Math.PI,Math.PI),ie=re*re,ae=ie*re,ue=ae*re,de=ue*re,pe=de*re,le=R*(M1*r-M2*Math.sin(2*r)+M3*Math.sin(4*r)-M4*Math.sin(6*r)),he=K0*j*(re+ae/6*(1-k+oe)+de/120*(5-18*k+L+72*oe-58*E_P2))+5e5;let _e=K0*(le+j*y*(ie/2+ue/24*(5-k+9*oe+4*oe**2)+pe/720*(61-58*k+L+600*oe-330*E_P2)));return n.north||(_e+=1e7),[he,_e]}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 g=t.match(i);if(g){e=parseInt(g[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,g){const y=n.length;i=i>1?i:2,g=g??i,r||(i>2?r=n.slice():r=new Array(y));for(let k=0;k<y;k+=g){const L=n[k],$=n[k+1],V=t(L,$,e);r[k]=V[0],r[k+1]=V[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$1,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 g=t.getPointResolutionFunc();if(g){if(i=g(e,n),r&&r!==t.getUnits()){const y=t.getMetersPerUnit();y&&(i=i*y/METERS_PER_UNIT$1[r])}}else{const y=t.getUnits();if(y=="degrees"&&!r||r=="degrees")i=e;else{const k=getTransformFromProjections(t,get$1("EPSG:4326"));if(!k&&y!=="degrees")i=e*t.getMetersPerUnit();else{let $=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];$=k($,$,2);const V=getDistance($.slice(0,2),$.slice(2,4)),z=getDistance($.slice(4,6),$.slice(6,8));i=(V+z)/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(g){add$1(i,g,n),add$1(g,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 g=e.length;r=r!==void 0?r:2,i=i??r,n=n!==void 0?n:new Array(g);for(let y=0;y<g;y+=i){const k=t(e.slice(y,y+r)),L=k.length;for(let $=0,V=i;$<V;++$)n[y+$]=$>=L?e[y+$]:k[$]}return n}}function fromLonLat(t,e){return disableCoordinateWarning(),transform(t,"EPSG:4326","EPSG:3857")}function toLonLat(t,e){const n=transform(t,"EPSG:3857","EPSG:4326"),r=n[0];return(r<-180||r>180)&&(n[0]=modulo(r+180,360)-180),n}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 g=null,y=null;for(const L of transformFactories)g||(g=L(t)),y||(y=L(e));if(!g&&!y)return null;const k="EPSG:4326";if(y)if(g)i=composeTransformFuncs(g.inverse,y.forward);else{const L=get$2(n,k);L&&(i=composeTransformFuncs(L,y.forward))}else{const L=get$2(k,r);L&&(i=composeTransformFuncs(g.inverse,L))}return i&&(addProjection(t),addProjection(e),add$1(t,e,i)),i}function composeTransformFuncs(t,e){return function(n,r,i,g){return r=t(n,r,i,g),e(r,r,i,g)}}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(),g=get$1(n).getCode();throw new Error(`No transform available between ${i} and ${g}`)}return r(t,void 0,t.length)}function transformExtent(t,e,n,r){const i=getTransform(e,n);return applyTransform(t,i,void 0)}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,g,y){g=g||[],y=y||2;let k=0;for(let L=e;L<n;L+=r){const $=t[L],V=t[L+1];g[k++]=i[0]*$+i[2]*V+i[4],g[k++]=i[1]*$+i[3]*V+i[5];for(let z=2;z<y;z++)g[k++]=t[L+z]}return g&&g.length!=k&&(g.length=k),g}function rotate(t,e,n,r,i,g,y){y=y||[];const k=Math.cos(i),L=Math.sin(i),$=g[0],V=g[1];let z=0;for(let j=e;j<n;j+=r){const oe=t[j]-$,re=t[j+1]-V;y[z++]=$+oe*k-re*L,y[z++]=V+oe*L+re*k;for(let ie=j+2;ie<j+r;++ie)y[z++]=t[ie]}return y&&y.length!=z&&(y.length=z),y}function scale$2(t,e,n,r,i,g,y,k){k=k||[];const L=y[0],$=y[1];let V=0;for(let z=e;z<n;z+=r){const j=t[z]-L,oe=t[z+1]-$;k[V++]=L+i*j,k[V++]=$+g*oe;for(let re=z+2;re<z+r;++re)k[V++]=t[re]}return k&&k.length!=V&&(k.length=V),k}function translate$1(t,e,n,r,i,g,y){y=y||[];let k=0;for(let L=e;L<n;L+=r){y[k++]=t[L]+i,y[k++]=t[L+1]+g;for(let $=L+2;$<L+r;++$)y[k++]=t[$]}return y&&y.length!=k&&(y.length=k),y}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(g,y,k){const L=r.getExtent(),$=r.getWorldExtent(),V=getHeight($)/getHeight(L);compose(tmpTransform$1,$[0],$[3],V,-V,0,0,0);const z=transform2D(g,0,g.length,k,tmpTransform$1,y),j=getTransform(r,n);return j?j(z,z,k):z}: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 g=0;g<r;++g){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 g=this.getStride();scale$2(i,0,i.length,g,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,g=n.length;i<g;++i)t[e++]=n[i];return e}function deflateCoordinates(t,e,n,r){for(let i=0,g=n.length;i<g;++i){const y=n[i];for(let k=0;k<r;++k)t[e++]=y[k]}return e}function deflateCoordinatesArray(t,e,n,r,i){i=i||[];let g=0;for(let y=0,k=n.length;y<k;++y){const L=deflateCoordinates(t,e,n[y],r);i[g++]=L,e=L}return i.length=g,i}function deflateMultiCoordinatesArray(t,e,n,r,i){i=i||[];let g=0;for(let y=0,k=n.length;y<k;++y){const L=deflateCoordinatesArray(t,e,n[y],r,i[g]);L.length===0&&(L[0]=e),i[g++]=L,e=L[L.length-1]}return i.length=g,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 g=this.flatCoordinates,y=e-g[0],k=n-g[1],L=y*y+k*k;if(L<i){if(L===0)for(let $=0;$<this.stride;++$)r[$]=g[$];else{const $=this.getRadius()/Math.sqrt(L);r[0]=g[0]+$*y,r[1]=g[1]+$*k;for(let V=2;V<this.stride;++V)r[V]=g[V]}return r.length=this.stride,L}return i}containsXY(e,n){const r=this.flatCoordinates,i=e-r[0],g=n-r[1];return i*i+g*g<=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 g=1;g<n;++g)i[n+g]=e[g];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 g=deflateCoordinate(i,0,e,this.stride);i[g++]=i[0]+n;for(let y=1,k=this.stride;y<k;++y)i[g++]=i[y];i.length=g,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 g=this.geometries_;for(let y=0,k=g.length;y<k;++y)i=g[y].closestPointXY(e,n,r,i);return i}containsXY(e,n){const r=this.geometries_;for(let i=0,g=r.length;i<g;++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$1(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 g=0,y=r.length;g<y;++g){const k=r[g],L=k.getSimplifiedGeometry(e);n.push(L),L!==k&&(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,g=r.length;i<g;++i)r[i].rotate(e,n);this.changed()}scale(e,n,r){r||(r=getCenter(this.getExtent()));const i=this.geometries_;for(let g=0,y=i.length;g<y;++g)i[g].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,g=r.length;i<g;++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,g,y){const k=t[e],L=t[e+1],$=t[n]-k,V=t[n+1]-L;let z;if($===0&&V===0)z=e;else{const j=((i-k)*$+(g-L)*V)/($*$+V*V);if(j>1)z=n;else if(j>0){for(let oe=0;oe<r;++oe)y[oe]=lerp(t[e+oe],t[n+oe],j);y.length=r;return}else z=e}for(let j=0;j<r;++j)y[j]=t[z+j];y.length=r}function maxSquaredDelta(t,e,n,r,i){let g=t[e],y=t[e+1];for(e+=r;e<n;e+=r){const k=t[e],L=t[e+1],$=squaredDistance$1(g,y,k,L);$>i&&(i=$),g=k,y=L}return i}function arrayMaxSquaredDelta(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g){const k=n[g];i=maxSquaredDelta(t,e,k,r,i),e=k}return i}function multiArrayMaxSquaredDelta(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g){const k=n[g];i=arrayMaxSquaredDelta(t,e,k,r,i),e=k[k.length-1]}return i}function assignClosestPoint(t,e,n,r,i,g,y,k,L,$,V){if(e==n)return $;let z,j;if(i===0){if(j=squaredDistance$1(y,k,t[e],t[e+1]),j<$){for(z=0;z<r;++z)L[z]=t[e+z];return L.length=r,j}return $}V=V||[NaN,NaN];let oe=e+r;for(;oe<n;)if(assignClosest(t,oe-r,oe,r,y,k,V),j=squaredDistance$1(y,k,V[0],V[1]),j<$){for($=j,z=0;z<r;++z)L[z]=V[z];L.length=r,oe+=r}else oe+=r*Math.max((Math.sqrt(j)-Math.sqrt($))/i|0,1);if(g&&(assignClosest(t,n-r,e,r,y,k,V),j=squaredDistance$1(y,k,V[0],V[1]),j<$)){for($=j,z=0;z<r;++z)L[z]=V[z];L.length=r}return $}function assignClosestArrayPoint(t,e,n,r,i,g,y,k,L,$,V){V=V||[NaN,NaN];for(let z=0,j=n.length;z<j;++z){const oe=n[z];$=assignClosestPoint(t,e,oe,r,i,g,y,k,L,$,V),e=oe}return $}function assignClosestMultiArrayPoint(t,e,n,r,i,g,y,k,L,$,V){V=V||[NaN,NaN];for(let z=0,j=n.length;z<j;++z){const oe=n[z];$=assignClosestArrayPoint(t,e,oe,r,i,g,y,k,L,$,V),e=oe[oe.length-1]}return $}function douglasPeucker(t,e,n,r,i,g,y){const k=(n-e)/r;if(k<3){for(;e<n;e+=r)g[y++]=t[e],g[y++]=t[e+1];return y}const L=new Array(k);L[0]=1,L[k-1]=1;const $=[e,n-r];let V=0;for(;$.length>0;){const z=$.pop(),j=$.pop();let oe=0;const re=t[j],ie=t[j+1],ae=t[z],ue=t[z+1];for(let de=j+r;de<z;de+=r){const pe=t[de],le=t[de+1],he=squaredSegmentDistance(pe,le,re,ie,ae,ue);he>oe&&(V=de,oe=he)}oe>i&&(L[(V-e)/r]=1,j+r<V&&$.push(j,V),V+r<z&&$.push(V,z))}for(let z=0;z<k;++z)L[z]&&(g[y++]=t[e+z*r],g[y++]=t[e+z*r+1]);return y}function douglasPeuckerArray(t,e,n,r,i,g,y,k){for(let L=0,$=n.length;L<$;++L){const V=n[L];y=douglasPeucker(t,e,V,r,i,g,y),k.push(y),e=V}return y}function snap(t,e){return e*Math.round(t/e)}function quantize(t,e,n,r,i,g,y){if(e==n)return y;let k=snap(t[e],i),L=snap(t[e+1],i);e+=r,g[y++]=k,g[y++]=L;let $,V;do if($=snap(t[e],i),V=snap(t[e+1],i),e+=r,e==n)return g[y++]=$,g[y++]=V,y;while($==k&&V==L);for(;e<n;){const z=snap(t[e],i),j=snap(t[e+1],i);if(e+=r,z==$&&j==V)continue;const oe=$-k,re=V-L,ie=z-k,ae=j-L;if(oe*ae==re*ie&&(oe<0&&ie<oe||oe==ie||oe>0&&ie>oe)&&(re<0&&ae<re||re==ae||re>0&&ae>re)){$=z,V=j;continue}g[y++]=$,g[y++]=V,k=$,L=V,$=z,V=j}return g[y++]=$,g[y++]=V,y}function quantizeArray(t,e,n,r,i,g,y,k){for(let L=0,$=n.length;L<$;++L){const V=n[L];y=quantize(t,e,V,r,i,g,y),k.push(y),e=V}return y}function quantizeMultiArray(t,e,n,r,i,g,y,k){for(let L=0,$=n.length;L<$;++L){const V=n[L],z=[];y=quantizeArray(t,e,V,r,i,g,y,z),k.push(z),e=V[V.length-1]}return y}function inflateCoordinates(t,e,n,r,i){i=i!==void 0?i:[];let g=0;for(let y=e;y<n;y+=r)i[g++]=t.slice(y,y+r);return i.length=g,i}function inflateCoordinatesArray(t,e,n,r,i){i=i!==void 0?i:[];let g=0;for(let y=0,k=n.length;y<k;++y){const L=n[y];i[g++]=inflateCoordinates(t,e,L,r,i[g]),e=L}return i.length=g,i}function inflateMultiCoordinatesArray(t,e,n,r,i){i=i!==void 0?i:[];let g=0;for(let y=0,k=n.length;y<k;++y){const L=n[y];i[g++]=L.length===1&&L[0]===e?[]:inflateCoordinatesArray(t,e,L,r,i[g]),e=L[L.length-1]}return i.length=g,i}function linearRing(t,e,n,r){let i=0;const g=t[n-r],y=t[n-r+1];let k=0,L=0;for(;e<n;e+=r){const $=t[e]-g,V=t[e+1]-y;i+=L*$-k*V,k=$,L=V}return i/2}function linearRings(t,e,n,r){let i=0;for(let g=0,y=n.length;g<y;++g){const k=n[g];i+=linearRing(t,e,k,r),e=k}return i}function linearRingss$1(t,e,n,r){let i=0;for(let g=0,y=n.length;g<y;++g){const k=n[g];i+=linearRings(t,e,k,r),e=k[k.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 g;for(e+=r;e<n;e+=r)if(g=i(t.slice(e-r,e),t.slice(e,e+r)),g)return g;return!1}function interpolatePoint(t,e,n,r,i,g,y){let k,L;const $=(n-e)/r;if($===1)k=e;else if($===2)k=e,L=i;else if($!==0){let V=t[e],z=t[e+1],j=0;const oe=[0];for(let ae=e+r;ae<n;ae+=r){const ue=t[ae],de=t[ae+1];j+=Math.sqrt((ue-V)*(ue-V)+(de-z)*(de-z)),oe.push(j),V=ue,z=de}const re=i*j,ie=binarySearch(oe,re);ie<0?(L=(re-oe[-ie-2])/(oe[-ie-1]-oe[-ie-2]),k=e+(-ie-2)*r):k=e+ie*r}y=y>1?y:2,g=g||new Array(y);for(let V=0;V<y;++V)g[V]=k===void 0?NaN:L===void 0?t[k+V]:lerp(t[k+V],t[k+r+V],L);return g}function lineStringCoordinateAtM(t,e,n,r,i,g){if(n==e)return null;let y;if(i<t[e+r-1])return g?(y=t.slice(e,e+r),y[r-1]=i,y):null;if(t[n-1]<i)return g?(y=t.slice(n-r,n),y[r-1]=i,y):null;if(i==t[e+r-1])return t.slice(e,e+r);let k=e/r,L=n/r;for(;k<L;){const j=k+L>>1;i<t[(j+1)*r-1]?L=j:k=j+1}const $=t[k*r-1];if(i==$)return t.slice((k-1)*r,(k-1)*r+r);const V=t[(k+1)*r-1],z=(i-$)/(V-$);y=[];for(let j=0;j<r-1;++j)y.push(lerp(t[(k-1)*r+j],t[k*r+j],z));return y.push(i),y}function lineStringsCoordinateAtM(t,e,n,r,i,g,y){if(y)return lineStringCoordinateAtM(t,e,n[n.length-1],r,i,g);let k;if(i<t[r-1])return g?(k=t.slice(0,r),k[r-1]=i,k):null;if(t[t.length-1]<i)return g?(k=t.slice(t.length-r),k[r-1]=i,k):null;for(let L=0,$=n.length;L<$;++L){const V=n[L];if(e!=V){if(i<t[e+r-1])return null;if(i<=t[V-1])return lineStringCoordinateAtM(t,e,V,r,i,!1);e=V}}return null}function linearRingContainsExtent(t,e,n,r,i){return!forEachCorner(i,function(y){return!linearRingContainsXY(t,e,n,r,y[0],y[1])})}function linearRingContainsXY(t,e,n,r,i,g){let y=0,k=t[n-r],L=t[n-r+1];for(;e<n;e+=r){const $=t[e],V=t[e+1];L<=g?V>g&&($-k)*(g-L)-(i-k)*(V-L)>0&&y++:V<=g&&($-k)*(g-L)-(i-k)*(V-L)<0&&y--,k=$,L=V}return y!==0}function linearRingsContainsXY(t,e,n,r,i,g){if(n.length===0||!linearRingContainsXY(t,e,n[0],r,i,g))return!1;for(let y=1,k=n.length;y<k;++y)if(linearRingContainsXY(t,n[y-1],n[y],r,i,g))return!1;return!0}function linearRingssContainsXY(t,e,n,r,i,g){if(n.length===0)return!1;for(let y=0,k=n.length;y<k;++y){const L=n[y];if(linearRingsContainsXY(t,e,L,r,i,g))return!0;e=L[L.length-1]}return!1}function intersectsLineString(t,e,n,r,i){const g=extendFlatCoordinates(createEmpty(),t,e,n,r);return intersects(i,g)?containsExtent(i,g)||g[0]>=i[0]&&g[2]<=i[2]||g[1]>=i[1]&&g[3]<=i[3]?!0:forEach(t,e,n,r,function(y,k){return intersectsSegment(i,y,k)}):!1}function intersectsLineStringArray(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g){if(intersectsLineString(t,e,n[g],r,i))return!0;e=n[g]}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 g=1,y=n.length;g<y;++g)if(linearRingContainsExtent(t,n[g-1],n[g],r,i)&&!intersectsLineString(t,n[g-1],n[g],r,i))return!1;return!0}function intersectsLinearRingMultiArray(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g){const k=n[g];if(intersectsLinearRingArray(t,e,k,r,i))return!0;e=k[k.length-1]}return!1}function lineStringLength(t,e,n,r){let i=t[e],g=t[e+1],y=0;for(let k=e+r;k<n;k+=r){const L=t[k],$=t[k+1];y+=Math.sqrt((L-i)*(L-i)+($-g)*($-g)),i=L,g=$}return y}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$3(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,g=[],y=[];for(let L=0,$=i.length;L<$;++L){const V=i[L];extend$3(g,V.getFlatCoordinates()),y.push(g.length)}const k=i.length===0?this.getLayout():i[0].getLayout();this.setFlatCoordinates(k,g),this.ends_=y}}appendLineString(e){extend$3(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 g=0;for(let y=0,k=n.length;y<k;++y){const L=n[y],$=new LineString(e.slice(g,L),r);i.push($),g=L}return i}getFlatMidpoints(){const e=[],n=this.flatCoordinates;let r=0;const i=this.ends_,g=this.stride;for(let y=0,k=i.length;y<k;++y){const L=i[y],$=interpolatePoint(n,r,L,g,.5);extend$3(e,$),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 g=this.flatCoordinates,y=squaredDistance$1(e,n,g[0],g[1]);if(y<i){const k=this.stride;for(let L=0;L<k;++L)r[L]=g[L];return r.length=k,y}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$3(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 g=this.flatCoordinates,y=this.stride;for(let k=0,L=g.length;k<L;k+=y){const $=squaredDistance$1(e,n,g[k],g[k+1]);if($<i){i=$;for(let V=0;V<y;++V)r[V]=g[k+V];r.length=y}}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 g=0,y=e.length;g<y;g+=r){const k=new Point(e.slice(g,g+r),n);i.push(k)}return i}getType(){return"MultiPoint"}intersectsExtent(e){const n=this.flatCoordinates,r=this.stride;for(let i=0,g=n.length;i<g;i+=r){const y=n[i],k=n[i+1];if(containsXY(e,y,k))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,g,y){let k,L,$,V,z,j,oe;const re=i[g+1],ie=[];for(let de=0,pe=n.length;de<pe;++de){const le=n[de];for(V=t[le-r],j=t[le-r+1],k=e;k<le;k+=r)z=t[k],oe=t[k+1],(re<=j&&oe<=re||j<=re&&re<=oe)&&($=(re-j)/(oe-j)*(z-V)+V,ie.push($)),V=z,j=oe}let ae=NaN,ue=-1/0;for(ie.sort(ascending),V=ie[0],k=1,L=ie.length;k<L;++k){z=ie[k];const de=Math.abs(z-V);de>ue&&($=(V+z)/2,linearRingsContainsXY(t,e,n,r,$,re)&&(ae=$,ue=de)),V=z}return isNaN(ae)&&(ae=i[g]),y?(y.push(ae,re,ue),y):[ae,re,ue]}function getInteriorPointsOfMultiArray(t,e,n,r,i){let g=[];for(let y=0,k=n.length;y<k;++y){const L=n[y];g=getInteriorPointOfArray(t,e,L,r,i,2*y,g),e=L[L.length-1]}return g}function coordinates(t,e,n,r){for(;e<n-r;){for(let i=0;i<r;++i){const g=t[e+i];t[e+i]=t[n-r+i],t[n-r+i]=g}e+=r,n-=r}}function linearRingIsClockwise(t,e,n,r){let i=0,g=t[n-r],y=t[n-r+1];for(;e<n;e+=r){const k=t[e],L=t[e+1];i+=(k-g)*(L+y),g=k,y=L}return i===0?void 0:i>0}function linearRingsAreOriented(t,e,n,r,i){i=i!==void 0?i:!1;for(let g=0,y=n.length;g<y;++g){const k=n[g],L=linearRingIsClockwise(t,e,k,r);if(g===0){if(i&&L||!i&&!L)return!1}else if(i&&!L||!i&&L)return!1;e=k}return!0}function linearRingssAreOriented(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g){const k=n[g];if(!linearRingsAreOriented(t,e,k,r,i))return!1;k.length&&(e=k[k.length-1])}return!0}function orientLinearRings(t,e,n,r,i){i=i!==void 0?i:!1;for(let g=0,y=n.length;g<y;++g){const k=n[g],L=linearRingIsClockwise(t,e,k,r);(g===0?i&&L||!i&&!L:i&&!L||!i&&L)&&coordinates(t,e,k,r),e=k}return e}function orientLinearRingsArray(t,e,n,r,i){for(let g=0,y=n.length;g<y;++g)e=orientLinearRings(t,e,n[g],r,i);return e}function inflateEnds(t,e){const n=[];let r=0,i=0,g;for(let y=0,k=e.length;y<k;++y){const L=e[y],$=linearRingIsClockwise(t,r,L,2);if(g===void 0&&(g=$),$===g)n.push(e.slice(i,y+1));else{if(n.length===0)continue;n[n.length-1].push(e[i])}i=y+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$3(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 g=0;for(let y=0,k=r.length;y<k;++y){const L=r[y],$=new LinearRing(n.slice(g,L),e);i.push($),g=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],g=[e,n,e,i,r,i,r,n,e,n];return new Polygon(g,"XY",[g.length])}function linearRingss(t,e,n,r){const i=[];let g=createEmpty();for(let y=0,k=n.length;y<k;++y){const L=n[y];g=createOrUpdateFromFlatCoordinates(t,e,L[0],r),i.push((g[0]+g[2])/2,(g[1]+g[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,g=[],y=[];for(let k=0,L=i.length;k<L;++k){const $=i[k],V=g.length,z=$.getEnds();for(let j=0,oe=z.length;j<oe;++j)z[j]+=V;extend$3(g,$.getFlatCoordinates()),y.push(z)}n=i.length===0?this.getLayout():i[0].getLayout(),e=g,r=y}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$3(this.flatCoordinates,e.getFlatCoordinates()),n=e.getEnds().slice();for(let i=0,g=n.length;i<g;++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 g=this.endss_[e-1];n=g[g.length-1]}const r=this.endss_[e].slice(),i=r[r.length-1];if(n!==0)for(let g=0,y=r.length;g<y;++g)r[g]-=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 g=0;for(let y=0,k=r.length;y<k;++y){const L=r[y].slice(),$=L[L.length-1];if(g!==0)for(let z=0,j=L.length;z<j;++z)L[z]-=g;const V=new Polygon(n.slice(g,$),e,L);i.push(V),g=$}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,g,y){this.styleFunction,this.extent_,this.id_=y,this.type_=e,this.flatCoordinates_=n,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r||null,this.properties_=g,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,g=r.length;i<g;++i){const y=r[i],k=interpolatePoint(e,n,y,2,.5);extend$3(this.flatMidpoints_,k),n=y}}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,g,y){const k=new XMLHttpRequest;k.open("GET",typeof t=="function"?t(n,r,i):t,!0),e.getType()=="arraybuffer"&&(k.responseType="arraybuffer"),k.withCredentials=withCredentials,k.onload=function(L){if(!k.status||k.status>=200&&k.status<300){const $=e.getType();try{let V;$=="text"||$=="json"?V=k.responseText:$=="xml"?V=k.responseXML||k.responseText:$=="arraybuffer"&&(V=k.response),V?g(e.readFeatures(V,{extent:n,featureProjection:i}),e.readProjection(V)):y()}catch{y()}}else y()},k.onerror=y,k.send()}function xhr(t,e){return function(n,r,i,g,y){const k=this;loadFeaturesXhr(t,e,n,r,i,function(L,$){k.addFeatures(L),g!==void 0&&g(L)},y||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 g=this.idIndex_[i];g instanceof RenderFeature?Array.isArray(g)?g.push(n):this.idIndex_[i]=[g,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 g=0,y=e.length;g<y;g++){const k=e[g],L=getUid(k);this.addToIndex_(L,k)&&r.push(k)}for(let g=0,y=r.length;g<y;g++){const k=r[g],L=getUid(k);this.setupChangeEvents_(L,k);const $=k.getGeometry();if($){const V=$.getExtent();n.push(V),i.push(k)}else this.nullGeometryFeatures_[L]=k}if(this.featuresRtree_&&this.featuresRtree_.load(n,i),this.hasListener(VectorEventType.ADDFEATURE))for(let g=0,y=r.length;g<y;g++)this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE,r[g]))}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 g=i.getGeometry();if(g instanceof RenderFeature||g.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 g=n(r);if(g)return g}})}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$3(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(g=>this.featuresRtree_.getInExtent(g)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,n){const r=e[0],i=e[1];let g=null;const y=[NaN,NaN];let k=1/0;const L=[-1/0,-1/0,1/0,1/0];return n=n||TRUE,this.featuresRtree_.forEachInExtent(L,function($){if(n($)){const V=$.getGeometry(),z=k;if(k=V instanceof RenderFeature?0:V.closestPointXY(r,i,y,k),k<z){g=$;const j=Math.sqrt(k);L[0]=r-j,L[1]=i-j,L[2]=r+j,L[3]=i+j}}}),g}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 y=i.getExtent();r in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[r],this.featuresRtree_&&this.featuresRtree_.insert(y,n)):this.featuresRtree_&&this.featuresRtree_.update(y,n)}const g=n.getId();if(g!==void 0){const y=g.toString();this.idIndex_[y]!==n&&(this.removeFromIdIndex_(n),this.idIndex_[y]=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_,g=this.strategy_(e,n,r);for(let y=0,k=g.length;y<k;++y){const L=g[y];i.forEachInExtent(L,function(V){return containsExtent(V.extent,L)})||(++this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADSTART)),this.loader_.call(this,L,n,r,V=>{--this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADEND,void 0,V))},()=>{--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 g=i.toString(),y=this.idIndex_[g];y===e?delete this.idIndex_[g]:Array.isArray(y)&&(y.splice(y.indexOf(e),1),y.length===1&&(this.idIndex_[g]=y[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],g,y,k;return g=n*3.240969941904521+r*-1.537383177570093+i*-.498610760293,y=n*-.96924363628087+r*1.87596750150772+i*.041555057407175,k=n*.055630079696993+r*-.20397695888897+i*1.056971514242878,g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g=g*12.92,y=y>.0031308?1.055*Math.pow(y,1/2.4)-.055:y=y*12.92,k=k>.0031308?1.055*Math.pow(k,1/2.4)-.055:k=k*12.92,g=Math.min(Math.max(0,g),1),y=Math.min(Math.max(0,y),1),k=Math.min(Math.max(0,k),1),[g*255,y*255,k*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 g=n*.41239079926595+r*.35758433938387+i*.18048078840183,y=n*.21263900587151+r*.71516867876775+i*.072192315360733,k=n*.019330818715591+r*.11919477979462+i*.95053215224966;return e=e||xyz.whitepoint[2].E,[g*e[0],y*e[1],k*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,g,y,k,L,$,V,z,j,oe,re,ie;if(g=t[0],y=t[1],k=t[2],g===0)return[0,0,0];var ae=.0011070564598794539;return e=e||"D65",n=n||2,z=xyz.whitepoint[n][e][0],j=xyz.whitepoint[n][e][1],oe=xyz.whitepoint[n][e][2],re=4*z/(z+15*j+3*oe),ie=9*j/(z+15*j+3*oe),r=y/(13*g)+re||0,i=k/(13*g)+ie||0,$=g>8?j*Math.pow((g+16)/116,3):j*g*ae,L=$*9*r/(4*i)||0,V=$*(12-3*r-20*i)/(4*i)||0,[L,$,V]}};xyz.luv=function(t,e,n){var r,i,g,y,k,L,$,V,z,j,oe,re,ie,ae=.008856451679035631,ue=903.2962962962961;e=e||"D65",n=n||2,z=xyz.whitepoint[n][e][0],j=xyz.whitepoint[n][e][1],oe=xyz.whitepoint[n][e][2],re=4*z/(z+15*j+3*oe),ie=9*j/(z+15*j+3*oe),L=t[0],$=t[1],V=t[2],r=4*L/(L+15*$+3*V)||0,i=9*$/(L+15*$+3*V)||0;var de=$/j;return g=de<=ae?ue*de:116*Math.pow(de,1/3)-16,y=13*g*(r-re),k=13*g*(i-ie),[g,y,k]};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,g,y;return y=r/360*2*Math.PI,i=n*Math.cos(y),g=n*Math.sin(y),[e,i,g]},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),g=Math.atan2(r,n),y=g*360/2/Math.PI;return y<0&&(y+=360),[e,i,y]},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 V,z;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 g=t.slice(1),y=g.length,k=y<=4;r=1,k?(n=[parseInt(g[0]+g[0],16),parseInt(g[1]+g[1],16),parseInt(g[2]+g[2],16)],y===4&&(r=parseInt(g[3]+g[3],16)/255)):(n=[parseInt(g[0]+g[1],16),parseInt(g[2]+g[3],16),parseInt(g[4]+g[5],16)],y===8&&(r=parseInt(g[6]+g[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 $=i==="cmyk"?4:i==="gray"?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=n.shift()),n=n.map(function(j,oe){if(j[j.length-1]==="%")return j=parseFloat(j)/100,oe===3?j:i==="rgb"?j*255:i[0]==="h"||i[0]==="l"&&!oe?j*100:i==="lab"?j*125:i==="lch"?oe<2?j*150:j*360:i[0]==="o"&&!oe?j:i==="oklab"?j*.4:i==="oklch"?oe<2?j*.4:j*360:j;if(i[oe]==="h"||oe===2&&i[i.length-1]==="h"){if(baseHues[j]!==void 0)return baseHues[j];if(j.endsWith("deg"))return parseFloat(j);if(j.endsWith("turn"))return parseFloat(j)*360;if(j.endsWith("grad"))return parseFloat(j)*360/400;if(j.endsWith("rad"))return parseFloat(j)*180/Math.PI}return j==="none"?0:parseFloat(j)}),r=n.length>$?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(j){return parseFloat(j)}),i=((z=(V=t.match(/([a-z])/ig))==null?void 0:V.join(""))==null?void 0:z.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,g,y,k,L,$=0;if(n===0)return L=r*255,[L,L,L];for(g=r<.5?r*(1+n):r+n-r*n,i=2*r-g,k=[0,0,0];$<3;)y=e+1/3*-($-1),y<0?y++:y>1&&y--,L=6*y<1?i+(g-i)*6*y:2*y<1?g:3*y<2?i+(g-i)*(2/3-y)*6:i,k[$++]=L*255;return k}};rgb.hsl=function(t){var e=t[0]/255,n=t[1]/255,r=t[2]/255,i=Math.min(e,n,r),g=Math.max(e,n,r),y=g-i,k,L,$;return g===i?k=0:e===g?k=(n-r)/y:n===g?k=2+(r-e)/y:r===g&&(k=4+(e-n)/y),k=Math.min(k*60,360),k<0&&(k+=360),$=(i+g)/2,g===i?L=0:$<=.5?L=y/(g+i):L=y/(2-g-i),[k,L*100,$*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],g=e[r];if(!i&&!g)break;if(i!==g){if(!i){t.appendChild(g);continue}if(!g){t.removeChild(i),--r;continue}t.insertBefore(g,i)}}}function listenImage(t,e,n){const r=t;let i=!0,g=!1,y=!1;const k=[listenOnce(r,EventType.LOAD,function(){y=!0,g||e()})];return r.src&&IMAGE_DECODE?(g=!0,r.decode().then(function(){i&&e()}).catch(function(L){i&&(y?e():n())})):k.push(listenOnce(r,EventType.ERROR,n)),function(){i=!1,k.forEach(unlistenByKey)}}function load(t,e){return new Promise((n,r)=>{function i(){y(),n(t)}function g(){y(),r(new Error("Image load error"))}function y(){t.removeEventListener("load",i),t.removeEventListener("error",g)}t.addEventListener("load",i),t.addEventListener("error",g)})}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,g){const y=getCacheKey$1(e,n,r),k=y in this.cache_;this.cache_[y]=i,g&&(i.getImageState()===ImageState.IDLE&&i.load(),i.getImageState()===ImageState.LOADING?i.ready().then(()=>{this.patternCache_[y]=getSharedCanvasContext2D().createPattern(i.getImage(1),"repeat")}):this.patternCache_[y]=getSharedCanvasContext2D().createPattern(i.getImage(1),"repeat")),k||++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,g){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=r,this.canvas_={},this.color_=g,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,g){let y=e===void 0?void 0:shared.get(e,n,i);return y||(y=new IconImage(t,t&&"src"in t?t.src||void 0:e,n,r,i),shared.set(e,n,i,y,g)),g&&y&&!shared.getPattern(e,n,i)&&shared.set(e,n,i,y,g),y}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 g=e[r+1];g!==void 0&&(n[fontRegExMatchIndex[r]]=g)}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 g,y;function k($,V,z){let j=!0;for(let oe=0;oe<r;++oe){const re=n[oe];if(y=measureTextWidth($+" "+V+" "+e+re,i),z!=re){const ie=measureTextWidth($+" "+V+" "+e+z+","+re,i);j=j&&ie!=y}}return!!j}function L(){let $=!0;const V=checkedFonts.getKeys();for(let z=0,j=V.length;z<j;++z){const oe=V[z];if(checkedFonts.get(oe)<100){const[re,ie,ae]=oe.split(`
|
|
54
54
|
`);k(re,ie,ae)?(clear(textHeights),measureContext=null,measureFont=void 0,checkedFonts.set(oe,100)):(checkedFonts.set(oe,checkedFonts.get(oe)+1,!0),$=!1)}}$&&(clearInterval(g),g=void 0)}return function($){const V=getFontParameters($);if(!V)return;const z=V.families;for(let j=0,oe=z.length;j<oe;++j){const re=z[j],ie=V.style+`
|
|
55
55
|
`+V.weight+`
|
|
56
56
|
`+re;checkedFonts.get(ie)===void 0&&(checkedFonts.set(ie,100,!0),k(V.style,V.weight,re)||(checkedFonts.set(ie,0,!0),g===void 0&&(g=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(`
|
|
@@ -704,4 +704,4 @@ void main(void) {
|
|
|
704
704
|
* @author RubaXa <trash@rubaxa.org>
|
|
705
705
|
* @author owenm <owen23355@gmail.com>
|
|
706
706
|
* @license MIT
|
|
707
|
-
*/function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(r){_defineProperty(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _typeof(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(e){return typeof e}:_typeof=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(t)}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _extends(){return _extends=Object.assign||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 _objectWithoutPropertiesLoose(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,g;for(g=0;g<r.length;g++)i=r[g],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function _objectWithoutProperties(t,e){if(t==null)return{};var n=_objectWithoutPropertiesLoose(t,e),r,i;if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(t);for(i=0;i<g.length;i++)r=g[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var version="1.15.6";function userAgent(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(t,e,n){t.addEventListener(e,n,!IE11OrLess&&captureMode)}function off(t,e,n){t.removeEventListener(e,n,!IE11OrLess&&captureMode)}function matches(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function getParentOrHost(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function closest(t,e,n,r){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&matches(t,e):matches(t,e))||r&&t===n)return t;if(t===n)break}while(t=getParentOrHost(t))}return null}var R_SPACE=/\s+/g;function toggleClass(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(R_SPACE," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(R_SPACE," ")}}function css(t,e,n){var r=t&&t.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=n+(typeof n=="string"?"":"px")}}function matrix(t,e){var n="";if(typeof t=="string")n=t;else do{var r=css(t,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function find(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,g=r.length;if(n)for(;i<g;i++)n(r[i],i);return r}return[]}function getWindowScrollingElement(){var t=document.scrollingElement;return t||document.documentElement}function getRect(t,e,n,r,i){if(!(!t.getBoundingClientRect&&t!==window)){var g,y,k,L,$,V,z;if(t!==window&&t.parentNode&&t!==getWindowScrollingElement()?(g=t.getBoundingClientRect(),y=g.top,k=g.left,L=g.bottom,$=g.right,V=g.height,z=g.width):(y=0,k=0,L=window.innerHeight,$=window.innerWidth,V=window.innerHeight,z=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!IE11OrLess))do if(i&&i.getBoundingClientRect&&(css(i,"transform")!=="none"||n&&css(i,"position")!=="static")){var j=i.getBoundingClientRect();y-=j.top+parseInt(css(i,"border-top-width")),k-=j.left+parseInt(css(i,"border-left-width")),L=y+g.height,$=k+g.width;break}while(i=i.parentNode);if(r&&t!==window){var oe=matrix(i||t),re=oe&&oe.a,ie=oe&&oe.d;oe&&(y/=ie,k/=re,z/=re,V/=ie,L=y+V,$=k+z)}return{top:y,left:k,bottom:L,right:$,width:z,height:V}}}function isScrolledPast(t,e,n){for(var r=getParentAutoScrollElement(t,!0),i=getRect(t)[e];r;){var g=getRect(r)[n],y=void 0;if(y=i>=g,!y)return r;if(r===getWindowScrollingElement())break;r=getParentAutoScrollElement(r,!1)}return!1}function getChild(t,e,n,r){for(var i=0,g=0,y=t.children;g<y.length;){if(y[g].style.display!=="none"&&y[g]!==Sortable.ghost&&(r||y[g]!==Sortable.dragged)&&closest(y[g],n.draggable,t,!1)){if(i===e)return y[g];i++}g++}return null}function lastChild(t,e){for(var n=t.lastElementChild;n&&(n===Sortable.ghost||css(n,"display")==="none"||e&&!matches(n,e));)n=n.previousElementSibling;return n||null}function index(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==Sortable.clone&&(!e||matches(t,e))&&n++;return n}function getRelativeScrollOffset(t){var e=0,n=0,r=getWindowScrollingElement();if(t)do{var i=matrix(t),g=i.a,y=i.d;e+=t.scrollLeft*g,n+=t.scrollTop*y}while(t!==r&&(t=t.parentNode));return[e,n]}function indexOfObject(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n)}return-1}function getParentAutoScrollElement(t,e){if(!t||!t.getBoundingClientRect)return getWindowScrollingElement();var n=t,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=css(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return getWindowScrollingElement();if(r||e)return n;r=!0}}while(n=n.parentNode);return getWindowScrollingElement()}function extend(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function isRectEqual(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var _throttleTimeout;function throttle(t,e){return function(){if(!_throttleTimeout){var n=arguments,r=this;n.length===1?t.call(r,n[0]):t.apply(r,n),_throttleTimeout=setTimeout(function(){_throttleTimeout=void 0},e)}}}function cancelThrottle(){clearTimeout(_throttleTimeout),_throttleTimeout=void 0}function scrollBy(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function clone(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function getChildContainingRectFromElement(t,e,n){var r={};return Array.from(t.children).forEach(function(i){var g,y,k,L;if(!(!closest(i,e.draggable,t,!1)||i.animated||i===n)){var $=getRect(i);r.left=Math.min((g=r.left)!==null&&g!==void 0?g:1/0,$.left),r.top=Math.min((y=r.top)!==null&&y!==void 0?y:1/0,$.top),r.right=Math.max((k=r.right)!==null&&k!==void 0?k:-1/0,$.right),r.bottom=Math.max((L=r.bottom)!==null&&L!==void 0?L:-1/0,$.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var expando="Sortable"+new Date().getTime();function AnimationStateManager(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(i){if(!(css(i,"display")==="none"||i===Sortable.ghost)){t.push({target:i,rect:getRect(i)});var g=_objectSpread2({},t[t.length-1].rect);if(i.thisAnimationDuration){var y=matrix(i,!0);y&&(g.top-=y.f,g.left-=y.e)}i.fromRect=g}})}},addAnimationState:function(r){t.push(r)},removeAnimationState:function(r){t.splice(indexOfObject(t,{target:r}),1)},animateAll:function(r){var i=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var g=!1,y=0;t.forEach(function(k){var L=0,$=k.target,V=$.fromRect,z=getRect($),j=$.prevFromRect,oe=$.prevToRect,re=k.rect,ie=matrix($,!0);ie&&(z.top-=ie.f,z.left-=ie.e),$.toRect=z,$.thisAnimationDuration&&isRectEqual(j,z)&&!isRectEqual(V,z)&&(re.top-z.top)/(re.left-z.left)===(V.top-z.top)/(V.left-z.left)&&(L=calculateRealTime(re,j,oe,i.options)),isRectEqual(z,V)||($.prevFromRect=V,$.prevToRect=z,L||(L=i.options.animation),i.animate($,re,z,L)),L&&(g=!0,y=Math.max(y,L),clearTimeout($.animationResetTimer),$.animationResetTimer=setTimeout(function(){$.animationTime=0,$.prevFromRect=null,$.fromRect=null,$.prevToRect=null,$.thisAnimationDuration=null},L),$.thisAnimationDuration=L)}),clearTimeout(e),g?e=setTimeout(function(){typeof r=="function"&&r()},y):typeof r=="function"&&r(),t=[]},animate:function(r,i,g,y){if(y){css(r,"transition",""),css(r,"transform","");var k=matrix(this.el),L=k&&k.a,$=k&&k.d,V=(i.left-g.left)/(L||1),z=(i.top-g.top)/($||1);r.animatingX=!!V,r.animatingY=!!z,css(r,"transform","translate3d("+V+"px,"+z+"px,0)"),this.forRepaintDummy=repaint(r),css(r,"transition","transform "+y+"ms"+(this.options.easing?" "+this.options.easing:"")),css(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){css(r,"transition",""),css(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},y)}}}}function repaint(t){return t.offsetWidth}function calculateRealTime(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var plugins=[],defaults={initializeByDefault:!0},PluginManager={mount:function t(e){for(var n in defaults)defaults.hasOwnProperty(n)&&!(n in e)&&(e[n]=defaults[n]);plugins.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),plugins.push(e)},pluginEvent:function t(e,n,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var g=e+"Global";plugins.forEach(function(y){n[y.pluginName]&&(n[y.pluginName][g]&&n[y.pluginName][g](_objectSpread2({sortable:n},r)),n.options[y.pluginName]&&n[y.pluginName][e]&&n[y.pluginName][e](_objectSpread2({sortable:n},r)))})},initializePlugins:function t(e,n,r,i){plugins.forEach(function(k){var L=k.pluginName;if(!(!e.options[L]&&!k.initializeByDefault)){var $=new k(e,n,e.options);$.sortable=e,$.options=e.options,e[L]=$,_extends(r,$.defaults)}});for(var g in e.options)if(e.options.hasOwnProperty(g)){var y=this.modifyOption(e,g,e.options[g]);typeof y<"u"&&(e.options[g]=y)}},getEventProperties:function t(e,n){var r={};return plugins.forEach(function(i){typeof i.eventProperties=="function"&&_extends(r,i.eventProperties.call(n[i.pluginName],e))}),r},modifyOption:function t(e,n,r){var i;return plugins.forEach(function(g){e[g.pluginName]&&g.optionListeners&&typeof g.optionListeners[n]=="function"&&(i=g.optionListeners[n].call(e[g.pluginName],r))}),i}};function dispatchEvent(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,g=t.cloneEl,y=t.toEl,k=t.fromEl,L=t.oldIndex,$=t.newIndex,V=t.oldDraggableIndex,z=t.newDraggableIndex,j=t.originalEvent,oe=t.putSortable,re=t.extraEventProperties;if(e=e||n&&n[expando],!!e){var ie,ae=e.options,ue="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!IE11OrLess&&!Edge?ie=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(ie=document.createEvent("Event"),ie.initEvent(r,!0,!0)),ie.to=y||n,ie.from=k||n,ie.item=i||n,ie.clone=g,ie.oldIndex=L,ie.newIndex=$,ie.oldDraggableIndex=V,ie.newDraggableIndex=z,ie.originalEvent=j,ie.pullMode=oe?oe.lastPutMode:void 0;var de=_objectSpread2(_objectSpread2({},re),PluginManager.getEventProperties(r,e));for(var pe in de)ie[pe]=de[pe];n&&n.dispatchEvent(ie),ae[ue]&&ae[ue].call(e,ie)}}var _excluded=["evt"],pluginEvent=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,g=_objectWithoutProperties(r,_excluded);PluginManager.pluginEvent.bind(Sortable)(e,n,_objectSpread2({dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,dragStarted:moved,putSortable,activeSortable:Sortable.active,originalEvent:i,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(k){_dispatchEvent({sortable:n,name:k,originalEvent:i})}},g))};function _dispatchEvent(t){dispatchEvent(_objectSpread2({putSortable,cloneEl,targetEl:dragEl,rootEl,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex},t))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists=typeof document<"u",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),_detectDirection=function t(e,n){var r=css(e),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),g=getChild(e,0,n),y=getChild(e,1,n),k=g&&css(g),L=y&&css(y),$=k&&parseInt(k.marginLeft)+parseInt(k.marginRight)+getRect(g).width,V=L&&parseInt(L.marginLeft)+parseInt(L.marginRight)+getRect(y).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(g&&k.float&&k.float!=="none"){var z=k.float==="left"?"left":"right";return y&&(L.clear==="both"||L.clear===z)?"vertical":"horizontal"}return g&&(k.display==="block"||k.display==="flex"||k.display==="table"||k.display==="grid"||$>=i&&r[CSSFloatProperty]==="none"||y&&r[CSSFloatProperty]==="none"&&$+V>i)?"vertical":"horizontal"},_dragElInRowColumn=function t(e,n,r){var i=r?e.left:e.top,g=r?e.right:e.bottom,y=r?e.width:e.height,k=r?n.left:n.top,L=r?n.right:n.bottom,$=r?n.width:n.height;return i===k||g===L||i+y/2===k+$/2},_detectNearestEmptySortable=function t(e,n){var r;return sortables.some(function(i){var g=i[expando].options.emptyInsertThreshold;if(!(!g||lastChild(i))){var y=getRect(i),k=e>=y.left-g&&e<=y.right+g,L=n>=y.top-g&&n<=y.bottom+g;if(k&&L)return r=i}}),r},_prepareGroup=function t(e){function n(g,y){return function(k,L,$,V){var z=k.options.group.name&&L.options.group.name&&k.options.group.name===L.options.group.name;if(g==null&&(y||z))return!0;if(g==null||g===!1)return!1;if(y&&g==="clone")return g;if(typeof g=="function")return n(g(k,L,$,V),y)(k,L,$,V);var j=(y?k:L).options.group.name;return g===!0||typeof g=="string"&&g===j||g.join&&g.indexOf(j)>-1}}var r={},i=e.group;(!i||_typeof(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,e.group=r},_hideGhostForTarget=function t(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function t(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&!ChromeForAndroid&&document.addEventListener("click",function(t){if(ignoreNextClick)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0);var nearestEmptyInsertDetectEvent=function t(e){if(dragEl){e=e.touches?e.touches[0]:e;var n=_detectNearestEmptySortable(e.clientX,e.clientY);if(n){var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[expando]._onDragOver(r)}}},_checkOutsideTargetEl=function t(e){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(e.target)};function Sortable(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=_extends({},e),t[expando]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(y,k){y.setData("Text",k.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==!1&&"PointerEvent"in window&&(!Safari||IOS),emptyInsertThreshold:5};PluginManager.initializePlugins(this,t,n);for(var r in n)!(r in e)&&(e[r]=n[r]);_prepareGroup(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?on(t,"pointerdown",this._onTapStart):(on(t,"mousedown",this._onTapStart),on(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(t,"dragover",this),on(t,"dragenter",this)),sortables.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function t(e){!this.el.contains(e)&&e!==this.el&&(lastTarget=null)},_getDirection:function t(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,dragEl):this.options.direction},_onTapStart:function t(e){if(e.cancelable){var n=this,r=this.el,i=this.options,g=i.preventOnFilter,y=e.type,k=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,L=(k||e).target,$=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||L,V=i.filter;if(_saveInputCheckedState(r),!dragEl&&!(/mousedown|pointerdown/.test(y)&&e.button!==0||i.disabled)&&!$.isContentEditable&&!(!this.nativeDraggable&&Safari&&L&&L.tagName.toUpperCase()==="SELECT")&&(L=closest(L,i.draggable,r,!1),!(L&&L.animated)&&lastDownEl!==L)){if(oldIndex=index(L),oldDraggableIndex=index(L,i.draggable),typeof V=="function"){if(V.call(this,e,L,this)){_dispatchEvent({sortable:n,rootEl:$,name:"filter",targetEl:L,toEl:r,fromEl:r}),pluginEvent("filter",n,{evt:e}),g&&e.preventDefault();return}}else if(V&&(V=V.split(",").some(function(z){if(z=closest($,z.trim(),r,!1),z)return _dispatchEvent({sortable:n,rootEl:z,name:"filter",targetEl:L,fromEl:r,toEl:r}),pluginEvent("filter",n,{evt:e}),!0}),V)){g&&e.preventDefault();return}i.handle&&!closest($,i.handle,r,!1)||this._prepareDragStart(e,k,L)}}},_prepareDragStart:function t(e,n,r){var i=this,g=i.el,y=i.options,k=g.ownerDocument,L;if(r&&!dragEl&&r.parentNode===g){var $=getRect(r);if(rootEl=g,dragEl=r,parentEl=dragEl.parentNode,nextEl=dragEl.nextSibling,lastDownEl=r,activeGroup=y.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(n||e).clientX,clientY:(n||e).clientY},tapDistanceLeft=tapEvt.clientX-$.left,tapDistanceTop=tapEvt.clientY-$.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,dragEl.style["will-change"]="all",L=function(){if(pluginEvent("delayEnded",i,{evt:e}),Sortable.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!FireFox&&i.nativeDraggable&&(dragEl.draggable=!0),i._triggerDragStart(e,n),_dispatchEvent({sortable:i,name:"choose",originalEvent:e}),toggleClass(dragEl,y.chosenClass,!0)},y.ignore.split(",").forEach(function(V){find(dragEl,V.trim(),_disableDraggable)}),on(k,"dragover",nearestEmptyInsertDetectEvent),on(k,"mousemove",nearestEmptyInsertDetectEvent),on(k,"touchmove",nearestEmptyInsertDetectEvent),y.supportPointer?(on(k,"pointerup",i._onDrop),!this.nativeDraggable&&on(k,"pointercancel",i._onDrop)):(on(k,"mouseup",i._onDrop),on(k,"touchend",i._onDrop),on(k,"touchcancel",i._onDrop)),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:e}),y.delay&&(!y.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}y.supportPointer?(on(k,"pointerup",i._disableDelayedDrag),on(k,"pointercancel",i._disableDelayedDrag)):(on(k,"mouseup",i._disableDelayedDrag),on(k,"touchend",i._disableDelayedDrag),on(k,"touchcancel",i._disableDelayedDrag)),on(k,"mousemove",i._delayedDragTouchMoveHandler),on(k,"touchmove",i._delayedDragTouchMoveHandler),y.supportPointer&&on(k,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(L,y.delay)}else L()}},_delayedDragTouchMoveHandler:function t(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function t(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function t(){var e=this.el.ownerDocument;off(e,"mouseup",this._disableDelayedDrag),off(e,"touchend",this._disableDelayedDrag),off(e,"touchcancel",this._disableDelayedDrag),off(e,"pointerup",this._disableDelayedDrag),off(e,"pointercancel",this._disableDelayedDrag),off(e,"mousemove",this._delayedDragTouchMoveHandler),off(e,"touchmove",this._delayedDragTouchMoveHandler),off(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function t(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):n?on(document,"touchmove",this._onTouchMove):on(document,"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function t(e,n){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:n}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var r=this.options;!e&&toggleClass(dragEl,r.dragClass,!1),toggleClass(dragEl,r.ghostClass,!0),Sortable.active=this,e&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function t(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var e=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY),e!==n);)n=e;if(dragEl.parentNode[expando]._isOutsideThisEl(e),n)do{if(n[expando]){var r=void 0;if(r=n[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:e,rootEl:n}),r&&!this.options.dragoverBubble)break}e=n}while(n=getParentOrHost(n));_unhideGhostForTarget()}},_onTouchMove:function t(e){if(tapEvt){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,g=e.touches?e.touches[0]:e,y=ghostEl&&matrix(ghostEl,!0),k=ghostEl&&y&&y.a,L=ghostEl&&y&&y.d,$=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),V=(g.clientX-tapEvt.clientX+i.x)/(k||1)+($?$[0]-ghostRelativeParentInitialScroll[0]:0)/(k||1),z=(g.clientY-tapEvt.clientY+i.y)/(L||1)+($?$[1]-ghostRelativeParentInitialScroll[1]:0)/(L||1);if(!Sortable.active&&!awaitingDragStarted){if(r&&Math.max(Math.abs(g.clientX-this._lastX),Math.abs(g.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(ghostEl){y?(y.e+=V-(lastDx||0),y.f+=z-(lastDy||0)):y={a:1,b:0,c:0,d:1,e:V,f:z};var j="matrix(".concat(y.a,",").concat(y.b,",").concat(y.c,",").concat(y.d,",").concat(y.e,",").concat(y.f,")");css(ghostEl,"webkitTransform",j),css(ghostEl,"mozTransform",j),css(ghostEl,"msTransform",j),css(ghostEl,"transform",j),lastDx=V,lastDy=z,touchEvt=g}e.cancelable&&e.preventDefault()}},_appendGhost:function t(){if(!ghostEl){var e=this.options.fallbackOnBody?document.body:rootEl,n=getRect(dragEl,!0,PositionGhostAbsolutely,!0,e),r=this.options;if(PositionGhostAbsolutely){for(ghostRelativeParent=e;css(ghostRelativeParent,"position")==="static"&&css(ghostRelativeParent,"transform")==="none"&&ghostRelativeParent!==document;)ghostRelativeParent=ghostRelativeParent.parentNode;ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement?(ghostRelativeParent===document&&(ghostRelativeParent=getWindowScrollingElement()),n.top+=ghostRelativeParent.scrollTop,n.left+=ghostRelativeParent.scrollLeft):ghostRelativeParent=getWindowScrollingElement(),ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}ghostEl=dragEl.cloneNode(!0),toggleClass(ghostEl,r.ghostClass,!1),toggleClass(ghostEl,r.fallbackClass,!0),toggleClass(ghostEl,r.dragClass,!0),css(ghostEl,"transition",""),css(ghostEl,"transform",""),css(ghostEl,"box-sizing","border-box"),css(ghostEl,"margin",0),css(ghostEl,"top",n.top),css(ghostEl,"left",n.left),css(ghostEl,"width",n.width),css(ghostEl,"height",n.height),css(ghostEl,"opacity","0.8"),css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed"),css(ghostEl,"zIndex","100000"),css(ghostEl,"pointerEvents","none"),Sortable.ghost=ghostEl,e.appendChild(ghostEl),css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function t(e,n){var r=this,i=e.dataTransfer,g=r.options;if(pluginEvent("dragStart",this,{evt:e}),Sortable.eventCanceled){this._onDrop();return}pluginEvent("setupClone",this),Sortable.eventCanceled||(cloneEl=clone(dragEl),cloneEl.removeAttribute("id"),cloneEl.draggable=!1,cloneEl.style["will-change"]="",this._hideClone(),toggleClass(cloneEl,this.options.chosenClass,!1),Sortable.clone=cloneEl),r.cloneId=_nextTick(function(){pluginEvent("clone",r),!Sortable.eventCanceled&&(r.options.removeCloneOnHide||rootEl.insertBefore(cloneEl,dragEl),r._hideClone(),_dispatchEvent({sortable:r,name:"clone"}))}),!n&&toggleClass(dragEl,g.dragClass,!0),n?(ignoreNextClick=!0,r._loopId=setInterval(r._emulateDragOver,50)):(off(document,"mouseup",r._onDrop),off(document,"touchend",r._onDrop),off(document,"touchcancel",r._onDrop),i&&(i.effectAllowed="move",g.setData&&g.setData.call(r,i,dragEl)),on(document,"drop",r),css(dragEl,"transform","translateZ(0)")),awaitingDragStarted=!0,r._dragStartId=_nextTick(r._dragStarted.bind(r,n,e)),on(document,"selectstart",r),moved=!0,window.getSelection().removeAllRanges(),Safari&&css(document.body,"user-select","none")},_onDragOver:function t(e){var n=this.el,r=e.target,i,g,y,k=this.options,L=k.group,$=Sortable.active,V=activeGroup===L,z=k.sort,j=putSortable||$,oe,re=this,ie=!1;if(_silent)return;function ae(qe,Ne){pluginEvent(qe,re,_objectSpread2({evt:e,isOwner:V,axis:oe?"vertical":"horizontal",revert:y,dragRect:i,targetRect:g,canSort:z,fromSortable:j,target:r,completed:de,onMove:function(Pt,hn){return _onMove(rootEl,n,dragEl,i,Pt,getRect(Pt),e,hn)},changed:pe},Ne))}function ue(){ae("dragOverAnimationCapture"),re.captureAnimationState(),re!==j&&j.captureAnimationState()}function de(qe){return ae("dragOverCompleted",{insertion:qe}),qe&&(V?$._hideClone():$._showClone(re),re!==j&&(toggleClass(dragEl,putSortable?putSortable.options.ghostClass:$.options.ghostClass,!1),toggleClass(dragEl,k.ghostClass,!0)),putSortable!==re&&re!==Sortable.active?putSortable=re:re===Sortable.active&&putSortable&&(putSortable=null),j===re&&(re._ignoreWhileAnimating=r),re.animateAll(function(){ae("dragOverAnimationComplete"),re._ignoreWhileAnimating=null}),re!==j&&(j.animateAll(),j._ignoreWhileAnimating=null)),(r===dragEl&&!dragEl.animated||r===n&&!r.animated)&&(lastTarget=null),!k.dragoverBubble&&!e.rootEl&&r!==document&&(dragEl.parentNode[expando]._isOutsideThisEl(e.target),!qe&&nearestEmptyInsertDetectEvent(e)),!k.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),ie=!0}function pe(){newIndex=index(dragEl),newDraggableIndex=index(dragEl,k.draggable),_dispatchEvent({sortable:re,name:"change",toEl:n,newIndex,newDraggableIndex,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=closest(r,k.draggable,n,!0),ae("dragOver"),Sortable.eventCanceled)return ie;if(dragEl.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||re._ignoreWhileAnimating===r)return de(!1);if(ignoreNextClick=!1,$&&!k.disabled&&(V?z||(y=parentEl!==rootEl):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,$,dragEl,e))&&L.checkPut(this,$,dragEl,e))){if(oe=this._getDirection(e,r)==="vertical",i=getRect(dragEl),ae("dragOverValid"),Sortable.eventCanceled)return ie;if(y)return parentEl=rootEl,ue(),this._hideClone(),ae("revert"),Sortable.eventCanceled||(nextEl?rootEl.insertBefore(dragEl,nextEl):rootEl.appendChild(dragEl)),de(!0);var le=lastChild(n,k.draggable);if(!le||_ghostIsLast(e,oe,this)&&!le.animated){if(le===dragEl)return de(!1);if(le&&n===e.target&&(r=le),r&&(g=getRect(r)),_onMove(rootEl,n,dragEl,i,r,g,e,!!r)!==!1)return ue(),le&&le.nextSibling?n.insertBefore(dragEl,le.nextSibling):n.appendChild(dragEl),parentEl=n,pe(),de(!0)}else if(le&&_ghostIsFirst(e,oe,this)){var he=getChild(n,0,k,!0);if(he===dragEl)return de(!1);if(r=he,g=getRect(r),_onMove(rootEl,n,dragEl,i,r,g,e,!1)!==!1)return ue(),n.insertBefore(dragEl,he),parentEl=n,pe(),de(!0)}else if(r.parentNode===n){g=getRect(r);var _e=0,Ce,xe=dragEl.parentNode!==n,Ie=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||i,r.animated&&r.toRect||g,oe),Oe=oe?"top":"left",$e=isScrolledPast(r,"top","top")||isScrolledPast(dragEl,"top","top"),Ue=$e?$e.scrollTop:void 0;lastTarget!==r&&(Ce=g[Oe],pastFirstInvertThresh=!1,isCircumstantialInvert=!Ie&&k.invertSwap||xe),_e=_getSwapDirection(e,r,g,oe,Ie?1:k.swapThreshold,k.invertedSwapThreshold==null?k.swapThreshold:k.invertedSwapThreshold,isCircumstantialInvert,lastTarget===r);var Et;if(_e!==0){var At=index(dragEl);do At-=_e,Et=parentEl.children[At];while(Et&&(css(Et,"display")==="none"||Et===ghostEl))}if(_e===0||Et===r)return de(!1);lastTarget=r,lastDirection=_e;var Ve=r.nextElementSibling,Fe=!1;Fe=_e===1;var ze=_onMove(rootEl,n,dragEl,i,r,g,e,Fe);if(ze!==!1)return(ze===1||ze===-1)&&(Fe=ze===1),_silent=!0,setTimeout(_unsilent,30),ue(),Fe&&!Ve?n.appendChild(dragEl):r.parentNode.insertBefore(dragEl,Fe?Ve:r),$e&&scrollBy($e,0,Ue-$e.scrollTop),parentEl=dragEl.parentNode,Ce!==void 0&&!isCircumstantialInvert&&(targetMoveDistance=Math.abs(Ce-getRect(r)[Oe])),pe(),de(!0)}if(n.contains(dragEl))return de(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function t(){off(document,"mousemove",this._onTouchMove),off(document,"touchmove",this._onTouchMove),off(document,"pointermove",this._onTouchMove),off(document,"dragover",nearestEmptyInsertDetectEvent),off(document,"mousemove",nearestEmptyInsertDetectEvent),off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function t(){var e=this.el.ownerDocument;off(e,"mouseup",this._onDrop),off(e,"touchend",this._onDrop),off(e,"pointerup",this._onDrop),off(e,"pointercancel",this._onDrop),off(e,"touchcancel",this._onDrop),off(document,"selectstart",this)},_onDrop:function t(e){var n=this.el,r=this.options;if(newIndex=index(dragEl),newDraggableIndex=index(dragEl,r.draggable),pluginEvent("drop",this,{evt:e}),parentEl=dragEl&&dragEl.parentNode,newIndex=index(dragEl),newDraggableIndex=index(dragEl,r.draggable),Sortable.eventCanceled){this._nulling();return}awaitingDragStarted=!1,isCircumstantialInvert=!1,pastFirstInvertThresh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick(this.cloneId),_cancelNextTick(this._dragStartId),this.nativeDraggable&&(off(document,"drop",this),off(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari&&css(document.body,"user-select",""),css(dragEl,"transform",""),e&&(moved&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl),(rootEl===parentEl||putSortable&&putSortable.lastPutMode!=="clone")&&cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),dragEl&&(this.nativeDraggable&&off(dragEl,"dragend",this),_disableDraggable(dragEl),dragEl.style["will-change"]="",moved&&!awaitingDragStarted&&toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,!1),toggleClass(dragEl,this.options.chosenClass,!1),_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:e}),rootEl!==parentEl?(newIndex>=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:e}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),Sortable.active&&((newIndex==null||newIndex===-1)&&(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:e}),this.save()))),this._nulling()},_nulling:function t(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(e){e.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function t(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(e),_globalDragOver(e));break;case"selectstart":e.preventDefault();break}},toArray:function t(){for(var e=[],n,r=this.el.children,i=0,g=r.length,y=this.options;i<g;i++)n=r[i],closest(n,y.draggable,this.el,!1)&&e.push(n.getAttribute(y.dataIdAttr)||_generateId(n));return e},sort:function t(e,n){var r={},i=this.el;this.toArray().forEach(function(g,y){var k=i.children[y];closest(k,this.options.draggable,i,!1)&&(r[g]=k)},this),n&&this.captureAnimationState(),e.forEach(function(g){r[g]&&(i.removeChild(r[g]),i.appendChild(r[g]))}),n&&this.animateAll()},save:function t(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function t(e,n){return closest(e,n||this.options.draggable,this.el,!1)},option:function t(e,n){var r=this.options;if(n===void 0)return r[e];var i=PluginManager.modifyOption(this,e,n);typeof i<"u"?r[e]=i:r[e]=n,e==="group"&&_prepareGroup(r)},destroy:function t(){pluginEvent("destroy",this);var e=this.el;e[expando]=null,off(e,"mousedown",this._onTapStart),off(e,"touchstart",this._onTapStart),off(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(off(e,"dragover",this),off(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sortables.splice(sortables.indexOf(this.el),1),this.el=e=null},_hideClone:function t(){if(!cloneHidden){if(pluginEvent("hideClone",this),Sortable.eventCanceled)return;css(cloneEl,"display","none"),this.options.removeCloneOnHide&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),cloneHidden=!0}},_showClone:function t(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(cloneHidden){if(pluginEvent("showClone",this),Sortable.eventCanceled)return;dragEl.parentNode==rootEl&&!this.options.group.revertClone?rootEl.insertBefore(cloneEl,dragEl):nextEl?rootEl.insertBefore(cloneEl,nextEl):rootEl.appendChild(cloneEl),this.options.group.revertClone&&this.animate(dragEl,cloneEl),css(cloneEl,"display",""),cloneHidden=!1}}};function _globalDragOver(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function _onMove(t,e,n,r,i,g,y,k){var L,$=t[expando],V=$.options.onMove,z;return window.CustomEvent&&!IE11OrLess&&!Edge?L=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(L=document.createEvent("Event"),L.initEvent("move",!0,!0)),L.to=e,L.from=t,L.dragged=n,L.draggedRect=r,L.related=i||e,L.relatedRect=g||getRect(e),L.willInsertAfter=k,L.originalEvent=y,t.dispatchEvent(L),V&&(z=V.call($,L,y)),z}function _disableDraggable(t){t.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsFirst(t,e,n){var r=getRect(getChild(n.el,0,n.options,!0)),i=getChildContainingRectFromElement(n.el,n.options,ghostEl),g=10;return e?t.clientX<i.left-g||t.clientY<r.top&&t.clientX<r.right:t.clientY<i.top-g||t.clientY<r.bottom&&t.clientX<r.left}function _ghostIsLast(t,e,n){var r=getRect(lastChild(n.el,n.options.draggable)),i=getChildContainingRectFromElement(n.el,n.options,ghostEl),g=10;return e?t.clientX>i.right+g||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>i.bottom+g||t.clientX>r.right&&t.clientY>r.top}function _getSwapDirection(t,e,n,r,i,g,y,k){var L=r?t.clientY:t.clientX,$=r?n.height:n.width,V=r?n.top:n.left,z=r?n.bottom:n.right,j=!1;if(!y){if(k&&targetMoveDistance<$*i){if(!pastFirstInvertThresh&&(lastDirection===1?L>V+$*g/2:L<z-$*g/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)j=!0;else if(lastDirection===1?L<V+targetMoveDistance:L>z-targetMoveDistance)return-lastDirection}else if(L>V+$*(1-i)/2&&L<z-$*(1-i)/2)return _getInsertDirection(e)}return j=j||y,j&&(L<V+$*g/2||L>z-$*g/2)?L>V+$/2?1:-1:0}function _getInsertDirection(t){return index(dragEl)<index(t)?1:-1}function _generateId(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function _saveInputCheckedState(t){savedInputChecked.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&savedInputChecked.push(r)}}function _nextTick(t){return setTimeout(t,0)}function _cancelNextTick(t){return clearTimeout(t)}documentExists&&on(document,"touchmove",function(t){(Sortable.active||awaitingDragStarted)&&t.cancelable&&t.preventDefault()}),Sortable.utils={on,off,css,find,is:function t(e,n){return!!closest(e,n,e,!1)},extend,throttle,closest,toggleClass,clone,index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild,expando},Sortable.get=function(t){return t[expando]},Sortable.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(Sortable.utils=_objectSpread2(_objectSpread2({},Sortable.utils),r.utils)),PluginManager.mount(r)})},Sortable.create=function(t,e){return new Sortable(t,e)},Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=!1,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?on(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on(document,"pointermove",this._handleFallbackAutoScroll):r.touches?on(document,"touchmove",this._handleFallbackAutoScroll):on(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?off(document,"dragover",this._handleAutoScroll):(off(document,"pointermove",this._handleFallbackAutoScroll),off(document,"touchmove",this._handleFallbackAutoScroll),off(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval(),clearAutoScrolls(),cancelThrottle()},nulling:function(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null,autoScrolls.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var i=this,g=(n.touches?n.touches[0]:n).clientX,y=(n.touches?n.touches[0]:n).clientY,k=document.elementFromPoint(g,y);if(touchEvt$1=n,r||this.options.forceAutoScrollFallback||Edge||IE11OrLess||Safari){autoScroll(n,this.options,k,r);var L=getParentAutoScrollElement(k,!0);scrolling&&(!pointerElemChangedInterval||g!==lastAutoScrollX||y!==lastAutoScrollY)&&(pointerElemChangedInterval&&clearPointerElemChangedInterval(),pointerElemChangedInterval=setInterval(function(){var $=getParentAutoScrollElement(document.elementFromPoint(g,y),!0);$!==L&&(L=$,clearAutoScrolls()),autoScroll(n,i.options,$,r)},10),lastAutoScrollX=g,lastAutoScrollY=y)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(k,!0)===getWindowScrollingElement()){clearAutoScrolls();return}autoScroll(n,this.options,getParentAutoScrollElement(k,!1),!1)}}},_extends(t,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls(){autoScrolls.forEach(function(t){clearInterval(t.pid)}),autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle(function(t,e,n,r){if(e.scroll){var i=(t.touches?t.touches[0]:t).clientX,g=(t.touches?t.touches[0]:t).clientY,y=e.scrollSensitivity,k=e.scrollSpeed,L=getWindowScrollingElement(),$=!1,V;scrollRootEl!==n&&(scrollRootEl=n,clearAutoScrolls(),scrollEl=e.scroll,V=e.scrollFn,scrollEl===!0&&(scrollEl=getParentAutoScrollElement(n,!0)));var z=0,j=scrollEl;do{var oe=j,re=getRect(oe),ie=re.top,ae=re.bottom,ue=re.left,de=re.right,pe=re.width,le=re.height,he=void 0,_e=void 0,Ce=oe.scrollWidth,xe=oe.scrollHeight,Ie=css(oe),Oe=oe.scrollLeft,$e=oe.scrollTop;oe===L?(he=pe<Ce&&(Ie.overflowX==="auto"||Ie.overflowX==="scroll"||Ie.overflowX==="visible"),_e=le<xe&&(Ie.overflowY==="auto"||Ie.overflowY==="scroll"||Ie.overflowY==="visible")):(he=pe<Ce&&(Ie.overflowX==="auto"||Ie.overflowX==="scroll"),_e=le<xe&&(Ie.overflowY==="auto"||Ie.overflowY==="scroll"));var Ue=he&&(Math.abs(de-i)<=y&&Oe+pe<Ce)-(Math.abs(ue-i)<=y&&!!Oe),Et=_e&&(Math.abs(ae-g)<=y&&$e+le<xe)-(Math.abs(ie-g)<=y&&!!$e);if(!autoScrolls[z])for(var At=0;At<=z;At++)autoScrolls[At]||(autoScrolls[At]={});(autoScrolls[z].vx!=Ue||autoScrolls[z].vy!=Et||autoScrolls[z].el!==oe)&&(autoScrolls[z].el=oe,autoScrolls[z].vx=Ue,autoScrolls[z].vy=Et,clearInterval(autoScrolls[z].pid),(Ue!=0||Et!=0)&&($=!0,autoScrolls[z].pid=setInterval((function(){r&&this.layer===0&&Sortable.active._onTouchMove(touchEvt$1);var Ve=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*k:0,Fe=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*k:0;typeof V=="function"&&V.call(Sortable.dragged.parentNode[expando],Fe,Ve,t,touchEvt$1,autoScrolls[this.layer].el)!=="continue"||scrollBy(autoScrolls[this.layer].el,Fe,Ve)}).bind({layer:z}),24))),z++}while(e.bubbleScroll&&j!==L&&(j=getParentAutoScrollElement(j,!1)));scrolling=$}},30),drop=function t(e){var n=e.originalEvent,r=e.putSortable,i=e.dragEl,g=e.activeSortable,y=e.dispatchSortableEvent,k=e.hideGhostForTarget,L=e.unhideGhostForTarget;if(n){var $=r||g;k();var V=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,z=document.elementFromPoint(V.clientX,V.clientY);L(),$&&!$.el.contains(z)&&(y("spill"),this.onSpill({dragEl:i,putSortable:r}))}};function Revert(){}Revert.prototype={startIndex:null,dragStart:function t(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function t(e){var n=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var i=getChild(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop},_extends(Revert,{pluginName:"revertOnSpill"});function Remove(){}Remove.prototype={onSpill:function t(e){var n=e.dragEl,r=e.putSortable,i=r||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop},_extends(Remove,{pluginName:"removeOnSpill"}),Sortable.mount(new AutoScrollPlugin),Sortable.mount(Remove,Revert);const useTable=(t,e={},n=!0,r,i,g=y=>y)=>{const y=vue.reactive({tableData:[],pageable:{page:1,size:10,total:0},searchParam:{},searchInitParam:{},totalParam:{},loading:!1}),k=vue.computed({get:()=>({page:y.pageable.page,size:y.pageable.size}),set:ie=>{console.log("我是分页更新之后的值",ie)}}),L=async()=>{if(y.loading=!0,!t){y.loading=!1;return}try{const ie=localStorage.getItem("MytaskGotoListPageQuery");if(ie){e={},y.totalParam={};const ue=JSON.parse(ie);e={...e,...ue},y.searchParam={...ue}}Object.assign(y.totalParam,e,n?k.value:{});for(const ue in y.searchParam)y.searchParam[ue]===""&&delete y.searchParam[ue];let ae=await t(g({...y.searchInitParam,...y.totalParam}));if(r&&(ae=await r(ae)),y.tableData=n?ae.list:ae,n){const{currentPage:ue,pageSize:de,total:pe}=ae;V({page:ue,size:de,total:pe})}}catch(ie){i&&i(ie)}finally{y.loading=!1}},$=()=>{y.totalParam={},y.searchInitParam={},e={};const ie={};for(const ae in y.searchParam)(y.searchParam[ae]||y.searchParam[ae]===!1||y.searchParam[ae]===0)&&(ie[ae]=y.searchParam[ae]);Object.assign(y.totalParam,ie,n?k.value:{})},V=ie=>{Object.assign(y.pageable,ie)},z=()=>{y.pageable.page=1,$(),L().then()},j=()=>{y.pageable.page=1,y.searchParam={...y.searchInitParam},$(),L().then()},oe=ie=>{y.pageable.page=1,y.pageable.size=ie,L().then()},re=ie=>{y.pageable.page=ie,L().then()};return{...vue.toRefs(y),getTableList:L,search:z,reset:j,handleSizeChange:oe,handleCurrentChange:re,updatedTotalParam:$}},useSelection=(t="id",e)=>{const n=vue.ref(!1),r=vue.ref([]),i=vue.computed(()=>{const y=[];return r.value.forEach(k=>y.push(get$5(k,t))),y});return{isSelected:n,selectedList:r,selectedListIds:i,selectionChange:y=>{y.length?n.value=!0:n.value=!1,r.value=y,e&&e(y)}}},_hoisted_1$5={class:"search-form-item"},_sfc_main$6=vue.defineComponent({name:"SearchFormItem",__name:"SearchFormItem",props:{column:{},searchParam:{}},emits:["search"],setup(t,{emit:e}){vue.useCssVars(ae=>({"20c95159":z.value}));const n=t,r=e,i=vue.computed(()=>n.searchParam),g=vue.computed(()=>{var ae,ue,de;return{label:((ae=n.column.fieldNames)==null?void 0:ae.label)??"label",value:((ue=n.column.fieldNames)==null?void 0:ue.value)??"value",children:((de=n.column.fieldNames)==null?void 0:de.children)??"children"}}),y=vue.inject("enumMap",vue.ref(new Map)),k=vue.computed(()=>{var ue;let ae=y.value.get(n.column.prop);return ae?(((ue=n.column.search)==null?void 0:ue.el)==="select-v2"&&n.column.fieldNames&&(ae=ae.map(de=>({...de,label:de[g.value.label],value:de[g.value.value]}))),ae):[]}),L=vue.computed(()=>{var ae,ue;return((ue=(ae=n.column.search)==null?void 0:ae.props)==null?void 0:ue.options)??k.value??[]}),$=vue.computed(()=>{var he,_e;const ae=g.value.label,ue=g.value.value,de=g.value.children,pe=(he=n.column.search)==null?void 0:he.el;let le=((_e=n.column.search)==null?void 0:_e.props)??{};return pe==="tree-select"&&(le={...le,props:{...le.props,label:ae,children:de},nodeKey:ue}),pe==="cascader"&&(le={...le,props:{...le.props,label:ae,value:ue,children:de}}),le}),V=vue.computed(()=>{var de,pe,le,he,_e,Ce,xe;const ae=n.column.search;return["datetimerange","daterange","monthrange"].includes((de=ae==null?void 0:ae.props)==null?void 0:de.type)||(pe=ae==null?void 0:ae.props)!=null&&pe.isRange?{rangeSeparator:((le=ae==null?void 0:ae.props)==null?void 0:le.rangeSeparator)??"-",startPlaceholder:((he=ae==null?void 0:ae.props)==null?void 0:he.startPlaceholder)??"开始时间",endPlaceholder:((_e=ae==null?void 0:ae.props)==null?void 0:_e.endPlaceholder)??"结束时间"}:{placeholder:((Ce=ae==null?void 0:ae.props)==null?void 0:Ce.placeholder)??((xe=ae==null?void 0:ae.el)!=null&&xe.includes("input")?"请输入":"请选择")}}),z=vue.computed(()=>{var le,he;const ae=n.column.search,ue=i.value[(ae==null?void 0:ae.key)??handleProp(n.column.prop)],de=ae==null?void 0:ae.el,pe=(le=ae==null?void 0:ae.props)==null?void 0:le.placeholder;if(ae!=null&&ae.width)if(isFunction$2(ae==null?void 0:ae.width)){if(ae==null?void 0:ae.width(ue))return(ae==null?void 0:ae.width(ue))+"px"}else return(ae==null?void 0:ae.width)+"px";if(ue&&ue.length!==0&&["select","select-v2","tree-select","cascader"].includes(de||"")){if(isArray$2(ue)){let xe=L.value;const Ie=[];if(ue.forEach(Oe=>{const $e=xe.find(Et=>Et[g.value.value]===Oe);Ie.push($e?$e[g.value.label]:Oe);const Ue=$e[g.value.children]??L.value;xe=$e?Ue:[]}),(he=ae==null?void 0:ae.props)!=null&&he.multiple){const Ue=getWidthByText(Ie[0])+42;return ue.length>1?Ue+26+getWidthByText("+ "+(ue.length-1))+"px":Ue+"px"}return getWidthByText(Ie.join(" / "))+"px"}let _e=L.value.find(xe=>xe[g.value.value]===ue);const Ce=_e?_e[g.value.label]:ue;return getWidthByText(Ce)+"px"}else return pe?getWidthByText(pe)+"px":["date-picker","time-picker","time-select"].includes(de||"")?"210px":"100px"}),j=vue.computed(()=>{var ae,ue,de,pe,le;return(de=(ue=(ae=n.column)==null?void 0:ae.search)==null?void 0:ue.props)!=null&&de.multiple&&((le=(pe=n.column)==null?void 0:pe.search)==null?void 0:le.el)==="select"?{collapseTags:!0,collapseTagsTooltip:!0}:{}}),oe=vue.computed(()=>{var ue;const ae=n.column.search;return((ue=ae==null?void 0:ae.props)==null?void 0:ue.clearable)??((ae==null?void 0:ae.defaultValue)==null||!1)}),re=ae=>{var ue,de,pe,le,he,_e,Ce,xe,Ie;if(((pe=(de=(ue=n.column)==null?void 0:ue.search)==null?void 0:de.props)==null?void 0:pe.type)==="daterange"){const{searchParam:Oe}=vue.toRefs(n);if(ae!=null&&ae.length){const $e=((_e=(he=(le=n.column)==null?void 0:le.search)==null?void 0:he.props)==null?void 0:_e.beginTime)||"beginTime",Ue=((Ie=(xe=(Ce=n.column)==null?void 0:Ce.search)==null?void 0:xe.props)==null?void 0:Ie.endTime)||"endTime";Oe.value[$e]=ae[0],Oe.value[Ue]=ae[1]}else delete Oe.value.beginTime,delete Oe.value.endTime}(ae==null||ae==="")&&r("search"),ae instanceof Array&&!ae.length&&r("search")},ie=()=>{var ae;["input","input-number"].includes(((ae=n.column.search)==null?void 0:ae.el)||"")&&r("search")};return(ae,ue)=>{var de,pe,le,he,_e,Ce,xe;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$5,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(((de=ae.column.search)==null?void 0:de.render)??`el-${(pe=ae.column.search)==null?void 0:pe.el}`),vue.mergeProps({...$.value,...V.value,searchParam:i.value,clearable:oe.value,...j.value},{modelValue:i.value[((le=ae.column.search)==null?void 0:le.key)??vue.unref(handleProp)(ae.column.prop)],"onUpdate:modelValue":ue[0]||(ue[0]=Ie=>{var Oe;return i.value[((Oe=ae.column.search)==null?void 0:Oe.key)??vue.unref(handleProp)(ae.column.prop)]=Ie}),modelModifiers:{trim:!0},data:((he=ae.column.search)==null?void 0:he.el)==="tree-select"?k.value:[],options:L.value,"prefix-icon":(Ce=(_e=ae.column.search)==null?void 0:_e.props)==null?void 0:Ce.prefixIcon,onChange:re,onKeyup:vue.withKeys(ie,["enter"])}),vue.createSlots({default:vue.withCtx(()=>{var Ie;return[((Ie=ae.column.search)==null?void 0:Ie.el)==="select"?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:0},vue.renderList(k.value,(Oe,$e)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent("el-option"),{key:$e,label:Oe[g.value.label]??"",value:Oe[g.value.value]},null,8,["label","value"]))),128)):vue.renderSlot(ae.$slots,"default",{key:1},void 0,!0)]}),_:2},[((xe=ae.column.search)==null?void 0:xe.el)==="cascader"?{name:"default",fn:vue.withCtx(({data:Ie})=>[vue.createElementVNode("span",null,vue.toDisplayString(Ie[g.value.label]),1)]),key:"0"}:void 0]),1040,["modelValue","data","options","prefix-icon"]))])}}}),SearchFormItem=_export_sfc(_sfc_main$6,[["__scopeId","data-v-5a276628"]]),_hoisted_1$4={class:"table-search"},_hoisted_2$3={key:0},_hoisted_3$3={key:0,class:"operation"},_sfc_main$5=vue.defineComponent({name:"SearchForm",__name:"SearchForm",props:{columns:{default:()=>[]},searchParam:{default:()=>({})},search:{},reset:{},isShowResetBtn:{type:Boolean,default:!0},isShowSearchBtn:{type:Boolean,default:!0}},setup(t){const e=t;return(n,r)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$4,[vue.createVNode(vue.unref(ElForm),{ref:"formRef",model:n.searchParam,class:"table-search--left",onSubmit:r[0]||(r[0]=vue.withModifiers(()=>{},["prevent"]))},{default:vue.withCtx(()=>[vue.renderSlot(n.$slots,"default",{},void 0,!0),n.columns.length?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.columns,i=>{var g,y,k;return vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:i.prop},[!vue.unref(isBoolean$1)((g=i.search)==null?void 0:g.isShow)||(y=i.search)!=null&&y.isShow?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$3,[vue.createVNode(vue.unref(ElFormItem),null,vue.createSlots({default:vue.withCtx(()=>[vue.createVNode(SearchFormItem,{column:i,"search-param":n.searchParam,onSearch:n.search},null,8,["column","search-param","onSearch"])]),_:2},[(k=i.search)!=null&&k.label?{name:"label",fn:vue.withCtx(()=>[vue.createVNode(vue.unref(ElSpace),{size:4},{default:vue.withCtx(()=>{var L,$;return[vue.createElementVNode("span",null,vue.toDisplayString(`${i.search.label}`),1),(L=i.search)!=null&&L.tooltip?(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),{key:0,effect:"dark",content:($=i.search)==null?void 0:$.tooltip,placement:"top"},{default:vue.withCtx(()=>r[1]||(r[1]=[vue.createElementVNode("i",{class:vue.normalizeClass("iconfont icon-yiwen")},null,-1)])),_:2},1032,["content"])):vue.createCommentVNode("",!0)]}),_:2},1024),r[2]||(r[2]=vue.createElementVNode("span",null,":",-1))]),key:"0"}:void 0]),1024)])):vue.createCommentVNode("",!0)],64)}),128)),e.isShowSearchBtn?(vue.openBlock(),vue.createBlock(vue.unref(ElButton),{key:0,type:"primary",class:"table-search--search-btn",onClick:n.search},{icon:vue.withCtx(()=>r[3]||(r[3]=[vue.createElementVNode("i",{class:"ztable-iconfont icon-zhihao-table-search"},null,-1)])),default:vue.withCtx(()=>[r[4]||(r[4]=vue.createTextVNode(" 搜索 "))]),_:1},8,["onClick"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0)]),_:3},8,["model"]),e.isShowResetBtn&&n.columns.length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$3,[vue.createVNode(vue.unref(ElTooltip),{class:"box-item",effect:"light",content:"重置",placement:"top"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElButton),{class:"table-search--reset-btn",onClick:n.reset},{icon:vue.withCtx(()=>[vue.createVNode(vue.unref(ElIcon),{size:14},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(refresh_left_default))]),_:1})]),_:1},8,["onClick"])]),_:1})])):vue.createCommentVNode("",!0)]))}}),SearchForm=_export_sfc(_sfc_main$5,[["__scopeId","data-v-78af7c4d"]]),_hoisted_1$3={class:"el-pagination__total zh-page-total"},_sfc_main$4=vue.defineComponent({name:"Pagination",__name:"tablePagination",props:{pageable:{},handleSizeChange:{type:Function},handleCurrentChange:{type:Function}},setup(t){return(e,n)=>e.pageable.total?(vue.openBlock(),vue.createBlock(vue.unref(ElPagination),{key:0,class:"zh-pagination",background:!0,"current-page":e.pageable.page,"page-size":e.pageable.size,total:e.pageable.total,teleported:!1,layout:"slot, sizes, prev, pager, next, jumper",onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange},{default:vue.withCtx(()=>[vue.renderSlot(e.$slots,"zhPaginationLeftSlot",{pageable:e.pageable},()=>[vue.createElementVNode("div",_hoisted_1$3,"共"+vue.toDisplayString(e.pageable.total)+"条数据",1)],!0)]),_:3},8,["current-page","page-size","total","onSizeChange","onCurrentChange"])):vue.createCommentVNode("",!0)}}),TablePagination=_export_sfc(_sfc_main$4,[["__scopeId","data-v-5965b30c"]]);function _isSlot(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!vue.isVNode(t)}const _sfc_main$3=vue.defineComponent({name:"TableColumn",__name:"TableColumn",props:{column:{},customColumn:{type:Boolean}},setup(t){const e=t,n=vue.ref(e.column),r=vue.useSlots(),i=vue.inject("enumMap",vue.ref(new Map)),g=(L,$)=>i.value.get(L.prop)&&L.isFilterEnum?filterEnum(handleRowAccordingToProp($.row,L.prop),i.value.get(L.prop),L.fieldNames):formatValue(handleRowAccordingToProp($.row,L.prop)),y=(L,$)=>filterEnum(handleRowAccordingToProp($.row,L.prop),i.value.get(L.prop),L.fieldNames,"tag"),k=L=>vue.createVNode(vue.Fragment,null,[L.isShow&&vue.createVNode(ElTableColumn,vue.mergeProps(L,{"class-name":L.wrap&&"table-column--wrap",showOverflowTooltip:L.showOverflowTooltip??L.prop!=="operation"}),{default:$=>{var z,j,oe;let V;if(L._children)return L._children.map(re=>k(re));if(L.render)return L.render($);if(L.prop==="operation"){if(!r[handleProp(L.prop)]){n.value.width=0;return}const re=((j=(z=r[handleProp(L.prop)]($))==null?void 0:z.at(0))==null?void 0:j.children)||[],ie=Ce=>Array.from(Ce).map(xe=>{var Ie,Oe;return((Ie=xe.type)==null?void 0:Ie.name)==="ElButton"&&xe.children!=="v-if"?xe:(Oe=xe.children)!=null&&Oe.length?ie(xe.children):null}).filter(Boolean).flat(),ae=ie(re),ue=Ce=>{let xe="";return Ce.forEach(Ie=>{xe+=Ie.children.default()[0].children}),getWidthByText(xe,14)+16*(Ce.length>0?Ce.length-1:0)},de=Ce=>{n.value.hasOperationMaxWidth||(n.value.width=0,n.value.hasOperationMaxWidth=!0);const xe=n.value.width;let Ie=0;Ce>0&&(Ie=Math.round(Ce)+32),Ie>Number.parseInt((xe==null?void 0:xe.toString())||"0")&&(n.value.width=Ie,n.value.hasOperationMaxWidth=!0)};if(ae.length<=3||L.expandOperationButtons){const Ce=Math.ceil(ue(ae));let xe=Ce;return e.customColumn&&(xe=ae.length?ae.length===1?Ce+30:Ce:50),de(xe),vue.createVNode("div",{class:"operation-container all-action"},[r[handleProp(L.prop)]($)])}const pe=[],le=ae.slice(0,2),he=vue.createVNode(ElButton,{link:!0,type:"primary"},{default:()=>[vue.createTextVNode("更多")]});pe.push(...le),pe[3]=vue.createVNode(ElDropdown,null,{default:()=>he,dropdown:()=>{let Ce;return vue.createVNode(ElDropdownMenu,null,_isSlot(Ce=ae.slice(2).map(xe=>vue.createVNode(ElDropdownItem,null,_isSlot(xe)?xe:{default:()=>[xe]})))?Ce:{default:()=>[Ce]})}});const _e=ue([...le,he]);return de(_e),vue.createVNode("div",{class:"operation-container"},[pe])}return r[handleProp(L.prop)]?r[handleProp(L.prop)]($):L.tag?vue.createVNode(ElTag,{type:y(L,$)},_isSlot(V=g(L,$))?V:{default:()=>[V]}):L.click&&g(L,$)!==DEFAULT_VALUE$1?vue.createVNode("span",{class:"el-link el-link--primary scan-link",onClick:function(){L.click($==null?void 0:$.row,$==null?void 0:$.$index)}},[L.formatter?L.formatter($.row,$.column,$.row[L.prop],$.$index):g(L,$)]):vue.createVNode("span",{class:((oe=filterEnumObj(handleRowAccordingToProp($.row,L.prop),i.value.get(L.prop)))==null?void 0:oe.state)||"text"},[L.formatter?L.formatter($.row,$.column,$.row[L.prop],$.$index):g(L,$)])},header:$=>L.headerRender?L.headerRender($):r[`${handleProp(L.prop)}Header`]?r[`${handleProp(L.prop)}Header`]($):L.label})]);return(L,$)=>(vue.openBlock(),vue.createBlock(k,vue.normalizeProps(vue.guardReactiveProps(n.value)),null,16))}}),_hoisted_1$2={class:"custom-column-dialog"},_hoisted_2$2={class:"table-body"},_hoisted_3$2={class:"name"},_hoisted_4$1={key:0,class:"ml-10"},_hoisted_5$1={class:"custom-width-label text"},_hoisted_6$1={key:0,class:"custom-width-input-box"},_hoisted_7$1={class:"custom-column-footer"},_hoisted_8$1={class:"flex-1"},_sfc_main$2=vue.defineComponent({name:"ColSetting",__name:"ColSetting",props:{originTableColumns:{default:()=>[]}},emits:["close","submit","dragSort"],setup(t,{expose:e,emit:n}){const r=vue.ref(),i=vue.ref(!1),g=t,y=vue.ref([]),k=vue.ref(new Date().getTime()),L=vue.ref(!1),$=vue.ref(),V=ue=>{y.value=ue,L.value=!0,vue.nextTick(()=>{re()})},z=ue=>{i.value=ue},j=n,oe=async()=>{j("submit",y.value),L.value=!1},re=()=>{$.value&&($.value.destroy(),k.value=new Date().getTime(),r.value.doLayout()),vue.nextTick(()=>{const ue=document.querySelector(".custom-column-dialog tbody");$.value=Sortable.create(ue,{handle:".move",animation:300,filter:".operation",onEnd({newIndex:de,oldIndex:pe}){if(!de&&de!==0||!pe&&pe!==0)return;let le=cloneDeep(y.value);const he=le[pe];if(de<pe)for(let _e=de;_e<pe;_e++)le[_e].order=String(Number(le[_e].order)+1);else for(let _e=pe+1;_e<=de;_e++)le[_e].order=String(Number(le[_e].order)-1);he.order=String(de),y.value=cloneDeep(le)}})})},ie=()=>{const ue=cloneDeep(g.originTableColumns);i.value?y.value=ue:y.value=y.value.map(de=>{const pe=y.value.find(le=>le.prop===de.prop);return!(pe!=null&&pe.isShow)||pe.prop==="operation"?de:ue.find(le=>le.prop===de.prop)}),re()},ae=()=>{L.value=!1};return e({openColSetting:V}),(ue,de)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$2,[vue.createVNode(_sfc_main$s,{modelValue:L.value,"onUpdate:modelValue":de[1]||(de[1]=pe=>L.value=pe),size:"middle"},{header:vue.withCtx(()=>de[2]||(de[2]=[vue.createElementVNode("div",{class:"title"},"自定义列",-1),vue.createElementVNode("div",{class:"sub-title"},"勾选需要展示的列,拖动列名进行排序",-1)])),footer:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_7$1,[vue.createVNode(vue.unref(ElCheckbox),{modelValue:i.value,"onUpdate:modelValue":de[0]||(de[0]=pe=>i.value=pe),class:"checkbox",label:"全局",onChange:z},null,8,["modelValue"]),vue.createElementVNode("div",_hoisted_8$1,[vue.createVNode(ZhButton$1,{onClick:ae},{default:vue.withCtx(()=>de[4]||(de[4]=[vue.createTextVNode("取消")])),_:1}),vue.createVNode(ZhButton$1,{class:"w-auto",onClick:ie},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(i.value?"全局恢复默认":"恢复默认"),1)]),_:1}),vue.createVNode(ZhButton$1,{type:"primary",onClick:oe},{default:vue.withCtx(()=>de[5]||(de[5]=[vue.createTextVNode("保存")])),_:1})])])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$2,[(vue.openBlock(),vue.createBlock(vue.unref(ElTable),{ref_key:"tableRef",ref:r,class:"custom-colum-table",key:k.value,data:y.value.filter(pe=>!pe.hideInCustomColumn),"row-class-name":pe=>pe.row.prop==="operation"?"operation":""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElTableColumn),{width:"100",label:"选择"},{default:vue.withCtx(({row:pe})=>[vue.createVNode(vue.unref(ElCheckbox),{class:"custom-column-check",modelValue:pe.isShow,"onUpdate:modelValue":le=>pe.isShow=le,disabled:pe.readonly},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(ElTableColumn),{prop:"label",label:"名称"},{default:vue.withCtx(({row:pe})=>[vue.createElementVNode("div",_hoisted_3$2,[vue.createTextVNode(vue.toDisplayString(pe.label)+" ",1),pe.readonly?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$1,"(必选)")):vue.createCommentVNode("",!0),pe.prop!=="operation"?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:1,class:"move move-icon"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(rank_default))]),_:1})):vue.createCommentVNode("",!0)])]),_:1}),vue.createVNode(vue.unref(ElTableColumn),{prop:"width",label:"宽度",width:"180"},{default:vue.withCtx(({row:pe})=>[vue.createElementVNode("div",{class:vue.normalizeClass(`custom-width-box ${pe.readonly&&"readonly"}`)},[de[3]||(de[3]=vue.createElementVNode("span",{class:"text"},"宽度",-1)),vue.createElementVNode("span",_hoisted_5$1,vue.toDisplayString(pe.width)+" px",1),pe.readonly?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$1,[vue.createVNode(vue.unref(ElInputNumber),{modelValue:pe.width,"onUpdate:modelValue":le=>pe.width=le,class:"custom-width-input",min:10,max:1e3,controls:!1},null,8,["modelValue","onUpdate:modelValue"])]))],2)]),_:1})]),_:1},8,["data","row-class-name"]))])]),_:1},8,["modelValue"])]))}}),ColSetting=_export_sfc(_sfc_main$2,[["__scopeId","data-v-e04b0a53"]]),_hoisted_1$1={class:"no-card table-main zh-table"},_hoisted_2$1={class:"table-title-container"},_hoisted_3$1={key:0,class:"table-title"},_hoisted_4={key:1,class:"table-header-tip"},_hoisted_5={class:"table-header-container"},_hoisted_6={key:0,class:"table-header"},_hoisted_7={class:"header-button-ri"},_hoisted_8={key:0},_hoisted_9={class:"table-body-container"},_hoisted_10={class:"text d-flex inline-input-text pointer"},_hoisted_11={key:1,class:"inline-input-box d-flex"},_hoisted_12={class:"table-empty"},_hoisted_13=["src"],_sfc_main$1=vue.defineComponent({name:"ZhTable",__name:"Table",props:{columns:{default:()=>[]},data:{},requestApi:{},requestAuto:{type:Boolean,default:!0},requestError:{type:Function,default:t=>{console.error("protable中请求数据错误",t)}},handleParam:{},dataCallback:{},selectChangeCallback:{},title:{},pagination:{type:Boolean,default:!0},initParam:{default:{}},border:{type:Boolean,default:!1},rowKey:{default:"id"},isShowSearch:{type:Boolean,default:!0},maxHeight:{},isShowSearchBtn:{type:Boolean,default:!0},isShowResetBtn:{type:Boolean,default:!0},customColumn:{type:Boolean,default:!1},onSortChange:{},offset:{},customColumnCacheKey:{},customColumnPageCacheKey:{},beforeReset:{}},emits:["search","reset","dargSort"],setup(t,{expose:e,emit:n}){var Un;const r=vue.ref(new Date().getTime()),i={mounted(xn){var On;(On=xn.querySelector("input"))==null||On.focus()}},g=vue.useSlots(),y=t,k=vue.ref(),L=["selection","radio","index","expand","sort","input"],$=vue.ref(y.isShowSearch),V=vue.ref(""),z=vue.ref({}),j=vue.ref(y.maxHeight),{selectionChange:oe,selectedList:re,selectedListIds:ie,isSelected:ae}=useSelection(y.rowKey,y.selectChangeCallback),{loading:ue,tableData:de,pageable:pe,searchParam:le,searchInitParam:he,getTableList:_e,search:Ce,reset:xe,handleSizeChange:Ie,handleCurrentChange:Oe}=useTable(y.requestApi,y.initParam,y.pagination,y.dataCallback,y.requestError,y.handleParam),$e=xn=>{function On(er){return er.replace(/[A-Z]/g,ar=>"_"+ar.toLowerCase())}const Ln={ascending:"asc",descending:"desc"},{prop:_n,order:Mn}=xn,Wn=On(handleProp(_n)),Qn=Ln[Mn];le.value={...le.value,sortKey:Wn,sortOrder:Qn},pe.value.page=1,Ce()},Ue=()=>k.value.clearSelection(),Et=()=>k.value.clearSort(),At=vue.ref(!1),Ve=()=>{En(),y.customColumn&&Zn(),y.requestAuto&&_e(),y.data&&(pe.value.total=y.data.length)};vue.onMounted(()=>{Ve(),vue.nextTick(()=>{At.value=!0})}),vue.onActivated(()=>{At.value&&Ve()}),vue.onDeactivated(()=>{}),vue.onUnmounted(()=>{});const Fe=vue.computed(()=>y.data?y.pagination?y.data.slice((pe.value.page-1)*pe.value.size,pe.value.size*pe.value.page):y.data:de.value),ze=xn=>{pe.value.total=xn};vue.watch(()=>y.initParam,_e,{deep:!0});let qe=vue.reactive(y.columns);const Ne=vue.computed(()=>hn(qe)),kt=vue.ref(new Map),Pt=async({prop:xn,enum:On})=>{if(!On||kt.value.has(xn)&&(typeof On=="function"||kt.value.get(xn)===On))return;if(typeof On!="function")return kt.value.set(xn,vue.unref(On));kt.value.set(xn,[]);const{data:Ln}=await On();kt.value.set(xn,Ln)};vue.provide("enumMap",kt);const hn=(xn,On=[])=>(xn.forEach(async Ln=>{var _n;(_n=Ln._children)!=null&&_n.length&&On.push(...hn(Ln._children)),On.push(Ln),Ln.isShow=Ln.isShow??!0,Ln.isFilterEnum=Ln.isFilterEnum??!0,await Pt(Ln)}),On.filter(Ln=>{var _n;return!((_n=Ln._children)!=null&&_n.length)})),Lt=vue.computed(()=>{var xn;return(xn=Ne.value)==null?void 0:xn.filter(On=>{var Ln,_n;return((Ln=On.search)==null?void 0:Ln.el)||((_n=On.search)==null?void 0:_n.render)}).sort((On,Ln)=>On.search.order-Ln.search.order)});(Un=Lt.value)==null||Un.forEach((xn,On)=>{var Mn,Wn,Qn;xn.search.order=((Mn=xn.search)==null?void 0:Mn.order)??On+2;const Ln=((Wn=xn.search)==null?void 0:Wn.key)??handleProp(xn.prop),_n=(Qn=xn.search)==null?void 0:Qn.defaultValue;_n!=null&&(he.value[Ln]=_n,le.value[Ln]=_n)});const jt=n,Tn=()=>{var xn;(xn=k.value)==null||xn.clearSelection(),Ce(),jt("search")},kn=()=>{y.beforeReset&&y.beforeReset(),xe(),Et(),jt("reset")},En=()=>{const xn=document.querySelector(".el-table__body-wrapper tbody");xn&&Sortable.create(xn,{handle:".move",animation:300,onEnd({newIndex:On,oldIndex:Ln}){const[_n]=Fe.value.splice(Ln,1);Fe.value.splice(On,0,_n),jt("dargSort",{newIndex:On,oldIndex:Ln})}})},Cn=vue.ref(0),In=(xn,On)=>{const Ln=de.value.findIndex(_n=>_n.$showInput);Ln>-1&&(de.value[Ln]=cloneDeep(z.value),de.value[Ln].$showInput=!1),Cn.value=$get(xn,String(On)),xn.$showInput=!0,z.value=cloneDeep(xn)},Dn=async(xn,On,Ln)=>{set$2(xn,On,Cn.value),Ln&&await Ln(xn),xn.$showInput=!1,ElMessage.success("更新成功"),await _e()},Nn=async xn=>{const On=de.value.findIndex(Ln=>isEqual(pickBy$1(Ln,identity$1),pickBy$1(xn,identity$1)));On>-1&&(de.value[On]=cloneDeep(z.value),de.value[On].$showInput=!1)},Vn=useColSetting(y.customColumnCacheKey),Bn=vue.ref(null),Yn=()=>qe.map((xn,On)=>({readonly:xn.isCustomDisable||["id","operation"].includes(String(xn.prop)),order:On,index:On,width:xn.width||xn.minWidth,...xn})).sort((xn,On)=>{const Ln=Number(xn.order),_n=Number(On.order);return Ln-_n}),Xn=()=>{zn=vue.reactive(Yn()),vue.nextTick(()=>{Bn.value.openColSetting(cloneDeep(zn))})},Zn=()=>{if(!y.customColumnPageCacheKey)return;const xn=Vn.getColumnCache(y.customColumnPageCacheKey);if(xn!=null&&xn.length){const On=qe.map(Ln=>{const _n=xn.find(Mn=>Mn.prop===Ln.prop);if(_n){const Mn={...Ln,order:_n.order||Ln.order,isShow:_n.isShow!==void 0?_n.isShow:Ln.isShow,readonly:_n.readonly!==void 0?_n.readonly:Ln.readonly,prop:_n.prop||Ln.prop,index:_n.index||Ln.index};return Ln.minWidth&&(Mn.minWidth=_n.minWidth||Ln.minWidth),Ln.width&&(Mn.width=_n.width||Ln.width),Mn}return Ln});zn=vue.reactive(On),qe=vue.reactive(zn)}};let zn=vue.reactive(Yn());const jn=cloneDeep(Yn()),$n=xn=>{if(!y.customColumnPageCacheKey)return console.error("请添加自定义列缓存配置项:customColumnPageCacheKey");xn=xn.map(On=>{const Ln=jn.find(_n=>_n.prop===On.prop);return Ln&&Ln.minWidth&&(On.minWidth=On.width,delete On.width),On}),qe=vue.reactive(cloneDeep(xn)),Vn.setColumnCache(y.customColumnPageCacheKey,xn),r.value=new Date().getTime(),k.value.doLayout()};return e({element:k,tableData:Fe,radio:V,pageable:pe,searchParam:le,searchInitParam:he,setPageTotal:ze,getTableList:_e,search:Ce,reset:xe,handleSizeChange:Ie,handleCurrentChange:Oe,clearSelection:Ue,enumMap:kt,isSelected:ae,selectedList:re,selectedListIds:ie}),(xn,On)=>{const Ln=vue.resolveDirective("loading");return vue.openBlock(),vue.createBlock(vue.unref(ElConfigProvider),{locale:vue.unref(zhCn)},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$1,[vue.createElementVNode("div",_hoisted_2$1,[xn.title?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$1,vue.toDisplayString(xn.title),1)):vue.createCommentVNode("",!0),vue.unref(g).headerTip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4,[vue.renderSlot(xn.$slots,"headerTip",{},void 0,!0)])):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_5,[vue.withDirectives(vue.createVNode(SearchForm,{search:Tn,reset:kn,columns:Lt.value,"search-param":vue.unref(le),"is-show-reset-btn":y.isShowResetBtn,"is-show-search-btn":y.isShowSearchBtn},{default:vue.withCtx(()=>[xn.$slots.tableHeader?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6,[vue.createElementVNode("div",_hoisted_7,[vue.renderSlot(xn.$slots,"tableHeader",{selectedList:vue.unref(re),selectedListIds:vue.unref(ie),isSelected:vue.unref(ae)},void 0,!0)])])):vue.createCommentVNode("",!0)]),_:3},8,["columns","search-param","is-show-reset-btn","is-show-search-btn"]),[[vue.vShow,$.value]])]),vue.unref(g).searchBarBottom?(vue.openBlock(),vue.createElementBlock("div",_hoisted_8,[vue.renderSlot(xn.$slots,"searchBarBottom",{},void 0,!0)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_9,[y.customColumn?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"col-setting-button",onClick:Xn},[vue.createVNode(vue.unref(ElTooltip),{class:"box-item",effect:"dark",content:"自定义列",placement:"top"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElIcon),{size:16,color:"#000000a6"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(setting_default))]),_:1})]),_:1})])):vue.createCommentVNode("",!0),vue.withDirectives((vue.openBlock(),vue.createBlock(vue.unref(ElTable),vue.mergeProps({ref_key:"tableRef",ref:k},xn.$attrs,{key:r.value,data:Fe.value,border:xn.border,"row-key":xn.rowKey,"max-height":j.value,"row-style":{height:"42px"},"tooltip-effect":"light","tooltip-options":{showArrow:!1,placement:"bottom-start",offset:y.offset?y.offset:-20}},vue.toHandlers(xn.$attrs),{onSelectionChange:vue.unref(oe),onSortChange:On[1]||(On[1]=_n=>y.onSortChange?y.onSortChange(_n):$e(_n))}),{append:vue.withCtx(()=>[vue.renderSlot(xn.$slots,"append",{},void 0,!0)]),empty:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_12,[vue.renderSlot(xn.$slots,"empty",{},()=>[vue.createElementVNode("img",{src:`${vue.unref(CDN_URL$1)}ghy-components/empty.png`,class:"zh-empty-img",alt:"notData"},null,8,_hoisted_13),On[5]||(On[5]=vue.createElementVNode("div",null,"暂无数据",-1))],!0)])]),default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(qe).sort((_n,Mn)=>_n.order-Mn.order),_n=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:_n},[_n.type&&L.includes(_n.type)&&_n.isShow?(vue.openBlock(),vue.createBlock(vue.unref(ElTableColumn),vue.mergeProps({key:0,ref_for:!0},_n,{align:_n.align??"left","reserve-selection":_n.type=="selection"}),vue.createSlots({default:vue.withCtx(Mn=>[_n.type=="expand"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[_n.render?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(_n.render),vue.mergeProps({key:0,ref_for:!0},Mn),null,16)):vue.renderSlot(xn.$slots,_n.type,vue.mergeProps({key:1,ref_for:!0},Mn),void 0,!0)],64)):vue.createCommentVNode("",!0),_n.type=="sort"?(vue.openBlock(),vue.createBlock(vue.unref(ElTag),{key:1,class:"move"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_caret_default))]),_:1})]),_:1})):vue.createCommentVNode("",!0),_n.type=="input"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:2},[Mn.row.$showInput?(vue.openBlock(),vue.createElementBlock("div",_hoisted_11,[vue.withDirectives(vue.createVNode(vue.unref(ElInputNumber),{modelValue:Cn.value,"onUpdate:modelValue":On[0]||(On[0]=Wn=>Cn.value=Wn),min:0,controls:!1},null,8,["modelValue"]),[[i]]),vue.createVNode(vue.unref(ElLink),{underline:!1,type:"primary",onClick:Wn=>Dn(Mn.row,String(_n.prop),_n.blurCallback),class:"ml-5"},{default:vue.withCtx(()=>On[3]||(On[3]=[vue.createTextVNode(" 保存 ")])),_:2},1032,["onClick"]),vue.createVNode(vue.unref(ElLink),{type:"primary",underline:!1,onClick:Wn=>Nn(Mn.row),class:"ml-5"},{default:vue.withCtx(()=>On[4]||(On[4]=[vue.createTextVNode(" 取消 ")])),_:2},1032,["onClick"])])):(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),{key:0,content:"编辑",placement:"top"},{default:vue.withCtx(()=>[vue.createElementVNode("span",_hoisted_10,[vue.createTextVNode(vue.toDisplayString(vue.unref($get)(Mn.row,String(_n.prop)))+" ",1),vue.createVNode(vue.unref(ElLink),{underline:!1,class:"text d-flex inline-input-text pointer",onClick:Wn=>In(Mn.row,_n.prop)},{default:vue.withCtx(()=>On[2]||(On[2]=[vue.createElementVNode("i",{class:"iconfont icon-edit"},null,-1)])),_:2},1032,["onClick"])])]),_:2},1024))],64)):vue.createCommentVNode("",!0)]),_:2},[_n.headerRender?{name:"header",fn:vue.withCtx(Mn=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(_n.headerRender),vue.mergeProps({ref_for:!0},Mn),null,16))]),key:"0"}:void 0]),1040,["align","reserve-selection"])):vue.createCommentVNode("",!0),!_n.type&&_n.prop&&_n.isShow?(vue.openBlock(),vue.createBlock(_sfc_main$3,{key:1,column:_n,"custom-column":xn.customColumn},vue.createSlots({_:2},[vue.renderList(Object.keys(xn.$slots),Mn=>({name:Mn,fn:vue.withCtx(Wn=>[vue.renderSlot(xn.$slots,Mn,vue.mergeProps({ref_for:!0},Wn),void 0,!0)])}))]),1032,["column","custom-column"])):vue.createCommentVNode("",!0)],64))),128))]),_:3},16,["data","border","row-key","max-height","tooltip-options","onSelectionChange"])),[[Ln,vue.unref(ue)]])]),vue.renderSlot(xn.$slots,"pagination",{},()=>[xn.pagination?(vue.openBlock(),vue.createBlock(TablePagination,{key:0,pageable:vue.unref(pe),"handle-size-change":vue.unref(Ie),"handle-current-change":vue.unref(Oe)},{zhPaginationLeftSlot:vue.withCtx(_n=>[vue.renderSlot(xn.$slots,"zhPaginationLeft",vue.normalizeProps(vue.guardReactiveProps(_n)),void 0,!0)]),_:3},8,["pageable","handle-size-change","handle-current-change"])):vue.createCommentVNode("",!0)],!0)]),y.customColumn?(vue.openBlock(),vue.createBlock(ColSetting,{key:0,ref_key:"colRef",ref:Bn,"origin-table-columns":vue.unref(jn),onSubmit:$n},null,8,["origin-table-columns"])):vue.createCommentVNode("",!0)]),_:3},8,["locale"])}}}),Table=_export_sfc(_sfc_main$1,[["__scopeId","data-v-77b1ce18"]]),ZhTable=withInstall$1(Table),_hoisted_1={key:1},_hoisted_2={key:1,class:"zh-base-item--value--file"},_hoisted_3={key:2},_sfc_main=vue.defineComponent({name:"ZhBaseItem",__name:"BaseItem",props:{label:{},labelRender:{},colon:{type:Boolean,default:!1},value:{},fileId:{},rewriteFileName:{},valueRender:{},onClick:{},labelWidth:{},infoDirection:{default:"horizontal"},defaultValue:{default:DEFAULT_VALUE$1},className:{},labelClassName:{},valueClassName:{},span:{default:1},showFileName:{type:Boolean,default:!0},fetchFileById:{}},setup(t){const e=vue.useSlots(),n=t,r=vue.inject("infoLabelWidth",void 0),i=vue.computed(()=>!!(n.onClick&&n.value)),g=vue.computed(()=>!!(!n.value&&n.fileId)),y=vue.ref(),k=vue.computed(()=>{var j;const z=(j=y.value)==null?void 0:j.name;if(!z)return"";if(n.rewriteFileName){const oe=z.substring(z.lastIndexOf("."));return n.rewriteFileName+oe}return z}),L=vue.computed(()=>{const z={},j=n.labelWidth||r;return j&&n.infoDirection==="horizontal"&&(isNaN(Number(j))?z.width=j:z.width=j+"px"),z}),$=vue.computed(()=>({...L.value})),V=vue.computed(()=>n.value===""?DEFAULT_VALUE$1:n.value??DEFAULT_VALUE$1);return vue.watchEffect(async()=>{!g.value||!n.fileId||!n.fetchFileById||(y.value=await n.fetchFileById(n.fileId))}),(z,j)=>(vue.openBlock(),vue.createBlock(vue.unref(ZhGridItem),{span:z.span,label:z.label},{default:vue.withCtx(oe=>{var re;return[vue.createElementVNode("div",{class:vue.normalizeClass(["zh-base-item",[z.infoDirection,z.className]])},[vue.createElementVNode("div",{class:vue.normalizeClass(["zh-base-item-label",[z.infoDirection,z.labelClassName]]),style:vue.normalizeStyle({width:z.infoDirection==="horizontal"&&oe.maxLabelWidthInCol?oe.maxLabelWidthInCol+"px":void 0,...$.value})},[z.labelRender?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(z.labelRender),{key:0})):(vue.openBlock(),vue.createElementBlock("span",_hoisted_1,vue.toDisplayString(z.label)+vue.toDisplayString(z.colon?":":""),1))],6),vue.createElementVNode("div",{class:vue.normalizeClass(["zh-base-item-value",z.valueClassName])},[vue.unref(e).value?vue.renderSlot(z.$slots,"value",{key:0,content:z.value}):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[i.value?(vue.openBlock(),vue.createBlock(vue.unref(ElLink),{key:0,type:"primary",class:"zh-base-item--value--link",onClick:j[0]||(j[0]=vue.withModifiers(ie=>z.onClick&&z.onClick(z.value),["stop"]))},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(z.value),1)]),_:1})):g.value?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2,[z.showFileName?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(vue.unref(ElIcon),{class:"iconfont"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(document_default))]),_:1}),vue.createTextVNode(" "+vue.toDisplayString(k.value),1)],64)):vue.createCommentVNode("",!0),vue.createVNode(vue.unref(ElLink),{type:"primary",href:(re=y.value)==null?void 0:re.path,target:"_blank",class:vue.normalizeClass({"ml-8":z.showFileName})},{default:vue.withCtx(()=>j[1]||(j[1]=[vue.createTextVNode(" 查看/下载 ")])),_:1},8,["href","class"])])):z.valueRender?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(z.valueRender)))])):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:3},[vue.createTextVNode(vue.toDisplayString(V.value),1)],64))],64))],2)],2)]}),_:3},8,["span","label"]))}}),ZhBaseItem=withInstall$1(_sfc_main),components=[ZhBaseInfo,ZhButton,ZhDatePicker,ZhDetailHeader,ZhDetailSubTitle,ZhDialog,ZhDiyDataTable,ZhEditInfoPair,ZhFileWrapper,ZhGrid,ZhGridItem,ZhMultiGrid,ZhInfoPair,ZhInput,ZhInputNumber,ZhLoading,ZhMessageBox,ZhConfirm,ZhAlert,ZhPrompt,ZhMoneyInput,ZhPageHeadPanel,ZhToolTips,ZhMap,ZhButtonGroup,ZhTable],installer=makeInstaller(components);exports.BaseMapType=BaseMapType,exports.CDN_URL=CDN_URL,exports.COPY_RIGHT_TYPE=COPY_RIGHT_TYPE,exports.DEFAULT_VALUE=DEFAULT_VALUE,exports.DIY_DATA_TYPE=DIY_DATA_TYPE,exports.LOG_DATE_FORMAT=LOG_DATE_FORMAT,exports.SEARCH_TYPE=SEARCH_TYPE,exports.ZhAlert=ZhAlert,exports.ZhBaseInfo=ZhBaseInfo,exports.ZhBaseItem=ZhBaseItem,exports.ZhButton=ZhButton,exports.ZhButtonGroup=ZhButtonGroup,exports.ZhConfirm=ZhConfirm,exports.ZhDatePicker=ZhDatePicker,exports.ZhDetailHeader=ZhDetailHeader,exports.ZhDetailSubTitle=ZhDetailSubTitle,exports.ZhDialog=ZhDialog,exports.ZhDiyDataTable=ZhDiyDataTable,exports.ZhEditInfoPair=ZhEditInfoPair,exports.ZhFileWrapper=ZhFileWrapper,exports.ZhGrid=ZhGrid,exports.ZhGridItem=ZhGridItem,exports.ZhInfoPair=ZhInfoPair,exports.ZhInput=ZhInput,exports.ZhInputNumber=ZhInputNumber,exports.ZhLoading=ZhLoading,exports.ZhMap=ZhMap,exports.ZhMessageBox=ZhMessageBox,exports.ZhMoneyInput=ZhMoneyInput,exports.ZhMultiGrid=ZhMultiGrid,exports.ZhPageHeadPanel=ZhPageHeadPanel,exports.ZhPrompt=ZhPrompt,exports.ZhTable=ZhTable,exports.ZhToolTips=ZhToolTips,exports.baseMap=baseMap,exports.default=installer,exports.mapDefaultCenter=mapDefaultCenter,exports.mapZoom=mapZoom,exports.projection=projection,exports.renderShipsLimit=renderShipsLimit,exports.tiandituKey=tiandituKey,exports.zhongkeKey=zhongkeKey,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
707
|
+
*/function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(r){_defineProperty(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _typeof(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(e){return typeof e}:_typeof=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(t)}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _extends(){return _extends=Object.assign||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 _objectWithoutPropertiesLoose(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,g;for(g=0;g<r.length;g++)i=r[g],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function _objectWithoutProperties(t,e){if(t==null)return{};var n=_objectWithoutPropertiesLoose(t,e),r,i;if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(t);for(i=0;i<g.length;i++)r=g[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}var version="1.15.6";function userAgent(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(t,e,n){t.addEventListener(e,n,!IE11OrLess&&captureMode)}function off(t,e,n){t.removeEventListener(e,n,!IE11OrLess&&captureMode)}function matches(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function getParentOrHost(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function closest(t,e,n,r){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&matches(t,e):matches(t,e))||r&&t===n)return t;if(t===n)break}while(t=getParentOrHost(t))}return null}var R_SPACE=/\s+/g;function toggleClass(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(R_SPACE," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(R_SPACE," ")}}function css(t,e,n){var r=t&&t.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=n+(typeof n=="string"?"":"px")}}function matrix(t,e){var n="";if(typeof t=="string")n=t;else do{var r=css(t,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function find(t,e,n){if(t){var r=t.getElementsByTagName(e),i=0,g=r.length;if(n)for(;i<g;i++)n(r[i],i);return r}return[]}function getWindowScrollingElement(){var t=document.scrollingElement;return t||document.documentElement}function getRect(t,e,n,r,i){if(!(!t.getBoundingClientRect&&t!==window)){var g,y,k,L,$,V,z;if(t!==window&&t.parentNode&&t!==getWindowScrollingElement()?(g=t.getBoundingClientRect(),y=g.top,k=g.left,L=g.bottom,$=g.right,V=g.height,z=g.width):(y=0,k=0,L=window.innerHeight,$=window.innerWidth,V=window.innerHeight,z=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!IE11OrLess))do if(i&&i.getBoundingClientRect&&(css(i,"transform")!=="none"||n&&css(i,"position")!=="static")){var j=i.getBoundingClientRect();y-=j.top+parseInt(css(i,"border-top-width")),k-=j.left+parseInt(css(i,"border-left-width")),L=y+g.height,$=k+g.width;break}while(i=i.parentNode);if(r&&t!==window){var oe=matrix(i||t),re=oe&&oe.a,ie=oe&&oe.d;oe&&(y/=ie,k/=re,z/=re,V/=ie,L=y+V,$=k+z)}return{top:y,left:k,bottom:L,right:$,width:z,height:V}}}function isScrolledPast(t,e,n){for(var r=getParentAutoScrollElement(t,!0),i=getRect(t)[e];r;){var g=getRect(r)[n],y=void 0;if(y=i>=g,!y)return r;if(r===getWindowScrollingElement())break;r=getParentAutoScrollElement(r,!1)}return!1}function getChild(t,e,n,r){for(var i=0,g=0,y=t.children;g<y.length;){if(y[g].style.display!=="none"&&y[g]!==Sortable.ghost&&(r||y[g]!==Sortable.dragged)&&closest(y[g],n.draggable,t,!1)){if(i===e)return y[g];i++}g++}return null}function lastChild(t,e){for(var n=t.lastElementChild;n&&(n===Sortable.ghost||css(n,"display")==="none"||e&&!matches(n,e));)n=n.previousElementSibling;return n||null}function index(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==Sortable.clone&&(!e||matches(t,e))&&n++;return n}function getRelativeScrollOffset(t){var e=0,n=0,r=getWindowScrollingElement();if(t)do{var i=matrix(t),g=i.a,y=i.d;e+=t.scrollLeft*g,n+=t.scrollTop*y}while(t!==r&&(t=t.parentNode));return[e,n]}function indexOfObject(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n)}return-1}function getParentAutoScrollElement(t,e){if(!t||!t.getBoundingClientRect)return getWindowScrollingElement();var n=t,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=css(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return getWindowScrollingElement();if(r||e)return n;r=!0}}while(n=n.parentNode);return getWindowScrollingElement()}function extend(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function isRectEqual(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var _throttleTimeout;function throttle(t,e){return function(){if(!_throttleTimeout){var n=arguments,r=this;n.length===1?t.call(r,n[0]):t.apply(r,n),_throttleTimeout=setTimeout(function(){_throttleTimeout=void 0},e)}}}function cancelThrottle(){clearTimeout(_throttleTimeout),_throttleTimeout=void 0}function scrollBy(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function clone(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function getChildContainingRectFromElement(t,e,n){var r={};return Array.from(t.children).forEach(function(i){var g,y,k,L;if(!(!closest(i,e.draggable,t,!1)||i.animated||i===n)){var $=getRect(i);r.left=Math.min((g=r.left)!==null&&g!==void 0?g:1/0,$.left),r.top=Math.min((y=r.top)!==null&&y!==void 0?y:1/0,$.top),r.right=Math.max((k=r.right)!==null&&k!==void 0?k:-1/0,$.right),r.bottom=Math.max((L=r.bottom)!==null&&L!==void 0?L:-1/0,$.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var expando="Sortable"+new Date().getTime();function AnimationStateManager(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(i){if(!(css(i,"display")==="none"||i===Sortable.ghost)){t.push({target:i,rect:getRect(i)});var g=_objectSpread2({},t[t.length-1].rect);if(i.thisAnimationDuration){var y=matrix(i,!0);y&&(g.top-=y.f,g.left-=y.e)}i.fromRect=g}})}},addAnimationState:function(r){t.push(r)},removeAnimationState:function(r){t.splice(indexOfObject(t,{target:r}),1)},animateAll:function(r){var i=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var g=!1,y=0;t.forEach(function(k){var L=0,$=k.target,V=$.fromRect,z=getRect($),j=$.prevFromRect,oe=$.prevToRect,re=k.rect,ie=matrix($,!0);ie&&(z.top-=ie.f,z.left-=ie.e),$.toRect=z,$.thisAnimationDuration&&isRectEqual(j,z)&&!isRectEqual(V,z)&&(re.top-z.top)/(re.left-z.left)===(V.top-z.top)/(V.left-z.left)&&(L=calculateRealTime(re,j,oe,i.options)),isRectEqual(z,V)||($.prevFromRect=V,$.prevToRect=z,L||(L=i.options.animation),i.animate($,re,z,L)),L&&(g=!0,y=Math.max(y,L),clearTimeout($.animationResetTimer),$.animationResetTimer=setTimeout(function(){$.animationTime=0,$.prevFromRect=null,$.fromRect=null,$.prevToRect=null,$.thisAnimationDuration=null},L),$.thisAnimationDuration=L)}),clearTimeout(e),g?e=setTimeout(function(){typeof r=="function"&&r()},y):typeof r=="function"&&r(),t=[]},animate:function(r,i,g,y){if(y){css(r,"transition",""),css(r,"transform","");var k=matrix(this.el),L=k&&k.a,$=k&&k.d,V=(i.left-g.left)/(L||1),z=(i.top-g.top)/($||1);r.animatingX=!!V,r.animatingY=!!z,css(r,"transform","translate3d("+V+"px,"+z+"px,0)"),this.forRepaintDummy=repaint(r),css(r,"transition","transform "+y+"ms"+(this.options.easing?" "+this.options.easing:"")),css(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){css(r,"transition",""),css(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},y)}}}}function repaint(t){return t.offsetWidth}function calculateRealTime(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var plugins=[],defaults={initializeByDefault:!0},PluginManager={mount:function t(e){for(var n in defaults)defaults.hasOwnProperty(n)&&!(n in e)&&(e[n]=defaults[n]);plugins.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),plugins.push(e)},pluginEvent:function t(e,n,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var g=e+"Global";plugins.forEach(function(y){n[y.pluginName]&&(n[y.pluginName][g]&&n[y.pluginName][g](_objectSpread2({sortable:n},r)),n.options[y.pluginName]&&n[y.pluginName][e]&&n[y.pluginName][e](_objectSpread2({sortable:n},r)))})},initializePlugins:function t(e,n,r,i){plugins.forEach(function(k){var L=k.pluginName;if(!(!e.options[L]&&!k.initializeByDefault)){var $=new k(e,n,e.options);$.sortable=e,$.options=e.options,e[L]=$,_extends(r,$.defaults)}});for(var g in e.options)if(e.options.hasOwnProperty(g)){var y=this.modifyOption(e,g,e.options[g]);typeof y<"u"&&(e.options[g]=y)}},getEventProperties:function t(e,n){var r={};return plugins.forEach(function(i){typeof i.eventProperties=="function"&&_extends(r,i.eventProperties.call(n[i.pluginName],e))}),r},modifyOption:function t(e,n,r){var i;return plugins.forEach(function(g){e[g.pluginName]&&g.optionListeners&&typeof g.optionListeners[n]=="function"&&(i=g.optionListeners[n].call(e[g.pluginName],r))}),i}};function dispatchEvent(t){var e=t.sortable,n=t.rootEl,r=t.name,i=t.targetEl,g=t.cloneEl,y=t.toEl,k=t.fromEl,L=t.oldIndex,$=t.newIndex,V=t.oldDraggableIndex,z=t.newDraggableIndex,j=t.originalEvent,oe=t.putSortable,re=t.extraEventProperties;if(e=e||n&&n[expando],!!e){var ie,ae=e.options,ue="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!IE11OrLess&&!Edge?ie=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(ie=document.createEvent("Event"),ie.initEvent(r,!0,!0)),ie.to=y||n,ie.from=k||n,ie.item=i||n,ie.clone=g,ie.oldIndex=L,ie.newIndex=$,ie.oldDraggableIndex=V,ie.newDraggableIndex=z,ie.originalEvent=j,ie.pullMode=oe?oe.lastPutMode:void 0;var de=_objectSpread2(_objectSpread2({},re),PluginManager.getEventProperties(r,e));for(var pe in de)ie[pe]=de[pe];n&&n.dispatchEvent(ie),ae[ue]&&ae[ue].call(e,ie)}}var _excluded=["evt"],pluginEvent=function t(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,g=_objectWithoutProperties(r,_excluded);PluginManager.pluginEvent.bind(Sortable)(e,n,_objectSpread2({dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,dragStarted:moved,putSortable,activeSortable:Sortable.active,originalEvent:i,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(k){_dispatchEvent({sortable:n,name:k,originalEvent:i})}},g))};function _dispatchEvent(t){dispatchEvent(_objectSpread2({putSortable,cloneEl,targetEl:dragEl,rootEl,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex},t))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists=typeof document<"u",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),_detectDirection=function t(e,n){var r=css(e),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),g=getChild(e,0,n),y=getChild(e,1,n),k=g&&css(g),L=y&&css(y),$=k&&parseInt(k.marginLeft)+parseInt(k.marginRight)+getRect(g).width,V=L&&parseInt(L.marginLeft)+parseInt(L.marginRight)+getRect(y).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(g&&k.float&&k.float!=="none"){var z=k.float==="left"?"left":"right";return y&&(L.clear==="both"||L.clear===z)?"vertical":"horizontal"}return g&&(k.display==="block"||k.display==="flex"||k.display==="table"||k.display==="grid"||$>=i&&r[CSSFloatProperty]==="none"||y&&r[CSSFloatProperty]==="none"&&$+V>i)?"vertical":"horizontal"},_dragElInRowColumn=function t(e,n,r){var i=r?e.left:e.top,g=r?e.right:e.bottom,y=r?e.width:e.height,k=r?n.left:n.top,L=r?n.right:n.bottom,$=r?n.width:n.height;return i===k||g===L||i+y/2===k+$/2},_detectNearestEmptySortable=function t(e,n){var r;return sortables.some(function(i){var g=i[expando].options.emptyInsertThreshold;if(!(!g||lastChild(i))){var y=getRect(i),k=e>=y.left-g&&e<=y.right+g,L=n>=y.top-g&&n<=y.bottom+g;if(k&&L)return r=i}}),r},_prepareGroup=function t(e){function n(g,y){return function(k,L,$,V){var z=k.options.group.name&&L.options.group.name&&k.options.group.name===L.options.group.name;if(g==null&&(y||z))return!0;if(g==null||g===!1)return!1;if(y&&g==="clone")return g;if(typeof g=="function")return n(g(k,L,$,V),y)(k,L,$,V);var j=(y?k:L).options.group.name;return g===!0||typeof g=="string"&&g===j||g.join&&g.indexOf(j)>-1}}var r={},i=e.group;(!i||_typeof(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,e.group=r},_hideGhostForTarget=function t(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function t(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&!ChromeForAndroid&&document.addEventListener("click",function(t){if(ignoreNextClick)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0);var nearestEmptyInsertDetectEvent=function t(e){if(dragEl){e=e.touches?e.touches[0]:e;var n=_detectNearestEmptySortable(e.clientX,e.clientY);if(n){var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[expando]._onDragOver(r)}}},_checkOutsideTargetEl=function t(e){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(e.target)};function Sortable(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=_extends({},e),t[expando]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(y,k){y.setData("Text",k.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==!1&&"PointerEvent"in window&&(!Safari||IOS),emptyInsertThreshold:5};PluginManager.initializePlugins(this,t,n);for(var r in n)!(r in e)&&(e[r]=n[r]);_prepareGroup(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?on(t,"pointerdown",this._onTapStart):(on(t,"mousedown",this._onTapStart),on(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(t,"dragover",this),on(t,"dragenter",this)),sortables.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function t(e){!this.el.contains(e)&&e!==this.el&&(lastTarget=null)},_getDirection:function t(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,dragEl):this.options.direction},_onTapStart:function t(e){if(e.cancelable){var n=this,r=this.el,i=this.options,g=i.preventOnFilter,y=e.type,k=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,L=(k||e).target,$=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||L,V=i.filter;if(_saveInputCheckedState(r),!dragEl&&!(/mousedown|pointerdown/.test(y)&&e.button!==0||i.disabled)&&!$.isContentEditable&&!(!this.nativeDraggable&&Safari&&L&&L.tagName.toUpperCase()==="SELECT")&&(L=closest(L,i.draggable,r,!1),!(L&&L.animated)&&lastDownEl!==L)){if(oldIndex=index(L),oldDraggableIndex=index(L,i.draggable),typeof V=="function"){if(V.call(this,e,L,this)){_dispatchEvent({sortable:n,rootEl:$,name:"filter",targetEl:L,toEl:r,fromEl:r}),pluginEvent("filter",n,{evt:e}),g&&e.preventDefault();return}}else if(V&&(V=V.split(",").some(function(z){if(z=closest($,z.trim(),r,!1),z)return _dispatchEvent({sortable:n,rootEl:z,name:"filter",targetEl:L,fromEl:r,toEl:r}),pluginEvent("filter",n,{evt:e}),!0}),V)){g&&e.preventDefault();return}i.handle&&!closest($,i.handle,r,!1)||this._prepareDragStart(e,k,L)}}},_prepareDragStart:function t(e,n,r){var i=this,g=i.el,y=i.options,k=g.ownerDocument,L;if(r&&!dragEl&&r.parentNode===g){var $=getRect(r);if(rootEl=g,dragEl=r,parentEl=dragEl.parentNode,nextEl=dragEl.nextSibling,lastDownEl=r,activeGroup=y.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(n||e).clientX,clientY:(n||e).clientY},tapDistanceLeft=tapEvt.clientX-$.left,tapDistanceTop=tapEvt.clientY-$.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,dragEl.style["will-change"]="all",L=function(){if(pluginEvent("delayEnded",i,{evt:e}),Sortable.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!FireFox&&i.nativeDraggable&&(dragEl.draggable=!0),i._triggerDragStart(e,n),_dispatchEvent({sortable:i,name:"choose",originalEvent:e}),toggleClass(dragEl,y.chosenClass,!0)},y.ignore.split(",").forEach(function(V){find(dragEl,V.trim(),_disableDraggable)}),on(k,"dragover",nearestEmptyInsertDetectEvent),on(k,"mousemove",nearestEmptyInsertDetectEvent),on(k,"touchmove",nearestEmptyInsertDetectEvent),y.supportPointer?(on(k,"pointerup",i._onDrop),!this.nativeDraggable&&on(k,"pointercancel",i._onDrop)):(on(k,"mouseup",i._onDrop),on(k,"touchend",i._onDrop),on(k,"touchcancel",i._onDrop)),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:e}),y.delay&&(!y.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}y.supportPointer?(on(k,"pointerup",i._disableDelayedDrag),on(k,"pointercancel",i._disableDelayedDrag)):(on(k,"mouseup",i._disableDelayedDrag),on(k,"touchend",i._disableDelayedDrag),on(k,"touchcancel",i._disableDelayedDrag)),on(k,"mousemove",i._delayedDragTouchMoveHandler),on(k,"touchmove",i._delayedDragTouchMoveHandler),y.supportPointer&&on(k,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(L,y.delay)}else L()}},_delayedDragTouchMoveHandler:function t(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function t(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function t(){var e=this.el.ownerDocument;off(e,"mouseup",this._disableDelayedDrag),off(e,"touchend",this._disableDelayedDrag),off(e,"touchcancel",this._disableDelayedDrag),off(e,"pointerup",this._disableDelayedDrag),off(e,"pointercancel",this._disableDelayedDrag),off(e,"mousemove",this._delayedDragTouchMoveHandler),off(e,"touchmove",this._delayedDragTouchMoveHandler),off(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function t(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):n?on(document,"touchmove",this._onTouchMove):on(document,"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function t(e,n){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:n}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var r=this.options;!e&&toggleClass(dragEl,r.dragClass,!1),toggleClass(dragEl,r.ghostClass,!0),Sortable.active=this,e&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function t(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var e=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY),e!==n);)n=e;if(dragEl.parentNode[expando]._isOutsideThisEl(e),n)do{if(n[expando]){var r=void 0;if(r=n[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:e,rootEl:n}),r&&!this.options.dragoverBubble)break}e=n}while(n=getParentOrHost(n));_unhideGhostForTarget()}},_onTouchMove:function t(e){if(tapEvt){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,g=e.touches?e.touches[0]:e,y=ghostEl&&matrix(ghostEl,!0),k=ghostEl&&y&&y.a,L=ghostEl&&y&&y.d,$=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),V=(g.clientX-tapEvt.clientX+i.x)/(k||1)+($?$[0]-ghostRelativeParentInitialScroll[0]:0)/(k||1),z=(g.clientY-tapEvt.clientY+i.y)/(L||1)+($?$[1]-ghostRelativeParentInitialScroll[1]:0)/(L||1);if(!Sortable.active&&!awaitingDragStarted){if(r&&Math.max(Math.abs(g.clientX-this._lastX),Math.abs(g.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(ghostEl){y?(y.e+=V-(lastDx||0),y.f+=z-(lastDy||0)):y={a:1,b:0,c:0,d:1,e:V,f:z};var j="matrix(".concat(y.a,",").concat(y.b,",").concat(y.c,",").concat(y.d,",").concat(y.e,",").concat(y.f,")");css(ghostEl,"webkitTransform",j),css(ghostEl,"mozTransform",j),css(ghostEl,"msTransform",j),css(ghostEl,"transform",j),lastDx=V,lastDy=z,touchEvt=g}e.cancelable&&e.preventDefault()}},_appendGhost:function t(){if(!ghostEl){var e=this.options.fallbackOnBody?document.body:rootEl,n=getRect(dragEl,!0,PositionGhostAbsolutely,!0,e),r=this.options;if(PositionGhostAbsolutely){for(ghostRelativeParent=e;css(ghostRelativeParent,"position")==="static"&&css(ghostRelativeParent,"transform")==="none"&&ghostRelativeParent!==document;)ghostRelativeParent=ghostRelativeParent.parentNode;ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement?(ghostRelativeParent===document&&(ghostRelativeParent=getWindowScrollingElement()),n.top+=ghostRelativeParent.scrollTop,n.left+=ghostRelativeParent.scrollLeft):ghostRelativeParent=getWindowScrollingElement(),ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}ghostEl=dragEl.cloneNode(!0),toggleClass(ghostEl,r.ghostClass,!1),toggleClass(ghostEl,r.fallbackClass,!0),toggleClass(ghostEl,r.dragClass,!0),css(ghostEl,"transition",""),css(ghostEl,"transform",""),css(ghostEl,"box-sizing","border-box"),css(ghostEl,"margin",0),css(ghostEl,"top",n.top),css(ghostEl,"left",n.left),css(ghostEl,"width",n.width),css(ghostEl,"height",n.height),css(ghostEl,"opacity","0.8"),css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed"),css(ghostEl,"zIndex","100000"),css(ghostEl,"pointerEvents","none"),Sortable.ghost=ghostEl,e.appendChild(ghostEl),css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function t(e,n){var r=this,i=e.dataTransfer,g=r.options;if(pluginEvent("dragStart",this,{evt:e}),Sortable.eventCanceled){this._onDrop();return}pluginEvent("setupClone",this),Sortable.eventCanceled||(cloneEl=clone(dragEl),cloneEl.removeAttribute("id"),cloneEl.draggable=!1,cloneEl.style["will-change"]="",this._hideClone(),toggleClass(cloneEl,this.options.chosenClass,!1),Sortable.clone=cloneEl),r.cloneId=_nextTick(function(){pluginEvent("clone",r),!Sortable.eventCanceled&&(r.options.removeCloneOnHide||rootEl.insertBefore(cloneEl,dragEl),r._hideClone(),_dispatchEvent({sortable:r,name:"clone"}))}),!n&&toggleClass(dragEl,g.dragClass,!0),n?(ignoreNextClick=!0,r._loopId=setInterval(r._emulateDragOver,50)):(off(document,"mouseup",r._onDrop),off(document,"touchend",r._onDrop),off(document,"touchcancel",r._onDrop),i&&(i.effectAllowed="move",g.setData&&g.setData.call(r,i,dragEl)),on(document,"drop",r),css(dragEl,"transform","translateZ(0)")),awaitingDragStarted=!0,r._dragStartId=_nextTick(r._dragStarted.bind(r,n,e)),on(document,"selectstart",r),moved=!0,window.getSelection().removeAllRanges(),Safari&&css(document.body,"user-select","none")},_onDragOver:function t(e){var n=this.el,r=e.target,i,g,y,k=this.options,L=k.group,$=Sortable.active,V=activeGroup===L,z=k.sort,j=putSortable||$,oe,re=this,ie=!1;if(_silent)return;function ae(qe,Ne){pluginEvent(qe,re,_objectSpread2({evt:e,isOwner:V,axis:oe?"vertical":"horizontal",revert:y,dragRect:i,targetRect:g,canSort:z,fromSortable:j,target:r,completed:de,onMove:function(Pt,hn){return _onMove(rootEl,n,dragEl,i,Pt,getRect(Pt),e,hn)},changed:pe},Ne))}function ue(){ae("dragOverAnimationCapture"),re.captureAnimationState(),re!==j&&j.captureAnimationState()}function de(qe){return ae("dragOverCompleted",{insertion:qe}),qe&&(V?$._hideClone():$._showClone(re),re!==j&&(toggleClass(dragEl,putSortable?putSortable.options.ghostClass:$.options.ghostClass,!1),toggleClass(dragEl,k.ghostClass,!0)),putSortable!==re&&re!==Sortable.active?putSortable=re:re===Sortable.active&&putSortable&&(putSortable=null),j===re&&(re._ignoreWhileAnimating=r),re.animateAll(function(){ae("dragOverAnimationComplete"),re._ignoreWhileAnimating=null}),re!==j&&(j.animateAll(),j._ignoreWhileAnimating=null)),(r===dragEl&&!dragEl.animated||r===n&&!r.animated)&&(lastTarget=null),!k.dragoverBubble&&!e.rootEl&&r!==document&&(dragEl.parentNode[expando]._isOutsideThisEl(e.target),!qe&&nearestEmptyInsertDetectEvent(e)),!k.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),ie=!0}function pe(){newIndex=index(dragEl),newDraggableIndex=index(dragEl,k.draggable),_dispatchEvent({sortable:re,name:"change",toEl:n,newIndex,newDraggableIndex,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=closest(r,k.draggable,n,!0),ae("dragOver"),Sortable.eventCanceled)return ie;if(dragEl.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||re._ignoreWhileAnimating===r)return de(!1);if(ignoreNextClick=!1,$&&!k.disabled&&(V?z||(y=parentEl!==rootEl):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,$,dragEl,e))&&L.checkPut(this,$,dragEl,e))){if(oe=this._getDirection(e,r)==="vertical",i=getRect(dragEl),ae("dragOverValid"),Sortable.eventCanceled)return ie;if(y)return parentEl=rootEl,ue(),this._hideClone(),ae("revert"),Sortable.eventCanceled||(nextEl?rootEl.insertBefore(dragEl,nextEl):rootEl.appendChild(dragEl)),de(!0);var le=lastChild(n,k.draggable);if(!le||_ghostIsLast(e,oe,this)&&!le.animated){if(le===dragEl)return de(!1);if(le&&n===e.target&&(r=le),r&&(g=getRect(r)),_onMove(rootEl,n,dragEl,i,r,g,e,!!r)!==!1)return ue(),le&&le.nextSibling?n.insertBefore(dragEl,le.nextSibling):n.appendChild(dragEl),parentEl=n,pe(),de(!0)}else if(le&&_ghostIsFirst(e,oe,this)){var he=getChild(n,0,k,!0);if(he===dragEl)return de(!1);if(r=he,g=getRect(r),_onMove(rootEl,n,dragEl,i,r,g,e,!1)!==!1)return ue(),n.insertBefore(dragEl,he),parentEl=n,pe(),de(!0)}else if(r.parentNode===n){g=getRect(r);var _e=0,Ce,xe=dragEl.parentNode!==n,Ie=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||i,r.animated&&r.toRect||g,oe),Oe=oe?"top":"left",$e=isScrolledPast(r,"top","top")||isScrolledPast(dragEl,"top","top"),Ue=$e?$e.scrollTop:void 0;lastTarget!==r&&(Ce=g[Oe],pastFirstInvertThresh=!1,isCircumstantialInvert=!Ie&&k.invertSwap||xe),_e=_getSwapDirection(e,r,g,oe,Ie?1:k.swapThreshold,k.invertedSwapThreshold==null?k.swapThreshold:k.invertedSwapThreshold,isCircumstantialInvert,lastTarget===r);var Et;if(_e!==0){var At=index(dragEl);do At-=_e,Et=parentEl.children[At];while(Et&&(css(Et,"display")==="none"||Et===ghostEl))}if(_e===0||Et===r)return de(!1);lastTarget=r,lastDirection=_e;var Ve=r.nextElementSibling,Fe=!1;Fe=_e===1;var ze=_onMove(rootEl,n,dragEl,i,r,g,e,Fe);if(ze!==!1)return(ze===1||ze===-1)&&(Fe=ze===1),_silent=!0,setTimeout(_unsilent,30),ue(),Fe&&!Ve?n.appendChild(dragEl):r.parentNode.insertBefore(dragEl,Fe?Ve:r),$e&&scrollBy($e,0,Ue-$e.scrollTop),parentEl=dragEl.parentNode,Ce!==void 0&&!isCircumstantialInvert&&(targetMoveDistance=Math.abs(Ce-getRect(r)[Oe])),pe(),de(!0)}if(n.contains(dragEl))return de(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function t(){off(document,"mousemove",this._onTouchMove),off(document,"touchmove",this._onTouchMove),off(document,"pointermove",this._onTouchMove),off(document,"dragover",nearestEmptyInsertDetectEvent),off(document,"mousemove",nearestEmptyInsertDetectEvent),off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function t(){var e=this.el.ownerDocument;off(e,"mouseup",this._onDrop),off(e,"touchend",this._onDrop),off(e,"pointerup",this._onDrop),off(e,"pointercancel",this._onDrop),off(e,"touchcancel",this._onDrop),off(document,"selectstart",this)},_onDrop:function t(e){var n=this.el,r=this.options;if(newIndex=index(dragEl),newDraggableIndex=index(dragEl,r.draggable),pluginEvent("drop",this,{evt:e}),parentEl=dragEl&&dragEl.parentNode,newIndex=index(dragEl),newDraggableIndex=index(dragEl,r.draggable),Sortable.eventCanceled){this._nulling();return}awaitingDragStarted=!1,isCircumstantialInvert=!1,pastFirstInvertThresh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick(this.cloneId),_cancelNextTick(this._dragStartId),this.nativeDraggable&&(off(document,"drop",this),off(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari&&css(document.body,"user-select",""),css(dragEl,"transform",""),e&&(moved&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl),(rootEl===parentEl||putSortable&&putSortable.lastPutMode!=="clone")&&cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),dragEl&&(this.nativeDraggable&&off(dragEl,"dragend",this),_disableDraggable(dragEl),dragEl.style["will-change"]="",moved&&!awaitingDragStarted&&toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,!1),toggleClass(dragEl,this.options.chosenClass,!1),_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:e}),rootEl!==parentEl?(newIndex>=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:e}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:e}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:e})),Sortable.active&&((newIndex==null||newIndex===-1)&&(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:e}),this.save()))),this._nulling()},_nulling:function t(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(e){e.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function t(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(e),_globalDragOver(e));break;case"selectstart":e.preventDefault();break}},toArray:function t(){for(var e=[],n,r=this.el.children,i=0,g=r.length,y=this.options;i<g;i++)n=r[i],closest(n,y.draggable,this.el,!1)&&e.push(n.getAttribute(y.dataIdAttr)||_generateId(n));return e},sort:function t(e,n){var r={},i=this.el;this.toArray().forEach(function(g,y){var k=i.children[y];closest(k,this.options.draggable,i,!1)&&(r[g]=k)},this),n&&this.captureAnimationState(),e.forEach(function(g){r[g]&&(i.removeChild(r[g]),i.appendChild(r[g]))}),n&&this.animateAll()},save:function t(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function t(e,n){return closest(e,n||this.options.draggable,this.el,!1)},option:function t(e,n){var r=this.options;if(n===void 0)return r[e];var i=PluginManager.modifyOption(this,e,n);typeof i<"u"?r[e]=i:r[e]=n,e==="group"&&_prepareGroup(r)},destroy:function t(){pluginEvent("destroy",this);var e=this.el;e[expando]=null,off(e,"mousedown",this._onTapStart),off(e,"touchstart",this._onTapStart),off(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(off(e,"dragover",this),off(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sortables.splice(sortables.indexOf(this.el),1),this.el=e=null},_hideClone:function t(){if(!cloneHidden){if(pluginEvent("hideClone",this),Sortable.eventCanceled)return;css(cloneEl,"display","none"),this.options.removeCloneOnHide&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),cloneHidden=!0}},_showClone:function t(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(cloneHidden){if(pluginEvent("showClone",this),Sortable.eventCanceled)return;dragEl.parentNode==rootEl&&!this.options.group.revertClone?rootEl.insertBefore(cloneEl,dragEl):nextEl?rootEl.insertBefore(cloneEl,nextEl):rootEl.appendChild(cloneEl),this.options.group.revertClone&&this.animate(dragEl,cloneEl),css(cloneEl,"display",""),cloneHidden=!1}}};function _globalDragOver(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function _onMove(t,e,n,r,i,g,y,k){var L,$=t[expando],V=$.options.onMove,z;return window.CustomEvent&&!IE11OrLess&&!Edge?L=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(L=document.createEvent("Event"),L.initEvent("move",!0,!0)),L.to=e,L.from=t,L.dragged=n,L.draggedRect=r,L.related=i||e,L.relatedRect=g||getRect(e),L.willInsertAfter=k,L.originalEvent=y,t.dispatchEvent(L),V&&(z=V.call($,L,y)),z}function _disableDraggable(t){t.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsFirst(t,e,n){var r=getRect(getChild(n.el,0,n.options,!0)),i=getChildContainingRectFromElement(n.el,n.options,ghostEl),g=10;return e?t.clientX<i.left-g||t.clientY<r.top&&t.clientX<r.right:t.clientY<i.top-g||t.clientY<r.bottom&&t.clientX<r.left}function _ghostIsLast(t,e,n){var r=getRect(lastChild(n.el,n.options.draggable)),i=getChildContainingRectFromElement(n.el,n.options,ghostEl),g=10;return e?t.clientX>i.right+g||t.clientY>r.bottom&&t.clientX>r.left:t.clientY>i.bottom+g||t.clientX>r.right&&t.clientY>r.top}function _getSwapDirection(t,e,n,r,i,g,y,k){var L=r?t.clientY:t.clientX,$=r?n.height:n.width,V=r?n.top:n.left,z=r?n.bottom:n.right,j=!1;if(!y){if(k&&targetMoveDistance<$*i){if(!pastFirstInvertThresh&&(lastDirection===1?L>V+$*g/2:L<z-$*g/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)j=!0;else if(lastDirection===1?L<V+targetMoveDistance:L>z-targetMoveDistance)return-lastDirection}else if(L>V+$*(1-i)/2&&L<z-$*(1-i)/2)return _getInsertDirection(e)}return j=j||y,j&&(L<V+$*g/2||L>z-$*g/2)?L>V+$/2?1:-1:0}function _getInsertDirection(t){return index(dragEl)<index(t)?1:-1}function _generateId(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function _saveInputCheckedState(t){savedInputChecked.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var r=e[n];r.checked&&savedInputChecked.push(r)}}function _nextTick(t){return setTimeout(t,0)}function _cancelNextTick(t){return clearTimeout(t)}documentExists&&on(document,"touchmove",function(t){(Sortable.active||awaitingDragStarted)&&t.cancelable&&t.preventDefault()}),Sortable.utils={on,off,css,find,is:function t(e,n){return!!closest(e,n,e,!1)},extend,throttle,closest,toggleClass,clone,index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild,expando},Sortable.get=function(t){return t[expando]},Sortable.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(Sortable.utils=_objectSpread2(_objectSpread2({},Sortable.utils),r.utils)),PluginManager.mount(r)})},Sortable.create=function(t,e){return new Sortable(t,e)},Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=!1,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?on(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on(document,"pointermove",this._handleFallbackAutoScroll):r.touches?on(document,"touchmove",this._handleFallbackAutoScroll):on(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?off(document,"dragover",this._handleAutoScroll):(off(document,"pointermove",this._handleFallbackAutoScroll),off(document,"touchmove",this._handleFallbackAutoScroll),off(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval(),clearAutoScrolls(),cancelThrottle()},nulling:function(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null,autoScrolls.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var i=this,g=(n.touches?n.touches[0]:n).clientX,y=(n.touches?n.touches[0]:n).clientY,k=document.elementFromPoint(g,y);if(touchEvt$1=n,r||this.options.forceAutoScrollFallback||Edge||IE11OrLess||Safari){autoScroll(n,this.options,k,r);var L=getParentAutoScrollElement(k,!0);scrolling&&(!pointerElemChangedInterval||g!==lastAutoScrollX||y!==lastAutoScrollY)&&(pointerElemChangedInterval&&clearPointerElemChangedInterval(),pointerElemChangedInterval=setInterval(function(){var $=getParentAutoScrollElement(document.elementFromPoint(g,y),!0);$!==L&&(L=$,clearAutoScrolls()),autoScroll(n,i.options,$,r)},10),lastAutoScrollX=g,lastAutoScrollY=y)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(k,!0)===getWindowScrollingElement()){clearAutoScrolls();return}autoScroll(n,this.options,getParentAutoScrollElement(k,!1),!1)}}},_extends(t,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls(){autoScrolls.forEach(function(t){clearInterval(t.pid)}),autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle(function(t,e,n,r){if(e.scroll){var i=(t.touches?t.touches[0]:t).clientX,g=(t.touches?t.touches[0]:t).clientY,y=e.scrollSensitivity,k=e.scrollSpeed,L=getWindowScrollingElement(),$=!1,V;scrollRootEl!==n&&(scrollRootEl=n,clearAutoScrolls(),scrollEl=e.scroll,V=e.scrollFn,scrollEl===!0&&(scrollEl=getParentAutoScrollElement(n,!0)));var z=0,j=scrollEl;do{var oe=j,re=getRect(oe),ie=re.top,ae=re.bottom,ue=re.left,de=re.right,pe=re.width,le=re.height,he=void 0,_e=void 0,Ce=oe.scrollWidth,xe=oe.scrollHeight,Ie=css(oe),Oe=oe.scrollLeft,$e=oe.scrollTop;oe===L?(he=pe<Ce&&(Ie.overflowX==="auto"||Ie.overflowX==="scroll"||Ie.overflowX==="visible"),_e=le<xe&&(Ie.overflowY==="auto"||Ie.overflowY==="scroll"||Ie.overflowY==="visible")):(he=pe<Ce&&(Ie.overflowX==="auto"||Ie.overflowX==="scroll"),_e=le<xe&&(Ie.overflowY==="auto"||Ie.overflowY==="scroll"));var Ue=he&&(Math.abs(de-i)<=y&&Oe+pe<Ce)-(Math.abs(ue-i)<=y&&!!Oe),Et=_e&&(Math.abs(ae-g)<=y&&$e+le<xe)-(Math.abs(ie-g)<=y&&!!$e);if(!autoScrolls[z])for(var At=0;At<=z;At++)autoScrolls[At]||(autoScrolls[At]={});(autoScrolls[z].vx!=Ue||autoScrolls[z].vy!=Et||autoScrolls[z].el!==oe)&&(autoScrolls[z].el=oe,autoScrolls[z].vx=Ue,autoScrolls[z].vy=Et,clearInterval(autoScrolls[z].pid),(Ue!=0||Et!=0)&&($=!0,autoScrolls[z].pid=setInterval((function(){r&&this.layer===0&&Sortable.active._onTouchMove(touchEvt$1);var Ve=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*k:0,Fe=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*k:0;typeof V=="function"&&V.call(Sortable.dragged.parentNode[expando],Fe,Ve,t,touchEvt$1,autoScrolls[this.layer].el)!=="continue"||scrollBy(autoScrolls[this.layer].el,Fe,Ve)}).bind({layer:z}),24))),z++}while(e.bubbleScroll&&j!==L&&(j=getParentAutoScrollElement(j,!1)));scrolling=$}},30),drop=function t(e){var n=e.originalEvent,r=e.putSortable,i=e.dragEl,g=e.activeSortable,y=e.dispatchSortableEvent,k=e.hideGhostForTarget,L=e.unhideGhostForTarget;if(n){var $=r||g;k();var V=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,z=document.elementFromPoint(V.clientX,V.clientY);L(),$&&!$.el.contains(z)&&(y("spill"),this.onSpill({dragEl:i,putSortable:r}))}};function Revert(){}Revert.prototype={startIndex:null,dragStart:function t(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function t(e){var n=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var i=getChild(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop},_extends(Revert,{pluginName:"revertOnSpill"});function Remove(){}Remove.prototype={onSpill:function t(e){var n=e.dragEl,r=e.putSortable,i=r||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop},_extends(Remove,{pluginName:"removeOnSpill"}),Sortable.mount(new AutoScrollPlugin),Sortable.mount(Remove,Revert);const useTable=(t,e={},n=!0,r,i,g=y=>y)=>{const y=vue.reactive({tableData:[],pageable:{page:1,size:10,total:0},searchParam:{},searchInitParam:{},totalParam:{},loading:!1}),k=vue.computed({get:()=>({page:y.pageable.page,size:y.pageable.size}),set:ie=>{console.log("我是分页更新之后的值",ie)}}),L=async()=>{if(y.loading=!0,!t){y.loading=!1;return}try{const ie=localStorage.getItem("MytaskGotoListPageQuery");if(ie){e={},y.totalParam={};const ue=JSON.parse(ie);e={...e,...ue},y.searchParam={...ue}}Object.assign(y.totalParam,e,n?k.value:{});for(const ue in y.searchParam)y.searchParam[ue]===""&&delete y.searchParam[ue];let ae=await t(g({...y.searchInitParam,...y.totalParam}));if(r&&(ae=await r(ae)),y.tableData=n?ae.list:ae,n){const{currentPage:ue,pageSize:de,total:pe}=ae;V({page:ue,size:de,total:pe})}}catch(ie){i&&i(ie)}finally{y.loading=!1}},$=()=>{y.totalParam={},y.searchInitParam={},e={};const ie={};for(const ae in y.searchParam)(y.searchParam[ae]||y.searchParam[ae]===!1||y.searchParam[ae]===0)&&(ie[ae]=y.searchParam[ae]);Object.assign(y.totalParam,ie,n?k.value:{})},V=ie=>{Object.assign(y.pageable,ie)},z=()=>{y.pageable.page=1,$(),L().then()},j=()=>{y.pageable.page=1,y.searchParam={...y.searchInitParam},$(),L().then()},oe=ie=>{y.pageable.page=1,y.pageable.size=ie,L().then()},re=ie=>{y.pageable.page=ie,L().then()};return{...vue.toRefs(y),getTableList:L,search:z,reset:j,handleSizeChange:oe,handleCurrentChange:re,updatedTotalParam:$}},useSelection=(t="id",e)=>{const n=vue.ref(!1),r=vue.ref([]),i=vue.computed(()=>{const y=[];return r.value.forEach(k=>y.push(get$5(k,t))),y});return{isSelected:n,selectedList:r,selectedListIds:i,selectionChange:y=>{y.length?n.value=!0:n.value=!1,r.value=y,e&&e(y)}}},_hoisted_1$5={class:"search-form-item"},_sfc_main$6=vue.defineComponent({name:"SearchFormItem",__name:"SearchFormItem",props:{column:{},searchParam:{}},emits:["search"],setup(t,{emit:e}){vue.useCssVars(ae=>({"20c95159":z.value}));const n=t,r=e,i=vue.computed(()=>n.searchParam),g=vue.computed(()=>{var ae,ue,de;return{label:((ae=n.column.fieldNames)==null?void 0:ae.label)??"label",value:((ue=n.column.fieldNames)==null?void 0:ue.value)??"value",children:((de=n.column.fieldNames)==null?void 0:de.children)??"children"}}),y=vue.inject("enumMap",vue.ref(new Map)),k=vue.computed(()=>{var ue;let ae=y.value.get(n.column.prop);return ae?(((ue=n.column.search)==null?void 0:ue.el)==="select-v2"&&n.column.fieldNames&&(ae=ae.map(de=>({...de,label:de[g.value.label],value:de[g.value.value]}))),ae):[]}),L=vue.computed(()=>{var ae,ue;return((ue=(ae=n.column.search)==null?void 0:ae.props)==null?void 0:ue.options)??k.value??[]}),$=vue.computed(()=>{var he,_e;const ae=g.value.label,ue=g.value.value,de=g.value.children,pe=(he=n.column.search)==null?void 0:he.el;let le=((_e=n.column.search)==null?void 0:_e.props)??{};return pe==="tree-select"&&(le={...le,props:{...le.props,label:ae,children:de},nodeKey:ue}),pe==="cascader"&&(le={...le,props:{...le.props,label:ae,value:ue,children:de}}),le}),V=vue.computed(()=>{var de,pe,le,he,_e,Ce,xe;const ae=n.column.search;return["datetimerange","daterange","monthrange"].includes((de=ae==null?void 0:ae.props)==null?void 0:de.type)||(pe=ae==null?void 0:ae.props)!=null&&pe.isRange?{rangeSeparator:((le=ae==null?void 0:ae.props)==null?void 0:le.rangeSeparator)??"-",startPlaceholder:((he=ae==null?void 0:ae.props)==null?void 0:he.startPlaceholder)??"开始时间",endPlaceholder:((_e=ae==null?void 0:ae.props)==null?void 0:_e.endPlaceholder)??"结束时间"}:{placeholder:((Ce=ae==null?void 0:ae.props)==null?void 0:Ce.placeholder)??((xe=ae==null?void 0:ae.el)!=null&&xe.includes("input")?"请输入":"请选择")}}),z=vue.computed(()=>{var le,he;const ae=n.column.search,ue=i.value[(ae==null?void 0:ae.key)??handleProp(n.column.prop)],de=ae==null?void 0:ae.el,pe=(le=ae==null?void 0:ae.props)==null?void 0:le.placeholder;if(ae!=null&&ae.width)if(isFunction$2(ae==null?void 0:ae.width)){if(ae==null?void 0:ae.width(ue))return(ae==null?void 0:ae.width(ue))+"px"}else return(ae==null?void 0:ae.width)+"px";if(ue&&ue.length!==0&&["select","select-v2","tree-select","cascader"].includes(de||"")){if(isArray$2(ue)){let xe=L.value;const Ie=[];if(ue.forEach(Oe=>{const $e=xe.find(Et=>Et[g.value.value]===Oe);Ie.push($e?$e[g.value.label]:Oe);const Ue=$e[g.value.children]??L.value;xe=$e?Ue:[]}),(he=ae==null?void 0:ae.props)!=null&&he.multiple){const Ue=getWidthByText(Ie[0])+42;return ue.length>1?Ue+26+getWidthByText("+ "+(ue.length-1))+"px":Ue+"px"}return getWidthByText(Ie.join(" / "))+"px"}let _e=L.value.find(xe=>xe[g.value.value]===ue);const Ce=_e?_e[g.value.label]:ue;return getWidthByText(Ce)+"px"}else return pe?getWidthByText(pe)+"px":["date-picker","time-picker","time-select"].includes(de||"")?"210px":"100px"}),j=vue.computed(()=>{var ae,ue,de,pe,le;return(de=(ue=(ae=n.column)==null?void 0:ae.search)==null?void 0:ue.props)!=null&&de.multiple&&((le=(pe=n.column)==null?void 0:pe.search)==null?void 0:le.el)==="select"?{collapseTags:!0,collapseTagsTooltip:!0}:{}}),oe=vue.computed(()=>{var ue;const ae=n.column.search;return((ue=ae==null?void 0:ae.props)==null?void 0:ue.clearable)??((ae==null?void 0:ae.defaultValue)==null||!1)}),re=ae=>{var ue,de,pe,le,he,_e,Ce,xe,Ie;if(((pe=(de=(ue=n.column)==null?void 0:ue.search)==null?void 0:de.props)==null?void 0:pe.type)==="daterange"){const{searchParam:Oe}=vue.toRefs(n);if(ae!=null&&ae.length){const $e=((_e=(he=(le=n.column)==null?void 0:le.search)==null?void 0:he.props)==null?void 0:_e.beginTime)||"beginTime",Ue=((Ie=(xe=(Ce=n.column)==null?void 0:Ce.search)==null?void 0:xe.props)==null?void 0:Ie.endTime)||"endTime";Oe.value[$e]=ae[0],Oe.value[Ue]=ae[1]}else delete Oe.value.beginTime,delete Oe.value.endTime}(ae==null||ae==="")&&r("search"),ae instanceof Array&&!ae.length&&r("search")},ie=()=>{var ae;["input","input-number"].includes(((ae=n.column.search)==null?void 0:ae.el)||"")&&r("search")};return(ae,ue)=>{var de,pe,le,he,_e,Ce,xe;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$5,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(((de=ae.column.search)==null?void 0:de.render)??`el-${(pe=ae.column.search)==null?void 0:pe.el}`),vue.mergeProps({...$.value,...V.value,searchParam:i.value,clearable:oe.value,...j.value},{modelValue:i.value[((le=ae.column.search)==null?void 0:le.key)??vue.unref(handleProp)(ae.column.prop)],"onUpdate:modelValue":ue[0]||(ue[0]=Ie=>{var Oe;return i.value[((Oe=ae.column.search)==null?void 0:Oe.key)??vue.unref(handleProp)(ae.column.prop)]=Ie}),modelModifiers:{trim:!0},data:((he=ae.column.search)==null?void 0:he.el)==="tree-select"?k.value:[],options:L.value,"prefix-icon":(Ce=(_e=ae.column.search)==null?void 0:_e.props)==null?void 0:Ce.prefixIcon,onChange:re,onKeyup:vue.withKeys(ie,["enter"])}),vue.createSlots({default:vue.withCtx(()=>{var Ie;return[((Ie=ae.column.search)==null?void 0:Ie.el)==="select"?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:0},vue.renderList(k.value,(Oe,$e)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent("el-option"),{key:$e,label:Oe[g.value.label]??"",value:Oe[g.value.value]},null,8,["label","value"]))),128)):vue.renderSlot(ae.$slots,"default",{key:1},void 0,!0)]}),_:2},[((xe=ae.column.search)==null?void 0:xe.el)==="cascader"?{name:"default",fn:vue.withCtx(({data:Ie})=>[vue.createElementVNode("span",null,vue.toDisplayString(Ie[g.value.label]),1)]),key:"0"}:void 0]),1040,["modelValue","data","options","prefix-icon"]))])}}}),SearchFormItem=_export_sfc(_sfc_main$6,[["__scopeId","data-v-5a276628"]]),_hoisted_1$4={class:"table-search"},_hoisted_2$3={key:0},_hoisted_3$3={key:0,class:"operation"},_sfc_main$5=vue.defineComponent({name:"SearchForm",__name:"SearchForm",props:{columns:{default:()=>[]},searchParam:{default:()=>({})},search:{},reset:{},isShowResetBtn:{type:Boolean,default:!0},isShowSearchBtn:{type:Boolean,default:!0}},setup(t){const e=t;return(n,r)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$4,[vue.createVNode(vue.unref(ElForm),{ref:"formRef",model:n.searchParam,class:"table-search--left",onSubmit:r[0]||(r[0]=vue.withModifiers(()=>{},["prevent"]))},{default:vue.withCtx(()=>[vue.renderSlot(n.$slots,"default",{},void 0,!0),n.columns.length?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.columns,i=>{var g,y,k;return vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:i.prop},[!vue.unref(isBoolean$1)((g=i.search)==null?void 0:g.isShow)||(y=i.search)!=null&&y.isShow?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$3,[vue.createVNode(vue.unref(ElFormItem),null,vue.createSlots({default:vue.withCtx(()=>[vue.createVNode(SearchFormItem,{column:i,"search-param":n.searchParam,onSearch:n.search},null,8,["column","search-param","onSearch"])]),_:2},[(k=i.search)!=null&&k.label?{name:"label",fn:vue.withCtx(()=>[vue.createVNode(vue.unref(ElSpace),{size:4},{default:vue.withCtx(()=>{var L,$;return[vue.createElementVNode("span",null,vue.toDisplayString(`${i.search.label}`),1),(L=i.search)!=null&&L.tooltip?(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),{key:0,effect:"dark",content:($=i.search)==null?void 0:$.tooltip,placement:"top"},{default:vue.withCtx(()=>r[1]||(r[1]=[vue.createElementVNode("i",{class:vue.normalizeClass("iconfont icon-yiwen")},null,-1)])),_:2},1032,["content"])):vue.createCommentVNode("",!0)]}),_:2},1024),r[2]||(r[2]=vue.createElementVNode("span",null,":",-1))]),key:"0"}:void 0]),1024)])):vue.createCommentVNode("",!0)],64)}),128)),e.isShowSearchBtn?(vue.openBlock(),vue.createBlock(vue.unref(ElButton),{key:0,type:"primary",class:"table-search--search-btn",onClick:n.search},{icon:vue.withCtx(()=>r[3]||(r[3]=[vue.createElementVNode("i",{class:"ztable-iconfont icon-zhihao-table-search"},null,-1)])),default:vue.withCtx(()=>[r[4]||(r[4]=vue.createTextVNode(" 搜索 "))]),_:1},8,["onClick"])):vue.createCommentVNode("",!0)],64)):vue.createCommentVNode("",!0)]),_:3},8,["model"]),e.isShowResetBtn&&n.columns.length?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$3,[vue.createVNode(vue.unref(ElTooltip),{class:"box-item",effect:"light",content:"重置",placement:"top"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElButton),{class:"table-search--reset-btn",onClick:n.reset},{icon:vue.withCtx(()=>[vue.createVNode(vue.unref(ElIcon),{size:14},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(refresh_left_default))]),_:1})]),_:1},8,["onClick"])]),_:1})])):vue.createCommentVNode("",!0)]))}}),SearchForm=_export_sfc(_sfc_main$5,[["__scopeId","data-v-e524e82e"]]),_hoisted_1$3={class:"el-pagination__total zh-page-total"},_sfc_main$4=vue.defineComponent({name:"Pagination",__name:"tablePagination",props:{pageable:{},handleSizeChange:{type:Function},handleCurrentChange:{type:Function}},setup(t){return(e,n)=>e.pageable.total?(vue.openBlock(),vue.createBlock(vue.unref(ElPagination),{key:0,class:"zh-pagination",background:!0,"current-page":e.pageable.page,"page-size":e.pageable.size,total:e.pageable.total,teleported:!1,layout:"slot, sizes, prev, pager, next, jumper",onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange},{default:vue.withCtx(()=>[vue.renderSlot(e.$slots,"zhPaginationLeftSlot",{pageable:e.pageable},()=>[vue.createElementVNode("div",_hoisted_1$3,"共"+vue.toDisplayString(e.pageable.total)+"条数据",1)],!0)]),_:3},8,["current-page","page-size","total","onSizeChange","onCurrentChange"])):vue.createCommentVNode("",!0)}}),TablePagination=_export_sfc(_sfc_main$4,[["__scopeId","data-v-5965b30c"]]);function _isSlot(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!vue.isVNode(t)}const _sfc_main$3=vue.defineComponent({name:"TableColumn",__name:"TableColumn",props:{column:{},customColumn:{type:Boolean}},setup(t){const e=t,n=vue.ref(e.column),r=vue.useSlots(),i=vue.inject("enumMap",vue.ref(new Map)),g=(L,$)=>i.value.get(L.prop)&&L.isFilterEnum?filterEnum(handleRowAccordingToProp($.row,L.prop),i.value.get(L.prop),L.fieldNames):formatValue(handleRowAccordingToProp($.row,L.prop)),y=(L,$)=>filterEnum(handleRowAccordingToProp($.row,L.prop),i.value.get(L.prop),L.fieldNames,"tag"),k=L=>vue.createVNode(vue.Fragment,null,[L.isShow&&vue.createVNode(ElTableColumn,vue.mergeProps(L,{"class-name":L.wrap&&"table-column--wrap",showOverflowTooltip:L.showOverflowTooltip??L.prop!=="operation"}),{default:$=>{var z,j,oe;let V;if(L._children)return L._children.map(re=>k(re));if(L.render)return L.render($);if(L.prop==="operation"){if(!r[handleProp(L.prop)]){n.value.width=0;return}const re=((j=(z=r[handleProp(L.prop)]($))==null?void 0:z.at(0))==null?void 0:j.children)||[],ie=Ce=>Array.from(Ce).map(xe=>{var Ie,Oe;return((Ie=xe.type)==null?void 0:Ie.name)==="ElButton"&&xe.children!=="v-if"?xe:(Oe=xe.children)!=null&&Oe.length?ie(xe.children):null}).filter(Boolean).flat(),ae=ie(re),ue=Ce=>{let xe="";return Ce.forEach(Ie=>{xe+=Ie.children.default()[0].children}),getWidthByText(xe,14)+16*(Ce.length>0?Ce.length-1:0)},de=Ce=>{n.value.hasOperationMaxWidth||(n.value.width=0,n.value.hasOperationMaxWidth=!0);const xe=n.value.width;let Ie=0;Ce>0&&(Ie=Math.round(Ce)+32),Ie>Number.parseInt((xe==null?void 0:xe.toString())||"0")&&(n.value.width=Ie,n.value.hasOperationMaxWidth=!0)};if(ae.length<=3||L.expandOperationButtons){const Ce=Math.ceil(ue(ae));let xe=Ce;return e.customColumn&&(xe=ae.length?ae.length===1?Ce+30:Ce:50),de(xe),vue.createVNode("div",{class:"operation-container all-action"},[r[handleProp(L.prop)]($)])}const pe=[],le=ae.slice(0,2),he=vue.createVNode(ElButton,{link:!0,type:"primary"},{default:()=>[vue.createTextVNode("更多")]});pe.push(...le),pe[3]=vue.createVNode(ElDropdown,null,{default:()=>he,dropdown:()=>{let Ce;return vue.createVNode(ElDropdownMenu,null,_isSlot(Ce=ae.slice(2).map(xe=>vue.createVNode(ElDropdownItem,null,_isSlot(xe)?xe:{default:()=>[xe]})))?Ce:{default:()=>[Ce]})}});const _e=ue([...le,he]);return de(_e),vue.createVNode("div",{class:"operation-container"},[pe])}return r[handleProp(L.prop)]?r[handleProp(L.prop)]($):L.tag?vue.createVNode(ElTag,{type:y(L,$)},_isSlot(V=g(L,$))?V:{default:()=>[V]}):L.click&&g(L,$)!==DEFAULT_VALUE$1?vue.createVNode("span",{class:"el-link el-link--primary scan-link",onClick:function(){L.click($==null?void 0:$.row,$==null?void 0:$.$index)}},[L.formatter?L.formatter($.row,$.column,$.row[L.prop],$.$index):g(L,$)]):vue.createVNode("span",{class:((oe=filterEnumObj(handleRowAccordingToProp($.row,L.prop),i.value.get(L.prop)))==null?void 0:oe.state)||"text"},[L.formatter?L.formatter($.row,$.column,$.row[L.prop],$.$index):g(L,$)])},header:$=>L.headerRender?L.headerRender($):r[`${handleProp(L.prop)}Header`]?r[`${handleProp(L.prop)}Header`]($):L.label})]);return(L,$)=>(vue.openBlock(),vue.createBlock(k,vue.normalizeProps(vue.guardReactiveProps(n.value)),null,16))}}),_hoisted_1$2={class:"custom-column-dialog"},_hoisted_2$2={class:"table-body"},_hoisted_3$2={class:"name"},_hoisted_4$1={key:0,class:"ml-10"},_hoisted_5$1={class:"custom-width-label text"},_hoisted_6$1={key:0,class:"custom-width-input-box"},_hoisted_7$1={class:"custom-column-footer"},_hoisted_8$1={class:"flex-1"},_sfc_main$2=vue.defineComponent({name:"ColSetting",__name:"ColSetting",props:{originTableColumns:{default:()=>[]}},emits:["close","submit","dragSort"],setup(t,{expose:e,emit:n}){const r=vue.ref(),i=vue.ref(!1),g=t,y=vue.ref([]),k=vue.ref(new Date().getTime()),L=vue.ref(!1),$=vue.ref(),V=ue=>{y.value=ue,L.value=!0,vue.nextTick(()=>{re()})},z=ue=>{i.value=ue},j=n,oe=async()=>{j("submit",y.value),L.value=!1},re=()=>{$.value&&($.value.destroy(),k.value=new Date().getTime(),r.value.doLayout()),vue.nextTick(()=>{const ue=document.querySelector(".custom-column-dialog tbody");$.value=Sortable.create(ue,{handle:".move",animation:300,filter:".operation",onEnd({newIndex:de,oldIndex:pe}){if(!de&&de!==0||!pe&&pe!==0)return;let le=cloneDeep(y.value);const he=le[pe];if(de<pe)for(let _e=de;_e<pe;_e++)le[_e].order=String(Number(le[_e].order)+1);else for(let _e=pe+1;_e<=de;_e++)le[_e].order=String(Number(le[_e].order)-1);he.order=String(de),y.value=cloneDeep(le)}})})},ie=()=>{const ue=cloneDeep(g.originTableColumns);i.value?y.value=ue:y.value=y.value.map(de=>{const pe=y.value.find(le=>le.prop===de.prop);return!(pe!=null&&pe.isShow)||pe.prop==="operation"?de:ue.find(le=>le.prop===de.prop)}),re()},ae=()=>{L.value=!1};return e({openColSetting:V}),(ue,de)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$2,[vue.createVNode(_sfc_main$s,{modelValue:L.value,"onUpdate:modelValue":de[1]||(de[1]=pe=>L.value=pe),size:"middle"},{header:vue.withCtx(()=>de[2]||(de[2]=[vue.createElementVNode("div",{class:"title"},"自定义列",-1),vue.createElementVNode("div",{class:"sub-title"},"勾选需要展示的列,拖动列名进行排序",-1)])),footer:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_7$1,[vue.createVNode(vue.unref(ElCheckbox),{modelValue:i.value,"onUpdate:modelValue":de[0]||(de[0]=pe=>i.value=pe),class:"checkbox",label:"全局",onChange:z},null,8,["modelValue"]),vue.createElementVNode("div",_hoisted_8$1,[vue.createVNode(ZhButton$1,{onClick:ae},{default:vue.withCtx(()=>de[4]||(de[4]=[vue.createTextVNode("取消")])),_:1}),vue.createVNode(ZhButton$1,{class:"w-auto",onClick:ie},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(i.value?"全局恢复默认":"恢复默认"),1)]),_:1}),vue.createVNode(ZhButton$1,{type:"primary",onClick:oe},{default:vue.withCtx(()=>de[5]||(de[5]=[vue.createTextVNode("保存")])),_:1})])])]),default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_2$2,[(vue.openBlock(),vue.createBlock(vue.unref(ElTable),{ref_key:"tableRef",ref:r,class:"custom-colum-table",key:k.value,data:y.value.filter(pe=>!pe.hideInCustomColumn),"row-class-name":pe=>pe.row.prop==="operation"?"operation":""},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElTableColumn),{width:"100",label:"选择"},{default:vue.withCtx(({row:pe})=>[vue.createVNode(vue.unref(ElCheckbox),{class:"custom-column-check",modelValue:pe.isShow,"onUpdate:modelValue":le=>pe.isShow=le,disabled:pe.readonly},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:1}),vue.createVNode(vue.unref(ElTableColumn),{prop:"label",label:"名称"},{default:vue.withCtx(({row:pe})=>[vue.createElementVNode("div",_hoisted_3$2,[vue.createTextVNode(vue.toDisplayString(pe.label)+" ",1),pe.readonly?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$1,"(必选)")):vue.createCommentVNode("",!0),pe.prop!=="operation"?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:1,class:"move move-icon"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(rank_default))]),_:1})):vue.createCommentVNode("",!0)])]),_:1}),vue.createVNode(vue.unref(ElTableColumn),{prop:"width",label:"宽度",width:"180"},{default:vue.withCtx(({row:pe})=>[vue.createElementVNode("div",{class:vue.normalizeClass(`custom-width-box ${pe.readonly&&"readonly"}`)},[de[3]||(de[3]=vue.createElementVNode("span",{class:"text"},"宽度",-1)),vue.createElementVNode("span",_hoisted_5$1,vue.toDisplayString(pe.width)+" px",1),pe.readonly?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",_hoisted_6$1,[vue.createVNode(vue.unref(ElInputNumber),{modelValue:pe.width,"onUpdate:modelValue":le=>pe.width=le,class:"custom-width-input",min:10,max:1e3,controls:!1},null,8,["modelValue","onUpdate:modelValue"])]))],2)]),_:1})]),_:1},8,["data","row-class-name"]))])]),_:1},8,["modelValue"])]))}}),ColSetting=_export_sfc(_sfc_main$2,[["__scopeId","data-v-597569aa"]]),_hoisted_1$1={class:"no-card table-main zh-table"},_hoisted_2$1={class:"table-title-container"},_hoisted_3$1={key:0,class:"table-title"},_hoisted_4={key:1,class:"table-header-tip"},_hoisted_5={class:"table-header-container"},_hoisted_6={key:0,class:"table-header"},_hoisted_7={class:"header-button-ri"},_hoisted_8={key:0},_hoisted_9={class:"table-body-container"},_hoisted_10={class:"text d-flex inline-input-text pointer"},_hoisted_11={key:1,class:"inline-input-box d-flex"},_hoisted_12={class:"table-empty"},_hoisted_13=["src"],_sfc_main$1=vue.defineComponent({name:"ZhTable",__name:"Table",props:{columns:{default:()=>[]},data:{},requestApi:{},requestAuto:{type:Boolean,default:!0},requestError:{type:Function,default:t=>{console.error("protable中请求数据错误",t)}},handleParam:{},dataCallback:{},selectChangeCallback:{},title:{},pagination:{type:Boolean,default:!0},initParam:{default:{}},border:{type:Boolean,default:!1},rowKey:{default:"id"},isShowSearch:{type:Boolean,default:!0},maxHeight:{},isShowSearchBtn:{type:Boolean,default:!0},isShowResetBtn:{type:Boolean,default:!0},customColumn:{type:Boolean,default:!1},onSortChange:{},offset:{},customColumnCacheKey:{},customColumnPageCacheKey:{},beforeReset:{}},emits:["search","reset","dargSort"],setup(t,{expose:e,emit:n}){var Un;const r=vue.ref(new Date().getTime()),i={mounted(xn){var On;(On=xn.querySelector("input"))==null||On.focus()}},g=vue.useSlots(),y=t,k=vue.ref(),L=["selection","radio","index","expand","sort","input"],$=vue.ref(y.isShowSearch),V=vue.ref(""),z=vue.ref({}),j=vue.ref(y.maxHeight),{selectionChange:oe,selectedList:re,selectedListIds:ie,isSelected:ae}=useSelection(y.rowKey,y.selectChangeCallback),{loading:ue,tableData:de,pageable:pe,searchParam:le,searchInitParam:he,getTableList:_e,search:Ce,reset:xe,handleSizeChange:Ie,handleCurrentChange:Oe}=useTable(y.requestApi,y.initParam,y.pagination,y.dataCallback,y.requestError,y.handleParam),$e=xn=>{function On(er){return er.replace(/[A-Z]/g,ar=>"_"+ar.toLowerCase())}const Ln={ascending:"asc",descending:"desc"},{prop:_n,order:Mn}=xn,Wn=On(handleProp(_n)),Qn=Ln[Mn];le.value={...le.value,sortKey:Wn,sortOrder:Qn},pe.value.page=1,Ce()},Ue=()=>k.value.clearSelection(),Et=()=>k.value.clearSort(),At=vue.ref(!1),Ve=()=>{En(),y.customColumn&&Zn(),y.requestAuto&&_e(),y.data&&(pe.value.total=y.data.length)};vue.onMounted(()=>{Ve(),vue.nextTick(()=>{At.value=!0})}),vue.onActivated(()=>{At.value&&Ve()}),vue.onDeactivated(()=>{}),vue.onUnmounted(()=>{});const Fe=vue.computed(()=>y.data?y.pagination?y.data.slice((pe.value.page-1)*pe.value.size,pe.value.size*pe.value.page):y.data:de.value),ze=xn=>{pe.value.total=xn};vue.watch(()=>y.initParam,_e,{deep:!0});let qe=vue.reactive(y.columns);const Ne=vue.computed(()=>hn(qe)),kt=vue.ref(new Map),Pt=async({prop:xn,enum:On})=>{if(!On||kt.value.has(xn)&&(typeof On=="function"||kt.value.get(xn)===On))return;if(typeof On!="function")return kt.value.set(xn,vue.unref(On));kt.value.set(xn,[]);const{data:Ln}=await On();kt.value.set(xn,Ln)};vue.provide("enumMap",kt);const hn=(xn,On=[])=>(xn.forEach(async Ln=>{var _n;(_n=Ln._children)!=null&&_n.length&&On.push(...hn(Ln._children)),On.push(Ln),Ln.isShow=Ln.isShow??!0,Ln.isFilterEnum=Ln.isFilterEnum??!0,await Pt(Ln)}),On.filter(Ln=>{var _n;return!((_n=Ln._children)!=null&&_n.length)})),Lt=vue.computed(()=>{var xn;return(xn=Ne.value)==null?void 0:xn.filter(On=>{var Ln,_n;return((Ln=On.search)==null?void 0:Ln.el)||((_n=On.search)==null?void 0:_n.render)}).sort((On,Ln)=>On.search.order-Ln.search.order)});(Un=Lt.value)==null||Un.forEach((xn,On)=>{var Mn,Wn,Qn;xn.search.order=((Mn=xn.search)==null?void 0:Mn.order)??On+2;const Ln=((Wn=xn.search)==null?void 0:Wn.key)??handleProp(xn.prop),_n=(Qn=xn.search)==null?void 0:Qn.defaultValue;_n!=null&&(he.value[Ln]=_n,le.value[Ln]=_n)});const jt=n,Tn=()=>{var xn;(xn=k.value)==null||xn.clearSelection(),Ce(),jt("search")},kn=()=>{y.beforeReset&&y.beforeReset(),xe(),Et(),jt("reset")},En=()=>{const xn=document.querySelector(".el-table__body-wrapper tbody");xn&&Sortable.create(xn,{handle:".move",animation:300,onEnd({newIndex:On,oldIndex:Ln}){const[_n]=Fe.value.splice(Ln,1);Fe.value.splice(On,0,_n),jt("dargSort",{newIndex:On,oldIndex:Ln})}})},Cn=vue.ref(0),In=(xn,On)=>{const Ln=de.value.findIndex(_n=>_n.$showInput);Ln>-1&&(de.value[Ln]=cloneDeep(z.value),de.value[Ln].$showInput=!1),Cn.value=$get(xn,String(On)),xn.$showInput=!0,z.value=cloneDeep(xn)},Dn=async(xn,On,Ln)=>{set$2(xn,On,Cn.value),Ln&&await Ln(xn),xn.$showInput=!1,ElMessage.success("更新成功"),await _e()},Nn=async xn=>{const On=de.value.findIndex(Ln=>isEqual(pickBy$1(Ln,identity$1),pickBy$1(xn,identity$1)));On>-1&&(de.value[On]=cloneDeep(z.value),de.value[On].$showInput=!1)},Vn=useColSetting(y.customColumnCacheKey),Bn=vue.ref(null),Yn=()=>qe.map((xn,On)=>({readonly:xn.isCustomDisable||["id","operation"].includes(String(xn.prop)),order:On,index:On,width:xn.width||xn.minWidth,...xn})).sort((xn,On)=>{const Ln=Number(xn.order),_n=Number(On.order);return Ln-_n}),Xn=()=>{zn=vue.reactive(Yn()),vue.nextTick(()=>{Bn.value.openColSetting(cloneDeep(zn))})},Zn=()=>{if(!y.customColumnPageCacheKey)return;const xn=Vn.getColumnCache(y.customColumnPageCacheKey);if(xn!=null&&xn.length){const On=qe.map(Ln=>{const _n=xn.find(Mn=>Mn.prop===Ln.prop);if(_n){const Mn={...Ln,order:_n.order||Ln.order,isShow:_n.isShow!==void 0?_n.isShow:Ln.isShow,readonly:_n.readonly!==void 0?_n.readonly:Ln.readonly,prop:_n.prop||Ln.prop,index:_n.index||Ln.index};return Ln.minWidth&&(Mn.minWidth=_n.minWidth||Ln.minWidth),Ln.width&&(Mn.width=_n.width||Ln.width),Mn}return Ln});zn=vue.reactive(On),qe=vue.reactive(zn)}};let zn=vue.reactive(Yn());const jn=cloneDeep(Yn()),$n=xn=>{if(!y.customColumnPageCacheKey)return console.error("请添加自定义列缓存配置项:customColumnPageCacheKey");xn=xn.map(On=>{const Ln=jn.find(_n=>_n.prop===On.prop);return Ln&&Ln.minWidth&&(On.minWidth=On.width,delete On.width),On}),qe=vue.reactive(cloneDeep(xn)),Vn.setColumnCache(y.customColumnPageCacheKey,xn),r.value=new Date().getTime(),k.value.doLayout()};return e({element:k,tableData:Fe,radio:V,pageable:pe,searchParam:le,searchInitParam:he,setPageTotal:ze,getTableList:_e,search:Ce,reset:xe,handleSizeChange:Ie,handleCurrentChange:Oe,clearSelection:Ue,enumMap:kt,isSelected:ae,selectedList:re,selectedListIds:ie}),(xn,On)=>{const Ln=vue.resolveDirective("loading");return vue.openBlock(),vue.createBlock(vue.unref(ElConfigProvider),{locale:vue.unref(zhCn)},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$1,[vue.createElementVNode("div",_hoisted_2$1,[xn.title?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$1,vue.toDisplayString(xn.title),1)):vue.createCommentVNode("",!0),vue.unref(g).headerTip?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4,[vue.renderSlot(xn.$slots,"headerTip",{},void 0,!0)])):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_5,[vue.withDirectives(vue.createVNode(SearchForm,{search:Tn,reset:kn,columns:Lt.value,"search-param":vue.unref(le),"is-show-reset-btn":y.isShowResetBtn,"is-show-search-btn":y.isShowSearchBtn},{default:vue.withCtx(()=>[xn.$slots.tableHeader?(vue.openBlock(),vue.createElementBlock("div",_hoisted_6,[vue.createElementVNode("div",_hoisted_7,[vue.renderSlot(xn.$slots,"tableHeader",{selectedList:vue.unref(re),selectedListIds:vue.unref(ie),isSelected:vue.unref(ae)},void 0,!0)])])):vue.createCommentVNode("",!0)]),_:3},8,["columns","search-param","is-show-reset-btn","is-show-search-btn"]),[[vue.vShow,$.value]])]),vue.unref(g).searchBarBottom?(vue.openBlock(),vue.createElementBlock("div",_hoisted_8,[vue.renderSlot(xn.$slots,"searchBarBottom",{},void 0,!0)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_9,[y.customColumn?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"col-setting-button",onClick:Xn},[vue.createVNode(vue.unref(ElTooltip),{class:"box-item",effect:"dark",content:"自定义列",placement:"top"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElIcon),{size:16,color:"#000000a6"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(setting_default))]),_:1})]),_:1})])):vue.createCommentVNode("",!0),vue.withDirectives((vue.openBlock(),vue.createBlock(vue.unref(ElTable),vue.mergeProps({ref_key:"tableRef",ref:k},xn.$attrs,{key:r.value,data:Fe.value,border:xn.border,"row-key":xn.rowKey,"max-height":j.value,"row-style":{height:"42px"},"tooltip-effect":"light","tooltip-options":{showArrow:!1,placement:"bottom-start",offset:y.offset?y.offset:-20}},vue.toHandlers(xn.$attrs),{onSelectionChange:vue.unref(oe),onSortChange:On[1]||(On[1]=_n=>y.onSortChange?y.onSortChange(_n):$e(_n))}),{append:vue.withCtx(()=>[vue.renderSlot(xn.$slots,"append",{},void 0,!0)]),empty:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_12,[vue.renderSlot(xn.$slots,"empty",{},()=>[vue.createElementVNode("img",{src:`${vue.unref(CDN_URL$1)}ghy-components/empty.png`,class:"zh-empty-img",alt:"notData"},null,8,_hoisted_13),On[5]||(On[5]=vue.createElementVNode("div",null,"暂无数据",-1))],!0)])]),default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(qe).sort((_n,Mn)=>_n.order-Mn.order),_n=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:_n},[_n.type&&L.includes(_n.type)&&_n.isShow?(vue.openBlock(),vue.createBlock(vue.unref(ElTableColumn),vue.mergeProps({key:0,ref_for:!0},_n,{align:_n.align??"left","reserve-selection":_n.type=="selection"}),vue.createSlots({default:vue.withCtx(Mn=>[_n.type=="expand"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[_n.render?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(_n.render),vue.mergeProps({key:0,ref_for:!0},Mn),null,16)):vue.renderSlot(xn.$slots,_n.type,vue.mergeProps({key:1,ref_for:!0},Mn),void 0,!0)],64)):vue.createCommentVNode("",!0),_n.type=="sort"?(vue.openBlock(),vue.createBlock(vue.unref(ElTag),{key:1,class:"move"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_caret_default))]),_:1})]),_:1})):vue.createCommentVNode("",!0),_n.type=="input"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:2},[Mn.row.$showInput?(vue.openBlock(),vue.createElementBlock("div",_hoisted_11,[vue.withDirectives(vue.createVNode(vue.unref(ElInputNumber),{modelValue:Cn.value,"onUpdate:modelValue":On[0]||(On[0]=Wn=>Cn.value=Wn),min:0,controls:!1},null,8,["modelValue"]),[[i]]),vue.createVNode(vue.unref(ElLink),{underline:!1,type:"primary",onClick:Wn=>Dn(Mn.row,String(_n.prop),_n.blurCallback),class:"ml-5"},{default:vue.withCtx(()=>On[3]||(On[3]=[vue.createTextVNode(" 保存 ")])),_:2},1032,["onClick"]),vue.createVNode(vue.unref(ElLink),{type:"primary",underline:!1,onClick:Wn=>Nn(Mn.row),class:"ml-5"},{default:vue.withCtx(()=>On[4]||(On[4]=[vue.createTextVNode(" 取消 ")])),_:2},1032,["onClick"])])):(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),{key:0,content:"编辑",placement:"top"},{default:vue.withCtx(()=>[vue.createElementVNode("span",_hoisted_10,[vue.createTextVNode(vue.toDisplayString(vue.unref($get)(Mn.row,String(_n.prop)))+" ",1),vue.createVNode(vue.unref(ElLink),{underline:!1,class:"text d-flex inline-input-text pointer",onClick:Wn=>In(Mn.row,_n.prop)},{default:vue.withCtx(()=>On[2]||(On[2]=[vue.createElementVNode("i",{class:"iconfont icon-edit"},null,-1)])),_:2},1032,["onClick"])])]),_:2},1024))],64)):vue.createCommentVNode("",!0)]),_:2},[_n.headerRender?{name:"header",fn:vue.withCtx(Mn=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(_n.headerRender),vue.mergeProps({ref_for:!0},Mn),null,16))]),key:"0"}:void 0]),1040,["align","reserve-selection"])):vue.createCommentVNode("",!0),!_n.type&&_n.prop&&_n.isShow?(vue.openBlock(),vue.createBlock(_sfc_main$3,{key:1,column:_n,"custom-column":xn.customColumn},vue.createSlots({_:2},[vue.renderList(Object.keys(xn.$slots),Mn=>({name:Mn,fn:vue.withCtx(Wn=>[vue.renderSlot(xn.$slots,Mn,vue.mergeProps({ref_for:!0},Wn),void 0,!0)])}))]),1032,["column","custom-column"])):vue.createCommentVNode("",!0)],64))),128))]),_:3},16,["data","border","row-key","max-height","tooltip-options","onSelectionChange"])),[[Ln,vue.unref(ue)]])]),vue.renderSlot(xn.$slots,"pagination",{},()=>[xn.pagination?(vue.openBlock(),vue.createBlock(TablePagination,{key:0,pageable:vue.unref(pe),"handle-size-change":vue.unref(Ie),"handle-current-change":vue.unref(Oe)},{zhPaginationLeftSlot:vue.withCtx(_n=>[vue.renderSlot(xn.$slots,"zhPaginationLeft",vue.normalizeProps(vue.guardReactiveProps(_n)),void 0,!0)]),_:3},8,["pageable","handle-size-change","handle-current-change"])):vue.createCommentVNode("",!0)],!0)]),y.customColumn?(vue.openBlock(),vue.createBlock(ColSetting,{key:0,ref_key:"colRef",ref:Bn,"origin-table-columns":vue.unref(jn),onSubmit:$n},null,8,["origin-table-columns"])):vue.createCommentVNode("",!0)]),_:3},8,["locale"])}}}),Table=_export_sfc(_sfc_main$1,[["__scopeId","data-v-77b1ce18"]]),ZhTable=withInstall$1(Table),_hoisted_1={key:1},_hoisted_2={key:1,class:"zh-base-item--value--file"},_hoisted_3={key:2},_sfc_main=vue.defineComponent({name:"ZhBaseItem",__name:"BaseItem",props:{label:{},labelRender:{},colon:{type:Boolean,default:!1},value:{},fileId:{},rewriteFileName:{},valueRender:{},onClick:{},labelWidth:{},infoDirection:{default:"horizontal"},defaultValue:{default:DEFAULT_VALUE$1},className:{},labelClassName:{},valueClassName:{},span:{default:1},showFileName:{type:Boolean,default:!0},fetchFileById:{}},setup(t){const e=vue.useSlots(),n=t,r=vue.inject("infoLabelWidth",void 0),i=vue.computed(()=>!!(n.onClick&&n.value)),g=vue.computed(()=>!!(!n.value&&n.fileId)),y=vue.ref(),k=vue.computed(()=>{var j;const z=(j=y.value)==null?void 0:j.name;if(!z)return"";if(n.rewriteFileName){const oe=z.substring(z.lastIndexOf("."));return n.rewriteFileName+oe}return z}),L=vue.computed(()=>{const z={},j=n.labelWidth||r;return j&&n.infoDirection==="horizontal"&&(isNaN(Number(j))?z.width=j:z.width=j+"px"),z}),$=vue.computed(()=>({...L.value})),V=vue.computed(()=>n.value===""?DEFAULT_VALUE$1:n.value??DEFAULT_VALUE$1);return vue.watchEffect(async()=>{!g.value||!n.fileId||!n.fetchFileById||(y.value=await n.fetchFileById(n.fileId))}),(z,j)=>(vue.openBlock(),vue.createBlock(vue.unref(ZhGridItem),{span:z.span,label:z.label},{default:vue.withCtx(oe=>{var re;return[vue.createElementVNode("div",{class:vue.normalizeClass(["zh-base-item",[z.infoDirection,z.className]])},[vue.createElementVNode("div",{class:vue.normalizeClass(["zh-base-item-label",[z.infoDirection,z.labelClassName]]),style:vue.normalizeStyle({width:z.infoDirection==="horizontal"&&oe.maxLabelWidthInCol?oe.maxLabelWidthInCol+"px":void 0,...$.value})},[z.labelRender?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(z.labelRender),{key:0})):(vue.openBlock(),vue.createElementBlock("span",_hoisted_1,vue.toDisplayString(z.label)+vue.toDisplayString(z.colon?":":""),1))],6),vue.createElementVNode("div",{class:vue.normalizeClass(["zh-base-item-value",z.valueClassName])},[vue.unref(e).value?vue.renderSlot(z.$slots,"value",{key:0,content:z.value}):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[i.value?(vue.openBlock(),vue.createBlock(vue.unref(ElLink),{key:0,type:"primary",class:"zh-base-item--value--link",onClick:j[0]||(j[0]=vue.withModifiers(ie=>z.onClick&&z.onClick(z.value),["stop"]))},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(z.value),1)]),_:1})):g.value?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2,[z.showFileName?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createVNode(vue.unref(ElIcon),{class:"iconfont"},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(document_default))]),_:1}),vue.createTextVNode(" "+vue.toDisplayString(k.value),1)],64)):vue.createCommentVNode("",!0),vue.createVNode(vue.unref(ElLink),{type:"primary",href:(re=y.value)==null?void 0:re.path,target:"_blank",class:vue.normalizeClass({"ml-8":z.showFileName})},{default:vue.withCtx(()=>j[1]||(j[1]=[vue.createTextVNode(" 查看/下载 ")])),_:1},8,["href","class"])])):z.valueRender?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(z.valueRender)))])):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:3},[vue.createTextVNode(vue.toDisplayString(V.value),1)],64))],64))],2)],2)]}),_:3},8,["span","label"]))}}),ZhBaseItem=withInstall$1(_sfc_main),components=[ZhBaseInfo,ZhButton,ZhDatePicker,ZhDetailHeader,ZhDetailSubTitle,ZhDialog,ZhDiyDataTable,ZhEditInfoPair,ZhFileWrapper,ZhGrid,ZhGridItem,ZhMultiGrid,ZhInfoPair,ZhInput,ZhInputNumber,ZhLoading,ZhMessageBox,ZhConfirm,ZhAlert,ZhPrompt,ZhMoneyInput,ZhPageHeadPanel,ZhToolTips,ZhMap,ZhButtonGroup,ZhTable],installer=makeInstaller(components);exports.BaseMapType=BaseMapType,exports.CDN_URL=CDN_URL,exports.COPY_RIGHT_TYPE=COPY_RIGHT_TYPE,exports.DEFAULT_VALUE=DEFAULT_VALUE,exports.DIY_DATA_TYPE=DIY_DATA_TYPE,exports.LOG_DATE_FORMAT=LOG_DATE_FORMAT,exports.SEARCH_TYPE=SEARCH_TYPE,exports.ZhAlert=ZhAlert,exports.ZhBaseInfo=ZhBaseInfo,exports.ZhBaseItem=ZhBaseItem,exports.ZhButton=ZhButton,exports.ZhButtonGroup=ZhButtonGroup,exports.ZhConfirm=ZhConfirm,exports.ZhDatePicker=ZhDatePicker,exports.ZhDetailHeader=ZhDetailHeader,exports.ZhDetailSubTitle=ZhDetailSubTitle,exports.ZhDialog=ZhDialog,exports.ZhDiyDataTable=ZhDiyDataTable,exports.ZhEditInfoPair=ZhEditInfoPair,exports.ZhFileWrapper=ZhFileWrapper,exports.ZhGrid=ZhGrid,exports.ZhGridItem=ZhGridItem,exports.ZhInfoPair=ZhInfoPair,exports.ZhInput=ZhInput,exports.ZhInputNumber=ZhInputNumber,exports.ZhLoading=ZhLoading,exports.ZhMap=ZhMap,exports.ZhMessageBox=ZhMessageBox,exports.ZhMoneyInput=ZhMoneyInput,exports.ZhMultiGrid=ZhMultiGrid,exports.ZhPageHeadPanel=ZhPageHeadPanel,exports.ZhPrompt=ZhPrompt,exports.ZhTable=ZhTable,exports.ZhToolTips=ZhToolTips,exports.baseMap=baseMap,exports.default=installer,exports.mapDefaultCenter=mapDefaultCenter,exports.mapZoom=mapZoom,exports.projection=projection,exports.renderShipsLimit=renderShipsLimit,exports.tiandituKey=tiandituKey,exports.zhongkeKey=zhongkeKey,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|