go-core 0.2.33 → 0.2.34
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/code.es5.js +8 -8
- package/dist/code.umd.js +8 -8
- package/package.json +2 -2
package/dist/code.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash"),require("axios"),require("@anov/ui/lib/utils/option-theme.js")):"function"==typeof define&&define.amd?define(["exports","lodash","axios","@anov/ui/lib/utils/option-theme.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).code={},e._,e.axios,e.optionTheme_js)}(this,(function(exports,_$1,e,optionTheme_js){"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var moment=createCommonjsModule((function(e,t){e.exports=function(){var t,r;function n(){return t.apply(null,arguments)}function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function u(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var r,n=[],i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function f(e,t){for(var r in t)s(t,r)&&(e[r]=t[r]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,r,n){return Wr(e,t,r,n,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=m()),e._pf}function v(e){var t=null,n=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=g(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function y(e){var t=p(NaN);return null!=e?f(g(t),e):g(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),n=r.length>>>0;for(t=0;t<n;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var _=n.momentProperties=[],b=!1;function w(e,t){var r,n,i,o=_.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=g(t)),u(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)u(i=t[n=_[r]])||(e[n]=i);return e}function D(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,n.updateOffset(this),b=!1)}function S(e){return e instanceof D||null!=e&&null!=e._isAMomentObject}function x(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var r=!0;return f((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),r){var i,o,a,c=[],u=arguments.length;for(o=0;o<u;o++){if(i="","object"==typeof arguments[o]){for(a in i+="\n["+o+"] ",arguments[0])s(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[o];c.push(i)}x(e+"\nArguments: "+Array.prototype.slice.call(c).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)}),t)}var k,P={};function E(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),P[e]||(x(t),P[e]=!0)}function A(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function C(e){var t,r;for(r in e)s(e,r)&&(A(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function O(e,t){var r,n=f({},e);for(r in t)s(t,r)&&(a(e[r])&&a(t[r])?(n[r]={},f(n[r],e[r]),f(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)s(e,r)&&!s(t,r)&&a(e[r])&&(n[r]=f({},n[r]));return n}function R(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,k=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)s(e,t)&&r.push(t);return r};var M={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function I(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return A(n)?n.call(t,r):n}function N(e,t,r){var n=""+Math.abs(e),i=t-n.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var B=/(\[[^\[]*\])|(\\)?([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,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},V={};function $(e,t,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&(V[e]=i),t&&(V[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),r&&(V[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function L(e){var t,r,n=e.match(B);for(t=0,r=n.length;t<r;t++)V[n[t]]?n[t]=V[n[t]]:n[t]=U(n[t]);return function(t){var i,o="";for(i=0;i<r;i++)o+=A(n[i])?n[i].call(t,e):n[i];return o}}function z(e,t){return e.isValid()?(t=K(t,e.localeData()),j[t]=j[t]||L(t),j[t](e)):e.localeData().invalidDate()}function K(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(F.lastIndex=0;r>=0&&F.test(e);)e=e.replace(F,n),F.lastIndex=0,r-=1;return e}var H={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 q(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(B).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var W="Invalid date";function Y(){return this._invalidDate}var G="%d",J=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var Z={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 Q(e,t,r,n){var i=this._relativeTime[r];return A(i)?i(e,t,r,n):i.replace(/%d/i,e)}function ee(e,t){var r=this._relativeTime[e>0?"future":"past"];return A(r)?r(t):r.replace(/%s/i,t)}var te={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 re(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function ne(e){var t,r,n={};for(r in e)s(e,r)&&(t=re(r))&&(n[t]=e[r]);return n}var ie={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 oe(e){var t,r=[];for(t in e)s(e,t)&&r.push({unit:t,priority:ie[t]});return r.sort((function(e,t){return e.priority-t.priority})),r}var ae,se=/\d/,ce=/\d\d/,ue=/\d{3}/,le=/\d{4}/,de=/[+-]?\d{6}/,he=/\d\d?/,fe=/\d\d\d\d?/,pe=/\d\d\d\d\d\d?/,me=/\d{1,3}/,ge=/\d{1,4}/,ve=/[+-]?\d{1,6}/,ye=/\d+/,_e=/[+-]?\d+/,be=/Z|[+-]\d\d:?\d\d/gi,we=/Z|[+-]\d\d(?::?\d\d)?/gi,De=/[+-]?\d+(\.\d{1,3})?/,Se=/[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,xe=/^[1-9]\d?/,Te=/^([1-9]\d|\d)/;function ke(e,t,r){ae[e]=A(t)?t:function(e,n){return e&&r?r:t}}function Pe(e,t){return s(ae,e)?ae[e](t._strict,t._locale):new RegExp(Ee(e))}function Ee(e){return Ae(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,i){return t||r||n||i})))}function Ae(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Oe(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=Ce(t)),r}ae={};var Re={};function Me(e,t){var r,n,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,r){r[t]=Oe(e)}),n=e.length,r=0;r<n;r++)Re[e[r]]=i}function Ie(e,t){Me(e,(function(e,r,n,i){n._w=n._w||{},t(e,n._w,n,i)}))}function Ne(e,t,r){null!=t&&s(Re,e)&&Re[e](t,r._a,r,e)}function Be(e){return e%4==0&&e%100!=0||e%400==0}var Fe=0,je=1,Ve=2,$e=3,Ue=4,Le=5,ze=6,Ke=7,He=8;function qe(e){return Be(e)?366:365}$("Y",0,0,(function(){var e=this.year();return e<=9999?N(e,4):"+"+e})),$(0,["YY",2],0,(function(){return this.year()%100})),$(0,["YYYY",4],0,"year"),$(0,["YYYYY",5],0,"year"),$(0,["YYYYYY",6,!0],0,"year"),ke("Y",_e),ke("YY",he,ce),ke("YYYY",ge,le),ke("YYYYY",ve,de),ke("YYYYYY",ve,de),Me(["YYYYY","YYYYYY"],Fe),Me("YYYY",(function(e,t){t[Fe]=2===e.length?n.parseTwoDigitYear(e):Oe(e)})),Me("YY",(function(e,t){t[Fe]=n.parseTwoDigitYear(e)})),Me("Y",(function(e,t){t[Fe]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return Oe(e)+(Oe(e)>68?1900:2e3)};var We,Ye=Je("FullYear",!0);function Ge(){return Be(this.year())}function Je(e,t){return function(r){return null!=r?(Ze(this,e,r),n.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Ze(e,t,r){var n,i,o,a,s;if(e.isValid()&&!isNaN(r)){switch(n=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(i?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(i?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(i?n.setUTCHours(r):n.setHours(r));case"Date":return void(i?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}o=r,a=e.month(),s=29!==(s=e.date())||1!==a||Be(o)?s:28,i?n.setUTCFullYear(o,a,s):n.setFullYear(o,a,s)}}function Qe(e){return A(this[e=re(e)])?this[e]():this}function et(e,t){if("object"==typeof e){var r,n=oe(e=ne(e)),i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(A(this[e=re(e)]))return this[e](t);return this}function tt(e,t){return(e%t+t)%t}function rt(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=tt(t,12);return e+=(t-r)/12,1===r?Be(e)?29:28:31-r%7%2}We=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},$("M",["MM",2],"Mo",(function(){return this.month()+1})),$("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),$("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ke("M",he,xe),ke("MM",he,ce),ke("MMM",(function(e,t){return t.monthsShortRegex(e)})),ke("MMMM",(function(e,t){return t.monthsRegex(e)})),Me(["M","MM"],(function(e,t){t[je]=Oe(e)-1})),Me(["MMM","MMMM"],(function(e,t,r,n){var i=r._locale.monthsParse(e,n,r._strict);null!=i?t[je]=i:g(r).invalidMonth=e}));var nt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),it="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ot=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,at=Se,st=Se;function ct(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ot).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone}function ut(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ot.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lt(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return r?"MMM"===t?-1!==(i=We.call(this._shortMonthsParse,a))?i:null:-1!==(i=We.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=We.call(this._shortMonthsParse,a))||-1!==(i=We.call(this._longMonthsParse,a))?i:null:-1!==(i=We.call(this._longMonthsParse,a))||-1!==(i=We.call(this._shortMonthsParse,a))?i:null}function dt(e,t,r){var n,i,o;if(this._monthsParseExact)return lt.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=p([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function ht(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Oe(t);else if(!l(t=e.localeData().monthsParse(t)))return e;var r=t,n=e.date();return n=n<29?n:Math.min(n,rt(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function ft(e){return null!=e?(ht(this,e),n.updateOffset(this,!0),this):Xe(this,"Month")}function pt(){return rt(this.year(),this.month())}function mt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||vt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=at),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function gt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||vt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=st),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function vt(){function e(e,t){return t.length-e.length}var t,r,n,i,o=[],a=[],s=[];for(t=0;t<12;t++)r=p([2e3,t]),n=Ae(this.monthsShort(r,"")),i=Ae(this.months(r,"")),o.push(n),a.push(i),s.push(i),s.push(n);o.sort(e),a.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function yt(e,t,r,n,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,i,o,a),s}function _t(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,r){var n=7+t-r;return-(7+_t(e,0,n).getUTCDay()-t)%7+n-1}function wt(e,t,r,n,i){var o,a,s=1+7*(t-1)+(7+r-n)%7+bt(e,n,i);return s<=0?a=qe(o=e-1)+s:s>qe(e)?(o=e+1,a=s-qe(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Dt(e,t,r){var n,i,o=bt(e.year(),t,r),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?n=a+St(i=e.year()-1,t,r):a>St(e.year(),t,r)?(n=a-St(e.year(),t,r),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function St(e,t,r){var n=bt(e,t,r),i=bt(e+1,t,r);return(qe(e)-n+i)/7}function xt(e){return Dt(e,this._week.dow,this._week.doy).week}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),ke("w",he,xe),ke("ww",he,ce),ke("W",he,xe),ke("WW",he,ce),Ie(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=Oe(e)}));var Tt={dow:0,doy:6};function kt(){return this._week.dow}function Pt(){return this._week.doy}function Et(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function At(e){var t=Dt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ct(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ot(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rt(e,t){return e.slice(t,7).concat(e.slice(0,t))}$("d",0,"do","day"),$("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),$("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),$("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),ke("d",he),ke("e",he),ke("E",he),ke("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ke("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ke("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ie(["dd","ddd","dddd"],(function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:g(r).invalidWeekday=e})),Ie(["d","e","E"],(function(e,t,r,n){t[n]=Oe(e)}));var Mt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),It="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Nt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Bt=Se,Ft=Se,jt=Se;function Vt(e,t){var r=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Rt(r,this._week.dow):e?r[e.day()]:r}function $t(e){return!0===e?Rt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ut(e){return!0===e?Rt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Lt(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(i=We.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=We.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._shortWeekdaysParse,a))||-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=We.call(this._shortWeekdaysParse,a))||-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:-1!==(i=We.call(this._minWeekdaysParse,a))||-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._shortWeekdaysParse,a))?i:null}function zt(e,t,r){var n,i,o;if(this._weekdaysParseExact)return Lt.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=p([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Kt(e){if(!this.isValid())return null!=e?this:NaN;var t=Xe(this,"Day");return null!=e?(e=Ct(e,this.localeData()),this.add(e-t,"d")):t}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function qt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ot(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Wt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Bt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Gt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=jt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Jt(){function e(e,t){return t.length-e.length}var t,r,n,i,o,a=[],s=[],c=[],u=[];for(t=0;t<7;t++)r=p([2e3,1]).day(t),n=Ae(this.weekdaysMin(r,"")),i=Ae(this.weekdaysShort(r,"")),o=Ae(this.weekdays(r,"")),a.push(n),s.push(i),c.push(o),u.push(n),u.push(i),u.push(o);a.sort(e),s.sort(e),c.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xt(){return this.hours()%12||12}function Zt(){return this.hours()||24}function Qt(e,t){$(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function er(e,t){return t._meridiemParse}function tr(e){return"p"===(e+"").toLowerCase().charAt(0)}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Xt),$("k",["kk",2],0,Zt),$("hmm",0,0,(function(){return""+Xt.apply(this)+N(this.minutes(),2)})),$("hmmss",0,0,(function(){return""+Xt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),$("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),$("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),Qt("a",!0),Qt("A",!1),ke("a",er),ke("A",er),ke("H",he,Te),ke("h",he,xe),ke("k",he,xe),ke("HH",he,ce),ke("hh",he,ce),ke("kk",he,ce),ke("hmm",fe),ke("hmmss",pe),ke("Hmm",fe),ke("Hmmss",pe),Me(["H","HH"],$e),Me(["k","kk"],(function(e,t,r){var n=Oe(e);t[$e]=24===n?0:n})),Me(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),Me(["h","hh"],(function(e,t,r){t[$e]=Oe(e),g(r).bigHour=!0})),Me("hmm",(function(e,t,r){var n=e.length-2;t[$e]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n)),g(r).bigHour=!0})),Me("hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[$e]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n,2)),t[Le]=Oe(e.substr(i)),g(r).bigHour=!0})),Me("Hmm",(function(e,t,r){var n=e.length-2;t[$e]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n))})),Me("Hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[$e]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n,2)),t[Le]=Oe(e.substr(i))}));var rr=/[ap]\.?m?\.?/i,nr=Je("Hours",!0);function ir(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var or,ar={calendar:M,longDateFormat:H,invalidDate:W,ordinal:G,dayOfMonthOrdinalParse:J,relativeTime:Z,months:nt,monthsShort:it,week:Tt,weekdays:Mt,weekdaysMin:Nt,weekdaysShort:It,meridiemParse:rr},sr={},cr={};function ur(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function lr(e){return e?e.toLowerCase().replace("_","-"):e}function dr(e){for(var t,r,n,i,o=0;o<e.length;){for(t=(i=lr(e[o]).split("-")).length,r=(r=lr(e[o+1]))?r.split("-"):null;t>0;){if(n=fr(i.slice(0,t).join("-")))return n;if(r&&r.length>=t&&ur(i,r)>=t-1)break;t--}o++}return or}function hr(e){return!(!e||!e.match("^[^/\\\\]*$"))}function fr(t){var r=null;if(void 0===sr[t]&&e&&e.exports&&hr(t))try{r=or._abbr,commonjsRequire("./locale/"+t),pr(r)}catch(e){sr[t]=null}return sr[t]}function pr(e,t){var r;return e&&((r=u(t)?vr(e):mr(e,t))?or=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),or._abbr}function mr(e,t){if(null!==t){var r,n=ar;if(t.abbr=e,null!=sr[e])E("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."),n=sr[e]._config;else if(null!=t.parentLocale)if(null!=sr[t.parentLocale])n=sr[t.parentLocale]._config;else{if(null==(r=fr(t.parentLocale)))return cr[t.parentLocale]||(cr[t.parentLocale]=[]),cr[t.parentLocale].push({name:e,config:t}),null;n=r._config}return sr[e]=new R(O(n,t)),cr[e]&&cr[e].forEach((function(e){mr(e.name,e.config)})),pr(e),sr[e]}return delete sr[e],null}function gr(e,t){if(null!=t){var r,n,i=ar;null!=sr[e]&&null!=sr[e].parentLocale?sr[e].set(O(sr[e]._config,t)):(null!=(n=fr(e))&&(i=n._config),t=O(i,t),null==n&&(t.abbr=e),(r=new R(t)).parentLocale=sr[e],sr[e]=r),pr(e)}else null!=sr[e]&&(null!=sr[e].parentLocale?(sr[e]=sr[e].parentLocale,e===pr()&&pr(e)):null!=sr[e]&&delete sr[e]);return sr[e]}function vr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return or;if(!o(e)){if(t=fr(e))return t;e=[e]}return dr(e)}function yr(){return k(sr)}function _r(e){var t,r=e._a;return r&&-2===g(e).overflow&&(t=r[je]<0||r[je]>11?je:r[Ve]<1||r[Ve]>rt(r[Fe],r[je])?Ve:r[$e]<0||r[$e]>24||24===r[$e]&&(0!==r[Ue]||0!==r[Le]||0!==r[ze])?$e:r[Ue]<0||r[Ue]>59?Ue:r[Le]<0||r[Le]>59?Le:r[ze]<0||r[ze]>999?ze:-1,g(e)._overflowDayOfYear&&(t<Fe||t>Ve)&&(t=Ve),g(e)._overflowWeeks&&-1===t&&(t=Ke),g(e)._overflowWeekday&&-1===t&&(t=He),g(e).overflow=t),e}var br=/^\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)?)?$/,wr=/^\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)?)?$/,Dr=/Z|[+-]\d\d(?::?\d\d)?/,Sr=[["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]],xr=[["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/]],Tr=/^\/?Date\((-?\d+)/i,kr=/^(?:(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}))$/,Pr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Er(e){var t,r,n,i,o,a,s=e._i,c=br.exec(s)||wr.exec(s),u=Sr.length,l=xr.length;if(c){for(g(e).iso=!0,t=0,r=u;t<r;t++)if(Sr[t][1].exec(c[1])){i=Sr[t][0],n=!1!==Sr[t][2];break}if(null==i)return void(e._isValid=!1);if(c[3]){for(t=0,r=l;t<r;t++)if(xr[t][1].exec(c[3])){o=(c[2]||" ")+xr[t][0];break}if(null==o)return void(e._isValid=!1)}if(!n&&null!=o)return void(e._isValid=!1);if(c[4]){if(!Dr.exec(c[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),$r(e)}else e._isValid=!1}function Ar(e,t,r,n,i,o){var a=[Cr(e),it.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function Cr(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Or(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Rr(e,t,r){return!e||It.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(r).weekdayMismatch=!0,r._isValid=!1,!1)}function Mr(e,t,r){if(e)return Pr[e];if(t)return 0;var n=parseInt(r,10),i=n%100;return(n-i)/100*60+i}function Ir(e){var t,r=kr.exec(Or(e._i));if(r){if(t=Ar(r[4],r[3],r[2],r[5],r[6],r[7]),!Rr(r[1],t,e))return;e._a=t,e._tzm=Mr(r[8],r[9],r[10]),e._d=_t.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Nr(e){var t=Tr.exec(e._i);null===t?(Er(e),!1===e._isValid&&(delete e._isValid,Ir(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:n.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Br(e,t,r){return null!=e?e:null!=t?t:r}function Fr(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function jr(e){var t,r,n,i,o,a=[];if(!e._d){for(n=Fr(e),e._w&&null==e._a[Ve]&&null==e._a[je]&&Vr(e),null!=e._dayOfYear&&(o=Br(e._a[Fe],n[Fe]),(e._dayOfYear>qe(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),r=_t(o,0,e._dayOfYear),e._a[je]=r.getUTCMonth(),e._a[Ve]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=n[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[$e]&&0===e._a[Ue]&&0===e._a[Le]&&0===e._a[ze]&&(e._nextDay=!0,e._a[$e]=0),e._d=(e._useUTC?_t:yt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[$e]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function Vr(e){var t,r,n,i,o,a,s,c,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,r=Br(t.GG,e._a[Fe],Dt(Yr(),1,4).year),n=Br(t.W,1),((i=Br(t.E,1))<1||i>7)&&(c=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,u=Dt(Yr(),o,a),r=Br(t.gg,e._a[Fe],u.year),n=Br(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(c=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(c=!0)):i=o),n<1||n>St(r,o,a)?g(e)._overflowWeeks=!0:null!=c?g(e)._overflowWeekday=!0:(s=wt(r,n,i,o,a),e._a[Fe]=s.year,e._dayOfYear=s.dayOfYear)}function $r(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],g(e).empty=!0;var t,r,i,o,a,s,c,u=""+e._i,l=u.length,d=0;for(c=(i=K(e._f,e._locale).match(B)||[]).length,t=0;t<c;t++)o=i[t],(r=(u.match(Pe(o,e))||[])[0])&&((a=u.substr(0,u.indexOf(r))).length>0&&g(e).unusedInput.push(a),u=u.slice(u.indexOf(r)+r.length),d+=r.length),V[o]?(r?g(e).empty=!1:g(e).unusedTokens.push(o),Ne(o,r,e)):e._strict&&!r&&g(e).unusedTokens.push(o);g(e).charsLeftOver=l-d,u.length>0&&g(e).unusedInput.push(u),e._a[$e]<=12&&!0===g(e).bigHour&&e._a[$e]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[$e]=Ur(e._locale,e._a[$e],e._meridiem),null!==(s=g(e).era)&&(e._a[Fe]=e._locale.erasConvertYear(s,e._a[Fe])),jr(e),_r(e)}else Ir(e);else Er(e)}function Ur(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function Lr(e){var t,r,n,i,o,a,s=!1,c=e._f.length;if(0===c)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<c;i++)o=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],$r(t),v(t)&&(a=!0),o+=g(t).charsLeftOver,o+=10*g(t).unusedTokens.length,g(t).score=o,s?o<n&&(n=o,r=t):(null==n||o<n||a)&&(n=o,r=t,a&&(s=!0));f(e,r||t)}function zr(e){if(!e._d){var t=ne(e._i),r=void 0===t.day?t.date:t.day;e._a=h([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),jr(e)}}function Kr(e){var t=new D(_r(Hr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Hr(e){var t=e._i,r=e._f;return e._locale=e._locale||vr(e._l),null===t||void 0===r&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new D(_r(t)):(d(t)?e._d=t:o(r)?Lr(e):r?$r(e):qr(e),v(e)||(e._d=null),e))}function qr(e){var t=e._i;u(t)?e._d=new Date(n.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Nr(e):o(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),jr(e)):a(t)?zr(e):l(t)?e._d=new Date(t):n.createFromInputFallback(e)}function Wr(e,t,r,n,i){var s={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==r&&!1!==r||(n=r,r=void 0),(a(e)&&c(e)||o(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=r,s._i=e,s._f=t,s._strict=n,Kr(s)}function Yr(e,t,r,n){return Wr(e,t,r,n,!1)}n.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var Gr=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Yr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),Jr=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Yr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Xr(e,t){var r,n;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Yr();for(r=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](r)||(r=t[n]);return r}function Zr(){return Xr("isBefore",[].slice.call(arguments,0))}function Qr(){return Xr("isAfter",[].slice.call(arguments,0))}var en=function(){return Date.now?Date.now():+new Date},tn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rn(e){var t,r,n=!1,i=tn.length;for(t in e)if(s(e,t)&&(-1===We.call(tn,t)||null!=e[t]&&isNaN(e[t])))return!1;for(r=0;r<i;++r)if(e[tn[r]]){if(n)return!1;parseFloat(e[tn[r]])!==Oe(e[tn[r]])&&(n=!0)}return!0}function nn(){return this._isValid}function on(){return En(NaN)}function an(e){var t=ne(e),r=t.year||0,n=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,c=t.minute||0,u=t.second||0,l=t.millisecond||0;this._isValid=rn(t),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*n+12*r,this._data={},this._locale=vr(),this._bubble()}function sn(e){return e instanceof an}function cn(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function un(e,t,r){var n,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(n=0;n<i;n++)(r&&e[n]!==t[n]||!r&&Oe(e[n])!==Oe(t[n]))&&a++;return a+o}function ln(e,t){$(e,0,0,(function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+N(~~(e/60),2)+t+N(~~e%60,2)}))}ln("Z",":"),ln("ZZ",""),ke("Z",we),ke("ZZ",we),Me(["Z","ZZ"],(function(e,t,r){r._useUTC=!0,r._tzm=hn(we,e)}));var dn=/([\+\-]|\d\d)/gi;function hn(e,t){var r,n,i=(t||"").match(e);return null===i?null:0===(n=60*(r=((i[i.length-1]||[])+"").match(dn)||["-",0,0])[1]+Oe(r[2]))?0:"+"===r[0]?n:-n}function fn(e,t){var r,i;return t._isUTC?(r=t.clone(),i=(S(e)||d(e)?e.valueOf():Yr(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),n.updateOffset(r,!1),r):Yr(e).local()}function pn(e){return-Math.round(e._d.getTimezoneOffset())}function mn(e,t,r){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=hn(we,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(i=pn(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Mn(this,En(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:pn(this)}function gn(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vn(e){return this.utcOffset(0,e)}function yn(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(pn(this),"m")),this}function _n(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=hn(be,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function bn(e){return!!this.isValid()&&(e=e?Yr(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function wn(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Dn(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Hr(t))._a?(e=t._isUTC?p(t._a):Yr(t._a),this._isDSTShifted=this.isValid()&&un(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Sn(){return!!this.isValid()&&!this._isUTC}function xn(){return!!this.isValid()&&this._isUTC}function Tn(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var kn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Pn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function En(e,t){var r,n,i,o=e,a=null;return sn(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=kn.exec(e))?(r="-"===a[1]?-1:1,o={y:0,d:Oe(a[Ve])*r,h:Oe(a[$e])*r,m:Oe(a[Ue])*r,s:Oe(a[Le])*r,ms:Oe(cn(1e3*a[ze]))*r}):(a=Pn.exec(e))?(r="-"===a[1]?-1:1,o={y:An(a[2],r),M:An(a[3],r),w:An(a[4],r),d:An(a[5],r),h:An(a[6],r),m:An(a[7],r),s:An(a[8],r)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=On(Yr(o.from),Yr(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),n=new an(o),sn(e)&&s(e,"_locale")&&(n._locale=e._locale),sn(e)&&s(e,"_isValid")&&(n._isValid=e._isValid),n}function An(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Cn(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function On(e,t){var r;return e.isValid()&&t.isValid()?(t=fn(t,e),e.isBefore(t)?r=Cn(e,t):((r=Cn(t,e)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Rn(e,t){return function(r,n){var i;return null===n||isNaN(+n)||(E(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),Mn(this,En(r,n),e),this}}function Mn(e,t,r,i){var o=t._milliseconds,a=cn(t._days),s=cn(t._months);e.isValid()&&(i=null==i||i,s&&ht(e,Xe(e,"Month")+s*r),a&&Ze(e,"Date",Xe(e,"Date")+a*r),o&&e._d.setTime(e._d.valueOf()+o*r),i&&n.updateOffset(e,a||s))}En.fn=an.prototype,En.invalid=on;var In=Rn(1,"add"),Nn=Rn(-1,"subtract");function Bn(e){return"string"==typeof e||e instanceof String}function Fn(e){return S(e)||d(e)||Bn(e)||l(e)||Vn(e)||jn(e)||null==e}function jn(e){var t,r,n=a(e)&&!c(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=o.length;for(t=0;t<u;t+=1)r=o[t],i=i||s(e,r);return n&&i}function Vn(e){var t=o(e),r=!1;return t&&(r=0===e.filter((function(t){return!l(t)&&Bn(e)})).length),t&&r}function $n(e){var t,r,n=a(e)&&!c(e),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)r=o[t],i=i||s(e,r);return n&&i}function Un(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Ln(e,t){1===arguments.length&&(arguments[0]?Fn(arguments[0])?(e=arguments[0],t=void 0):$n(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Yr(),i=fn(r,this).startOf("day"),o=n.calendarFormat(this,i)||"sameElse",a=t&&(A(t[o])?t[o].call(this,r):t[o]);return this.format(a||this.localeData().calendar(o,this,Yr(r)))}function zn(){return new D(this)}function Kn(e,t){var r=S(e)?e:Yr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())}function Hn(e,t){var r=S(e)?e:Yr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())}function qn(e,t,r,n){var i=S(e)?e:Yr(e),o=S(t)?t:Yr(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(n=n||"()")[0]?this.isAfter(i,r):!this.isBefore(i,r))&&(")"===n[1]?this.isBefore(o,r):!this.isAfter(o,r))}function Wn(e,t){var r,n=S(e)?e:Yr(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))}function Yn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Gn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Jn(e,t,r){var n,i,o;if(!this.isValid())return NaN;if(!(n=fn(e,this)).isValid())return NaN;switch(i=6e4*(n.utcOffset()-this.utcOffset()),t=re(t)){case"year":o=Xn(this,n)/12;break;case"month":o=Xn(this,n);break;case"quarter":o=Xn(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-i)/864e5;break;case"week":o=(this-n-i)/6048e5;break;default:o=this-n}return r?o:Ce(o)}function Xn(e,t){if(e.date()<t.date())return-Xn(t,e);var r=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(r,"months");return-(r+(t-n<0?(t-n)/(n-e.clone().add(r-1,"months")):(t-n)/(e.clone().add(r+1,"months")-n)))||0}function Zn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Qn(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?z(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(r,"Z")):z(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",n=o+'[")]',this.format(e+t+r+n)}function ti(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=z(this,e);return this.localeData().postformat(t)}function ri(e,t){return this.isValid()&&(S(e)&&e.isValid()||Yr(e).isValid())?En({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ni(e){return this.from(Yr(),e)}function ii(e,t){return this.isValid()&&(S(e)&&e.isValid()||Yr(e).isValid())?En({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.to(Yr(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vr(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ci(){return this._locale}var ui=1e3,li=60*ui,di=60*li,hi=3506328*di;function fi(e,t){return(e%t+t)%t}function pi(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-hi:new Date(e,t,r).valueOf()}function mi(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-hi:Date.UTC(e,t,r)}function gi(e){var t,r;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mi:pi,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fi(t+(this._isUTC?0:this.utcOffset()*li),di);break;case"minute":t=this._d.valueOf(),t-=fi(t,li);break;case"second":t=this._d.valueOf(),t-=fi(t,ui)}return this._d.setTime(t),n.updateOffset(this,!0),this}function vi(e){var t,r;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mi:pi,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=di-fi(t+(this._isUTC?0:this.utcOffset()*li),di)-1;break;case"minute":t=this._d.valueOf(),t+=li-fi(t,li)-1;break;case"second":t=this._d.valueOf(),t+=ui-fi(t,ui)-1}return this._d.setTime(t),n.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function _i(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function wi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Di(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Si(){return this.isValid()?this.toISOString():null}function xi(){return v(this)}function Ti(){return f({},g(this))}function ki(){return g(this).overflow}function Pi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ei(e,t){var r,i,o,a=this._eras||vr("en")._eras;for(r=0,i=a.length;r<i;++r)switch("string"==typeof a[r].since&&(o=n(a[r].since).startOf("day"),a[r].since=o.valueOf()),typeof a[r].until){case"undefined":a[r].until=1/0;break;case"string":o=n(a[r].until).startOf("day").valueOf(),a[r].until=o.valueOf()}return a}function Ai(e,t,r){var n,i,o,a,s,c=this.eras();for(e=e.toUpperCase(),n=0,i=c.length;n<i;++n)if(o=c[n].name.toUpperCase(),a=c[n].abbr.toUpperCase(),s=c[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return c[n];break;case"NNNN":if(o===e)return c[n];break;case"NNNNN":if(s===e)return c[n]}else if([o,a,s].indexOf(e)>=0)return c[n]}function Ci(e,t){var r=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*r}function Oi(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].name;if(n[e].until<=r&&r<=n[e].since)return n[e].name}return""}function Ri(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].narrow;if(n[e].until<=r&&r<=n[e].since)return n[e].narrow}return""}function Mi(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].abbr;if(n[e].until<=r&&r<=n[e].since)return n[e].abbr}return""}function Ii(){var e,t,r,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(r=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-n(o[e].since).year())*r+o[e].offset;return this.year()}function Ni(e){return s(this,"_erasNameRegex")||Li.call(this),e?this._erasNameRegex:this._erasRegex}function Bi(e){return s(this,"_erasAbbrRegex")||Li.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fi(e){return s(this,"_erasNarrowRegex")||Li.call(this),e?this._erasNarrowRegex:this._erasRegex}function ji(e,t){return t.erasAbbrRegex(e)}function Vi(e,t){return t.erasNameRegex(e)}function $i(e,t){return t.erasNarrowRegex(e)}function Ui(e,t){return t._eraYearOrdinalRegex||ye}function Li(){var e,t,r,n,i,o=[],a=[],s=[],c=[],u=this.eras();for(e=0,t=u.length;e<t;++e)r=Ae(u[e].name),n=Ae(u[e].abbr),i=Ae(u[e].narrow),a.push(r),o.push(n),s.push(i),c.push(r),c.push(n),c.push(i);this._erasRegex=new RegExp("^("+c.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function zi(e,t){$(0,[e,e.length],0,t)}function Ki(e){return Ji.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Hi(e){return Ji.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function qi(){return St(this.year(),1,4)}function Wi(){return St(this.isoWeekYear(),1,4)}function Yi(){var e=this.localeData()._week;return St(this.year(),e.dow,e.doy)}function Gi(){var e=this.localeData()._week;return St(this.weekYear(),e.dow,e.doy)}function Ji(e,t,r,n,i){var o;return null==e?Dt(this,n,i).year:(t>(o=St(e,n,i))&&(t=o),Xi.call(this,e,t,r,n,i))}function Xi(e,t,r,n,i){var o=wt(e,t,r,n,i),a=_t(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Zi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}$("N",0,0,"eraAbbr"),$("NN",0,0,"eraAbbr"),$("NNN",0,0,"eraAbbr"),$("NNNN",0,0,"eraName"),$("NNNNN",0,0,"eraNarrow"),$("y",["y",1],"yo","eraYear"),$("y",["yy",2],0,"eraYear"),$("y",["yyy",3],0,"eraYear"),$("y",["yyyy",4],0,"eraYear"),ke("N",ji),ke("NN",ji),ke("NNN",ji),ke("NNNN",Vi),ke("NNNNN",$i),Me(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var i=r._locale.erasParse(e,n,r._strict);i?g(r).era=i:g(r).invalidEra=e})),ke("y",ye),ke("yy",ye),ke("yyy",ye),ke("yyyy",ye),ke("yo",Ui),Me(["y","yy","yyy","yyyy"],Fe),Me(["yo"],(function(e,t,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Fe]=r._locale.eraYearOrdinalParse(e,i):t[Fe]=parseInt(e,10)})),$(0,["gg",2],0,(function(){return this.weekYear()%100})),$(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),zi("gggg","weekYear"),zi("ggggg","weekYear"),zi("GGGG","isoWeekYear"),zi("GGGGG","isoWeekYear"),ke("G",_e),ke("g",_e),ke("GG",he,ce),ke("gg",he,ce),ke("GGGG",ge,le),ke("gggg",ge,le),ke("GGGGG",ve,de),ke("ggggg",ve,de),Ie(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=Oe(e)})),Ie(["gg","GG"],(function(e,t,r,i){t[i]=n.parseTwoDigitYear(e)})),$("Q",0,"Qo","quarter"),ke("Q",se),Me("Q",(function(e,t){t[je]=3*(Oe(e)-1)})),$("D",["DD",2],"Do","date"),ke("D",he,xe),ke("DD",he,ce),ke("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Me(["D","DD"],Ve),Me("Do",(function(e,t){t[Ve]=Oe(e.match(he)[0])}));var Qi=Je("Date",!0);function eo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}$("DDD",["DDDD",3],"DDDo","dayOfYear"),ke("DDD",me),ke("DDDD",ue),Me(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=Oe(e)})),$("m",["mm",2],0,"minute"),ke("m",he,Te),ke("mm",he,ce),Me(["m","mm"],Ue);var to=Je("Minutes",!1);$("s",["ss",2],0,"second"),ke("s",he,Te),ke("ss",he,ce),Me(["s","ss"],Le);var ro,no,io=Je("Seconds",!1);for($("S",0,0,(function(){return~~(this.millisecond()/100)})),$(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),$(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),$(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),$(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),$(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),$(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ke("S",me,se),ke("SS",me,ce),ke("SSS",me,ue),ro="SSSS";ro.length<=9;ro+="S")ke(ro,ye);function oo(e,t){t[ze]=Oe(1e3*("0."+e))}for(ro="S";ro.length<=9;ro+="S")Me(ro,oo);function ao(){return this._isUTC?"UTC":""}function so(){return this._isUTC?"Coordinated Universal Time":""}no=Je("Milliseconds",!1),$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var co=D.prototype;function uo(e){return Yr(1e3*e)}function lo(){return Yr.apply(null,arguments).parseZone()}function ho(e){return e}co.add=In,co.calendar=Ln,co.clone=zn,co.diff=Jn,co.endOf=vi,co.format=ti,co.from=ri,co.fromNow=ni,co.to=ii,co.toNow=oi,co.get=Qe,co.invalidAt=ki,co.isAfter=Kn,co.isBefore=Hn,co.isBetween=qn,co.isSame=Wn,co.isSameOrAfter=Yn,co.isSameOrBefore=Gn,co.isValid=xi,co.lang=si,co.locale=ai,co.localeData=ci,co.max=Jr,co.min=Gr,co.parsingFlags=Ti,co.set=et,co.startOf=gi,co.subtract=Nn,co.toArray=wi,co.toObject=Di,co.toDate=bi,co.toISOString=Qn,co.inspect=ei,"undefined"!=typeof Symbol&&null!=Symbol.for&&(co[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),co.toJSON=Si,co.toString=Zn,co.unix=_i,co.valueOf=yi,co.creationData=Pi,co.eraName=Oi,co.eraNarrow=Ri,co.eraAbbr=Mi,co.eraYear=Ii,co.year=Ye,co.isLeapYear=Ge,co.weekYear=Ki,co.isoWeekYear=Hi,co.quarter=co.quarters=Zi,co.month=ft,co.daysInMonth=pt,co.week=co.weeks=Et,co.isoWeek=co.isoWeeks=At,co.weeksInYear=Yi,co.weeksInWeekYear=Gi,co.isoWeeksInYear=qi,co.isoWeeksInISOWeekYear=Wi,co.date=Qi,co.day=co.days=Kt,co.weekday=Ht,co.isoWeekday=qt,co.dayOfYear=eo,co.hour=co.hours=nr,co.minute=co.minutes=to,co.second=co.seconds=io,co.millisecond=co.milliseconds=no,co.utcOffset=mn,co.utc=vn,co.local=yn,co.parseZone=_n,co.hasAlignedHourOffset=bn,co.isDST=wn,co.isLocal=Sn,co.isUtcOffset=xn,co.isUtc=Tn,co.isUTC=Tn,co.zoneAbbr=ao,co.zoneName=so,co.dates=T("dates accessor is deprecated. Use date instead.",Qi),co.months=T("months accessor is deprecated. Use month instead",ft),co.years=T("years accessor is deprecated. Use year instead",Ye),co.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gn),co.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Dn);var fo=R.prototype;function po(e,t,r,n){var i=vr(),o=p().set(n,t);return i[r](o,e)}function mo(e,t,r){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return po(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=po(e,n,r,"month");return i}function go(e,t,r,n){"boolean"==typeof e?(l(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,l(t)&&(r=t,t=void 0),t=t||"");var i,o=vr(),a=e?o._week.dow:0,s=[];if(null!=r)return po(t,(r+a)%7,n,"day");for(i=0;i<7;i++)s[i]=po(t,(i+a)%7,n,"day");return s}function vo(e,t){return mo(e,t,"months")}function yo(e,t){return mo(e,t,"monthsShort")}function _o(e,t,r){return go(e,t,r,"weekdays")}function bo(e,t,r){return go(e,t,r,"weekdaysShort")}function wo(e,t,r){return go(e,t,r,"weekdaysMin")}fo.calendar=I,fo.longDateFormat=q,fo.invalidDate=Y,fo.ordinal=X,fo.preparse=ho,fo.postformat=ho,fo.relativeTime=Q,fo.pastFuture=ee,fo.set=C,fo.eras=Ei,fo.erasParse=Ai,fo.erasConvertYear=Ci,fo.erasAbbrRegex=Bi,fo.erasNameRegex=Ni,fo.erasNarrowRegex=Fi,fo.months=ct,fo.monthsShort=ut,fo.monthsParse=dt,fo.monthsRegex=gt,fo.monthsShortRegex=mt,fo.week=xt,fo.firstDayOfYear=Pt,fo.firstDayOfWeek=kt,fo.weekdays=Vt,fo.weekdaysMin=Ut,fo.weekdaysShort=$t,fo.weekdaysParse=zt,fo.weekdaysRegex=Wt,fo.weekdaysShortRegex=Yt,fo.weekdaysMinRegex=Gt,fo.isPM=tr,fo.meridiem=ir,pr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Oe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=T("moment.lang is deprecated. Use moment.locale instead.",pr),n.langData=T("moment.langData is deprecated. Use moment.localeData instead.",vr);var Do=Math.abs;function So(){var e=this._data;return this._milliseconds=Do(this._milliseconds),this._days=Do(this._days),this._months=Do(this._months),e.milliseconds=Do(e.milliseconds),e.seconds=Do(e.seconds),e.minutes=Do(e.minutes),e.hours=Do(e.hours),e.months=Do(e.months),e.years=Do(e.years),this}function xo(e,t,r,n){var i=En(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function To(e,t){return xo(this,e,t,1)}function ko(e,t){return xo(this,e,t,-1)}function Po(e){return e<0?Math.floor(e):Math.ceil(e)}function Eo(){var e,t,r,n,i,o=this._milliseconds,a=this._days,s=this._months,c=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Po(Co(s)+a),a=0,s=0),c.milliseconds=o%1e3,e=Ce(o/1e3),c.seconds=e%60,t=Ce(e/60),c.minutes=t%60,r=Ce(t/60),c.hours=r%24,a+=Ce(r/24),s+=i=Ce(Ao(a)),a-=Po(Co(i)),n=Ce(s/12),s%=12,c.days=a,c.months=s,c.years=n,this}function Ao(e){return 4800*e/146097}function Co(e){return 146097*e/4800}function Oo(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Ao(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Co(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function Ro(e){return function(){return this.as(e)}}var Mo=Ro("ms"),Io=Ro("s"),No=Ro("m"),Bo=Ro("h"),Fo=Ro("d"),jo=Ro("w"),Vo=Ro("M"),$o=Ro("Q"),Uo=Ro("y"),Lo=Mo;function zo(){return En(this)}function Ko(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Ho(e){return function(){return this.isValid()?this._data[e]:NaN}}var qo=Ho("milliseconds"),Wo=Ho("seconds"),Yo=Ho("minutes"),Go=Ho("hours"),Jo=Ho("days"),Xo=Ho("months"),Zo=Ho("years");function Qo(){return Ce(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ra(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function na(e,t,r,n){var i=En(e).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),c=ea(i.as("d")),u=ea(i.as("M")),l=ea(i.as("w")),d=ea(i.as("y")),h=o<=r.ss&&["s",o]||o<r.s&&["ss",o]||a<=1&&["m"]||a<r.m&&["mm",a]||s<=1&&["h"]||s<r.h&&["hh",s]||c<=1&&["d"]||c<r.d&&["dd",c];return null!=r.w&&(h=h||l<=1&&["w"]||l<r.w&&["ww",l]),(h=h||u<=1&&["M"]||u<r.M&&["MM",u]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=n,ra.apply(null,h)}function ia(e){return void 0===e?ea:"function"==typeof e&&(ea=e,!0)}function oa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,i=!1,o=ta;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),n=na(this,!i,o,r=this.localeData()),i&&(n=r.pastFuture(+this,n)),r.postformat(n)}var sa=Math.abs;function ca(e){return(e>0)-(e<0)||+e}function ua(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,i,o,a,s,c=sa(this._milliseconds)/1e3,u=sa(this._days),l=sa(this._months),d=this.asSeconds();return d?(e=Ce(c/60),t=Ce(e/60),c%=60,e%=60,r=Ce(l/12),l%=12,n=c?c.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",o=ca(this._months)!==ca(d)?"-":"",a=ca(this._days)!==ca(d)?"-":"",s=ca(this._milliseconds)!==ca(d)?"-":"",i+"P"+(r?o+r+"Y":"")+(l?o+l+"M":"")+(u?a+u+"D":"")+(t||e||c?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(c?s+n+"S":"")):"P0D"}var la=an.prototype;return la.isValid=nn,la.abs=So,la.add=To,la.subtract=ko,la.as=Oo,la.asMilliseconds=Mo,la.asSeconds=Io,la.asMinutes=No,la.asHours=Bo,la.asDays=Fo,la.asWeeks=jo,la.asMonths=Vo,la.asQuarters=$o,la.asYears=Uo,la.valueOf=Lo,la._bubble=Eo,la.clone=zo,la.get=Ko,la.milliseconds=qo,la.seconds=Wo,la.minutes=Yo,la.hours=Go,la.days=Jo,la.weeks=Qo,la.months=Xo,la.years=Zo,la.humanize=aa,la.toISOString=ua,la.toString=ua,la.toJSON=ua,la.locale=ai,la.localeData=ci,la.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ua),la.lang=si,$("X",0,0,"unix"),$("x",0,0,"valueOf"),ke("x",_e),ke("X",De),Me("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),Me("x",(function(e,t,r){r._d=new Date(Oe(e))})),
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lodash"),require("axios")):"function"==typeof define&&define.amd?define(["exports","lodash","axios"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).code={},e._,e.axios)}(this,(function(exports,_$1,axios){"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var moment=createCommonjsModule((function(e,t){e.exports=function(){var t,r;function n(){return t.apply(null,arguments)}function i(e){t=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var r,n=[],i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function f(e,t){for(var r in t)s(t,r)&&(e[r]=t[r]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,r,n){return Wr(e,t,r,n,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=m()),e._pf}function v(e){var t=null,n=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=g(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function y(e){var t=p(NaN);return null!=e?f(g(t),e):g(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),n=r.length>>>0;for(t=0;t<n;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var _=n.momentProperties=[],b=!1;function w(e,t){var r,n,i,o=_.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=g(t)),c(t._locale)||(e._locale=t._locale),o>0)for(r=0;r<o;r++)c(i=t[n=_[r]])||(e[n]=i);return e}function D(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,n.updateOffset(this),b=!1)}function x(e){return e instanceof D||null!=e&&null!=e._isAMomentObject}function S(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var r=!0;return f((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),r){var i,o,a,l=[],c=arguments.length;for(o=0;o<c;o++){if(i="","object"==typeof arguments[o]){for(a in i+="\n["+o+"] ",arguments[0])s(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[o];l.push(i)}S(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),r=!1}return t.apply(this,arguments)}),t)}var T,P={};function E(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),P[e]||(S(t),P[e]=!0)}function C(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e){var t,r;for(r in e)s(e,r)&&(C(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function O(e,t){var r,n=f({},e);for(r in t)s(t,r)&&(a(e[r])&&a(t[r])?(n[r]={},f(n[r],e[r]),f(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)s(e,r)&&!s(t,r)&&a(e[r])&&(n[r]=f({},n[r]));return n}function M(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)s(e,t)&&r.push(t);return r};var R={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function I(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return C(n)?n.call(t,r):n}function N(e,t,r){var n=""+Math.abs(e),i=t-n.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var B=/(\[[^\[]*\])|(\\)?([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,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},V={};function $(e,t,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&(V[e]=i),t&&(V[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),r&&(V[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function L(e){var t,r,n=e.match(B);for(t=0,r=n.length;t<r;t++)V[n[t]]?n[t]=V[n[t]]:n[t]=U(n[t]);return function(t){var i,o="";for(i=0;i<r;i++)o+=C(n[i])?n[i].call(t,e):n[i];return o}}function z(e,t){return e.isValid()?(t=K(t,e.localeData()),j[t]=j[t]||L(t),j[t](e)):e.localeData().invalidDate()}function K(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(F.lastIndex=0;r>=0&&F.test(e);)e=e.replace(F,n),F.lastIndex=0,r-=1;return e}var H={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 q(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(B).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var W="Invalid date";function Y(){return this._invalidDate}var G="%d",J=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var Z={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 Q(e,t,r,n){var i=this._relativeTime[r];return C(i)?i(e,t,r,n):i.replace(/%d/i,e)}function ee(e,t){var r=this._relativeTime[e>0?"future":"past"];return C(r)?r(t):r.replace(/%s/i,t)}var te={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 re(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function ne(e){var t,r,n={};for(r in e)s(e,r)&&(t=re(r))&&(n[t]=e[r]);return n}var ie={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 oe(e){var t,r=[];for(t in e)s(e,t)&&r.push({unit:t,priority:ie[t]});return r.sort((function(e,t){return e.priority-t.priority})),r}var ae,se=/\d/,le=/\d\d/,ce=/\d{3}/,ue=/\d{4}/,he=/[+-]?\d{6}/,de=/\d\d?/,fe=/\d\d\d\d?/,pe=/\d\d\d\d\d\d?/,me=/\d{1,3}/,ge=/\d{1,4}/,ve=/[+-]?\d{1,6}/,ye=/\d+/,_e=/[+-]?\d+/,be=/Z|[+-]\d\d:?\d\d/gi,we=/Z|[+-]\d\d(?::?\d\d)?/gi,De=/[+-]?\d+(\.\d{1,3})?/,xe=/[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,Se=/^[1-9]\d?/,ke=/^([1-9]\d|\d)/;function Te(e,t,r){ae[e]=C(t)?t:function(e,n){return e&&r?r:t}}function Pe(e,t){return s(ae,e)?ae[e](t._strict,t._locale):new RegExp(Ee(e))}function Ee(e){return Ce(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,r,n,i){return t||r||n||i})))}function Ce(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ae(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Oe(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=Ae(t)),r}ae={};var Me={};function Re(e,t){var r,n,i=t;for("string"==typeof e&&(e=[e]),u(t)&&(i=function(e,r){r[t]=Oe(e)}),n=e.length,r=0;r<n;r++)Me[e[r]]=i}function Ie(e,t){Re(e,(function(e,r,n,i){n._w=n._w||{},t(e,n._w,n,i)}))}function Ne(e,t,r){null!=t&&s(Me,e)&&Me[e](t,r._a,r,e)}function Be(e){return e%4==0&&e%100!=0||e%400==0}var Fe=0,je=1,Ve=2,$e=3,Ue=4,Le=5,ze=6,Ke=7,He=8;function qe(e){return Be(e)?366:365}$("Y",0,0,(function(){var e=this.year();return e<=9999?N(e,4):"+"+e})),$(0,["YY",2],0,(function(){return this.year()%100})),$(0,["YYYY",4],0,"year"),$(0,["YYYYY",5],0,"year"),$(0,["YYYYYY",6,!0],0,"year"),Te("Y",_e),Te("YY",de,le),Te("YYYY",ge,ue),Te("YYYYY",ve,he),Te("YYYYYY",ve,he),Re(["YYYYY","YYYYYY"],Fe),Re("YYYY",(function(e,t){t[Fe]=2===e.length?n.parseTwoDigitYear(e):Oe(e)})),Re("YY",(function(e,t){t[Fe]=n.parseTwoDigitYear(e)})),Re("Y",(function(e,t){t[Fe]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return Oe(e)+(Oe(e)>68?1900:2e3)};var We,Ye=Je("FullYear",!0);function Ge(){return Be(this.year())}function Je(e,t){return function(r){return null!=r?(Ze(this,e,r),n.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Ze(e,t,r){var n,i,o,a,s;if(e.isValid()&&!isNaN(r)){switch(n=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(i?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(i?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(i?n.setUTCHours(r):n.setHours(r));case"Date":return void(i?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}o=r,a=e.month(),s=29!==(s=e.date())||1!==a||Be(o)?s:28,i?n.setUTCFullYear(o,a,s):n.setFullYear(o,a,s)}}function Qe(e){return C(this[e=re(e)])?this[e]():this}function et(e,t){if("object"==typeof e){var r,n=oe(e=ne(e)),i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(C(this[e=re(e)]))return this[e](t);return this}function tt(e,t){return(e%t+t)%t}function rt(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=tt(t,12);return e+=(t-r)/12,1===r?Be(e)?29:28:31-r%7%2}We=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},$("M",["MM",2],"Mo",(function(){return this.month()+1})),$("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),$("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),Te("M",de,Se),Te("MM",de,le),Te("MMM",(function(e,t){return t.monthsShortRegex(e)})),Te("MMMM",(function(e,t){return t.monthsRegex(e)})),Re(["M","MM"],(function(e,t){t[je]=Oe(e)-1})),Re(["MMM","MMMM"],(function(e,t,r,n){var i=r._locale.monthsParse(e,n,r._strict);null!=i?t[je]=i:g(r).invalidMonth=e}));var nt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),it="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ot=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,at=xe,st=xe;function lt(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ot).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone}function ct(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ot.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ut(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return r?"MMM"===t?-1!==(i=We.call(this._shortMonthsParse,a))?i:null:-1!==(i=We.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=We.call(this._shortMonthsParse,a))||-1!==(i=We.call(this._longMonthsParse,a))?i:null:-1!==(i=We.call(this._longMonthsParse,a))||-1!==(i=We.call(this._shortMonthsParse,a))?i:null}function ht(e,t,r){var n,i,o;if(this._monthsParseExact)return ut.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=p([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function dt(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Oe(t);else if(!u(t=e.localeData().monthsParse(t)))return e;var r=t,n=e.date();return n=n<29?n:Math.min(n,rt(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function ft(e){return null!=e?(dt(this,e),n.updateOffset(this,!0),this):Xe(this,"Month")}function pt(){return rt(this.year(),this.month())}function mt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||vt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=at),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function gt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||vt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=st),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function vt(){function e(e,t){return t.length-e.length}var t,r,n,i,o=[],a=[],s=[];for(t=0;t<12;t++)r=p([2e3,t]),n=Ce(this.monthsShort(r,"")),i=Ce(this.months(r,"")),o.push(n),a.push(i),s.push(i),s.push(n);o.sort(e),a.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function yt(e,t,r,n,i,o,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,r,n,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,i,o,a),s}function _t(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function bt(e,t,r){var n=7+t-r;return-(7+_t(e,0,n).getUTCDay()-t)%7+n-1}function wt(e,t,r,n,i){var o,a,s=1+7*(t-1)+(7+r-n)%7+bt(e,n,i);return s<=0?a=qe(o=e-1)+s:s>qe(e)?(o=e+1,a=s-qe(e)):(o=e,a=s),{year:o,dayOfYear:a}}function Dt(e,t,r){var n,i,o=bt(e.year(),t,r),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?n=a+xt(i=e.year()-1,t,r):a>xt(e.year(),t,r)?(n=a-xt(e.year(),t,r),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function xt(e,t,r){var n=bt(e,t,r),i=bt(e+1,t,r);return(qe(e)-n+i)/7}function St(e){return Dt(e,this._week.dow,this._week.doy).week}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),Te("w",de,Se),Te("ww",de,le),Te("W",de,Se),Te("WW",de,le),Ie(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=Oe(e)}));var kt={dow:0,doy:6};function Tt(){return this._week.dow}function Pt(){return this._week.doy}function Et(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ct(e){var t=Dt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function At(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ot(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Mt(e,t){return e.slice(t,7).concat(e.slice(0,t))}$("d",0,"do","day"),$("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),$("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),$("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),Te("d",de),Te("e",de),Te("E",de),Te("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Te("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Te("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ie(["dd","ddd","dddd"],(function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:g(r).invalidWeekday=e})),Ie(["d","e","E"],(function(e,t,r,n){t[n]=Oe(e)}));var Rt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),It="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Nt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Bt=xe,Ft=xe,jt=xe;function Vt(e,t){var r=o(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Mt(r,this._week.dow):e?r[e.day()]:r}function $t(e){return!0===e?Mt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ut(e){return!0===e?Mt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Lt(e,t,r){var n,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(i=We.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=We.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._shortWeekdaysParse,a))||-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=We.call(this._shortWeekdaysParse,a))||-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._minWeekdaysParse,a))?i:null:-1!==(i=We.call(this._minWeekdaysParse,a))||-1!==(i=We.call(this._weekdaysParse,a))||-1!==(i=We.call(this._shortWeekdaysParse,a))?i:null}function zt(e,t,r){var n,i,o;if(this._weekdaysParseExact)return Lt.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=p([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Kt(e){if(!this.isValid())return null!=e?this:NaN;var t=Xe(this,"Day");return null!=e?(e=At(e,this.localeData()),this.add(e-t,"d")):t}function Ht(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function qt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ot(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Wt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Bt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Gt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Jt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=jt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Jt(){function e(e,t){return t.length-e.length}var t,r,n,i,o,a=[],s=[],l=[],c=[];for(t=0;t<7;t++)r=p([2e3,1]).day(t),n=Ce(this.weekdaysMin(r,"")),i=Ce(this.weekdaysShort(r,"")),o=Ce(this.weekdays(r,"")),a.push(n),s.push(i),l.push(o),c.push(n),c.push(i),c.push(o);a.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Xt(){return this.hours()%12||12}function Zt(){return this.hours()||24}function Qt(e,t){$(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function er(e,t){return t._meridiemParse}function tr(e){return"p"===(e+"").toLowerCase().charAt(0)}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Xt),$("k",["kk",2],0,Zt),$("hmm",0,0,(function(){return""+Xt.apply(this)+N(this.minutes(),2)})),$("hmmss",0,0,(function(){return""+Xt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),$("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),$("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),Qt("a",!0),Qt("A",!1),Te("a",er),Te("A",er),Te("H",de,ke),Te("h",de,Se),Te("k",de,Se),Te("HH",de,le),Te("hh",de,le),Te("kk",de,le),Te("hmm",fe),Te("hmmss",pe),Te("Hmm",fe),Te("Hmmss",pe),Re(["H","HH"],$e),Re(["k","kk"],(function(e,t,r){var n=Oe(e);t[$e]=24===n?0:n})),Re(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),Re(["h","hh"],(function(e,t,r){t[$e]=Oe(e),g(r).bigHour=!0})),Re("hmm",(function(e,t,r){var n=e.length-2;t[$e]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n)),g(r).bigHour=!0})),Re("hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[$e]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n,2)),t[Le]=Oe(e.substr(i)),g(r).bigHour=!0})),Re("Hmm",(function(e,t,r){var n=e.length-2;t[$e]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n))})),Re("Hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2;t[$e]=Oe(e.substr(0,n)),t[Ue]=Oe(e.substr(n,2)),t[Le]=Oe(e.substr(i))}));var rr=/[ap]\.?m?\.?/i,nr=Je("Hours",!0);function ir(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var or,ar={calendar:R,longDateFormat:H,invalidDate:W,ordinal:G,dayOfMonthOrdinalParse:J,relativeTime:Z,months:nt,monthsShort:it,week:kt,weekdays:Rt,weekdaysMin:Nt,weekdaysShort:It,meridiemParse:rr},sr={},lr={};function cr(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function ur(e){return e?e.toLowerCase().replace("_","-"):e}function hr(e){for(var t,r,n,i,o=0;o<e.length;){for(t=(i=ur(e[o]).split("-")).length,r=(r=ur(e[o+1]))?r.split("-"):null;t>0;){if(n=fr(i.slice(0,t).join("-")))return n;if(r&&r.length>=t&&cr(i,r)>=t-1)break;t--}o++}return or}function dr(e){return!(!e||!e.match("^[^/\\\\]*$"))}function fr(t){var r=null;if(void 0===sr[t]&&e&&e.exports&&dr(t))try{r=or._abbr,commonjsRequire("./locale/"+t),pr(r)}catch(e){sr[t]=null}return sr[t]}function pr(e,t){var r;return e&&((r=c(t)?vr(e):mr(e,t))?or=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),or._abbr}function mr(e,t){if(null!==t){var r,n=ar;if(t.abbr=e,null!=sr[e])E("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."),n=sr[e]._config;else if(null!=t.parentLocale)if(null!=sr[t.parentLocale])n=sr[t.parentLocale]._config;else{if(null==(r=fr(t.parentLocale)))return lr[t.parentLocale]||(lr[t.parentLocale]=[]),lr[t.parentLocale].push({name:e,config:t}),null;n=r._config}return sr[e]=new M(O(n,t)),lr[e]&&lr[e].forEach((function(e){mr(e.name,e.config)})),pr(e),sr[e]}return delete sr[e],null}function gr(e,t){if(null!=t){var r,n,i=ar;null!=sr[e]&&null!=sr[e].parentLocale?sr[e].set(O(sr[e]._config,t)):(null!=(n=fr(e))&&(i=n._config),t=O(i,t),null==n&&(t.abbr=e),(r=new M(t)).parentLocale=sr[e],sr[e]=r),pr(e)}else null!=sr[e]&&(null!=sr[e].parentLocale?(sr[e]=sr[e].parentLocale,e===pr()&&pr(e)):null!=sr[e]&&delete sr[e]);return sr[e]}function vr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return or;if(!o(e)){if(t=fr(e))return t;e=[e]}return hr(e)}function yr(){return T(sr)}function _r(e){var t,r=e._a;return r&&-2===g(e).overflow&&(t=r[je]<0||r[je]>11?je:r[Ve]<1||r[Ve]>rt(r[Fe],r[je])?Ve:r[$e]<0||r[$e]>24||24===r[$e]&&(0!==r[Ue]||0!==r[Le]||0!==r[ze])?$e:r[Ue]<0||r[Ue]>59?Ue:r[Le]<0||r[Le]>59?Le:r[ze]<0||r[ze]>999?ze:-1,g(e)._overflowDayOfYear&&(t<Fe||t>Ve)&&(t=Ve),g(e)._overflowWeeks&&-1===t&&(t=Ke),g(e)._overflowWeekday&&-1===t&&(t=He),g(e).overflow=t),e}var br=/^\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)?)?$/,wr=/^\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)?)?$/,Dr=/Z|[+-]\d\d(?::?\d\d)?/,xr=[["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]],Sr=[["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/]],kr=/^\/?Date\((-?\d+)/i,Tr=/^(?:(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}))$/,Pr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Er(e){var t,r,n,i,o,a,s=e._i,l=br.exec(s)||wr.exec(s),c=xr.length,u=Sr.length;if(l){for(g(e).iso=!0,t=0,r=c;t<r;t++)if(xr[t][1].exec(l[1])){i=xr[t][0],n=!1!==xr[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,r=u;t<r;t++)if(Sr[t][1].exec(l[3])){o=(l[2]||" ")+Sr[t][0];break}if(null==o)return void(e._isValid=!1)}if(!n&&null!=o)return void(e._isValid=!1);if(l[4]){if(!Dr.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=i+(o||"")+(a||""),$r(e)}else e._isValid=!1}function Cr(e,t,r,n,i,o){var a=[Ar(e),it.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}function Ar(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Or(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Mr(e,t,r){return!e||It.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(r).weekdayMismatch=!0,r._isValid=!1,!1)}function Rr(e,t,r){if(e)return Pr[e];if(t)return 0;var n=parseInt(r,10),i=n%100;return(n-i)/100*60+i}function Ir(e){var t,r=Tr.exec(Or(e._i));if(r){if(t=Cr(r[4],r[3],r[2],r[5],r[6],r[7]),!Mr(r[1],t,e))return;e._a=t,e._tzm=Rr(r[8],r[9],r[10]),e._d=_t.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Nr(e){var t=kr.exec(e._i);null===t?(Er(e),!1===e._isValid&&(delete e._isValid,Ir(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:n.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Br(e,t,r){return null!=e?e:null!=t?t:r}function Fr(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function jr(e){var t,r,n,i,o,a=[];if(!e._d){for(n=Fr(e),e._w&&null==e._a[Ve]&&null==e._a[je]&&Vr(e),null!=e._dayOfYear&&(o=Br(e._a[Fe],n[Fe]),(e._dayOfYear>qe(o)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),r=_t(o,0,e._dayOfYear),e._a[je]=r.getUTCMonth(),e._a[Ve]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=n[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[$e]&&0===e._a[Ue]&&0===e._a[Le]&&0===e._a[ze]&&(e._nextDay=!0,e._a[$e]=0),e._d=(e._useUTC?_t:yt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[$e]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}function Vr(e){var t,r,n,i,o,a,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(o=1,a=4,r=Br(t.GG,e._a[Fe],Dt(Yr(),1,4).year),n=Br(t.W,1),((i=Br(t.E,1))<1||i>7)&&(l=!0)):(o=e._locale._week.dow,a=e._locale._week.doy,c=Dt(Yr(),o,a),r=Br(t.gg,e._a[Fe],c.year),n=Br(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o),n<1||n>xt(r,o,a)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=wt(r,n,i,o,a),e._a[Fe]=s.year,e._dayOfYear=s.dayOfYear)}function $r(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],g(e).empty=!0;var t,r,i,o,a,s,l,c=""+e._i,u=c.length,h=0;for(l=(i=K(e._f,e._locale).match(B)||[]).length,t=0;t<l;t++)o=i[t],(r=(c.match(Pe(o,e))||[])[0])&&((a=c.substr(0,c.indexOf(r))).length>0&&g(e).unusedInput.push(a),c=c.slice(c.indexOf(r)+r.length),h+=r.length),V[o]?(r?g(e).empty=!1:g(e).unusedTokens.push(o),Ne(o,r,e)):e._strict&&!r&&g(e).unusedTokens.push(o);g(e).charsLeftOver=u-h,c.length>0&&g(e).unusedInput.push(c),e._a[$e]<=12&&!0===g(e).bigHour&&e._a[$e]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[$e]=Ur(e._locale,e._a[$e],e._meridiem),null!==(s=g(e).era)&&(e._a[Fe]=e._locale.erasConvertYear(s,e._a[Fe])),jr(e),_r(e)}else Ir(e);else Er(e)}function Ur(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function Lr(e){var t,r,n,i,o,a,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)o=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],$r(t),v(t)&&(a=!0),o+=g(t).charsLeftOver,o+=10*g(t).unusedTokens.length,g(t).score=o,s?o<n&&(n=o,r=t):(null==n||o<n||a)&&(n=o,r=t,a&&(s=!0));f(e,r||t)}function zr(e){if(!e._d){var t=ne(e._i),r=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),jr(e)}}function Kr(e){var t=new D(_r(Hr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Hr(e){var t=e._i,r=e._f;return e._locale=e._locale||vr(e._l),null===t||void 0===r&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),x(t)?new D(_r(t)):(h(t)?e._d=t:o(r)?Lr(e):r?$r(e):qr(e),v(e)||(e._d=null),e))}function qr(e){var t=e._i;c(t)?e._d=new Date(n.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Nr(e):o(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),jr(e)):a(t)?zr(e):u(t)?e._d=new Date(t):n.createFromInputFallback(e)}function Wr(e,t,r,n,i){var s={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==r&&!1!==r||(n=r,r=void 0),(a(e)&&l(e)||o(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=r,s._i=e,s._f=t,s._strict=n,Kr(s)}function Yr(e,t,r,n){return Wr(e,t,r,n,!1)}n.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var Gr=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Yr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),Jr=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Yr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Xr(e,t){var r,n;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Yr();for(r=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](r)||(r=t[n]);return r}function Zr(){return Xr("isBefore",[].slice.call(arguments,0))}function Qr(){return Xr("isAfter",[].slice.call(arguments,0))}var en=function(){return Date.now?Date.now():+new Date},tn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rn(e){var t,r,n=!1,i=tn.length;for(t in e)if(s(e,t)&&(-1===We.call(tn,t)||null!=e[t]&&isNaN(e[t])))return!1;for(r=0;r<i;++r)if(e[tn[r]]){if(n)return!1;parseFloat(e[tn[r]])!==Oe(e[tn[r]])&&(n=!0)}return!0}function nn(){return this._isValid}function on(){return En(NaN)}function an(e){var t=ne(e),r=t.year||0,n=t.quarter||0,i=t.month||0,o=t.week||t.isoWeek||0,a=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=rn(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*s*60*60,this._days=+a+7*o,this._months=+i+3*n+12*r,this._data={},this._locale=vr(),this._bubble()}function sn(e){return e instanceof an}function ln(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cn(e,t,r){var n,i=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),a=0;for(n=0;n<i;n++)(r&&e[n]!==t[n]||!r&&Oe(e[n])!==Oe(t[n]))&&a++;return a+o}function un(e,t){$(e,0,0,(function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+N(~~(e/60),2)+t+N(~~e%60,2)}))}un("Z",":"),un("ZZ",""),Te("Z",we),Te("ZZ",we),Re(["Z","ZZ"],(function(e,t,r){r._useUTC=!0,r._tzm=dn(we,e)}));var hn=/([\+\-]|\d\d)/gi;function dn(e,t){var r,n,i=(t||"").match(e);return null===i?null:0===(n=60*(r=((i[i.length-1]||[])+"").match(hn)||["-",0,0])[1]+Oe(r[2]))?0:"+"===r[0]?n:-n}function fn(e,t){var r,i;return t._isUTC?(r=t.clone(),i=(x(e)||h(e)?e.valueOf():Yr(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),n.updateOffset(r,!1),r):Yr(e).local()}function pn(e){return-Math.round(e._d.getTimezoneOffset())}function mn(e,t,r){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=dn(we,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(i=pn(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!t||this._changeInProgress?Rn(this,En(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:pn(this)}function gn(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vn(e){return this.utcOffset(0,e)}function yn(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(pn(this),"m")),this}function _n(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=dn(be,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function bn(e){return!!this.isValid()&&(e=e?Yr(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function wn(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Dn(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Hr(t))._a?(e=t._isUTC?p(t._a):Yr(t._a),this._isDSTShifted=this.isValid()&&cn(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function xn(){return!!this.isValid()&&!this._isUTC}function Sn(){return!!this.isValid()&&this._isUTC}function kn(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Tn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Pn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function En(e,t){var r,n,i,o=e,a=null;return sn(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(a=Tn.exec(e))?(r="-"===a[1]?-1:1,o={y:0,d:Oe(a[Ve])*r,h:Oe(a[$e])*r,m:Oe(a[Ue])*r,s:Oe(a[Le])*r,ms:Oe(ln(1e3*a[ze]))*r}):(a=Pn.exec(e))?(r="-"===a[1]?-1:1,o={y:Cn(a[2],r),M:Cn(a[3],r),w:Cn(a[4],r),d:Cn(a[5],r),h:Cn(a[6],r),m:Cn(a[7],r),s:Cn(a[8],r)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=On(Yr(o.from),Yr(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),n=new an(o),sn(e)&&s(e,"_locale")&&(n._locale=e._locale),sn(e)&&s(e,"_isValid")&&(n._isValid=e._isValid),n}function Cn(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function An(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function On(e,t){var r;return e.isValid()&&t.isValid()?(t=fn(t,e),e.isBefore(t)?r=An(e,t):((r=An(t,e)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Mn(e,t){return function(r,n){var i;return null===n||isNaN(+n)||(E(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),Rn(this,En(r,n),e),this}}function Rn(e,t,r,i){var o=t._milliseconds,a=ln(t._days),s=ln(t._months);e.isValid()&&(i=null==i||i,s&&dt(e,Xe(e,"Month")+s*r),a&&Ze(e,"Date",Xe(e,"Date")+a*r),o&&e._d.setTime(e._d.valueOf()+o*r),i&&n.updateOffset(e,a||s))}En.fn=an.prototype,En.invalid=on;var In=Mn(1,"add"),Nn=Mn(-1,"subtract");function Bn(e){return"string"==typeof e||e instanceof String}function Fn(e){return x(e)||h(e)||Bn(e)||u(e)||Vn(e)||jn(e)||null==e}function jn(e){var t,r,n=a(e)&&!l(e),i=!1,o=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=o.length;for(t=0;t<c;t+=1)r=o[t],i=i||s(e,r);return n&&i}function Vn(e){var t=o(e),r=!1;return t&&(r=0===e.filter((function(t){return!u(t)&&Bn(e)})).length),t&&r}function $n(e){var t,r,n=a(e)&&!l(e),i=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)r=o[t],i=i||s(e,r);return n&&i}function Un(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Ln(e,t){1===arguments.length&&(arguments[0]?Fn(arguments[0])?(e=arguments[0],t=void 0):$n(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Yr(),i=fn(r,this).startOf("day"),o=n.calendarFormat(this,i)||"sameElse",a=t&&(C(t[o])?t[o].call(this,r):t[o]);return this.format(a||this.localeData().calendar(o,this,Yr(r)))}function zn(){return new D(this)}function Kn(e,t){var r=x(e)?e:Yr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())}function Hn(e,t){var r=x(e)?e:Yr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())}function qn(e,t,r,n){var i=x(e)?e:Yr(e),o=x(t)?t:Yr(t);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(n=n||"()")[0]?this.isAfter(i,r):!this.isBefore(i,r))&&(")"===n[1]?this.isBefore(o,r):!this.isAfter(o,r))}function Wn(e,t){var r,n=x(e)?e:Yr(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))}function Yn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Gn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Jn(e,t,r){var n,i,o;if(!this.isValid())return NaN;if(!(n=fn(e,this)).isValid())return NaN;switch(i=6e4*(n.utcOffset()-this.utcOffset()),t=re(t)){case"year":o=Xn(this,n)/12;break;case"month":o=Xn(this,n);break;case"quarter":o=Xn(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-i)/864e5;break;case"week":o=(this-n-i)/6048e5;break;default:o=this-n}return r?o:Ae(o)}function Xn(e,t){if(e.date()<t.date())return-Xn(t,e);var r=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(r,"months");return-(r+(t-n<0?(t-n)/(n-e.clone().add(r-1,"months")):(t-n)/(e.clone().add(r+1,"months")-n)))||0}function Zn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Qn(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?z(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(r,"Z")):z(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ei(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n,i="moment",o="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",n=o+'[")]',this.format(e+t+r+n)}function ti(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=z(this,e);return this.localeData().postformat(t)}function ri(e,t){return this.isValid()&&(x(e)&&e.isValid()||Yr(e).isValid())?En({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ni(e){return this.from(Yr(),e)}function ii(e,t){return this.isValid()&&(x(e)&&e.isValid()||Yr(e).isValid())?En({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.to(Yr(),e)}function ai(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vr(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var si=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function li(){return this._locale}var ci=1e3,ui=60*ci,hi=60*ui,di=3506328*hi;function fi(e,t){return(e%t+t)%t}function pi(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-di:new Date(e,t,r).valueOf()}function mi(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-di:Date.UTC(e,t,r)}function gi(e){var t,r;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mi:pi,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fi(t+(this._isUTC?0:this.utcOffset()*ui),hi);break;case"minute":t=this._d.valueOf(),t-=fi(t,ui);break;case"second":t=this._d.valueOf(),t-=fi(t,ci)}return this._d.setTime(t),n.updateOffset(this,!0),this}function vi(e){var t,r;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(r=this._isUTC?mi:pi,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=hi-fi(t+(this._isUTC?0:this.utcOffset()*ui),hi)-1;break;case"minute":t=this._d.valueOf(),t+=ui-fi(t,ui)-1;break;case"second":t=this._d.valueOf(),t+=ci-fi(t,ci)-1}return this._d.setTime(t),n.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function _i(){return Math.floor(this.valueOf()/1e3)}function bi(){return new Date(this.valueOf())}function wi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Di(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function xi(){return this.isValid()?this.toISOString():null}function Si(){return v(this)}function ki(){return f({},g(this))}function Ti(){return g(this).overflow}function Pi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ei(e,t){var r,i,o,a=this._eras||vr("en")._eras;for(r=0,i=a.length;r<i;++r)switch("string"==typeof a[r].since&&(o=n(a[r].since).startOf("day"),a[r].since=o.valueOf()),typeof a[r].until){case"undefined":a[r].until=1/0;break;case"string":o=n(a[r].until).startOf("day").valueOf(),a[r].until=o.valueOf()}return a}function Ci(e,t,r){var n,i,o,a,s,l=this.eras();for(e=e.toUpperCase(),n=0,i=l.length;n<i;++n)if(o=l[n].name.toUpperCase(),a=l[n].abbr.toUpperCase(),s=l[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[n];break;case"NNNN":if(o===e)return l[n];break;case"NNNNN":if(s===e)return l[n]}else if([o,a,s].indexOf(e)>=0)return l[n]}function Ai(e,t){var r=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*r}function Oi(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].name;if(n[e].until<=r&&r<=n[e].since)return n[e].name}return""}function Mi(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].narrow;if(n[e].until<=r&&r<=n[e].since)return n[e].narrow}return""}function Ri(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].abbr;if(n[e].until<=r&&r<=n[e].since)return n[e].abbr}return""}function Ii(){var e,t,r,i,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(r=o[e].since<=o[e].until?1:-1,i=this.clone().startOf("day").valueOf(),o[e].since<=i&&i<=o[e].until||o[e].until<=i&&i<=o[e].since)return(this.year()-n(o[e].since).year())*r+o[e].offset;return this.year()}function Ni(e){return s(this,"_erasNameRegex")||Li.call(this),e?this._erasNameRegex:this._erasRegex}function Bi(e){return s(this,"_erasAbbrRegex")||Li.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fi(e){return s(this,"_erasNarrowRegex")||Li.call(this),e?this._erasNarrowRegex:this._erasRegex}function ji(e,t){return t.erasAbbrRegex(e)}function Vi(e,t){return t.erasNameRegex(e)}function $i(e,t){return t.erasNarrowRegex(e)}function Ui(e,t){return t._eraYearOrdinalRegex||ye}function Li(){var e,t,r,n,i,o=[],a=[],s=[],l=[],c=this.eras();for(e=0,t=c.length;e<t;++e)r=Ce(c[e].name),n=Ce(c[e].abbr),i=Ce(c[e].narrow),a.push(r),o.push(n),s.push(i),l.push(r),l.push(n),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+o.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function zi(e,t){$(0,[e,e.length],0,t)}function Ki(e){return Ji.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Hi(e){return Ji.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function qi(){return xt(this.year(),1,4)}function Wi(){return xt(this.isoWeekYear(),1,4)}function Yi(){var e=this.localeData()._week;return xt(this.year(),e.dow,e.doy)}function Gi(){var e=this.localeData()._week;return xt(this.weekYear(),e.dow,e.doy)}function Ji(e,t,r,n,i){var o;return null==e?Dt(this,n,i).year:(t>(o=xt(e,n,i))&&(t=o),Xi.call(this,e,t,r,n,i))}function Xi(e,t,r,n,i){var o=wt(e,t,r,n,i),a=_t(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Zi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}$("N",0,0,"eraAbbr"),$("NN",0,0,"eraAbbr"),$("NNN",0,0,"eraAbbr"),$("NNNN",0,0,"eraName"),$("NNNNN",0,0,"eraNarrow"),$("y",["y",1],"yo","eraYear"),$("y",["yy",2],0,"eraYear"),$("y",["yyy",3],0,"eraYear"),$("y",["yyyy",4],0,"eraYear"),Te("N",ji),Te("NN",ji),Te("NNN",ji),Te("NNNN",Vi),Te("NNNNN",$i),Re(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,r,n){var i=r._locale.erasParse(e,n,r._strict);i?g(r).era=i:g(r).invalidEra=e})),Te("y",ye),Te("yy",ye),Te("yyy",ye),Te("yyyy",ye),Te("yo",Ui),Re(["y","yy","yyy","yyyy"],Fe),Re(["yo"],(function(e,t,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Fe]=r._locale.eraYearOrdinalParse(e,i):t[Fe]=parseInt(e,10)})),$(0,["gg",2],0,(function(){return this.weekYear()%100})),$(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),zi("gggg","weekYear"),zi("ggggg","weekYear"),zi("GGGG","isoWeekYear"),zi("GGGGG","isoWeekYear"),Te("G",_e),Te("g",_e),Te("GG",de,le),Te("gg",de,le),Te("GGGG",ge,ue),Te("gggg",ge,ue),Te("GGGGG",ve,he),Te("ggggg",ve,he),Ie(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,r,n){t[n.substr(0,2)]=Oe(e)})),Ie(["gg","GG"],(function(e,t,r,i){t[i]=n.parseTwoDigitYear(e)})),$("Q",0,"Qo","quarter"),Te("Q",se),Re("Q",(function(e,t){t[je]=3*(Oe(e)-1)})),$("D",["DD",2],"Do","date"),Te("D",de,Se),Te("DD",de,le),Te("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Re(["D","DD"],Ve),Re("Do",(function(e,t){t[Ve]=Oe(e.match(de)[0])}));var Qi=Je("Date",!0);function eo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}$("DDD",["DDDD",3],"DDDo","dayOfYear"),Te("DDD",me),Te("DDDD",ce),Re(["DDD","DDDD"],(function(e,t,r){r._dayOfYear=Oe(e)})),$("m",["mm",2],0,"minute"),Te("m",de,ke),Te("mm",de,le),Re(["m","mm"],Ue);var to=Je("Minutes",!1);$("s",["ss",2],0,"second"),Te("s",de,ke),Te("ss",de,le),Re(["s","ss"],Le);var ro,no,io=Je("Seconds",!1);for($("S",0,0,(function(){return~~(this.millisecond()/100)})),$(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),$(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),$(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),$(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),$(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),$(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Te("S",me,se),Te("SS",me,le),Te("SSS",me,ce),ro="SSSS";ro.length<=9;ro+="S")Te(ro,ye);function oo(e,t){t[ze]=Oe(1e3*("0."+e))}for(ro="S";ro.length<=9;ro+="S")Re(ro,oo);function ao(){return this._isUTC?"UTC":""}function so(){return this._isUTC?"Coordinated Universal Time":""}no=Je("Milliseconds",!1),$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var lo=D.prototype;function co(e){return Yr(1e3*e)}function uo(){return Yr.apply(null,arguments).parseZone()}function ho(e){return e}lo.add=In,lo.calendar=Ln,lo.clone=zn,lo.diff=Jn,lo.endOf=vi,lo.format=ti,lo.from=ri,lo.fromNow=ni,lo.to=ii,lo.toNow=oi,lo.get=Qe,lo.invalidAt=Ti,lo.isAfter=Kn,lo.isBefore=Hn,lo.isBetween=qn,lo.isSame=Wn,lo.isSameOrAfter=Yn,lo.isSameOrBefore=Gn,lo.isValid=Si,lo.lang=si,lo.locale=ai,lo.localeData=li,lo.max=Jr,lo.min=Gr,lo.parsingFlags=ki,lo.set=et,lo.startOf=gi,lo.subtract=Nn,lo.toArray=wi,lo.toObject=Di,lo.toDate=bi,lo.toISOString=Qn,lo.inspect=ei,"undefined"!=typeof Symbol&&null!=Symbol.for&&(lo[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lo.toJSON=xi,lo.toString=Zn,lo.unix=_i,lo.valueOf=yi,lo.creationData=Pi,lo.eraName=Oi,lo.eraNarrow=Mi,lo.eraAbbr=Ri,lo.eraYear=Ii,lo.year=Ye,lo.isLeapYear=Ge,lo.weekYear=Ki,lo.isoWeekYear=Hi,lo.quarter=lo.quarters=Zi,lo.month=ft,lo.daysInMonth=pt,lo.week=lo.weeks=Et,lo.isoWeek=lo.isoWeeks=Ct,lo.weeksInYear=Yi,lo.weeksInWeekYear=Gi,lo.isoWeeksInYear=qi,lo.isoWeeksInISOWeekYear=Wi,lo.date=Qi,lo.day=lo.days=Kt,lo.weekday=Ht,lo.isoWeekday=qt,lo.dayOfYear=eo,lo.hour=lo.hours=nr,lo.minute=lo.minutes=to,lo.second=lo.seconds=io,lo.millisecond=lo.milliseconds=no,lo.utcOffset=mn,lo.utc=vn,lo.local=yn,lo.parseZone=_n,lo.hasAlignedHourOffset=bn,lo.isDST=wn,lo.isLocal=xn,lo.isUtcOffset=Sn,lo.isUtc=kn,lo.isUTC=kn,lo.zoneAbbr=ao,lo.zoneName=so,lo.dates=k("dates accessor is deprecated. Use date instead.",Qi),lo.months=k("months accessor is deprecated. Use month instead",ft),lo.years=k("years accessor is deprecated. Use year instead",Ye),lo.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gn),lo.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Dn);var fo=M.prototype;function po(e,t,r,n){var i=vr(),o=p().set(n,t);return i[r](o,e)}function mo(e,t,r){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return po(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=po(e,n,r,"month");return i}function go(e,t,r,n){"boolean"==typeof e?(u(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,u(t)&&(r=t,t=void 0),t=t||"");var i,o=vr(),a=e?o._week.dow:0,s=[];if(null!=r)return po(t,(r+a)%7,n,"day");for(i=0;i<7;i++)s[i]=po(t,(i+a)%7,n,"day");return s}function vo(e,t){return mo(e,t,"months")}function yo(e,t){return mo(e,t,"monthsShort")}function _o(e,t,r){return go(e,t,r,"weekdays")}function bo(e,t,r){return go(e,t,r,"weekdaysShort")}function wo(e,t,r){return go(e,t,r,"weekdaysMin")}fo.calendar=I,fo.longDateFormat=q,fo.invalidDate=Y,fo.ordinal=X,fo.preparse=ho,fo.postformat=ho,fo.relativeTime=Q,fo.pastFuture=ee,fo.set=A,fo.eras=Ei,fo.erasParse=Ci,fo.erasConvertYear=Ai,fo.erasAbbrRegex=Bi,fo.erasNameRegex=Ni,fo.erasNarrowRegex=Fi,fo.months=lt,fo.monthsShort=ct,fo.monthsParse=ht,fo.monthsRegex=gt,fo.monthsShortRegex=mt,fo.week=St,fo.firstDayOfYear=Pt,fo.firstDayOfWeek=Tt,fo.weekdays=Vt,fo.weekdaysMin=Ut,fo.weekdaysShort=$t,fo.weekdaysParse=zt,fo.weekdaysRegex=Wt,fo.weekdaysShortRegex=Yt,fo.weekdaysMinRegex=Gt,fo.isPM=tr,fo.meridiem=ir,pr("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Oe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=k("moment.lang is deprecated. Use moment.locale instead.",pr),n.langData=k("moment.langData is deprecated. Use moment.localeData instead.",vr);var Do=Math.abs;function xo(){var e=this._data;return this._milliseconds=Do(this._milliseconds),this._days=Do(this._days),this._months=Do(this._months),e.milliseconds=Do(e.milliseconds),e.seconds=Do(e.seconds),e.minutes=Do(e.minutes),e.hours=Do(e.hours),e.months=Do(e.months),e.years=Do(e.years),this}function So(e,t,r,n){var i=En(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function ko(e,t){return So(this,e,t,1)}function To(e,t){return So(this,e,t,-1)}function Po(e){return e<0?Math.floor(e):Math.ceil(e)}function Eo(){var e,t,r,n,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Po(Ao(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=Ae(o/1e3),l.seconds=e%60,t=Ae(e/60),l.minutes=t%60,r=Ae(t/60),l.hours=r%24,a+=Ae(r/24),s+=i=Ae(Co(a)),a-=Po(Ao(i)),n=Ae(s/12),s%=12,l.days=a,l.months=s,l.years=n,this}function Co(e){return 4800*e/146097}function Ao(e){return 146097*e/4800}function Oo(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Co(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Ao(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function Mo(e){return function(){return this.as(e)}}var Ro=Mo("ms"),Io=Mo("s"),No=Mo("m"),Bo=Mo("h"),Fo=Mo("d"),jo=Mo("w"),Vo=Mo("M"),$o=Mo("Q"),Uo=Mo("y"),Lo=Ro;function zo(){return En(this)}function Ko(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Ho(e){return function(){return this.isValid()?this._data[e]:NaN}}var qo=Ho("milliseconds"),Wo=Ho("seconds"),Yo=Ho("minutes"),Go=Ho("hours"),Jo=Ho("days"),Xo=Ho("months"),Zo=Ho("years");function Qo(){return Ae(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ra(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function na(e,t,r,n){var i=En(e).abs(),o=ea(i.as("s")),a=ea(i.as("m")),s=ea(i.as("h")),l=ea(i.as("d")),c=ea(i.as("M")),u=ea(i.as("w")),h=ea(i.as("y")),d=o<=r.ss&&["s",o]||o<r.s&&["ss",o]||a<=1&&["m"]||a<r.m&&["mm",a]||s<=1&&["h"]||s<r.h&&["hh",s]||l<=1&&["d"]||l<r.d&&["dd",l];return null!=r.w&&(d=d||u<=1&&["w"]||u<r.w&&["ww",u]),(d=d||c<=1&&["M"]||c<r.M&&["MM",c]||h<=1&&["y"]||["yy",h])[2]=t,d[3]=+e>0,d[4]=n,ra.apply(null,d)}function ia(e){return void 0===e?ea:"function"==typeof e&&(ea=e,!0)}function oa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,i=!1,o=ta;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(o=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(o.ss=t.s-1)),n=na(this,!i,o,r=this.localeData()),i&&(n=r.pastFuture(+this,n)),r.postformat(n)}var sa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function ca(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,i,o,a,s,l=sa(this._milliseconds)/1e3,c=sa(this._days),u=sa(this._months),h=this.asSeconds();return h?(e=Ae(l/60),t=Ae(e/60),l%=60,e%=60,r=Ae(u/12),u%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",o=la(this._months)!==la(h)?"-":"",a=la(this._days)!==la(h)?"-":"",s=la(this._milliseconds)!==la(h)?"-":"",i+"P"+(r?o+r+"Y":"")+(u?o+u+"M":"")+(c?a+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+n+"S":"")):"P0D"}var ua=an.prototype;return ua.isValid=nn,ua.abs=xo,ua.add=ko,ua.subtract=To,ua.as=Oo,ua.asMilliseconds=Ro,ua.asSeconds=Io,ua.asMinutes=No,ua.asHours=Bo,ua.asDays=Fo,ua.asWeeks=jo,ua.asMonths=Vo,ua.asQuarters=$o,ua.asYears=Uo,ua.valueOf=Lo,ua._bubble=Eo,ua.clone=zo,ua.get=Ko,ua.milliseconds=qo,ua.seconds=Wo,ua.minutes=Yo,ua.hours=Go,ua.days=Jo,ua.weeks=Qo,ua.months=Xo,ua.years=Zo,ua.humanize=aa,ua.toISOString=ca,ua.toString=ca,ua.toJSON=ca,ua.locale=ai,ua.localeData=li,ua.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ca),ua.lang=si,$("X",0,0,"unix"),$("x",0,0,"valueOf"),Te("x",_e),Te("X",De),Re("X",(function(e,t,r){r._d=new Date(1e3*parseFloat(e))})),Re("x",(function(e,t,r){r._d=new Date(Oe(e))})),
|
|
2
2
|
//! moment.js
|
|
3
|
-
n.version="2.30.1",i(Yr),n.fn=co,n.min=Zr,n.max=Qr,n.now=en,n.utc=p,n.unix=uo,n.months=vo,n.isDate=d,n.locale=pr,n.invalid=y,n.duration=En,n.isMoment=S,n.weekdays=_o,n.parseZone=lo,n.localeData=vr,n.isDuration=sn,n.monthsShort=yo,n.weekdaysMin=wo,n.defineLocale=mr,n.updateLocale=gr,n.locales=yr,n.weekdaysShort=bo,n.normalizeUnits=re,n.relativeTimeRounding=ia,n.relativeTimeThreshold=oa,n.calendarFormat=Un,n.prototype=co,n.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"},n}()})),createSysConst=function(){return[{des:"年份",key:1001,mapField:"YEAR",mapping:"-",model:"2",name:"YEAR",value:moment().get("year")},{des:"月份",key:1005,mapField:"MONTH",mapping:"-",model:"2",name:"MONTH",value:moment().get("month")},{des:"日期",key:1004,mapField:"DATE",mapping:"-",model:"2",name:"DATE",value:moment().get("date")},{des:"星期",key:1003,mapField:"WEEK",mapping:"-",model:"2",name:"WEEK",value:moment().format("dddd")},{des:"版本",key:1002,mapField:"VERSION",mapping:"-",model:"2",name:"VERSION",value:"1.0.0"},{des:"手机号",key:2001,mapField:"U_PHONE",mapping:"-",model:"2",name:"U_PHONE",value:""},{des:"用户省",key:2002,mapField:"U_PROVINCE",mapping:"-",model:"2",name:"U_PROVINCE",value:""},{des:"用户市",key:2003,mapField:"U_CITY",mapping:"-",model:"2",name:"U_CITY",value:""},{des:"用户区县",key:2004,mapField:"U_COUNTY",mapping:"-",model:"2",name:"U_COUNTY",value:""}]},state={size:{width:1920,height:1080},resource:{jspaths:[],csspaths:[],otherpaths:[],fonts:[]},globalSource:[],alternateData:{},contextList:{},selectd:[],baseComs:[],globalVars:[],globalConstant:[],globalEvents:[],pages:[],pageIndex:0,groupFlag:!1,plant:{baseData:{width:1920,height:1080},option:null,optionDes:null},list:[],menuList:[],syncFlag:!0,multiple:!1,undoRedoPointer:-1,undos:[],redos:[],cache:[],cloneCache:[],shareVariable:{},shareVariableTree:{},catch:{selectd:[],list:[]},currentEditerCid:"",currentArea:{left:0,top:0,width:0,height:0,show:!1},caseList:[],constant:[],caseInfo:null,pageId:null,toPage:null,tw:null,watermark:null,endnotes:null,selectdChangeOrigin:"",sysConst:createSysConst(),historyFlag:!0,shareComs:new Map},extendStatics$1=function(e,t){return extendStatics$1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics$1(e,t)};function __extends$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics$1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign$1=function(){return __assign$1=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$1.apply(this,arguments)};function __rest(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function __awaiter(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function __generator(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function __spreadArray$1(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var UndoRedo={createItem:function(e){e.catch={selectd:_$1.cloneDeep(e.selectd),list:_$1.cloneDeep(e.list)}},resetData:function(e,t){if(e.historyFlag){var r=_$1.cloneDeep(t);e.selected=r.selected,e.list=r.list}},execute:function(e){e.historyFlag&&(e.undoRedoPointer===e.undos.length-1?(e.undos.length>5&&_$1.pullAt(e.undos,0),e.undos.push({selectd:_$1.cloneDeep(e.selectd),list:_$1.cloneDeep(e.list)})):e.undos.splice(e.undoRedoPointer+1,e.undos.length-1-e.undoRedoPointer,{selectd:_$1.cloneDeep(e.selectd),list:_$1.cloneDeep(e.list)}),e.undoRedoPointer=e.undos.length-1)},undo:function(e){if(e.historyFlag&&e.undoRedoPointer>0&&e.undoRedoPointer<e.undos.length){e.undoRedoPointer=e.undoRedoPointer-1;var t=e.undos[e.undoRedoPointer];this.commit("GoCom/resetData",t)}},redo:function(e){if(e.historyFlag&&e.undoRedoPointer>=0&&e.undoRedoPointer<e.undos.length){e.undoRedoPointer=e.undoRedoPointer+1;var t=e.undos[e.undoRedoPointer];this.commit("GoCom/resetData",t)}},switchHistoryFlag:function(e){e.historyFlag=!e.historyFlag,e.historyFlag||(e.undos=[],e.undoRedoPointer=-1)}},sandboxWorker="\nfunction proxyObj(originObj) {\n const exposeObj = new Proxy(originObj, {\n has: (target, key) => {\n if (['fetch', 'XMLHttpRequest', 'postMessage'].indexOf(key) >= 0) {\n throw new Error('Illegal operation for key'+key)\n } else {\n return target[key]\n }\n },\n })\n return exposeObj\n}\nfunction compileCode(src) {\n src = 'with (exposeObj) {'+src+'}'\n //console.log(src)\n return new Function('exposeObj', src)\n}\nfunction run(code) {\n let proxy = proxyObj({})\n let result = compileCode(code)(proxy)\n return result\n}\n\nonmessage = (e) => {\n try {\n let result = run(e.data.code)\n postMessage({\n code: 1,\n result,\n })\n } catch (err) {\n postMessage({\n code: -1,\n err,\n })\n }\n}\n\n",blob=new Blob([sandboxWorker]),url=URL.createObjectURL(blob);function run$1(e,t){return void 0===t&&(t=5e3),__awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(n){return r=new Worker(url),[2,new Promise((function(n,i){var o=function(){clearTimeout(s),r.removeEventListener("message",a),r.terminate(),r=null},a=function(e){var t=e.data,r=t.code,a=t.result,s=t.err;o(),1===r?n(a):i(s)};r.postMessage({code:e}),r.addEventListener("message",a);var s=setTimeout((function(){o(),i("timeout")}),t)}))]}))}))}function getDataForEvaluator(e,t,r,n,i){return __awaiter(this,void 0,void 0,(function(){var r,i,o,a,s,c,u;return __generator(this,(function(l){switch(l.label){case 0:if(r=e,i=_$1.cloneDeep(t),o=i.use,a=i.data,!o)return[3,4];c=function(e){var t,i;return __generator(this,(function(o){switch(o.label){case 0:return a[e].use?(t=a[e].dependVars,i={},n&&i&&t&&t.length&&t.map((function(e){var t=_$1.cloneDeep(n).filter((function(t){var r=t.mapField==e;return r&&(i[e]=t.value),r}));t&&0!=t.length||(i[e]="")})),[4,evaluator(a[e].code,r,i,a[e].mode?a[e].mode:"worker")]):[3,2];case 1:s=o.sent(),r=s.data,o.label=2;case 2:return[2]}}))},u=0,l.label=1;case 1:return u<a.length?[5,c(u)]:[3,4];case 2:l.sent(),l.label=3;case 3:return u++,[3,1];case 4:return[2,r]}}))}))}function evaluator(e,t,r,n){return void 0===r&&(r={}),void 0===n&&(n="worker"),__awaiter(this,void 0,void 0,(function(){var i,o,a,s,c,u,l,d,h;return __generator(this,(function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),"window"!=n?[3,1]:(o=(i=[["data"],[t]])[0],a=i[1],"object"==typeof r&&Object.keys(r).forEach((function(e){o.push(e),a.push(r[e])})),s=new(Function.bind.apply(Function,__spreadArray$1(__spreadArray$1([void 0],o,!1),[e],!1))),[2,{success:!0,data:s.apply(void 0,a)}]);case 1:return l=(c=[t,r,""])[1],d=c[2],"object"==typeof(u=c[0])&&(u=JSON.stringify(t)),"object"==typeof r&&(l=JSON.stringify(r)),Object.keys(r).forEach((function(e){return d+="".concat(e,",")})),h="let data=eval(".concat(u,"); \n let app=").concat(JSON.stringify({}),";"),h+=d?"let {".concat(d,"} = eval(").concat(l,"); "):"",[4,run$1(h+="".concat(e))];case 2:return[2,{success:!0,data:f.sent()}];case 3:return[3,5];case 4:return[2,{success:!1,error:f.sent(),data:t}];case 5:return[2]}}))}))}var global$1="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}var cachedSetTimeout=defaultSetTimout,cachedClearTimeout=defaultClearTimeout;function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}"function"==typeof global$1.setTimeout&&(cachedSetTimeout=setTimeout),"function"==typeof global$1.clearTimeout&&(cachedClearTimeout=clearTimeout);var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function nextTick(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)}function Item(e,t){this.fun=e,this.array=t}Item.prototype.run=function(){this.fun.apply(null,this.array)};var title="browser",platform$1="browser",browser=!0,env={},argv=[],version$1="",versions={},release={},config={};function noop(){}var on=noop,addListener=noop,once=noop,off=noop,removeListener=noop,removeAllListeners=noop,emit=noop;function binding(e){throw new Error("process.binding is not supported")}function cwd(){return"/"}function chdir(e){throw new Error("process.chdir is not supported")}function umask(){return 0}var performance=global$1.performance||{},performanceNow=performance.now||performance.mozNow||performance.msNow||performance.oNow||performance.webkitNow||function(){return(new Date).getTime()};function hrtime(e){var t=.001*performanceNow.call(performance),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]}var startTime=new Date;function uptime(){return(new Date-startTime)/1e3}var process$1={nextTick:nextTick,title:title,browser:browser,env:env,argv:argv,version:version$1,versions:versions,on:on,addListener:addListener,once:once,off:off,removeListener:removeListener,removeAllListeners:removeAllListeners,emit:emit,binding:binding,cwd:cwd,chdir:chdir,umask:umask,hrtime:hrtime,platform:platform$1,release:release,config:config,uptime:uptime},BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";function int2char(e){return BI_RM.charAt(e)}function op_and(e,t){return e&t}function op_or(e,t){return e|t}function op_xor(e,t){return e^t}function op_andnot(e,t){return e&~t}function lbit(e){if(0==e)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function cbit(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64pad="=",decoder$1;function hex2b64(e){var t,r,n="";for(t=0;t+3<=e.length;t+=3)r=parseInt(e.substring(t,t+3),16),n+=b64map.charAt(r>>6)+b64map.charAt(63&r);for(t+1==e.length?(r=parseInt(e.substring(t,t+1),16),n+=b64map.charAt(r<<2)):t+2==e.length&&(r=parseInt(e.substring(t,t+2),16),n+=b64map.charAt(r>>2)+b64map.charAt((3&r)<<4));(3&n.length)>0;)n+=b64pad;return n}function b64tohex(e){var t,r="",n=0,i=0;for(t=0;t<e.length&&e.charAt(t)!=b64pad;++t){var o=b64map.indexOf(e.charAt(t));o<0||(0==n?(r+=int2char(o>>2),i=3&o,n=1):1==n?(r+=int2char(i<<2|o>>4),i=15&o,n=2):2==n?(r+=int2char(i),r+=int2char(o>>2),i=3&o,n=3):(r+=int2char(i<<2|o>>4),r+=int2char(15&o),n=0))}return 1==n&&(r+=int2char(i<<2)),r}var Hex={decode:function(e){var t;if(void 0===decoder$1){var r="0123456789ABCDEF",n=" \f\n\r\t \u2028\u2029";for(decoder$1={},t=0;t<16;++t)decoder$1[r.charAt(t)]=t;for(r=r.toLowerCase(),t=10;t<16;++t)decoder$1[r.charAt(t)]=t;for(t=0;t<8;++t)decoder$1[n.charAt(t)]=-1}var i=[],o=0,a=0;for(t=0;t<e.length;++t){var s=e.charAt(t);if("="==s)break;if(-1!=(s=decoder$1[s])){if(void 0===s)throw new Error("Illegal character at offset "+t);o|=s,++a>=2?(i[i.length]=o,o=0,a=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},decoder,Base64={decode:function(e){var t;if(void 0===decoder){var r="= \f\n\r\t \u2028\u2029";for(decoder=Object.create(null),t=0;t<64;++t)decoder["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(decoder["-"]=62,decoder._=63,t=0;t<9;++t)decoder[r.charAt(t)]=-1}var n=[],i=0,o=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=decoder[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);i|=a,++o>=4?(n[n.length]=i>>16,n[n.length]=i>>8&255,n[n.length]=255&i,i=0,o=0):i<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=i>>10;break;case 3:n[n.length]=i>>16,n[n.length]=i>>8&255}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=Base64.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return Base64.decode(e)}},max=1e13,Int10=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var r,n,i=this.buf,o=i.length;for(r=0;r<o;++r)(n=i[r]*e+t)<max?t=0:n-=(t=0|n/max)*max,i[r]=n;t>0&&(i[r]=t)},e.prototype.sub=function(e){var t,r,n=this.buf,i=n.length;for(t=0;t<i;++t)(r=n[t]-e)<0?(r+=max,e=1):e=0,n[t]=r;for(;0===n[n.length-1];)n.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,r=t[t.length-1].toString(),n=t.length-2;n>=0;--n)r+=(max+t[n]).toString().substring(1);return r},e.prototype.valueOf=function(){for(var e=this.buf,t=0,r=e.length-1;r>=0;--r)t=t*max+e[r];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),ellipsis="…",reTimeS=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,reTimeL=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function stringCut(e,t){return e.length>t&&(e=e.substring(0,t)+ellipsis),e}var Stream=function(){function e(t,r){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=r)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,r){for(var n="",i=e;i<t;++i)if(n+=this.hexByte(this.get(i)),!0!==r)switch(15&i){case 7:n+=" ";break;case 15:n+="\n";break;default:n+=" "}return n},e.prototype.isASCII=function(e,t){for(var r=e;r<t;++r){var n=this.get(r);if(n<32||n>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var r="",n=e;n<t;++n)r+=String.fromCharCode(this.get(n));return r},e.prototype.parseStringUTF=function(e,t){for(var r="",n=e;n<t;){var i=this.get(n++);r+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(n++)):String.fromCharCode((15&i)<<12|(63&this.get(n++))<<6|63&this.get(n++))}return r},e.prototype.parseStringBMP=function(e,t){for(var r,n,i="",o=e;o<t;)r=this.get(o++),n=this.get(o++),i+=String.fromCharCode(r<<8|n);return i},e.prototype.parseTime=function(e,t,r){var n=this.parseStringISO(e,t),i=(r?reTimeS:reTimeL).exec(n);return i?(r&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),n=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(n+=":"+i[5],i[6]&&(n+=":"+i[6],i[7]&&(n+="."+i[7]))),i[8]&&(n+=" UTC","Z"!=i[8]&&(n+=i[8],i[9]&&(n+=":"+i[9]))),n):"Unrecognized time: "+n},e.prototype.parseInteger=function(e,t){for(var r,n=this.get(e),i=n>127,o=i?255:0,a="";n==o&&++e<t;)n=this.get(e);if(0===(r=t-e))return i?-1:0;if(r>4){for(a=n,r<<=3;!(128&(+a^o));)a=+a<<1,--r;a="("+r+" bit)\n"}i&&(n-=256);for(var s=new Int10(n),c=e+1;c<t;++c)s.mulAdd(256,this.get(c));return a+s.toString()},e.prototype.parseBitString=function(e,t,r){for(var n=this.get(e),i="("+((t-e-1<<3)-n)+" bit)\n",o="",a=e+1;a<t;++a){for(var s=this.get(a),c=a==t-1?n:0,u=7;u>=c;--u)o+=s>>u&1?"1":"0";if(o.length>r)return i+stringCut(o,r)}return i+o},e.prototype.parseOctetString=function(e,t,r){if(this.isASCII(e,t))return stringCut(this.parseStringISO(e,t),r);var n=t-e,i="("+n+" byte)\n";n>(r/=2)&&(t=e+r);for(var o=e;o<t;++o)i+=this.hexByte(this.get(o));return n>r&&(i+=ellipsis),i},e.prototype.parseOID=function(e,t,r){for(var n="",i=new Int10,o=0,a=e;a<t;++a){var s=this.get(a);if(i.mulAdd(128,127&s),o+=7,!(128&s)){if(""===n)if((i=i.simplify())instanceof Int10)i.sub(80),n="2."+i.toString();else{var c=i<80?i<40?0:1:2;n=c+"."+(i-40*c)}else n+="."+i.toString();if(n.length>r)return stringCut(n,r);i=new Int10,o=0}}return o>0&&(n+=".incomplete"),n},e}(),ASN1=function(){function e(e,t,r,n,i){if(!(n instanceof ASN1Tag))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=r,this.tag=n,this.sub=i}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+r,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);case 6:return this.stream.parseOID(t,t+r,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return stringCut(this.stream.parseStringUTF(t,t+r),e);case 18:case 19:case 20:case 21:case 22:case 26:return stringCut(this.stream.parseStringISO(t,t+r),e);case 30:return stringCut(this.stream.parseStringBMP(t,t+r),e);case 23:case 24:return this.stream.parseTime(t,t+r,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var r=0,n=this.sub.length;r<n;++r)t+=this.sub[r].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),r=127&t;if(r==t)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===r)return null;t=0;for(var n=0;n<r;++n)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,r=2*this.length;return e.substr(t,r)},e.decode=function(t){var r;r=t instanceof Stream?t:new Stream(t,0);var n=new Stream(r),i=new ASN1Tag(r),o=e.decodeLength(r),a=r.pos,s=a-n.pos,c=null,u=function(){var t=[];if(null!==o){for(var n=a+o;r.pos<n;)t[t.length]=e.decode(r);if(r.pos!=n)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var i=e.decode(r);if(i.tag.isEOC())break;t[t.length]=i}o=a-r.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(i.tagConstructed)c=u();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");c=u();for(var l=0;l<c.length;++l)if(c[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){c=null}if(null===c){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);r.pos=a+Math.abs(o)}return new e(n,s,o,i,c)},e}(),ASN1Tag=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=!!(32&t),this.tagNumber=31&t,31==this.tagNumber){var r=new Int10;do{t=e.get(),r.mulAdd(128,127&t)}while(128&t);this.tagNumber=r.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),dbits,canary=0xdeadbeefcafe,j_lm=15715070==(16777215&canary),lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=(1<<26)/lowprimes[lowprimes.length-1],BigInteger=function(){function e(e,t,r){null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(r=this[a]>>s)>0&&(i=!0,o=int2char(r));a>=0;)s<t?(r=(this[a]&(1<<s)-1)<<t-s,r|=this[--a]>>(s+=this.DB-t)):(r=this[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=int2char(r));return i?o:"0"},e.prototype.negate=function(){var t=nbi();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var r=nbi();return this.abs().divRemTo(t,null,r),this.s<0&&r.compareTo(e.ZERO)>0&&t.subTo(r,r),r},e.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new Classic(t):new Montgomery(t),this.exp(e,r)},e.prototype.clone=function(){var e=nbi();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this[e]&(1<<n)-1)<<8-n,r|=this[--e]>>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),128&r&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=nbi();return this.bitwiseTo(e,op_and,t),t},e.prototype.or=function(e){var t=nbi();return this.bitwiseTo(e,op_or,t),t},e.prototype.xor=function(e){var t=nbi();return this.bitwiseTo(e,op_xor,t),t},e.prototype.andNot=function(e){var t=nbi();return this.bitwiseTo(e,op_andnot,t),t},e.prototype.not=function(){for(var e=nbi(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=nbi();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=nbi();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+lbit(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=cbit(this[r]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,op_or)},e.prototype.clearBit=function(e){return this.changeBit(e,op_andnot)},e.prototype.flipBit=function(e){return this.changeBit(e,op_xor)},e.prototype.add=function(e){var t=nbi();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=nbi();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=nbi();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=nbi();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=nbi();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=nbi(),r=nbi();return this.divRemTo(e,t,r),[t,r]},e.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),o=nbv(1);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new Classic(t):t.isEven()?new Barrett(t):new Montgomery(t);var a=[],s=3,c=r-1,u=(1<<r)-1;if(a[1]=n.convert(this),r>1){var l=nbi();for(n.sqrTo(a[1],l);s<=u;)a[s]=nbi(),n.mulTo(l,a[s-2],a[s]),s+=2}var d,h,f=e.t-1,p=!0,m=nbi();for(i=nbits(e[f])-1;f>=0;){for(i>=c?d=e[f]>>i-c&u:(d=(e[f]&(1<<i+1)-1)<<c-i,f>0&&(d|=e[f-1]>>this.DB+i-c)),s=r;!(1&d);)d>>=1,--s;if((i-=s)<0&&(i+=this.DB,--f),p)a[d].copyTo(o),p=!1;else{for(;s>1;)n.sqrTo(o,m),n.sqrTo(m,o),s-=2;s>0?n.sqrTo(o,m):(h=o,o=m,m=h),n.mulTo(m,a[d],o)}for(;f>=0&&!(e[f]&1<<i);)n.sqrTo(o,m),h=o,o=m,m=h,--i<0&&(i=this.DB-1,--f)}return n.revert(o)},e.prototype.modInverse=function(t){var r=t.isEven();if(this.isEven()&&r||0==t.signum())return e.ZERO;for(var n=t.clone(),i=this.clone(),o=nbv(1),a=nbv(0),s=nbv(0),c=nbv(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),r?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),r?(s.isEven()&&c.isEven()||(s.addTo(this,s),c.subTo(t,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(t,c),c.rShiftTo(1,c);n.compareTo(i)>=0?(n.subTo(i,n),r&&o.subTo(s,o),a.subTo(c,a)):(i.subTo(n,i),r&&s.subTo(o,s),c.subTo(a,c))}return 0!=i.compareTo(e.ONE)?e.ZERO:c.compareTo(t)>=0?c.subtract(t):c.signum()<0?(c.addTo(t,c),c.signum()<0?c.add(t):c):c},e.prototype.pow=function(e){return this.exp(e,new NullExp)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},e.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=lowprimes[lowprimes.length-1]){for(t=0;t<lowprimes.length;++t)if(r[0]==lowprimes[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<lowprimes.length;){for(var n=lowprimes[t],i=t+1;i<lowprimes.length&&n<lplim;)n*=lowprimes[i++];for(n=r.modInt(n);t<i;)if(n%lowprimes[t++]==0)return!1}return r.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,r){var n;if(16==r)n=4;else if(8==r)n=3;else if(256==r)n=8;else if(2==r)n=1;else if(32==r)n=5;else{if(4!=r)return void this.fromRadix(t,r);n=2}this.t=0,this.s=0;for(var i=t.length,o=!1,a=0;--i>=0;){var s=8==n?255&+t[i]:intAt(t,i);s<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=n)>=this.DB&&(a-=this.DB))}8==n&&128&+t[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var r=e%this.DB,n=this.DB-r,i=(1<<n)-1,o=Math.floor(e/this.DB),a=this.s<<r&this.DM,s=this.t-1;s>=0;--s)t[s+o+1]=this[s]>>n|a,a=(this[s]&i)<<r;for(s=o-1;s>=0;--s)t[s]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t[0]=this[r]>>n;for(var a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&o)<<i,t[a-r]=this[a]>>n;n>0&&(t[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},e.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},e.prototype.multiplyTo=function(t,r){var n=this.abs(),i=t.abs(),o=n.t;for(r.t=o+i.t;--o>=0;)r[o]=0;for(o=0;o<i.t;++o)r[o+n.t]=n.am(0,i[o],r,o,0,n.t);r.s=0,r.clamp(),this.s!=t.s&&e.ZERO.subTo(r,r)},e.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,r,n){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=r&&r.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=nbi());var a=nbi(),s=this.s,c=t.s,u=this.DB-nbits(i[i.t-1]);u>0?(i.lShiftTo(u,a),o.lShiftTo(u,n)):(i.copyTo(a),o.copyTo(n));var l=a.t,d=a[l-1];if(0!=d){var h=d*(1<<this.F1)+(l>1?a[l-2]>>this.F2:0),f=this.FV/h,p=(1<<this.F1)/h,m=1<<this.F2,g=n.t,v=g-l,y=null==r?nbi():r;for(a.dlShiftTo(v,y),n.compareTo(y)>=0&&(n[n.t++]=1,n.subTo(y,n)),e.ONE.dlShiftTo(l,y),y.subTo(a,a);a.t<l;)a[a.t++]=0;for(;--v>=0;){var _=n[--g]==d?this.DM:Math.floor(n[g]*f+(n[g-1]+m)*p);if((n[g]+=a.am(0,_,n,v,0,l))<_)for(a.dlShiftTo(v,y),n.subTo(y,n);n[g]<--_;)n.subTo(y,n)}null!=r&&(n.drShiftTo(l,r),s!=c&&e.ZERO.subTo(r,r)),n.t=l,n.clamp(),u>0&&n.rShiftTo(u,n),s<0&&e.ZERO.subTo(n,n)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,r){if(t>4294967295||t<1)return e.ONE;var n=nbi(),i=nbi(),o=r.convert(this),a=nbits(t)-1;for(o.copyTo(n);--a>=0;)if(r.sqrTo(n,i),(t&1<<a)>0)r.mulTo(i,o,n);else{var s=n;n=i,i=s}return r.revert(n)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=nbv(r),i=nbi(),o=nbi(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(e)+a},e.prototype.fromRadix=function(t,r){this.fromInt(0),null==r&&(r=10);for(var n=this.chunkSize(r),i=Math.pow(r,n),o=!1,a=0,s=0,c=0;c<t.length;++c){var u=intAt(t,c);u<0?"-"==t.charAt(c)&&0==this.signum()&&(o=!0):(s=r*s+u,++a>=n&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(r,a)),this.dAddOffset(s,0)),o&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,r,n){if("number"==typeof r)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var i=[],o=7&t;i.length=1+(t>>3),r.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},e.prototype.bitwiseTo=function(e,t,r){var n,i,o=Math.min(e.t,this.t);for(n=0;n<o;++n)r[n]=t(this[n],e[n]);if(e.t<this.t){for(i=e.s&this.DM,n=o;n<this.t;++n)r[n]=t(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<e.t;++n)r[n]=t(i,e[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},e.prototype.changeBit=function(t,r){var n=e.ONE.shiftLeft(t);return this.bitwiseTo(n,r,n),n},e.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r[--n]=0;for(var i=r.t-this.t;n<i;++n)r[n+this.t]=this.am(0,e[n],r,n,0,this.t);for(i=Math.min(e.t,t);n<i;++n)this.am(0,e[n],r,n,0,t-n);r.clamp()},e.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r[this.t+n-t]=this.am(t-n,e[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},e.prototype.millerRabin=function(t){var r=this.subtract(e.ONE),n=r.getLowestSetBit();if(n<=0)return!1;var i=r.shiftRight(n);(t=t+1>>1)>lowprimes.length&&(t=lowprimes.length);for(var o=nbi(),a=0;a<t;++a){o.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var s=o.modPow(i,this);if(0!=s.compareTo(e.ONE)&&0!=s.compareTo(r)){for(var c=1;c++<n&&0!=s.compareTo(r);)if(0==(s=s.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=s.compareTo(r))return!1}}return!0},e.prototype.square=function(){var e=nbi();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var r=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(r.compareTo(n)<0){var i=r;r=n,n=i}var o=r.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)t(r);else{o<a&&(a=o),a>0&&(r.rShiftTo(a,r),n.rShiftTo(a,n));var s=function(){(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),r.compareTo(n)>=0?(r.subTo(n,r),r.rShiftTo(1,r)):(n.subTo(r,n),n.rShiftTo(1,n)),r.signum()>0?setTimeout(s,0):(a>0&&n.lShiftTo(a,n),setTimeout((function(){t(n)}),0))};setTimeout(s,10)}},e.prototype.fromNumberAsync=function(t,r,n,i){if("number"==typeof r)if(t<2)this.fromInt(1);else{this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>t&&o.subTo(e.ONE.shiftLeft(t-1),o),o.isProbablePrime(r)?setTimeout((function(){i()}),0):setTimeout(a,0)};setTimeout(a,0)}else{var s=[],c=7&t;s.length=1+(t>>3),r.nextBytes(s),c>0?s[0]&=(1<<c)-1:s[0]=0,this.fromString(s,256)}},e}(),NullExp=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),Classic=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Montgomery=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=nbi();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(BigInteger.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=nbi();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Barrett=function(){function e(e){this.m=e,this.r2=nbi(),this.q3=nbi(),BigInteger.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=nbi();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function nbi(){return new BigInteger(null)}function parseBigInt(e,t){return new BigInteger(e,t)}var inBrowser="undefined"!=typeof navigator;inBrowser&&j_lm&&"Microsoft Internet Explorer"==navigator.appName?(BigInteger.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var c=32767&this[e],u=this[e++]>>15,l=s*c+u*a;i=((c=a*c+((32767&l)<<15)+r[n]+(1073741823&i))>>>30)+(l>>>15)+s*u+(i>>>30),r[n++]=1073741823&c}return i},dbits=30):inBrowser&&j_lm&&"Netscape"!=navigator.appName?(BigInteger.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this[e++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},dbits=26):(BigInteger.prototype.am=function(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var c=16383&this[e],u=this[e++]>>14,l=s*c+u*a;i=((c=a*c+((16383&l)<<14)+r[n]+i)>>28)+(l>>14)+s*u,r[n++]=268435455&c}return i},dbits=28),BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1<<dbits)-1,BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP),BigInteger.prototype.F1=BI_FP-dbits,BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RC=[],rr,vv;for(rr="0".charCodeAt(0),vv=0;vv<=9;++vv)BI_RC[rr++]=vv;for(rr="a".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;for(rr="A".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;function intAt(e,t){var r=BI_RC[e.charCodeAt(t)];return null==r?-1:r}function nbv(e){var t=nbi();return t.fromInt(e),t}function nbits(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}BigInteger.ZERO=nbv(0),BigInteger.ONE=nbv(1);var Arcfour=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,r,n;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+e[t%e.length]&255,n=this.S[t],this.S[t]=this.S[r],this.S[r]=n;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();function prng_newstate(){return new Arcfour}var rng_psize=256,rng_state,rng_pool=null,rng_pptr;if(null==rng_pool){rng_pool=[],rng_pptr=0;var t=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var z$1=new Uint32Array(256);for(window.crypto.getRandomValues(z$1),t=0;t<z$1.length;++t)rng_pool[rng_pptr++]=255&z$1[t]}var count=0,onMouseMoveListener_1=function(e){if((count=count||0)>=256||rng_pptr>=rng_psize)window.removeEventListener?window.removeEventListener("mousemove",onMouseMoveListener_1,!1):window.detachEvent&&window.detachEvent("onmousemove",onMouseMoveListener_1);else try{var t=e.x+e.y;rng_pool[rng_pptr++]=255&t,count+=1}catch(e){}};"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",onMouseMoveListener_1,!1):window.attachEvent&&window.attachEvent("onmousemove",onMouseMoveListener_1))}function rng_get_byte(){if(null==rng_state){for(rng_state=prng_newstate();rng_pptr<rng_psize;){var e=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=255&e}for(rng_state.init(rng_pool),rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}var SecureRandom=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=rng_get_byte()},e}();function pkcs1pad1(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var r=t-e.length-6,n="",i=0;i<r;i+=2)n+="ff";return parseBigInt("0001"+n+"00"+e,16)}function pkcs1pad2(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var r=[],n=e.length-1;n>=0&&t>0;){var i=e.charCodeAt(n--);i<128?r[--t]=i:i>127&&i<2048?(r[--t]=63&i|128,r[--t]=i>>6|192):(r[--t]=63&i|128,r[--t]=i>>6&63|128,r[--t]=i>>12|224)}r[--t]=0;for(var o=new SecureRandom,a=[];t>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);r[--t]=a[0]}return r[--t]=2,r[--t]=0,new BigInteger(r)}var RSAKey=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e){var t=this.n.bitLength()+7>>3,r=pkcs1pad2(e,t);if(null==r)return null;var n=this.doPublic(r);if(null==n)return null;for(var i=n.toString(16),o=i.length,a=0;a<2*t-o;a++)i="0"+i;return i},e.prototype.setPrivate=function(e,t,r){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16),this.d=parseBigInt(r,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,r,n,i,o,a,s){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16),this.d=parseBigInt(r,16),this.p=parseBigInt(n,16),this.q=parseBigInt(i,16),this.dmp1=parseBigInt(o,16),this.dmq1=parseBigInt(a,16),this.coeff=parseBigInt(s,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var r=new SecureRandom,n=e>>1;this.e=parseInt(t,16);for(var i=new BigInteger(t,16);;){for(;this.p=new BigInteger(e-n,1,r),0!=this.p.subtract(BigInteger.ONE).gcd(i).compareTo(BigInteger.ONE)||!this.p.isProbablePrime(10););for(;this.q=new BigInteger(n,1,r),0!=this.q.subtract(BigInteger.ONE).gcd(i).compareTo(BigInteger.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(BigInteger.ONE),s=this.q.subtract(BigInteger.ONE),c=a.multiply(s);if(0==c.gcd(i).compareTo(BigInteger.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(c),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=parseBigInt(e,16),r=this.doPrivate(t);return null==r?null:pkcs1unpad2(r,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,r){var n=new SecureRandom,i=e>>1;this.e=parseInt(t,16);var o=new BigInteger(t,16),a=this,s=function(){var t=function(){if(a.p.compareTo(a.q)<=0){var e=a.p;a.p=a.q,a.q=e}var t=a.p.subtract(BigInteger.ONE),n=a.q.subtract(BigInteger.ONE),i=t.multiply(n);0==i.gcd(o).compareTo(BigInteger.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(t),a.dmq1=a.d.mod(n),a.coeff=a.q.modInverse(a.p),setTimeout((function(){r()}),0)):setTimeout(s,0)},c=function(){a.q=nbi(),a.q.fromNumberAsync(i,1,n,(function(){a.q.subtract(BigInteger.ONE).gcda(o,(function(e){0==e.compareTo(BigInteger.ONE)&&a.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(c,0)}))}))},u=function(){a.p=nbi(),a.p.fromNumberAsync(e-i,1,n,(function(){a.p.subtract(BigInteger.ONE).gcda(o,(function(e){0==e.compareTo(BigInteger.ONE)&&a.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(u,0)}))}))};setTimeout(u,0)};setTimeout(s,0)},e.prototype.sign=function(e,t,r){var n=pkcs1pad1(getDigestHeader(r)+t(e).toString(),this.n.bitLength()/4);if(null==n)return null;var i=this.doPrivate(n);if(null==i)return null;var o=i.toString(16);return 1&o.length?"0"+o:o},e.prototype.verify=function(e,t,r){var n=parseBigInt(t,16),i=this.doPublic(n);return null==i?null:removeDigestHeader(i.toString(16).replace(/^1f+00/,""))==r(e).toString()},e}();function pkcs1unpad2(e,t){for(var r=e.toByteArray(),n=0;n<r.length&&0==r[n];)++n;if(r.length-n!=t-1||2!=r[n])return null;for(++n;0!=r[n];)if(++n>=r.length)return null;for(var i="";++n<r.length;){var o=255&r[n];o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&r[n+1]),++n):(i+=String.fromCharCode((15&o)<<12|(63&r[n+1])<<6|63&r[n+2]),n+=2)}return i}var DIGEST_HEADERS={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function getDigestHeader(e){return DIGEST_HEADERS[e]||""}function removeDigestHeader(e){for(var t in DIGEST_HEADERS)if(DIGEST_HEADERS.hasOwnProperty(t)){var r=DIGEST_HEADERS[t],n=r.length;if(e.substr(0,n)==r)return e.substr(n)}return e}
|
|
3
|
+
n.version="2.30.1",i(Yr),n.fn=lo,n.min=Zr,n.max=Qr,n.now=en,n.utc=p,n.unix=co,n.months=vo,n.isDate=h,n.locale=pr,n.invalid=y,n.duration=En,n.isMoment=x,n.weekdays=_o,n.parseZone=uo,n.localeData=vr,n.isDuration=sn,n.monthsShort=yo,n.weekdaysMin=wo,n.defineLocale=mr,n.updateLocale=gr,n.locales=yr,n.weekdaysShort=bo,n.normalizeUnits=re,n.relativeTimeRounding=ia,n.relativeTimeThreshold=oa,n.calendarFormat=Un,n.prototype=lo,n.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"},n}()})),createSysConst=function(){return[{des:"年份",key:1001,mapField:"YEAR",mapping:"-",model:"2",name:"YEAR",value:moment().get("year")},{des:"月份",key:1005,mapField:"MONTH",mapping:"-",model:"2",name:"MONTH",value:moment().get("month")},{des:"日期",key:1004,mapField:"DATE",mapping:"-",model:"2",name:"DATE",value:moment().get("date")},{des:"星期",key:1003,mapField:"WEEK",mapping:"-",model:"2",name:"WEEK",value:moment().format("dddd")},{des:"版本",key:1002,mapField:"VERSION",mapping:"-",model:"2",name:"VERSION",value:"1.0.0"},{des:"手机号",key:2001,mapField:"U_PHONE",mapping:"-",model:"2",name:"U_PHONE",value:""},{des:"用户省",key:2002,mapField:"U_PROVINCE",mapping:"-",model:"2",name:"U_PROVINCE",value:""},{des:"用户市",key:2003,mapField:"U_CITY",mapping:"-",model:"2",name:"U_CITY",value:""},{des:"用户区县",key:2004,mapField:"U_COUNTY",mapping:"-",model:"2",name:"U_COUNTY",value:""}]},state={size:{width:1920,height:1080},resource:{jspaths:[],csspaths:[],otherpaths:[],fonts:[]},globalSource:[],alternateData:{},contextList:{},selectd:[],baseComs:[],globalVars:[],globalConstant:[],globalEvents:[],pages:[],pageIndex:0,groupFlag:!1,plant:{baseData:{width:1920,height:1080},option:null,optionDes:null},list:[],menuList:[],syncFlag:!0,multiple:!1,undoRedoPointer:-1,undos:[],redos:[],cache:[],cloneCache:[],shareVariable:{},shareVariableTree:{},catch:{selectd:[],list:[]},currentEditerCid:"",currentArea:{left:0,top:0,width:0,height:0,show:!1},caseList:[],constant:[],caseInfo:null,pageId:null,toPage:null,tw:null,watermark:null,endnotes:null,selectdChangeOrigin:"",sysConst:createSysConst(),historyFlag:!0,shareComs:new Map},extendStatics$1=function(e,t){return extendStatics$1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics$1(e,t)};function __extends$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics$1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign$1=function(){return __assign$1=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign$1.apply(this,arguments)};function __rest(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function __awaiter(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function __generator(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function __spreadArray$1(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var UndoRedo={createItem:function(e){e.catch={selectd:_$1.cloneDeep(e.selectd),list:_$1.cloneDeep(e.list)}},resetData:function(e,t){if(e.historyFlag){var r=_$1.cloneDeep(t);e.selected=r.selected,e.list=r.list}},execute:function(e){e.historyFlag&&(e.undoRedoPointer===e.undos.length-1?(e.undos.length>5&&_$1.pullAt(e.undos,0),e.undos.push({selectd:_$1.cloneDeep(e.selectd),list:_$1.cloneDeep(e.list)})):e.undos.splice(e.undoRedoPointer+1,e.undos.length-1-e.undoRedoPointer,{selectd:_$1.cloneDeep(e.selectd),list:_$1.cloneDeep(e.list)}),e.undoRedoPointer=e.undos.length-1)},undo:function(e){if(e.historyFlag&&e.undoRedoPointer>0&&e.undoRedoPointer<e.undos.length){e.undoRedoPointer=e.undoRedoPointer-1;var t=e.undos[e.undoRedoPointer];this.commit("GoCom/resetData",t)}},redo:function(e){if(e.historyFlag&&e.undoRedoPointer>=0&&e.undoRedoPointer<e.undos.length){e.undoRedoPointer=e.undoRedoPointer+1;var t=e.undos[e.undoRedoPointer];this.commit("GoCom/resetData",t)}},switchHistoryFlag:function(e){e.historyFlag=!e.historyFlag,e.historyFlag||(e.undos=[],e.undoRedoPointer=-1)}},sandboxWorker="\nfunction proxyObj(originObj) {\n const exposeObj = new Proxy(originObj, {\n has: (target, key) => {\n if (['fetch', 'XMLHttpRequest', 'postMessage'].indexOf(key) >= 0) {\n throw new Error('Illegal operation for key'+key)\n } else {\n return target[key]\n }\n },\n })\n return exposeObj\n}\nfunction compileCode(src) {\n src = 'with (exposeObj) {'+src+'}'\n //console.log(src)\n return new Function('exposeObj', src)\n}\nfunction run(code) {\n let proxy = proxyObj({})\n let result = compileCode(code)(proxy)\n return result\n}\n\nonmessage = (e) => {\n try {\n let result = run(e.data.code)\n postMessage({\n code: 1,\n result,\n })\n } catch (err) {\n postMessage({\n code: -1,\n err,\n })\n }\n}\n\n",blob=new Blob([sandboxWorker]),url=URL.createObjectURL(blob);function run$1(e,t){return void 0===t&&(t=5e3),__awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(n){return r=new Worker(url),[2,new Promise((function(n,i){var o=function(){clearTimeout(s),r.removeEventListener("message",a),r.terminate(),r=null},a=function(e){var t=e.data,r=t.code,a=t.result,s=t.err;o(),1===r?n(a):i(s)};r.postMessage({code:e}),r.addEventListener("message",a);var s=setTimeout((function(){o(),i("timeout")}),t)}))]}))}))}function getDataForEvaluator(e,t,r,n,i){return __awaiter(this,void 0,void 0,(function(){var r,i,o,a,s,l,c;return __generator(this,(function(u){switch(u.label){case 0:if(r=e,i=_$1.cloneDeep(t),o=i.use,a=i.data,!o)return[3,4];l=function(e){var t,i;return __generator(this,(function(o){switch(o.label){case 0:return a[e].use?(t=a[e].dependVars,i={},n&&i&&t&&t.length&&t.map((function(e){var t=_$1.cloneDeep(n).filter((function(t){var r=t.mapField==e;return r&&(i[e]=t.value),r}));t&&0!=t.length||(i[e]="")})),[4,evaluator(a[e].code,r,i,a[e].mode?a[e].mode:"worker")]):[3,2];case 1:s=o.sent(),r=s.data,o.label=2;case 2:return[2]}}))},c=0,u.label=1;case 1:return c<a.length?[5,l(c)]:[3,4];case 2:u.sent(),u.label=3;case 3:return c++,[3,1];case 4:return[2,r]}}))}))}function evaluator(e,t,r,n){return void 0===r&&(r={}),void 0===n&&(n="worker"),__awaiter(this,void 0,void 0,(function(){var i,o,a,s,l,c,u,h,d;return __generator(this,(function(f){switch(f.label){case 0:return f.trys.push([0,4,,5]),"window"!=n?[3,1]:(o=(i=[["data"],[t]])[0],a=i[1],"object"==typeof r&&Object.keys(r).forEach((function(e){o.push(e),a.push(r[e])})),s=new(Function.bind.apply(Function,__spreadArray$1(__spreadArray$1([void 0],o,!1),[e],!1))),[2,{success:!0,data:s.apply(void 0,a)}]);case 1:return u=(l=[t,r,""])[1],h=l[2],"object"==typeof(c=l[0])&&(c=JSON.stringify(t)),"object"==typeof r&&(u=JSON.stringify(r)),Object.keys(r).forEach((function(e){return h+="".concat(e,",")})),d="let data=eval(".concat(c,"); \n let app=").concat(JSON.stringify({}),";"),d+=h?"let {".concat(h,"} = eval(").concat(u,"); "):"",[4,run$1(d+="".concat(e))];case 2:return[2,{success:!0,data:f.sent()}];case 3:return[3,5];case 4:return[2,{success:!1,error:f.sent(),data:t}];case 5:return[2]}}))}))}var global$1="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}var cachedSetTimeout=defaultSetTimout,cachedClearTimeout=defaultClearTimeout;function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}"function"==typeof global$1.setTimeout&&(cachedSetTimeout=setTimeout),"function"==typeof global$1.clearTimeout&&(cachedClearTimeout=clearTimeout);var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function nextTick(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)}function Item(e,t){this.fun=e,this.array=t}Item.prototype.run=function(){this.fun.apply(null,this.array)};var title="browser",platform$1="browser",browser=!0,env={},argv=[],version$1="",versions={},release={},config={};function noop(){}var on=noop,addListener=noop,once=noop,off=noop,removeListener=noop,removeAllListeners=noop,emit=noop;function binding(e){throw new Error("process.binding is not supported")}function cwd(){return"/"}function chdir(e){throw new Error("process.chdir is not supported")}function umask(){return 0}var performance=global$1.performance||{},performanceNow=performance.now||performance.mozNow||performance.msNow||performance.oNow||performance.webkitNow||function(){return(new Date).getTime()};function hrtime(e){var t=.001*performanceNow.call(performance),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]}var startTime=new Date;function uptime(){return(new Date-startTime)/1e3}var process$1={nextTick:nextTick,title:title,browser:browser,env:env,argv:argv,version:version$1,versions:versions,on:on,addListener:addListener,once:once,off:off,removeListener:removeListener,removeAllListeners:removeAllListeners,emit:emit,binding:binding,cwd:cwd,chdir:chdir,umask:umask,hrtime:hrtime,platform:platform$1,release:release,config:config,uptime:uptime},BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";function int2char(e){return BI_RM.charAt(e)}function op_and(e,t){return e&t}function op_or(e,t){return e|t}function op_xor(e,t){return e^t}function op_andnot(e,t){return e&~t}function lbit(e){if(0==e)return-1;var t=0;return 65535&e||(e>>=16,t+=16),255&e||(e>>=8,t+=8),15&e||(e>>=4,t+=4),3&e||(e>>=2,t+=2),1&e||++t,t}function cbit(e){for(var t=0;0!=e;)e&=e-1,++t;return t}var b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64pad="=",decoder$1;function hex2b64(e){var t,r,n="";for(t=0;t+3<=e.length;t+=3)r=parseInt(e.substring(t,t+3),16),n+=b64map.charAt(r>>6)+b64map.charAt(63&r);for(t+1==e.length?(r=parseInt(e.substring(t,t+1),16),n+=b64map.charAt(r<<2)):t+2==e.length&&(r=parseInt(e.substring(t,t+2),16),n+=b64map.charAt(r>>2)+b64map.charAt((3&r)<<4));(3&n.length)>0;)n+=b64pad;return n}function b64tohex(e){var t,r="",n=0,i=0;for(t=0;t<e.length&&e.charAt(t)!=b64pad;++t){var o=b64map.indexOf(e.charAt(t));o<0||(0==n?(r+=int2char(o>>2),i=3&o,n=1):1==n?(r+=int2char(i<<2|o>>4),i=15&o,n=2):2==n?(r+=int2char(i),r+=int2char(o>>2),i=3&o,n=3):(r+=int2char(i<<2|o>>4),r+=int2char(15&o),n=0))}return 1==n&&(r+=int2char(i<<2)),r}var Hex={decode:function(e){var t;if(void 0===decoder$1){var r="0123456789ABCDEF",n=" \f\n\r\t \u2028\u2029";for(decoder$1={},t=0;t<16;++t)decoder$1[r.charAt(t)]=t;for(r=r.toLowerCase(),t=10;t<16;++t)decoder$1[r.charAt(t)]=t;for(t=0;t<8;++t)decoder$1[n.charAt(t)]=-1}var i=[],o=0,a=0;for(t=0;t<e.length;++t){var s=e.charAt(t);if("="==s)break;if(-1!=(s=decoder$1[s])){if(void 0===s)throw new Error("Illegal character at offset "+t);o|=s,++a>=2?(i[i.length]=o,o=0,a=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},decoder,Base64={decode:function(e){var t;if(void 0===decoder){var r="= \f\n\r\t \u2028\u2029";for(decoder=Object.create(null),t=0;t<64;++t)decoder["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)]=t;for(decoder["-"]=62,decoder._=63,t=0;t<9;++t)decoder[r.charAt(t)]=-1}var n=[],i=0,o=0;for(t=0;t<e.length;++t){var a=e.charAt(t);if("="==a)break;if(-1!=(a=decoder[a])){if(void 0===a)throw new Error("Illegal character at offset "+t);i|=a,++o>=4?(n[n.length]=i>>16,n[n.length]=i>>8&255,n[n.length]=255&i,i=0,o=0):i<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=i>>10;break;case 3:n[n.length]=i>>16,n[n.length]=i>>8&255}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=Base64.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return Base64.decode(e)}},max=1e13,Int10=function(){function e(e){this.buf=[+e||0]}return e.prototype.mulAdd=function(e,t){var r,n,i=this.buf,o=i.length;for(r=0;r<o;++r)(n=i[r]*e+t)<max?t=0:n-=(t=0|n/max)*max,i[r]=n;t>0&&(i[r]=t)},e.prototype.sub=function(e){var t,r,n=this.buf,i=n.length;for(t=0;t<i;++t)(r=n[t]-e)<0?(r+=max,e=1):e=0,n[t]=r;for(;0===n[n.length-1];)n.pop()},e.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,r=t[t.length-1].toString(),n=t.length-2;n>=0;--n)r+=(max+t[n]).toString().substring(1);return r},e.prototype.valueOf=function(){for(var e=this.buf,t=0,r=e.length-1;r>=0;--r)t=t*max+e[r];return t},e.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},e}(),ellipsis="…",reTimeS=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,reTimeL=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function stringCut(e,t){return e.length>t&&(e=e.substring(0,t)+ellipsis),e}var Stream=function(){function e(t,r){this.hexDigits="0123456789ABCDEF",t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=r)}return e.prototype.get=function(e){if(void 0===e&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},e.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},e.prototype.hexDump=function(e,t,r){for(var n="",i=e;i<t;++i)if(n+=this.hexByte(this.get(i)),!0!==r)switch(15&i){case 7:n+=" ";break;case 15:n+="\n";break;default:n+=" "}return n},e.prototype.isASCII=function(e,t){for(var r=e;r<t;++r){var n=this.get(r);if(n<32||n>176)return!1}return!0},e.prototype.parseStringISO=function(e,t){for(var r="",n=e;n<t;++n)r+=String.fromCharCode(this.get(n));return r},e.prototype.parseStringUTF=function(e,t){for(var r="",n=e;n<t;){var i=this.get(n++);r+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(n++)):String.fromCharCode((15&i)<<12|(63&this.get(n++))<<6|63&this.get(n++))}return r},e.prototype.parseStringBMP=function(e,t){for(var r,n,i="",o=e;o<t;)r=this.get(o++),n=this.get(o++),i+=String.fromCharCode(r<<8|n);return i},e.prototype.parseTime=function(e,t,r){var n=this.parseStringISO(e,t),i=(r?reTimeS:reTimeL).exec(n);return i?(r&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),n=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(n+=":"+i[5],i[6]&&(n+=":"+i[6],i[7]&&(n+="."+i[7]))),i[8]&&(n+=" UTC","Z"!=i[8]&&(n+=i[8],i[9]&&(n+=":"+i[9]))),n):"Unrecognized time: "+n},e.prototype.parseInteger=function(e,t){for(var r,n=this.get(e),i=n>127,o=i?255:0,a="";n==o&&++e<t;)n=this.get(e);if(0===(r=t-e))return i?-1:0;if(r>4){for(a=n,r<<=3;!(128&(+a^o));)a=+a<<1,--r;a="("+r+" bit)\n"}i&&(n-=256);for(var s=new Int10(n),l=e+1;l<t;++l)s.mulAdd(256,this.get(l));return a+s.toString()},e.prototype.parseBitString=function(e,t,r){for(var n=this.get(e),i="("+((t-e-1<<3)-n)+" bit)\n",o="",a=e+1;a<t;++a){for(var s=this.get(a),l=a==t-1?n:0,c=7;c>=l;--c)o+=s>>c&1?"1":"0";if(o.length>r)return i+stringCut(o,r)}return i+o},e.prototype.parseOctetString=function(e,t,r){if(this.isASCII(e,t))return stringCut(this.parseStringISO(e,t),r);var n=t-e,i="("+n+" byte)\n";n>(r/=2)&&(t=e+r);for(var o=e;o<t;++o)i+=this.hexByte(this.get(o));return n>r&&(i+=ellipsis),i},e.prototype.parseOID=function(e,t,r){for(var n="",i=new Int10,o=0,a=e;a<t;++a){var s=this.get(a);if(i.mulAdd(128,127&s),o+=7,!(128&s)){if(""===n)if((i=i.simplify())instanceof Int10)i.sub(80),n="2."+i.toString();else{var l=i<80?i<40?0:1:2;n=l+"."+(i-40*l)}else n+="."+i.toString();if(n.length>r)return stringCut(n,r);i=new Int10,o=0}}return o>0&&(n+=".incomplete"),n},e}(),ASN1=function(){function e(e,t,r,n,i){if(!(n instanceof ASN1Tag))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=r,this.tag=n,this.sub=i}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(e){if(void 0===this.tag)return null;void 0===e&&(e=1/0);var t=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+r,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,e);case 6:return this.stream.parseOID(t,t+r,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return stringCut(this.stream.parseStringUTF(t,t+r),e);case 18:case 19:case 20:case 21:case 22:case 26:return stringCut(this.stream.parseStringISO(t,t+r),e);case 30:return stringCut(this.stream.parseStringBMP(t,t+r),e);case 23:case 24:return this.stream.parseTime(t,t+r,23==this.tag.tagNumber)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(e){void 0===e&&(e="");var t=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+=" ";for(var r=0,n=this.sub.length;r<n;++r)t+=this.sub[r].toPrettyString(e)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(e){var t=e.get(),r=127&t;if(r==t)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0===r)return null;t=0;for(var n=0;n<r;++n)t=256*t+e.get();return t},e.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,r=2*this.length;return e.substr(t,r)},e.decode=function(t){var r;r=t instanceof Stream?t:new Stream(t,0);var n=new Stream(r),i=new ASN1Tag(r),o=e.decodeLength(r),a=r.pos,s=a-n.pos,l=null,c=function(){var t=[];if(null!==o){for(var n=a+o;r.pos<n;)t[t.length]=e.decode(r);if(r.pos!=n)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var i=e.decode(r);if(i.tag.isEOC())break;t[t.length]=i}o=a-r.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return t};if(i.tagConstructed)l=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=r.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");l=c();for(var u=0;u<l.length;++u)if(l[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){l=null}if(null===l){if(null===o)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);r.pos=a+Math.abs(o)}return new e(n,s,o,i,l)},e}(),ASN1Tag=function(){function e(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=!!(32&t),this.tagNumber=31&t,31==this.tagNumber){var r=new Int10;do{t=e.get(),r.mulAdd(128,127&t)}while(128&t);this.tagNumber=r.simplify()}}return e.prototype.isUniversal=function(){return 0===this.tagClass},e.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},e}(),dbits,canary=0xdeadbeefcafe,j_lm=15715070==(16777215&canary),lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=(1<<26)/lowprimes[lowprimes.length-1],BigInteger=function(){function e(e,t,r){null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}return e.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<<t)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(r=this[a]>>s)>0&&(i=!0,o=int2char(r));a>=0;)s<t?(r=(this[a]&(1<<s)-1)<<t-s,r|=this[--a]>>(s+=this.DB-t)):(r=this[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=int2char(r));return i?o:"0"},e.prototype.negate=function(){var t=nbi();return e.ZERO.subTo(this,t),t},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(t){var r=nbi();return this.abs().divRemTo(t,null,r),this.s<0&&r.compareTo(e.ZERO)>0&&t.subTo(r,r),r},e.prototype.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new Classic(t):new Montgomery(t),this.exp(e,r)},e.prototype.clone=function(){var e=nbi();return this.copyTo(e),e},e.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var r,n=this.DB-e*this.DB%8,i=0;if(e-- >0)for(n<this.DB&&(r=this[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this[e]&(1<<n)-1)<<8-n,r|=this[--e]>>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),128&r&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t},e.prototype.equals=function(e){return 0==this.compareTo(e)},e.prototype.min=function(e){return this.compareTo(e)<0?this:e},e.prototype.max=function(e){return this.compareTo(e)>0?this:e},e.prototype.and=function(e){var t=nbi();return this.bitwiseTo(e,op_and,t),t},e.prototype.or=function(e){var t=nbi();return this.bitwiseTo(e,op_or,t),t},e.prototype.xor=function(e){var t=nbi();return this.bitwiseTo(e,op_xor,t),t},e.prototype.andNot=function(e){var t=nbi();return this.bitwiseTo(e,op_andnot,t),t},e.prototype.not=function(){for(var e=nbi(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},e.prototype.shiftLeft=function(e){var t=nbi();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},e.prototype.shiftRight=function(e){var t=nbi();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},e.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+lbit(this[e]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=cbit(this[r]^t);return e},e.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:!!(this[t]&1<<e%this.DB)},e.prototype.setBit=function(e){return this.changeBit(e,op_or)},e.prototype.clearBit=function(e){return this.changeBit(e,op_andnot)},e.prototype.flipBit=function(e){return this.changeBit(e,op_xor)},e.prototype.add=function(e){var t=nbi();return this.addTo(e,t),t},e.prototype.subtract=function(e){var t=nbi();return this.subTo(e,t),t},e.prototype.multiply=function(e){var t=nbi();return this.multiplyTo(e,t),t},e.prototype.divide=function(e){var t=nbi();return this.divRemTo(e,t,null),t},e.prototype.remainder=function(e){var t=nbi();return this.divRemTo(e,null,t),t},e.prototype.divideAndRemainder=function(e){var t=nbi(),r=nbi();return this.divRemTo(e,t,r),[t,r]},e.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),o=nbv(1);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new Classic(t):t.isEven()?new Barrett(t):new Montgomery(t);var a=[],s=3,l=r-1,c=(1<<r)-1;if(a[1]=n.convert(this),r>1){var u=nbi();for(n.sqrTo(a[1],u);s<=c;)a[s]=nbi(),n.mulTo(u,a[s-2],a[s]),s+=2}var h,d,f=e.t-1,p=!0,m=nbi();for(i=nbits(e[f])-1;f>=0;){for(i>=l?h=e[f]>>i-l&c:(h=(e[f]&(1<<i+1)-1)<<l-i,f>0&&(h|=e[f-1]>>this.DB+i-l)),s=r;!(1&h);)h>>=1,--s;if((i-=s)<0&&(i+=this.DB,--f),p)a[h].copyTo(o),p=!1;else{for(;s>1;)n.sqrTo(o,m),n.sqrTo(m,o),s-=2;s>0?n.sqrTo(o,m):(d=o,o=m,m=d),n.mulTo(m,a[h],o)}for(;f>=0&&!(e[f]&1<<i);)n.sqrTo(o,m),d=o,o=m,m=d,--i<0&&(i=this.DB-1,--f)}return n.revert(o)},e.prototype.modInverse=function(t){var r=t.isEven();if(this.isEven()&&r||0==t.signum())return e.ZERO;for(var n=t.clone(),i=this.clone(),o=nbv(1),a=nbv(0),s=nbv(0),l=nbv(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),r?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),r?(s.isEven()&&l.isEven()||(s.addTo(this,s),l.subTo(t,l)),s.rShiftTo(1,s)):l.isEven()||l.subTo(t,l),l.rShiftTo(1,l);n.compareTo(i)>=0?(n.subTo(i,n),r&&o.subTo(s,o),a.subTo(l,a)):(i.subTo(n,i),r&&s.subTo(o,s),l.subTo(a,l))}return 0!=i.compareTo(e.ONE)?e.ZERO:l.compareTo(t)>=0?l.subtract(t):l.signum()<0?(l.addTo(t,l),l.signum()<0?l.add(t):l):l},e.prototype.pow=function(e){return this.exp(e,new NullExp)},e.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},e.prototype.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=lowprimes[lowprimes.length-1]){for(t=0;t<lowprimes.length;++t)if(r[0]==lowprimes[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<lowprimes.length;){for(var n=lowprimes[t],i=t+1;i<lowprimes.length&&n<lplim;)n*=lowprimes[i++];for(n=r.modInt(n);t<i;)if(n%lowprimes[t++]==0)return!1}return r.millerRabin(e)},e.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},e.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},e.prototype.fromString=function(t,r){var n;if(16==r)n=4;else if(8==r)n=3;else if(256==r)n=8;else if(2==r)n=1;else if(32==r)n=5;else{if(4!=r)return void this.fromRadix(t,r);n=2}this.t=0,this.s=0;for(var i=t.length,o=!1,a=0;--i>=0;){var s=8==n?255&+t[i]:intAt(t,i);s<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=n)>=this.DB&&(a-=this.DB))}8==n&&128&+t[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},e.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},e.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},e.prototype.lShiftTo=function(e,t){for(var r=e%this.DB,n=this.DB-r,i=(1<<n)-1,o=Math.floor(e/this.DB),a=this.s<<r&this.DM,s=this.t-1;s>=0;--s)t[s+o+1]=this[s]>>n|a,a=(this[s]&i)<<r;for(s=o-1;s>=0;--s)t[s]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<<n)-1;t[0]=this[r]>>n;for(var a=r+1;a<this.t;++a)t[a-r-1]|=(this[a]&o)<<i,t[a-r]=this[a]>>n;n>0&&(t[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},e.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},e.prototype.multiplyTo=function(t,r){var n=this.abs(),i=t.abs(),o=n.t;for(r.t=o+i.t;--o>=0;)r[o]=0;for(o=0;o<i.t;++o)r[o+n.t]=n.am(0,i[o],r,o,0,n.t);r.s=0,r.clamp(),this.s!=t.s&&e.ZERO.subTo(r,r)},e.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},e.prototype.divRemTo=function(t,r,n){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=r&&r.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=nbi());var a=nbi(),s=this.s,l=t.s,c=this.DB-nbits(i[i.t-1]);c>0?(i.lShiftTo(c,a),o.lShiftTo(c,n)):(i.copyTo(a),o.copyTo(n));var u=a.t,h=a[u-1];if(0!=h){var d=h*(1<<this.F1)+(u>1?a[u-2]>>this.F2:0),f=this.FV/d,p=(1<<this.F1)/d,m=1<<this.F2,g=n.t,v=g-u,y=null==r?nbi():r;for(a.dlShiftTo(v,y),n.compareTo(y)>=0&&(n[n.t++]=1,n.subTo(y,n)),e.ONE.dlShiftTo(u,y),y.subTo(a,a);a.t<u;)a[a.t++]=0;for(;--v>=0;){var _=n[--g]==h?this.DM:Math.floor(n[g]*f+(n[g-1]+m)*p);if((n[g]+=a.am(0,_,n,v,0,u))<_)for(a.dlShiftTo(v,y),n.subTo(y,n);n[g]<--_;)n.subTo(y,n)}null!=r&&(n.drShiftTo(u,r),s!=l&&e.ZERO.subTo(r,r)),n.t=u,n.clamp(),c>0&&n.rShiftTo(c,n),s<0&&e.ZERO.subTo(n,n)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},e.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},e.prototype.exp=function(t,r){if(t>4294967295||t<1)return e.ONE;var n=nbi(),i=nbi(),o=r.convert(this),a=nbits(t)-1;for(o.copyTo(n);--a>=0;)if(r.sqrTo(n,i),(t&1<<a)>0)r.mulTo(i,o,n);else{var s=n;n=i,i=s}return r.revert(n)},e.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},e.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=nbv(r),i=nbi(),o=nbi(),a="";for(this.divRemTo(n,i,o);i.signum()>0;)a=(r+o.intValue()).toString(e).substr(1)+a,i.divRemTo(n,i,o);return o.intValue().toString(e)+a},e.prototype.fromRadix=function(t,r){this.fromInt(0),null==r&&(r=10);for(var n=this.chunkSize(r),i=Math.pow(r,n),o=!1,a=0,s=0,l=0;l<t.length;++l){var c=intAt(t,l);c<0?"-"==t.charAt(l)&&0==this.signum()&&(o=!0):(s=r*s+c,++a>=n&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(r,a)),this.dAddOffset(s,0)),o&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(t,r,n){if("number"==typeof r)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var i=[],o=7&t;i.length=1+(t>>3),r.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},e.prototype.bitwiseTo=function(e,t,r){var n,i,o=Math.min(e.t,this.t);for(n=0;n<o;++n)r[n]=t(this[n],e[n]);if(e.t<this.t){for(i=e.s&this.DM,n=o;n<this.t;++n)r[n]=t(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<e.t;++n)r[n]=t(i,e[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()},e.prototype.changeBit=function(t,r){var n=e.ONE.shiftLeft(t);return this.bitwiseTo(n,r,n),n},e.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},e.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r[--n]=0;for(var i=r.t-this.t;n<i;++n)r[n+this.t]=this.am(0,e[n],r,n,0,this.t);for(i=Math.min(e.t,t);n<i;++n)this.am(0,e[n],r,n,0,t-n);r.clamp()},e.prototype.multiplyUpperTo=function(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r[this.t+n-t]=this.am(t-n,e[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)},e.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},e.prototype.millerRabin=function(t){var r=this.subtract(e.ONE),n=r.getLowestSetBit();if(n<=0)return!1;var i=r.shiftRight(n);(t=t+1>>1)>lowprimes.length&&(t=lowprimes.length);for(var o=nbi(),a=0;a<t;++a){o.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var s=o.modPow(i,this);if(0!=s.compareTo(e.ONE)&&0!=s.compareTo(r)){for(var l=1;l++<n&&0!=s.compareTo(r);)if(0==(s=s.modPowInt(2,this)).compareTo(e.ONE))return!1;if(0!=s.compareTo(r))return!1}}return!0},e.prototype.square=function(){var e=nbi();return this.squareTo(e),e},e.prototype.gcda=function(e,t){var r=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(r.compareTo(n)<0){var i=r;r=n,n=i}var o=r.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)t(r);else{o<a&&(a=o),a>0&&(r.rShiftTo(a,r),n.rShiftTo(a,n));var s=function(){(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),r.compareTo(n)>=0?(r.subTo(n,r),r.rShiftTo(1,r)):(n.subTo(r,n),n.rShiftTo(1,n)),r.signum()>0?setTimeout(s,0):(a>0&&n.lShiftTo(a,n),setTimeout((function(){t(n)}),0))};setTimeout(s,10)}},e.prototype.fromNumberAsync=function(t,r,n,i){if("number"==typeof r)if(t<2)this.fromInt(1);else{this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>t&&o.subTo(e.ONE.shiftLeft(t-1),o),o.isProbablePrime(r)?setTimeout((function(){i()}),0):setTimeout(a,0)};setTimeout(a,0)}else{var s=[],l=7&t;s.length=1+(t>>3),r.nextBytes(s),l>0?s[0]&=(1<<l)-1:s[0]=0,this.fromString(s,256)}},e}(),NullExp=function(){function e(){}return e.prototype.convert=function(e){return e},e.prototype.revert=function(e){return e},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},e.prototype.sqrTo=function(e,t){e.squareTo(t)},e}(),Classic=function(){function e(e){this.m=e}return e.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Montgomery=function(){function e(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return e.prototype.convert=function(e){var t=nbi();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(BigInteger.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(e){var t=nbi();return e.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}(),Barrett=function(){function e(e){this.m=e,this.r2=nbi(),this.q3=nbi(),BigInteger.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return e.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=nbi();return e.copyTo(t),this.reduce(t),t},e.prototype.revert=function(e){return e},e.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},e.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},e}();function nbi(){return new BigInteger(null)}function parseBigInt(e,t){return new BigInteger(e,t)}var inBrowser="undefined"!=typeof navigator;inBrowser&&j_lm&&"Microsoft Internet Explorer"==navigator.appName?(BigInteger.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var l=32767&this[e],c=this[e++]>>15,u=s*l+c*a;i=((l=a*l+((32767&u)<<15)+r[n]+(1073741823&i))>>>30)+(u>>>15)+s*c+(i>>>30),r[n++]=1073741823&l}return i},dbits=30):inBrowser&&j_lm&&"Netscape"!=navigator.appName?(BigInteger.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this[e++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},dbits=26):(BigInteger.prototype.am=function(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var l=16383&this[e],c=this[e++]>>14,u=s*l+c*a;i=((l=a*l+((16383&u)<<14)+r[n]+i)>>28)+(u>>14)+s*c,r[n++]=268435455&l}return i},dbits=28),BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1<<dbits)-1,BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP),BigInteger.prototype.F1=BI_FP-dbits,BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RC=[],rr,vv;for(rr="0".charCodeAt(0),vv=0;vv<=9;++vv)BI_RC[rr++]=vv;for(rr="a".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;for(rr="A".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;function intAt(e,t){var r=BI_RC[e.charCodeAt(t)];return null==r?-1:r}function nbv(e){var t=nbi();return t.fromInt(e),t}function nbits(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}BigInteger.ZERO=nbv(0),BigInteger.ONE=nbv(1);var Arcfour=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(e){var t,r,n;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+e[t%e.length]&255,n=this.S[t],this.S[t]=this.S[r],this.S[r]=n;this.i=0,this.j=0},e.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},e}();function prng_newstate(){return new Arcfour}var rng_psize=256,rng_state,rng_pool=null,rng_pptr;if(null==rng_pool){rng_pool=[],rng_pptr=0;var t=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var z$1=new Uint32Array(256);for(window.crypto.getRandomValues(z$1),t=0;t<z$1.length;++t)rng_pool[rng_pptr++]=255&z$1[t]}var count=0,onMouseMoveListener_1=function(e){if((count=count||0)>=256||rng_pptr>=rng_psize)window.removeEventListener?window.removeEventListener("mousemove",onMouseMoveListener_1,!1):window.detachEvent&&window.detachEvent("onmousemove",onMouseMoveListener_1);else try{var t=e.x+e.y;rng_pool[rng_pptr++]=255&t,count+=1}catch(e){}};"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",onMouseMoveListener_1,!1):window.attachEvent&&window.attachEvent("onmousemove",onMouseMoveListener_1))}function rng_get_byte(){if(null==rng_state){for(rng_state=prng_newstate();rng_pptr<rng_psize;){var e=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=255&e}for(rng_state.init(rng_pool),rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}var SecureRandom=function(){function e(){}return e.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=rng_get_byte()},e}();function pkcs1pad1(e,t){if(t<e.length+22)return console.error("Message too long for RSA"),null;for(var r=t-e.length-6,n="",i=0;i<r;i+=2)n+="ff";return parseBigInt("0001"+n+"00"+e,16)}function pkcs1pad2(e,t){if(t<e.length+11)return console.error("Message too long for RSA"),null;for(var r=[],n=e.length-1;n>=0&&t>0;){var i=e.charCodeAt(n--);i<128?r[--t]=i:i>127&&i<2048?(r[--t]=63&i|128,r[--t]=i>>6|192):(r[--t]=63&i|128,r[--t]=i>>6&63|128,r[--t]=i>>12|224)}r[--t]=0;for(var o=new SecureRandom,a=[];t>2;){for(a[0]=0;0==a[0];)o.nextBytes(a);r[--t]=a[0]}return r[--t]=2,r[--t]=0,new BigInteger(r)}var RSAKey=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},e.prototype.setPublic=function(e,t){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(e){var t=this.n.bitLength()+7>>3,r=pkcs1pad2(e,t);if(null==r)return null;var n=this.doPublic(r);if(null==n)return null;for(var i=n.toString(16),o=i.length,a=0;a<2*t-o;a++)i="0"+i;return i},e.prototype.setPrivate=function(e,t,r){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16),this.d=parseBigInt(r,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(e,t,r,n,i,o,a,s){null!=e&&null!=t&&e.length>0&&t.length>0?(this.n=parseBigInt(e,16),this.e=parseInt(t,16),this.d=parseBigInt(r,16),this.p=parseBigInt(n,16),this.q=parseBigInt(i,16),this.dmp1=parseBigInt(o,16),this.dmq1=parseBigInt(a,16),this.coeff=parseBigInt(s,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(e,t){var r=new SecureRandom,n=e>>1;this.e=parseInt(t,16);for(var i=new BigInteger(t,16);;){for(;this.p=new BigInteger(e-n,1,r),0!=this.p.subtract(BigInteger.ONE).gcd(i).compareTo(BigInteger.ONE)||!this.p.isProbablePrime(10););for(;this.q=new BigInteger(n,1,r),0!=this.q.subtract(BigInteger.ONE).gcd(i).compareTo(BigInteger.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(BigInteger.ONE),s=this.q.subtract(BigInteger.ONE),l=a.multiply(s);if(0==l.gcd(i).compareTo(BigInteger.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(l),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(e){var t=parseBigInt(e,16),r=this.doPrivate(t);return null==r?null:pkcs1unpad2(r,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(e,t,r){var n=new SecureRandom,i=e>>1;this.e=parseInt(t,16);var o=new BigInteger(t,16),a=this,s=function(){var t=function(){if(a.p.compareTo(a.q)<=0){var e=a.p;a.p=a.q,a.q=e}var t=a.p.subtract(BigInteger.ONE),n=a.q.subtract(BigInteger.ONE),i=t.multiply(n);0==i.gcd(o).compareTo(BigInteger.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(t),a.dmq1=a.d.mod(n),a.coeff=a.q.modInverse(a.p),setTimeout((function(){r()}),0)):setTimeout(s,0)},l=function(){a.q=nbi(),a.q.fromNumberAsync(i,1,n,(function(){a.q.subtract(BigInteger.ONE).gcda(o,(function(e){0==e.compareTo(BigInteger.ONE)&&a.q.isProbablePrime(10)?setTimeout(t,0):setTimeout(l,0)}))}))},c=function(){a.p=nbi(),a.p.fromNumberAsync(e-i,1,n,(function(){a.p.subtract(BigInteger.ONE).gcda(o,(function(e){0==e.compareTo(BigInteger.ONE)&&a.p.isProbablePrime(10)?setTimeout(l,0):setTimeout(c,0)}))}))};setTimeout(c,0)};setTimeout(s,0)},e.prototype.sign=function(e,t,r){var n=pkcs1pad1(getDigestHeader(r)+t(e).toString(),this.n.bitLength()/4);if(null==n)return null;var i=this.doPrivate(n);if(null==i)return null;var o=i.toString(16);return 1&o.length?"0"+o:o},e.prototype.verify=function(e,t,r){var n=parseBigInt(t,16),i=this.doPublic(n);return null==i?null:removeDigestHeader(i.toString(16).replace(/^1f+00/,""))==r(e).toString()},e}();function pkcs1unpad2(e,t){for(var r=e.toByteArray(),n=0;n<r.length&&0==r[n];)++n;if(r.length-n!=t-1||2!=r[n])return null;for(++n;0!=r[n];)if(++n>=r.length)return null;for(var i="";++n<r.length;){var o=255&r[n];o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((31&o)<<6|63&r[n+1]),++n):(i+=String.fromCharCode((15&o)<<12|(63&r[n+1])<<6|63&r[n+2]),n+=2)}return i}var DIGEST_HEADERS={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function getDigestHeader(e){return DIGEST_HEADERS[e]||""}function removeDigestHeader(e){for(var t in DIGEST_HEADERS)if(DIGEST_HEADERS.hasOwnProperty(t)){var r=DIGEST_HEADERS[t],n=r.length;if(e.substr(0,n)==r)return e.substr(n)}return e}
|
|
4
4
|
/*!
|
|
5
5
|
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
|
6
6
|
Code licensed under the BSD License:
|
|
@@ -15,7 +15,7 @@ n.version="2.30.1",i(Yr),n.fn=co,n.min=Zr,n.max=Qr,n.now=en,n.utc=p,n.unix=uo,n.
|
|
|
15
15
|
* @since jsrsasign 2.1
|
|
16
16
|
* @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
|
|
17
17
|
*/
|
|
18
|
-
var KJUR={};void 0!==KJUR.asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var r=t.substr(1).length;r%2==1?r+=1:t.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i<r;i++)n+="f";t=new BigInteger(n,16).xor(e).add(BigInteger.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=KJUR.asn1,r=t.DERBoolean,n=t.DERInteger,i=t.DERBitString,o=t.DEROctetString,a=t.DERNull,s=t.DERObjectIdentifier,c=t.DEREnumerated,u=t.DERUTF8String,l=t.DERNumericString,d=t.DERPrintableString,h=t.DERTeletexString,f=t.DERIA5String,p=t.DERUTCTime,m=t.DERGeneralizedTime,g=t.DERSequence,v=t.DERSet,y=t.DERTaggedObject,_=t.ASN1Util.newObject,b=Object.keys(e);if(1!=b.length)throw"key of param shall be only one.";var w=b[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":"))throw"undefined key: "+w;if("bool"==w)return new r(e[w]);if("int"==w)return new n(e[w]);if("bitstr"==w)return new i(e[w]);if("octstr"==w)return new o(e[w]);if("null"==w)return new a(e[w]);if("oid"==w)return new s(e[w]);if("enum"==w)return new c(e[w]);if("utf8str"==w)return new u(e[w]);if("numstr"==w)return new l(e[w]);if("prnstr"==w)return new d(e[w]);if("telstr"==w)return new h(e[w]);if("ia5str"==w)return new f(e[w]);if("utctime"==w)return new p(e[w]);if("gentime"==w)return new m(e[w]);if("seq"==w){for(var D=e[w],S=[],x=0;x<D.length;x++){var T=_(D[x]);S.push(T)}return new g({array:S})}if("set"==w){for(D=e[w],S=[],x=0;x<D.length;x++){T=_(D[x]);S.push(T)}return new v({array:S})}if("tag"==w){var k=e[w];if("[object Array]"===Object.prototype.toString.call(k)&&3==k.length){var P=_(k[2]);return new y({tag:k[0],explicit:k[1],obj:P})}var E={};if(void 0!==k.explicit&&(E.explicit=k.explicit),void 0!==k.tag&&(E.tag=k.tag),void 0===k.obj)throw"obj shall be specified for 'tag'.";return E.obj=_(k.obj),new y(E)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},KJUR.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",r=parseInt(e.substr(0,2),16),n=(t=Math.floor(r/40)+"."+r%40,""),i=2;i<e.length;i+=2){var o=("00000000"+parseInt(e.substr(i,2),16).toString(2)).slice(-8);if(n+=o.substr(1,7),"0"==o.substr(0,1))t=t+"."+new BigInteger(n,2).toString(10),n=""}return t},KJUR.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},r=function(e){var r="",n=new BigInteger(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";n=o+n;for(a=0;a<n.length-1;a+=7){var s=n.substr(a,7);a!=n.length-7&&(s="1"+s),r+=t(parseInt(s,2))}return r};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);n+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)n+=r(i[a]);return n},KJUR.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var r=t.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+r).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},KJUR.asn1.DERAbstractString=function(e){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},YAHOO.lang.extend(KJUR.asn1.DERAbstractString,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractTime=function(e){KJUR.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,r){var n=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substr(2,2));var a=o+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var s=i.getMilliseconds();if(0!=s){var c=n(String(s),3);a=a+"."+(c=c.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,r,n,i,o){var a=new Date(Date.UTC(e,t-1,r,n,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},YAHOO.lang.extend(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractStructured=function(e){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object),KJUR.asn1.DERBoolean=function(){KJUR.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},YAHOO.lang.extend(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object),KJUR.asn1.DERInteger=function(e){KJUR.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new BigInteger(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},YAHOO.lang.extend(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object),KJUR.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=KJUR.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}KJUR.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var r="0"+e;this.hTLV=null,this.isModified=!0,this.hV=r+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var r=0;r<=t;r++)e+="0";var n="";for(r=0;r<e.length-1;r+=8){var i=e.substr(r,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),n+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+t+n},this.setByBooleanArray=function(e){for(var t="",r=0;r<e.length;r++)1==e[r]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},YAHOO.lang.extend(KJUR.asn1.DERBitString,KJUR.asn1.ASN1Object),KJUR.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=KJUR.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}KJUR.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},YAHOO.lang.extend(KJUR.asn1.DEROctetString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNull=function(){KJUR.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},YAHOO.lang.extend(KJUR.asn1.DERNull,KJUR.asn1.ASN1Object),KJUR.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},r=function(e){var r="",n=new BigInteger(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";n=o+n;for(a=0;a<n.length-1;a+=7){var s=n.substr(a,7);a!=n.length-7&&(s="1"+s),r+=t(parseInt(s,2))}return r};KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);n+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)n+=r(i[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.setValueName=function(e){var t=KJUR.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier,KJUR.asn1.ASN1Object),KJUR.asn1.DEREnumerated=function(e){KJUR.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new BigInteger(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},YAHOO.lang.extend(KJUR.asn1.DEREnumerated,KJUR.asn1.ASN1Object),KJUR.asn1.DERUTF8String=function(e){KJUR.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},YAHOO.lang.extend(KJUR.asn1.DERUTF8String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNumericString=function(e){KJUR.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},YAHOO.lang.extend(KJUR.asn1.DERNumericString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERPrintableString=function(e){KJUR.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},YAHOO.lang.extend(KJUR.asn1.DERPrintableString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERTeletexString=function(e){KJUR.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},YAHOO.lang.extend(KJUR.asn1.DERTeletexString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERIA5String=function(e){KJUR.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},YAHOO.lang.extend(KJUR.asn1.DERIA5String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERUTCTime=function(e){KJUR.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},YAHOO.lang.extend(KJUR.asn1.DERUTCTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERGeneralizedTime=function(e){KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERSequence=function(e){KJUR.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++){e+=this.asn1Array[t].getEncodedHex()}return this.hV=e,this.hV}},YAHOO.lang.extend(KJUR.asn1.DERSequence,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERSet=function(e){KJUR.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];e.push(r.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},YAHOO.lang.extend(KJUR.asn1.DERSet,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERTaggedObject=function(e){KJUR.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,r){this.hT=t,this.isExplicit=e,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.tag&&(this.hT=e.tag),void 0!==e.explicit&&(this.isExplicit=e.explicit),void 0!==e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},YAHOO.lang.extend(KJUR.asn1.DERTaggedObject,KJUR.asn1.ASN1Object);var __extends$1=window&&window.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),JSEncryptRSAKey=function(e){function t(r){var n=e.call(this)||this;return r&&("string"==typeof r?n.parseKey(r):(t.hasPrivateKeyProperty(r)||t.hasPublicKeyProperty(r))&&n.parsePropertiesFrom(r)),n}return __extends$1(t,e),t.prototype.parseKey=function(e){try{var t=0,r=0,n=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?Hex.decode(e):Base64.unarmor(e),i=ASN1.decode(n);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){t=i.sub[1].getHexStringValue(),this.n=parseBigInt(t,16),r=i.sub[2].getHexStringValue(),this.e=parseInt(r,16);var o=i.sub[3].getHexStringValue();this.d=parseBigInt(o,16);var a=i.sub[4].getHexStringValue();this.p=parseBigInt(a,16);var s=i.sub[5].getHexStringValue();this.q=parseBigInt(s,16);var c=i.sub[6].getHexStringValue();this.dmp1=parseBigInt(c,16);var u=i.sub[7].getHexStringValue();this.dmq1=parseBigInt(u,16);var l=i.sub[8].getHexStringValue();this.coeff=parseBigInt(l,16)}else{if(2!==i.sub.length)return!1;if(i.sub[0].sub){var d=i.sub[1].sub[0];t=d.sub[0].getHexStringValue(),this.n=parseBigInt(t,16),r=d.sub[1].getHexStringValue(),this.e=parseInt(r,16)}else t=i.sub[0].getHexStringValue(),this.n=parseBigInt(t,16),r=i.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new KJUR.asn1.DERInteger({int:0}),new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e}),new KJUR.asn1.DERInteger({bigint:this.d}),new KJUR.asn1.DERInteger({bigint:this.p}),new KJUR.asn1.DERInteger({bigint:this.q}),new KJUR.asn1.DERInteger({bigint:this.dmp1}),new KJUR.asn1.DERInteger({bigint:this.dmq1}),new KJUR.asn1.DERInteger({bigint:this.coeff})]};return new KJUR.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return hex2b64(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new KJUR.asn1.DERNull]}),t=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e})]}),r=new KJUR.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new KJUR.asn1.DERSequence({array:[e,r]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return hex2b64(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var r="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(r,"g")).join("\n")},t.prototype.getPrivateKey=function(){var e="-----BEGIN RSA PRIVATE KEY-----\n";return e+=t.wordwrap(this.getPrivateBaseKeyB64())+"\n",e+="-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e="-----BEGIN PUBLIC KEY-----\n";return e+=t.wordwrap(this.getPublicBaseKeyB64())+"\n",e+="-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(RSAKey),_a$2,version=void 0!==process$1?null===(_a$2=process$1.env)||void 0===_a$2?void 0:_a$2.npm_package_version:void 0,JSEncrypt=function(){function e(e){void 0===e&&(e={}),e=e||{},this.default_key_size=e.default_key_size?parseInt(e.default_key_size,10):1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}return e.prototype.setKey=function(e){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(e)},e.prototype.setPrivateKey=function(e){this.setKey(e)},e.prototype.setPublicKey=function(e){this.setKey(e)},e.prototype.decrypt=function(e){try{return this.getKey().decrypt(b64tohex(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return hex2b64(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.sign=function(e,t,r){try{return hex2b64(this.getKey().sign(e,t,r))}catch(e){return!1}},e.prototype.verify=function(e,t,r){try{return this.getKey().verify(e,b64tohex(t),r)}catch(e){return!1}},e.prototype.getKey=function(e){if(!this.key){if(this.key=new JSEncryptRSAKey,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=version,e}(),require$$0={},core=createCommonjsModule((function(e,t){var r;e.exports=(r=r||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==commonjsGlobal&&commonjsGlobal.crypto&&(r=commonjsGlobal.crypto),!r&&"function"==typeof commonjsRequire)try{r=require$$0}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=o.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},d=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,o);if(u){for(var d=0;d<u;d+=a)this._doProcessBlock(i,d);r=i.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=f.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=o.algo={};return o}(Math),r)})),x64Core=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.Base,o=n.WordArray,a=t.x64={};a.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n<t;n++){var i=e[n];r.push(i.high),r.push(i.low)}return o.create(r,this.sigBytes)},clone:function(){for(var e=i.clone.call(this),t=e.words=this.words.slice(0),r=t.length,n=0;n<r;n++)t[n]=t[n].clone();return e}})}(),r)})),libTypedarrays=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init,n=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var r=e.byteLength,n=[],i=0;i<r;i++)n[i>>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)})),encUtf16=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i<r;i++)n[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},n.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o+=2){var a=i(t[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var r=e.length,n=[],o=0;o<r;o++)n[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*r)}}}(),r.enc.Utf16)})),encBase64=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray;function n(e,r,n){for(var i=[],o=0,a=0;a<r;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64)})),encBase64url=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray;function n(e,r,n){for(var i=[],o=0,a=0;a<r;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a<n;a+=3)for(var s=(r[a>>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c<n;c++)o.push(i.charAt(s>>>6*(3-c)&63));var u=i.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var r=e.length,i=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<i.length;a++)o[i.charCodeAt(a)]=a}var s=i.charAt(64);if(s){var c=e.indexOf(s);-1!==c&&(r=c)}return n(e,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),r.enc.Base64url)})),md5=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],c=e[t+1],f=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],_=e[t+8],b=e[t+9],w=e[t+10],D=e[t+11],S=e[t+12],x=e[t+13],T=e[t+14],k=e[t+15],P=o[0],E=o[1],A=o[2],C=o[3];P=u(P,E,A,C,a,7,s[0]),C=u(C,P,E,A,c,12,s[1]),A=u(A,C,P,E,f,17,s[2]),E=u(E,A,C,P,p,22,s[3]),P=u(P,E,A,C,m,7,s[4]),C=u(C,P,E,A,g,12,s[5]),A=u(A,C,P,E,v,17,s[6]),E=u(E,A,C,P,y,22,s[7]),P=u(P,E,A,C,_,7,s[8]),C=u(C,P,E,A,b,12,s[9]),A=u(A,C,P,E,w,17,s[10]),E=u(E,A,C,P,D,22,s[11]),P=u(P,E,A,C,S,7,s[12]),C=u(C,P,E,A,x,12,s[13]),A=u(A,C,P,E,T,17,s[14]),P=l(P,E=u(E,A,C,P,k,22,s[15]),A,C,c,5,s[16]),C=l(C,P,E,A,v,9,s[17]),A=l(A,C,P,E,D,14,s[18]),E=l(E,A,C,P,a,20,s[19]),P=l(P,E,A,C,g,5,s[20]),C=l(C,P,E,A,w,9,s[21]),A=l(A,C,P,E,k,14,s[22]),E=l(E,A,C,P,m,20,s[23]),P=l(P,E,A,C,b,5,s[24]),C=l(C,P,E,A,T,9,s[25]),A=l(A,C,P,E,p,14,s[26]),E=l(E,A,C,P,_,20,s[27]),P=l(P,E,A,C,x,5,s[28]),C=l(C,P,E,A,f,9,s[29]),A=l(A,C,P,E,y,14,s[30]),P=d(P,E=l(E,A,C,P,S,20,s[31]),A,C,g,4,s[32]),C=d(C,P,E,A,_,11,s[33]),A=d(A,C,P,E,D,16,s[34]),E=d(E,A,C,P,T,23,s[35]),P=d(P,E,A,C,c,4,s[36]),C=d(C,P,E,A,m,11,s[37]),A=d(A,C,P,E,y,16,s[38]),E=d(E,A,C,P,w,23,s[39]),P=d(P,E,A,C,x,4,s[40]),C=d(C,P,E,A,a,11,s[41]),A=d(A,C,P,E,p,16,s[42]),E=d(E,A,C,P,v,23,s[43]),P=d(P,E,A,C,b,4,s[44]),C=d(C,P,E,A,S,11,s[45]),A=d(A,C,P,E,k,16,s[46]),P=h(P,E=d(E,A,C,P,f,23,s[47]),A,C,a,6,s[48]),C=h(C,P,E,A,y,10,s[49]),A=h(A,C,P,E,T,15,s[50]),E=h(E,A,C,P,g,21,s[51]),P=h(P,E,A,C,S,6,s[52]),C=h(C,P,E,A,p,10,s[53]),A=h(A,C,P,E,w,15,s[54]),E=h(E,A,C,P,c,21,s[55]),P=h(P,E,A,C,_,6,s[56]),C=h(C,P,E,A,k,10,s[57]),A=h(A,C,P,E,v,15,s[58]),E=h(E,A,C,P,x,21,s[59]),P=h(P,E,A,C,m,6,s[60]),C=h(C,P,E,A,D,10,s[61]),A=h(A,C,P,E,f,15,s[62]),E=h(E,A,C,P,b,21,s[63]),o[0]=o[0]+P|0,o[1]=o[1]+E|0,o[2]=o[2]+A|0,o[3]=o[3]+C|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(c),t.HmacMD5=o._createHmacHelper(c)}(Math),r.MD5)})),sha1=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib,n=t.WordArray,i=t.Hasher,o=e.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],c=r[4],u=0;u<80;u++){if(u<16)a[u]=0|e[t+u];else{var l=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=l<<1|l>>>31}var d=(n<<5|n>>>27)+c+a[u];d+=u<20?1518500249+(i&o|~i&s):u<40?1859775393+(i^o^s):u<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,c=s,s=o,o=i<<30|i>>>2,i=n,n=d}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=i._createHelper(s),e.HmacSHA1=i._createHmacHelper(s)}(),r.SHA1)})),sha256=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],c=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),c[i]=r(e.pow(n,1/3)),i++),n++}();var u=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],d=r[6],h=r[7],f=0;f<64;f++){if(f<16)u[f]=0|e[t+f];else{var p=u[f-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=u[f-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[f]=m+u[f-7]+v+u[f-16]}var y=n&i^n&o^i&o,_=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&d)+c[f]+u[f];h=d,d=l,l=s,s=a+b|0,a=o,o=i,i=n,n=b+(_+y)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+l|0,r[6]=r[6]+d|0,r[7]=r[7]+h|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)})),sha224=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray,n=e.algo,i=n.SHA256,o=n.SHA224=i.extend({_doReset:function(){this._hash=new t.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});e.SHA224=i._createHelper(o),e.HmacSHA224=i._createHmacHelper(o)}(),r.SHA224)})),sha512=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],u=[];!function(){for(var e=0;e<80;e++)u[e]=s()}();var l=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],l=r[5],d=r[6],h=r[7],f=n.high,p=n.low,m=i.high,g=i.low,v=o.high,y=o.low,_=a.high,b=a.low,w=s.high,D=s.low,S=l.high,x=l.low,T=d.high,k=d.low,P=h.high,E=h.low,A=f,C=p,O=m,R=g,M=v,I=y,N=_,B=b,F=w,j=D,V=S,$=x,U=T,L=k,z=P,K=E,H=0;H<80;H++){var q,W,Y=u[H];if(H<16)W=Y.high=0|e[t+2*H],q=Y.low=0|e[t+2*H+1];else{var G=u[H-15],J=G.high,X=G.low,Z=(J>>>1|X<<31)^(J>>>8|X<<24)^J>>>7,Q=(X>>>1|J<<31)^(X>>>8|J<<24)^(X>>>7|J<<25),ee=u[H-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=u[H-7],ae=oe.high,se=oe.low,ce=u[H-16],ue=ce.high,le=ce.low;W=(W=(W=Z+ae+((q=Q+se)>>>0<Q>>>0?1:0))+ne+((q+=ie)>>>0<ie>>>0?1:0))+ue+((q+=le)>>>0<le>>>0?1:0),Y.high=W,Y.low=q}var de,he=F&V^~F&U,fe=j&$^~j&L,pe=A&O^A&M^O&M,me=C&R^C&I^R&I,ge=(A>>>28|C<<4)^(A<<30|C>>>2)^(A<<25|C>>>7),ve=(C>>>28|A<<4)^(C<<30|A>>>2)^(C<<25|A>>>7),ye=(F>>>14|j<<18)^(F>>>18|j<<14)^(F<<23|j>>>9),_e=(j>>>14|F<<18)^(j>>>18|F<<14)^(j<<23|F>>>9),be=c[H],we=be.high,De=be.low,Se=z+ye+((de=K+_e)>>>0<K>>>0?1:0),xe=ve+me;z=U,K=L,U=V,L=$,V=F,$=j,F=N+(Se=(Se=(Se=Se+he+((de+=fe)>>>0<fe>>>0?1:0))+we+((de+=De)>>>0<De>>>0?1:0))+W+((de+=q)>>>0<q>>>0?1:0))+((j=B+de|0)>>>0<B>>>0?1:0)|0,N=M,B=I,M=O,I=R,O=A,R=C,A=Se+(ge+pe+(xe>>>0<ve>>>0?1:0))+((C=de+xe|0)>>>0<de>>>0?1:0)|0}p=n.low=p+C,n.high=f+A+(p>>>0<C>>>0?1:0),g=i.low=g+R,i.high=m+O+(g>>>0<R>>>0?1:0),y=o.low=y+I,o.high=v+M+(y>>>0<I>>>0?1:0),b=a.low=b+B,a.high=_+N+(b>>>0<B>>>0?1:0),D=s.low=D+j,s.high=w+F+(D>>>0<j>>>0?1:0),x=l.low=x+$,l.high=S+V+(x>>>0<$>>>0?1:0),k=d.low=k+L,d.high=T+U+(k>>>0<L>>>0?1:0),E=h.low=E+K,h.high=P+z+(E>>>0<K>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),r.SHA512)})),sha384=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.x64,n=t.Word,i=t.WordArray,o=e.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),r.SHA384)})),sha3=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,c=[],u=[],l=[];!function(){for(var e=1,t=0,r=0;r<24;r++){c[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)u[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,d=0,h=0;h<7;h++){if(1&i){var f=(1<<h)-1;f<32?d^=1<<f:s^=1<<f-32}128&i?i=i<<1^113:i<<=1}l[o]=a.create(s,d)}}();var d=[];!function(){for(var e=0;e<25;e++)d[e]=a.create()}();var h=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var r=this._state,n=this.blockSize/2,i=0;i<n;i++){var o=e[t+2*i],a=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(E=r[i]).high^=a,E.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var f=0,p=0,m=0;m<5;m++)f^=(E=r[h+5*m]).high,p^=E.low;var g=d[h];g.high=f,g.low=p}for(h=0;h<5;h++){var v=d[(h+4)%5],y=d[(h+1)%5],_=y.high,b=y.low;for(f=v.high^(_<<1|b>>>31),p=v.low^(b<<1|_>>>31),m=0;m<5;m++)(E=r[h+5*m]).high^=f,E.low^=p}for(var w=1;w<25;w++){var D=(E=r[w]).high,S=E.low,x=c[w];x<32?(f=D<<x|S>>>32-x,p=S<<x|D>>>32-x):(f=S<<x-32|D>>>64-x,p=D<<x-32|S>>>64-x);var T=d[u[w]];T.high=f,T.low=p}var k=d[0],P=r[0];for(k.high=P.high,k.low=P.low,h=0;h<5;h++)for(m=0;m<5;m++){var E=r[w=h+5*m],A=d[w],C=d[(h+1)%5+5*m],O=d[(h+2)%5+5*m];E.high=A.high^~C.high&O.high,E.low=A.low^~C.low&O.low}E=r[0];var R=l[s];E.high^=R.high,E.low^=R.low}},_doFinalize:function(){var t=this._data,r=t.words;this._nDataBytes;var n=8*t.sigBytes,o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,c=s/8,u=[],l=0;l<c;l++){var d=a[l],h=d.high,f=d.low;h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),u.push(f),u.push(h)}return new i.init(u,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(h),t.HmacSHA3=o._createHmacHelper(h)}(Math),r.SHA3)})),ripemd160=createCommonjsModule((function(e,t){var r;e.exports=(r=core,
|
|
18
|
+
var KJUR={};void 0!==KJUR.asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var r=t.substr(1).length;r%2==1?r+=1:t.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i<r;i++)n+="f";t=new BigInteger(n,16).xor(e).add(BigInteger.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t=KJUR.asn1,r=t.DERBoolean,n=t.DERInteger,i=t.DERBitString,o=t.DEROctetString,a=t.DERNull,s=t.DERObjectIdentifier,l=t.DEREnumerated,c=t.DERUTF8String,u=t.DERNumericString,h=t.DERPrintableString,d=t.DERTeletexString,f=t.DERIA5String,p=t.DERUTCTime,m=t.DERGeneralizedTime,g=t.DERSequence,v=t.DERSet,y=t.DERTaggedObject,_=t.ASN1Util.newObject,b=Object.keys(e);if(1!=b.length)throw"key of param shall be only one.";var w=b[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":"))throw"undefined key: "+w;if("bool"==w)return new r(e[w]);if("int"==w)return new n(e[w]);if("bitstr"==w)return new i(e[w]);if("octstr"==w)return new o(e[w]);if("null"==w)return new a(e[w]);if("oid"==w)return new s(e[w]);if("enum"==w)return new l(e[w]);if("utf8str"==w)return new c(e[w]);if("numstr"==w)return new u(e[w]);if("prnstr"==w)return new h(e[w]);if("telstr"==w)return new d(e[w]);if("ia5str"==w)return new f(e[w]);if("utctime"==w)return new p(e[w]);if("gentime"==w)return new m(e[w]);if("seq"==w){for(var D=e[w],x=[],S=0;S<D.length;S++){var k=_(D[S]);x.push(k)}return new g({array:x})}if("set"==w){for(D=e[w],x=[],S=0;S<D.length;S++){k=_(D[S]);x.push(k)}return new v({array:x})}if("tag"==w){var T=e[w];if("[object Array]"===Object.prototype.toString.call(T)&&3==T.length){var P=_(T[2]);return new y({tag:T[0],explicit:T[1],obj:P})}var E={};if(void 0!==T.explicit&&(E.explicit=T.explicit),void 0!==T.tag&&(E.tag=T.tag),void 0===T.obj)throw"obj shall be specified for 'tag'.";return E.obj=_(T.obj),new y(E)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},KJUR.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",r=parseInt(e.substr(0,2),16),n=(t=Math.floor(r/40)+"."+r%40,""),i=2;i<e.length;i+=2){var o=("00000000"+parseInt(e.substr(i,2),16).toString(2)).slice(-8);if(n+=o.substr(1,7),"0"==o.substr(0,1))t=t+"."+new BigInteger(n,2).toString(10),n=""}return t},KJUR.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},r=function(e){var r="",n=new BigInteger(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";n=o+n;for(a=0;a<n.length-1;a+=7){var s=n.substr(a,7);a!=n.length-7&&(s="1"+s),r+=t(parseInt(s,2))}return r};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);n+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)n+=r(i[a]);return n},KJUR.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n=0,v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var r=t.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+r).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},KJUR.asn1.DERAbstractString=function(e){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},YAHOO.lang.extend(KJUR.asn1.DERAbstractString,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractTime=function(e){KJUR.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,r){var n=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substr(2,2));var a=o+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var s=i.getMilliseconds();if(0!=s){var l=n(String(s),3);a=a+"."+(l=l.replace(/[0]+$/,""))}}return a+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,r,n,i,o){var a=new Date(Date.UTC(e,t-1,r,n,i,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},YAHOO.lang.extend(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractStructured=function(e){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object),KJUR.asn1.DERBoolean=function(){KJUR.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},YAHOO.lang.extend(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object),KJUR.asn1.DERInteger=function(e){KJUR.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new BigInteger(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},YAHOO.lang.extend(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object),KJUR.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=KJUR.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}KJUR.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var r="0"+e;this.hTLV=null,this.isModified=!0,this.hV=r+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var r=0;r<=t;r++)e+="0";var n="";for(r=0;r<e.length-1;r+=8){var i=e.substr(r,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),n+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+t+n},this.setByBooleanArray=function(e){for(var t="",r=0;r<e.length;r++)1==e[r]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},YAHOO.lang.extend(KJUR.asn1.DERBitString,KJUR.asn1.ASN1Object),KJUR.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=KJUR.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}KJUR.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},YAHOO.lang.extend(KJUR.asn1.DEROctetString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNull=function(){KJUR.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},YAHOO.lang.extend(KJUR.asn1.DERNull,KJUR.asn1.ASN1Object),KJUR.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},r=function(e){var r="",n=new BigInteger(e,10).toString(2),i=7-n.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";n=o+n;for(a=0;a<n.length-1;a+=7){var s=n.substr(a,7);a!=n.length-7&&(s="1"+s),r+=t(parseInt(s,2))}return r};KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);n+=t(o),i.splice(0,2);for(var a=0;a<i.length;a++)n+=r(i[a]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.setValueName=function(e){var t=KJUR.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier,KJUR.asn1.ASN1Object),KJUR.asn1.DEREnumerated=function(e){KJUR.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new BigInteger(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},YAHOO.lang.extend(KJUR.asn1.DEREnumerated,KJUR.asn1.ASN1Object),KJUR.asn1.DERUTF8String=function(e){KJUR.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},YAHOO.lang.extend(KJUR.asn1.DERUTF8String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNumericString=function(e){KJUR.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},YAHOO.lang.extend(KJUR.asn1.DERNumericString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERPrintableString=function(e){KJUR.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},YAHOO.lang.extend(KJUR.asn1.DERPrintableString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERTeletexString=function(e){KJUR.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},YAHOO.lang.extend(KJUR.asn1.DERTeletexString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERIA5String=function(e){KJUR.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},YAHOO.lang.extend(KJUR.asn1.DERIA5String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERUTCTime=function(e){KJUR.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},YAHOO.lang.extend(KJUR.asn1.DERUTCTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERGeneralizedTime=function(e){KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERSequence=function(e){KJUR.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++){e+=this.asn1Array[t].getEncodedHex()}return this.hV=e,this.hV}},YAHOO.lang.extend(KJUR.asn1.DERSequence,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERSet=function(e){KJUR.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];e.push(r.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},YAHOO.lang.extend(KJUR.asn1.DERSet,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERTaggedObject=function(e){KJUR.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,r){this.hT=t,this.isExplicit=e,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.tag&&(this.hT=e.tag),void 0!==e.explicit&&(this.isExplicit=e.explicit),void 0!==e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},YAHOO.lang.extend(KJUR.asn1.DERTaggedObject,KJUR.asn1.ASN1Object);var __extends$1=window&&window.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),JSEncryptRSAKey=function(e){function t(r){var n=e.call(this)||this;return r&&("string"==typeof r?n.parseKey(r):(t.hasPrivateKeyProperty(r)||t.hasPublicKeyProperty(r))&&n.parsePropertiesFrom(r)),n}return __extends$1(t,e),t.prototype.parseKey=function(e){try{var t=0,r=0,n=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?Hex.decode(e):Base64.unarmor(e),i=ASN1.decode(n);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){t=i.sub[1].getHexStringValue(),this.n=parseBigInt(t,16),r=i.sub[2].getHexStringValue(),this.e=parseInt(r,16);var o=i.sub[3].getHexStringValue();this.d=parseBigInt(o,16);var a=i.sub[4].getHexStringValue();this.p=parseBigInt(a,16);var s=i.sub[5].getHexStringValue();this.q=parseBigInt(s,16);var l=i.sub[6].getHexStringValue();this.dmp1=parseBigInt(l,16);var c=i.sub[7].getHexStringValue();this.dmq1=parseBigInt(c,16);var u=i.sub[8].getHexStringValue();this.coeff=parseBigInt(u,16)}else{if(2!==i.sub.length)return!1;if(i.sub[0].sub){var h=i.sub[1].sub[0];t=h.sub[0].getHexStringValue(),this.n=parseBigInt(t,16),r=h.sub[1].getHexStringValue(),this.e=parseInt(r,16)}else t=i.sub[0].getHexStringValue(),this.n=parseBigInt(t,16),r=i.sub[1].getHexStringValue(),this.e=parseInt(r,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new KJUR.asn1.DERInteger({int:0}),new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e}),new KJUR.asn1.DERInteger({bigint:this.d}),new KJUR.asn1.DERInteger({bigint:this.p}),new KJUR.asn1.DERInteger({bigint:this.q}),new KJUR.asn1.DERInteger({bigint:this.dmp1}),new KJUR.asn1.DERInteger({bigint:this.dmq1}),new KJUR.asn1.DERInteger({bigint:this.coeff})]};return new KJUR.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return hex2b64(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new KJUR.asn1.DERNull]}),t=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e})]}),r=new KJUR.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new KJUR.asn1.DERSequence({array:[e,r]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return hex2b64(this.getPublicBaseKey())},t.wordwrap=function(e,t){if(!e)return e;var r="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})";return e.match(RegExp(r,"g")).join("\n")},t.prototype.getPrivateKey=function(){var e="-----BEGIN RSA PRIVATE KEY-----\n";return e+=t.wordwrap(this.getPrivateBaseKeyB64())+"\n",e+="-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){var e="-----BEGIN PUBLIC KEY-----\n";return e+=t.wordwrap(this.getPublicBaseKeyB64())+"\n",e+="-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(RSAKey),_a$2,version=void 0!==process$1?null===(_a$2=process$1.env)||void 0===_a$2?void 0:_a$2.npm_package_version:void 0,JSEncrypt=function(){function e(e){void 0===e&&(e={}),e=e||{},this.default_key_size=e.default_key_size?parseInt(e.default_key_size,10):1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}return e.prototype.setKey=function(e){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(e)},e.prototype.setPrivateKey=function(e){this.setKey(e)},e.prototype.setPublicKey=function(e){this.setKey(e)},e.prototype.decrypt=function(e){try{return this.getKey().decrypt(b64tohex(e))}catch(e){return!1}},e.prototype.encrypt=function(e){try{return hex2b64(this.getKey().encrypt(e))}catch(e){return!1}},e.prototype.sign=function(e,t,r){try{return hex2b64(this.getKey().sign(e,t,r))}catch(e){return!1}},e.prototype.verify=function(e,t,r){try{return this.getKey().verify(e,b64tohex(t),r)}catch(e){return!1}},e.prototype.getKey=function(e){if(!this.key){if(this.key=new JSEncryptRSAKey,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=version,e}(),require$$0={},core=createCommonjsModule((function(e,t){var r;e.exports=(r=r||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==commonjsGlobal&&commonjsGlobal.crypto&&(r=commonjsGlobal.crypto),!r&&"function"==typeof commonjsRequire)try{r=require$$0}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),o={},a=o.lib={},s=a.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var a=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new l.init(t,e)}}),c=o.enc={},u=c.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new l.init(r,t/2)}},h=c.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new l.init(r,t)}},d=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,o=n.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,u=e.min(4*c,o);if(c){for(var h=0;h<c;h+=a)this._doProcessBlock(i,h);r=i.splice(0,c),n.sigBytes-=u}return new l.init(r,u)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=f.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=o.algo={};return o}(Math),r)})),x64Core=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.Base,o=n.WordArray,a=t.x64={};a.Word=i.extend({init:function(e,t){this.high=e,this.low=t}}),a.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var e=this.words,t=e.length,r=[],n=0;n<t;n++){var i=e[n];r.push(i.high),r.push(i.low)}return o.create(r,this.sigBytes)},clone:function(){for(var e=i.clone.call(this),t=e.words=this.words.slice(0),r=t.length,n=0;n<r;n++)t[n]=t[n].clone();return e}})}(),r)})),libTypedarrays=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init,n=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var r=e.byteLength,n=[],i=0;i<r;i++)n[i>>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)};n.prototype=e}}(),r.lib.WordArray)})),encUtf16=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray,n=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var r=e.length,n=[],i=0;i<r;i++)n[i>>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r)}},n.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o+=2){var a=i(t[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var r=e.length,n=[],o=0;o<r;o++)n[o>>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*r)}}}(),r.enc.Utf16)})),encBase64=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray;function n(e,r,n){for(var i=[],o=0,a=0;a<r;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<r;s++)i.push(n.charAt(a>>>6*(3-s)&63));var l=n.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64)})),encBase64url=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray;function n(e,r,n){for(var i=[],o=0,a=0;a<r;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;i[o>>>2]|=s<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var r=e.words,n=e.sigBytes,i=t?this._safe_map:this._map;e.clamp();for(var o=[],a=0;a<n;a+=3)for(var s=(r[a>>>2]>>>24-a%4*8&255)<<16|(r[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|r[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l<n;l++)o.push(i.charAt(s>>>6*(3-l)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t){void 0===t&&(t=!0);var r=e.length,i=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<i.length;a++)o[i.charCodeAt(a)]=a}var s=i.charAt(64);if(s){var l=e.indexOf(s);-1!==l&&(r=l)}return n(e,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),r.enc.Base64url)})),md5=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],l=e[t+1],f=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],_=e[t+8],b=e[t+9],w=e[t+10],D=e[t+11],x=e[t+12],S=e[t+13],k=e[t+14],T=e[t+15],P=o[0],E=o[1],C=o[2],A=o[3];P=c(P,E,C,A,a,7,s[0]),A=c(A,P,E,C,l,12,s[1]),C=c(C,A,P,E,f,17,s[2]),E=c(E,C,A,P,p,22,s[3]),P=c(P,E,C,A,m,7,s[4]),A=c(A,P,E,C,g,12,s[5]),C=c(C,A,P,E,v,17,s[6]),E=c(E,C,A,P,y,22,s[7]),P=c(P,E,C,A,_,7,s[8]),A=c(A,P,E,C,b,12,s[9]),C=c(C,A,P,E,w,17,s[10]),E=c(E,C,A,P,D,22,s[11]),P=c(P,E,C,A,x,7,s[12]),A=c(A,P,E,C,S,12,s[13]),C=c(C,A,P,E,k,17,s[14]),P=u(P,E=c(E,C,A,P,T,22,s[15]),C,A,l,5,s[16]),A=u(A,P,E,C,v,9,s[17]),C=u(C,A,P,E,D,14,s[18]),E=u(E,C,A,P,a,20,s[19]),P=u(P,E,C,A,g,5,s[20]),A=u(A,P,E,C,w,9,s[21]),C=u(C,A,P,E,T,14,s[22]),E=u(E,C,A,P,m,20,s[23]),P=u(P,E,C,A,b,5,s[24]),A=u(A,P,E,C,k,9,s[25]),C=u(C,A,P,E,p,14,s[26]),E=u(E,C,A,P,_,20,s[27]),P=u(P,E,C,A,S,5,s[28]),A=u(A,P,E,C,f,9,s[29]),C=u(C,A,P,E,y,14,s[30]),P=h(P,E=u(E,C,A,P,x,20,s[31]),C,A,g,4,s[32]),A=h(A,P,E,C,_,11,s[33]),C=h(C,A,P,E,D,16,s[34]),E=h(E,C,A,P,k,23,s[35]),P=h(P,E,C,A,l,4,s[36]),A=h(A,P,E,C,m,11,s[37]),C=h(C,A,P,E,y,16,s[38]),E=h(E,C,A,P,w,23,s[39]),P=h(P,E,C,A,S,4,s[40]),A=h(A,P,E,C,a,11,s[41]),C=h(C,A,P,E,p,16,s[42]),E=h(E,C,A,P,v,23,s[43]),P=h(P,E,C,A,b,4,s[44]),A=h(A,P,E,C,x,11,s[45]),C=h(C,A,P,E,T,16,s[46]),P=d(P,E=h(E,C,A,P,f,23,s[47]),C,A,a,6,s[48]),A=d(A,P,E,C,y,10,s[49]),C=d(C,A,P,E,k,15,s[50]),E=d(E,C,A,P,g,21,s[51]),P=d(P,E,C,A,x,6,s[52]),A=d(A,P,E,C,p,10,s[53]),C=d(C,A,P,E,w,15,s[54]),E=d(E,C,A,P,l,21,s[55]),P=d(P,E,C,A,_,6,s[56]),A=d(A,P,E,C,T,10,s[57]),C=d(C,A,P,E,v,15,s[58]),E=d(E,C,A,P,S,21,s[59]),P=d(P,E,C,A,m,6,s[60]),A=d(A,P,E,C,D,10,s[61]),C=d(C,A,P,E,f,15,s[62]),E=d(E,C,A,P,b,21,s[63]),o[0]=o[0]+P|0,o[1]=o[1]+E|0,o[2]=o[2]+C|0,o[3]=o[3]+A|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var o=e.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<<o|s>>>32-o)+t}function u(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),r.MD5)})),sha1=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib,n=t.WordArray,i=t.Hasher,o=e.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],l=r[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var u=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=u<<1|u>>>31}var h=(n<<5|n>>>27)+l+a[c];h+=c<20?1518500249+(i&o|~i&s):c<40?1859775393+(i^o^s):c<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,l=s,s=o,o=i<<30|i>>>2,i=n,n=h}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=i._createHelper(s),e.HmacSHA1=i._createHmacHelper(s)}(),r.SHA1)})),sha256=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=[],l=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),l[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],h=r[6],d=r[7],f=0;f<64;f++){if(f<16)c[f]=0|e[t+f];else{var p=c[f-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=c[f-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[f]=m+c[f-7]+v+c[f-16]}var y=n&i^n&o^i&o,_=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),b=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&h)+l[f]+c[f];d=h,h=u,u=s,s=a+b|0,a=o,o=i,i=n,n=b+(_+y)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+u|0,r[6]=r[6]+h|0,r[7]=r[7]+d|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(u),t.HmacSHA256=o._createHmacHelper(u)}(Math),r.SHA256)})),sha224=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.WordArray,n=e.algo,i=n.SHA256,o=n.SHA224=i.extend({_doReset:function(){this._hash=new t.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}});e.SHA224=i._createHelper(o),e.HmacSHA224=i._createHmacHelper(o)}(),r.SHA224)})),sha512=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.Hasher,n=e.x64,i=n.Word,o=n.WordArray,a=e.algo;function s(){return i.create.apply(i,arguments)}var l=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=t.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],h=r[6],d=r[7],f=n.high,p=n.low,m=i.high,g=i.low,v=o.high,y=o.low,_=a.high,b=a.low,w=s.high,D=s.low,x=u.high,S=u.low,k=h.high,T=h.low,P=d.high,E=d.low,C=f,A=p,O=m,M=g,R=v,I=y,N=_,B=b,F=w,j=D,V=x,$=S,U=k,L=T,z=P,K=E,H=0;H<80;H++){var q,W,Y=c[H];if(H<16)W=Y.high=0|e[t+2*H],q=Y.low=0|e[t+2*H+1];else{var G=c[H-15],J=G.high,X=G.low,Z=(J>>>1|X<<31)^(J>>>8|X<<24)^J>>>7,Q=(X>>>1|J<<31)^(X>>>8|J<<24)^(X>>>7|J<<25),ee=c[H-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=c[H-7],ae=oe.high,se=oe.low,le=c[H-16],ce=le.high,ue=le.low;W=(W=(W=Z+ae+((q=Q+se)>>>0<Q>>>0?1:0))+ne+((q+=ie)>>>0<ie>>>0?1:0))+ce+((q+=ue)>>>0<ue>>>0?1:0),Y.high=W,Y.low=q}var he,de=F&V^~F&U,fe=j&$^~j&L,pe=C&O^C&R^O&R,me=A&M^A&I^M&I,ge=(C>>>28|A<<4)^(C<<30|A>>>2)^(C<<25|A>>>7),ve=(A>>>28|C<<4)^(A<<30|C>>>2)^(A<<25|C>>>7),ye=(F>>>14|j<<18)^(F>>>18|j<<14)^(F<<23|j>>>9),_e=(j>>>14|F<<18)^(j>>>18|F<<14)^(j<<23|F>>>9),be=l[H],we=be.high,De=be.low,xe=z+ye+((he=K+_e)>>>0<K>>>0?1:0),Se=ve+me;z=U,K=L,U=V,L=$,V=F,$=j,F=N+(xe=(xe=(xe=xe+de+((he+=fe)>>>0<fe>>>0?1:0))+we+((he+=De)>>>0<De>>>0?1:0))+W+((he+=q)>>>0<q>>>0?1:0))+((j=B+he|0)>>>0<B>>>0?1:0)|0,N=R,B=I,R=O,I=M,O=C,M=A,C=xe+(ge+pe+(Se>>>0<ve>>>0?1:0))+((A=he+Se|0)>>>0<he>>>0?1:0)|0}p=n.low=p+A,n.high=f+C+(p>>>0<A>>>0?1:0),g=i.low=g+M,i.high=m+O+(g>>>0<M>>>0?1:0),y=o.low=y+I,o.high=v+R+(y>>>0<I>>>0?1:0),b=a.low=b+B,a.high=_+N+(b>>>0<B>>>0?1:0),D=s.low=D+j,s.high=w+F+(D>>>0<j>>>0?1:0),S=u.low=S+$,u.high=x+V+(S>>>0<$>>>0?1:0),T=h.low=T+L,h.high=k+U+(T>>>0<L>>>0?1:0),E=d.low=E+K,d.high=P+z+(E>>>0<K>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(u),e.HmacSHA512=t._createHmacHelper(u)}(),r.SHA512)})),sha384=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.x64,n=t.Word,i=t.WordArray,o=e.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),r.SHA384)})),sha3=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.x64.Word,s=t.algo,l=[],c=[],u=[];!function(){for(var e=1,t=0,r=0;r<24;r++){l[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,h=0,d=0;d<7;d++){if(1&i){var f=(1<<d)-1;f<32?h^=1<<f:s^=1<<f-32}128&i?i=i<<1^113:i<<=1}u[o]=a.create(s,h)}}();var h=[];!function(){for(var e=0;e<25;e++)h[e]=a.create()}();var d=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var r=this._state,n=this.blockSize/2,i=0;i<n;i++){var o=e[t+2*i],a=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(E=r[i]).high^=a,E.low^=o}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var f=0,p=0,m=0;m<5;m++)f^=(E=r[d+5*m]).high,p^=E.low;var g=h[d];g.high=f,g.low=p}for(d=0;d<5;d++){var v=h[(d+4)%5],y=h[(d+1)%5],_=y.high,b=y.low;for(f=v.high^(_<<1|b>>>31),p=v.low^(b<<1|_>>>31),m=0;m<5;m++)(E=r[d+5*m]).high^=f,E.low^=p}for(var w=1;w<25;w++){var D=(E=r[w]).high,x=E.low,S=l[w];S<32?(f=D<<S|x>>>32-S,p=x<<S|D>>>32-S):(f=x<<S-32|D>>>64-S,p=D<<S-32|x>>>64-S);var k=h[c[w]];k.high=f,k.low=p}var T=h[0],P=r[0];for(T.high=P.high,T.low=P.low,d=0;d<5;d++)for(m=0;m<5;m++){var E=r[w=d+5*m],C=h[w],A=h[(d+1)%5+5*m],O=h[(d+2)%5+5*m];E.high=C.high^~A.high&O.high,E.low=C.low^~A.low&O.low}E=r[0];var M=u[s];E.high^=M.high,E.low^=M.low}},_doFinalize:function(){var t=this._data,r=t.words;this._nDataBytes;var n=8*t.sigBytes,o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,l=s/8,c=[],u=0;u<l;u++){var h=a[u],d=h.high,f=h.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c.push(f),c.push(d)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});t.SHA3=o._createHelper(d),t.HmacSHA3=o._createHmacHelper(d)}(Math),r.SHA3)})),ripemd160=createCommonjsModule((function(e,t){var r;e.exports=(r=core,
|
|
19
19
|
/** @preserve
|
|
20
20
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
21
21
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
@@ -23,13 +23,13 @@ var KJUR={};void 0!==KJUR.asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new
|
|
|
23
23
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
24
24
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
25
25
|
*/
|
|
26
|
-
function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),
|
|
26
|
+
function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,f,b,w,D,x,S,k,T,P,E=this._hash.words,C=h.words,A=d.words,O=s.words,M=l.words,R=c.words,I=u.words;for(D=o=E[0],x=a=E[1],S=f=E[2],k=b=E[3],T=w=E[4],r=0;r<80;r+=1)P=o+e[t+O[r]]|0,P+=r<16?p(a,f,b)+C[0]:r<32?m(a,f,b)+C[1]:r<48?g(a,f,b)+C[2]:r<64?v(a,f,b)+C[3]:y(a,f,b)+C[4],P=(P=_(P|=0,R[r]))+w|0,o=w,w=b,b=_(f,10),f=a,a=P,P=D+e[t+M[r]]|0,P+=r<16?y(x,S,k)+A[0]:r<32?v(x,S,k)+A[1]:r<48?g(x,S,k)+A[2]:r<64?m(x,S,k)+A[3]:p(x,S,k)+A[4],P=(P=_(P|=0,I[r]))+T|0,D=T,T=k,k=_(S,10),S=x,x=P;P=E[1]+f+k|0,E[1]=E[2]+b+T|0,E[2]=E[3]+w+D|0,E[3]=E[4]+o+x|0,E[4]=E[0]+a+S|0,E[0]=P},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,r){return e^t^r}function m(e,t,r){return e&t|~e&r}function g(e,t,r){return(e|~t)^r}function v(e,t,r){return e&r|t&~r}function y(e,t,r){return e^(t|~r)}function _(e,t){return e<<t|e>>>32-t}t.RIPEMD160=o._createHelper(f),t.HmacRIPEMD160=o._createHmacHelper(f)}(),r.RIPEMD160)})),hmac=createCommonjsModule((function(e,t){var r;e.exports=(r=core,void function(){var e=r,t=e.lib.Base,n=e.enc.Utf8;e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,l=a.words,c=0;c<r;c++)s[c]^=1549556828,l[c]^=909522486;o.sigBytes=a.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}())})),pbkdf2=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib,n=t.Base,i=t.WordArray,o=e.algo,a=o.SHA256,s=o.HMAC,l=o.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=s.create(r.hasher,e),o=i.create(),a=i.create([1]),l=o.words,c=a.words,u=r.keySize,h=r.iterations;l.length<u;){var d=n.update(t).finalize(a);n.reset();for(var f=d.words,p=f.length,m=d,g=1;g<h;g++){m=n.finalize(m),n.reset();for(var v=m.words,y=0;y<p;y++)f[y]^=v[y]}o.concat(d),c[0]++}return o.sigBytes=4*u,o}});e.PBKDF2=function(e,t,r){return l.create(r).compute(e,t)}}(),r.PBKDF2)})),evpkdf=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib,n=t.Base,i=t.WordArray,o=e.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,o=n.hasher.create(),a=i.create(),s=a.words,l=n.keySize,c=n.iterations;s.length<l;){r&&o.update(r),r=o.update(e).finalize(t),o.reset();for(var u=1;u<c;u++)r=o.finalize(r),o.reset();a.concat(r)}return a.sigBytes=4*l,a}});e.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)}}(),r.EvpKDF)})),cipherCore=createCommonjsModule((function(e,t){var r;e.exports=void((r=core).lib.Cipher||function(e){var t=r,n=t.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=t.enc;s.Utf8;var l=s.Base64,c=t.algo.EvpKDF,u=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?_:v}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()});n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var h=t.mode={},d=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=h.CBC=function(){var t=d.extend();function r(t,r,n){var i,o=this._iv;o?(i=o,this._iv=e):i=this._prevBlock;for(var a=0;a<n;a++)t[r+a]^=i[a]}return t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=e.slice(t,t+i);n.decryptBlock(e,t),r.call(this,e,t,i),this._prevBlock=o}}),t}(),p=(t.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,a=[],s=0;s<n;s+=4)a.push(i);var l=o.create(a,n);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:p}),reset:function(){var e;u.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?o.create([1398893684,1701076831]).concat(r).concat(t):t).toString(l)},parse:function(e){var t,r=l.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=o.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),m.create({ciphertext:r,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return m.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(t.kdf={}).OpenSSL={execute:function(e,t,r,n,i){if(n||(n=o.random(8)),i)a=c.create({keySize:t+r,hasher:i}).compute(e,n);else var a=c.create({keySize:t+r}).compute(e,n);var s=o.create(a.words.slice(t),4*r);return a.sigBytes=4*t,m.create({key:a,iv:s,salt:n})}},_=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=i.iv,v.decrypt.call(this,e,t,i.key,n)}})}())})),modeCfb=createCommonjsModule((function(e,t){var r;e.exports=((r=core).mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,r,n){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,n.encryptBlock(i,0);for(var a=0;a<r;a++)e[t+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize;t.call(this,e,r,i,n),this._prevBlock=e.slice(r,r+i)}}),e.Decryptor=e.extend({processBlock:function(e,r){var n=this._cipher,i=n.blockSize,o=e.slice(r,r+i);t.call(this,e,r,i,n),this._prevBlock=o}}),e}(),r.mode.CFB)})),modeCtr=createCommonjsModule((function(e,t){var r,n,i;e.exports=((i=core).mode.CTR=(r=i.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var a=o.slice(0);r.encryptBlock(a,0),o[n-1]=o[n-1]+1|0;for(var s=0;s<n;s++)e[t+s]^=a[s]}}),r.Decryptor=n,r),i.mode.CTR)})),modeCtrGladman=createCommonjsModule((function(e,t){var r;e.exports=(
|
|
27
27
|
/** @preserve
|
|
28
28
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
29
29
|
* derived from CryptoJS.mode.CTR
|
|
30
30
|
* Jan Hruby jhruby.web@gmail.com
|
|
31
31
|
*/
|
|
32
|
-
(r=core).mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}return e}function n(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var i=e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),n(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c<i;c++)e[t+c]^=s[c]}});return e.Decryptor=i,e}(),r.mode.CTRGladman)})),modeOfb=createCommonjsModule((function(e,t){var r,n,i;e.exports=((i=core).mode.OFB=(r=i.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var a=0;a<n;a++)e[t+a]^=o[a]}}),r.Decryptor=n,r),i.mode.OFB)})),modeEcb=createCommonjsModule((function(e,t){var r,n;e.exports=((n=core).mode.ECB=((r=n.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),r.Decryptor=r.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),r),n.mode.ECB)})),padAnsix923=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,o=r+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)})),padIso10126=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)})),padIso97971=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)})),padZeropadding=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},r.pad.ZeroPadding)})),padNopadding=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)})),formatHex=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib.CipherParams,i=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return n.create({ciphertext:t})}}}(),r.format.Hex)})),aes=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],c=[],u=[],l=[],d=[],h=[],f=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var m=e[r],g=e[m],v=e[g],y=257*e[p]^16843008*p;a[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,u[r]=y,y=16843009*v^65537*g^257*m^16843008*r,l[p]=y<<24|y>>>8,d[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,f[p]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(u=o[a-1],a%r?r>6&&a%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=p[a/r|0]<<24),o[a]=o[a-r]^u);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var u=o[a];else u=o[a-4];s[c]=c<4||a<=4?u:l[i[u>>>24]]^d[i[u>>>16&255]]^h[i[u>>>8&255]]^f[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,d,h,f,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],d=e[t+2]^r[2],h=e[t+3]^r[3],f=4,p=1;p<c;p++){var m=n[u>>>24]^i[l>>>16&255]^o[d>>>8&255]^a[255&h]^r[f++],g=n[l>>>24]^i[d>>>16&255]^o[h>>>8&255]^a[255&u]^r[f++],v=n[d>>>24]^i[h>>>16&255]^o[u>>>8&255]^a[255&l]^r[f++],y=n[h>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&d]^r[f++];u=m,l=g,d=v,h=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^r[f++],g=(s[l>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[f++],v=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[f++],y=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&d])^r[f++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)})),tripledes=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var u=i[o]=[],l=c[o];for(r=0;r<24;r++)u[r/6|0]|=t[(s[r]-1+l)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(s[r+24]-1+l)%28]<<31-r%6;for(u[0]=u[0]<<1|u[0]>>>31,r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}var d=this._invSubKeys=[];for(r=0;r<16;r++)d[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=u[c][((a^i[c])&l[c])>>>0];this._lBlock=a,this._rBlock=o^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,h.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function f(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}e.DES=i._createHelper(d);var p=o.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(t)),this._des2=d.createEncryptor(n.create(r)),this._des3=d.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)})),rc4=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var c=n[i];n[i]=n[o],n[o]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)})),rabbit=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=u>>>16|4294901760&l,h=l<<16|65535&u;for(i[0]^=u,i[1]^=d,i[2]^=l,i[3]^=h,i[4]^=u,i[5]^=d,i[6]^=l,i[7]^=h,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)})),rabbitLegacy=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=u>>>16|4294901760&l,h=l<<16|65535&u;for(n[0]^=u,n[1]^=d,n[2]^=l,n[3]^=h,n[4]^=u,n[5]^=d,n[6]^=l,n[7]^=h,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)})),blowfish=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.BlockCipher,n=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function c(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][r]+e.sbox[1][n];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function u(e,t,r){let n,o=t,a=r;for(let t=0;t<i;++t)o^=e.pbox[t],a=c(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[i],o^=e.pbox[i+1],{left:o,right:a}}function l(e,t,r){let n,o=t,a=r;for(let t=i+1;t>1;--t)o^=e.pbox[t],a=c(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[1],o^=e.pbox[0],{left:o,right:a}}function d(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=a[t][r]}let n=0;for(let a=0;a<i+2;a++)e.pbox[a]=o[a]^t[n],n++,n>=r&&(n=0);let s=0,c=0,l=0;for(let t=0;t<i+2;t+=2)l=u(e,s,c),s=l.left,c=l.right,e.pbox[t]=s,e.pbox[t+1]=c;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)l=u(e,s,c),s=l.left,c=l.right,e.sbox[t][r]=s,e.sbox[t][r+1]=c;return!0}var h=n.Blowfish=t.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4;d(s,t,r)}},encryptBlock:function(e,t){var r=u(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},decryptBlock:function(e,t){var r=l(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(h)}(),r.Blowfish)})),cryptoJs=createCommonjsModule((function(e,t){e.exports=core}));function setSessionData(e,t){var r=JSON.stringify(t);sessionStorage.setItem(e,r)}function getSessionData(e){var t=sessionStorage.getItem(e);return t?JSON.parse(t):null}var updataSizeDeep=function(e,t){try{var r=t.xRatio,n=t.yRatio;return isNaN(r)||isNaN(n)?(console.error("发生错误:on updataSizeDeep in go-code "),e):(e.forEach((function(e){var i;e.baseData.left=e.baseData.left*r,e.baseData.width=e.baseData.width*r,e.baseData.top=e.baseData.top*n,e.baseData.height=e.baseData.height*n,e.baseData.angle=e.baseData.angle,(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)&&updataSizeDeep(null==e?void 0:e.children,t)})),e)}catch(t){return e}},checkBaseData=function(e,t){var r=!0;try{for(var n=0,i=["width","height","left","top","opacity","angel","skewY","skewX","rotateX","rotateY"];n<i.length;n++){var o=i[n];if(Object.hasOwn(e,o)&&isNaN(e[o])){if(!("string"==typeof e[o]&&e[o].includes("%")||"NaN"==e[o])){console.warn(o+"--参数校验不合法:"+t),r=!1;break}r=!0}}return r}catch(e){return console.warn("参数校验不合法:"+t),!1}},arraySwap=function(e,t,r){var n=e[r];return e.splice(r,1),e.splice(t,0,n),e},arraySwapForId=function(e,t,r){var n=_$1.findIndex(e,(function(e){return e.cid==r})),i=_$1.findIndex(e,(function(e){return e.cid==t}));return arraySwap(e,i,n)},arraySwapDeep=function(e,t,r){for(var n=-1,i=0;i<e.length;i++){var o=e[i];if(o.children&&o.children.length)for(var a=0;a<o.children.length;a++){if(n=a,o.children[a].cid===r){switch(t){case"up":n>=1&&arraySwap(o.children,n-1,n);break;case"down":n<o.children.length-2&&arraySwap(o.children,n+1,n);break;case"top":0!==n&&arraySwap(o.children,0,n);break;case"bottom":var s=o.children.length-1;n!==s&&arraySwap(o.children,s,n)}break}}}return e},findItemDeep$1=function(e,t,r){var n=!1,i=function(e){for(var o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(function(e){return e.cid==t}));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){for(var a=Array.from(e[o].dynamicChildren),s=0;s<a.length;s++)if(a[s]instanceof Array){var c=a[s][1];i(c)}}else if(e[o].dynamicChildren instanceof Array)for(a=e[o].dynamicChildren,s=0;s<a.length;s++)if(a[s]instanceof Array){c=a[s][1];i(c)}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1},getAncestorsNodes=function(e,t){var r=[],n=function(e){for(var i=0;i<e.length;i++){if(e[i].cid===t)return!0;if(Array.isArray(e[i].children)){if(n(e[i].children))return r.push(e[i]),!0;n(e[i].children)}}};return n(e),r},findItemIndexDeep=function(e,t){for(var r,n=0,i=0;i<e.length;i++){var o=e[i];if(n+=1,o.cid==t)break;if(null===(r=null==o?void 0:o.children)||void 0===r?void 0:r.length)for(var a=0;a<(null==o?void 0:o.children.length);a++){if(n+=1,(null==o?void 0:o.children[a]).cid==t)return n}}return n},getLength=function(e){var t=0,r=function(e){for(var n=function(n){if(e[n].isShow&&e[n].children)r(e[n].children);else if(e[n].isShow&&e[n].dynamicChildren){if(e[n].dynamicChildren instanceof Map){for(var i=Array.from(e[n].dynamicChildren),o=0;o<i.length;o++)if(i[o]instanceof Array){var a=i[o][1];r(a)}}else if(e[n].isShow&&e[n].dynamicChildren instanceof Array){var s=e[n].dynamicChildren.find((function(t){return t[0]=e[n].activeDynamic}));s&&s.length&&r(s[1])}}else e[n].isShow&&e[n].stateChildren?r(e[n].stateChildren):e[n].isShow&&t++},i=0;i<e.length;i++)n(i)};return r(e),t||!1},findParentDeep=function(e,t){var r=null,n=function(e,i){for(var o=0,a=e;o<a.length;o++){var s=a[o];if(s.cid==t){r=i;break}if(s.children)n(s.children,s);else if(s.dynamicChildren)if(s.dynamicChildren instanceof Map){for(var c=Array.from(s.dynamicChildren),u=0;u<c.length;u++)if(c[u]instanceof Array){var l=c[u][1];n(l,s)}}else s.dynamicChildren;else s.stateChildren&&n(s.stateChildren,s)}};return n(e,null),r||!1},findItem=function(e,t,r){for(var n,i=function(i){var o=e[i];if(o.cid===t)return n=o,r&&e.splice(i,1),{value:n};if(o.children&&o.children.length){for(var a=0;a<o.children.length;a++)if(o.children[a].cid===t)return n=o.children[a],r&&o.children.splice(a,1),{value:n}}else if(o.stateChildren&&o.stateChildren.length){for(a=0;a<o.stateChildren.length;a++)if(o.stateChildren[a].cid===t)return n=o.stateChildren[a],r&&o.stateChildren.splice(a,1),{value:n}}else if(o.dynamicChildren){var s=void 0;if(o.dynamicChildren instanceof Map?s=o.dynamicChildren.get(o.activeDynamic):o.dynamicChildren instanceof Array&&(s=o.dynamicChildren.find((function(e){return e[0]==o.activeDynamic}))[1]),s)for(a=0;a<s.length;a++)if(s[a].cid===t)return n=s[a],r&&s.splice(a,1),{value:n}}},o=0;o<e.length;o++){var a=i(o);if("object"==typeof a)return a.value}return!!n},isPeer=function(e,t,r){var n=findItem(e,t),i=findItem(e,r);return n.pid&&i.pid||!n.pid&&!i.pid},recursion=function(e,t){var r=function(e){for(var n,i,o,a=0,s=e;a<s.length;a++){var c=s[a],u=null===(o=null===(i=null===(n=null==c?void 0:c.tmpData)||void 0===n?void 0:n.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;if(null==u?void 0:u.length)for(var l=0,d=u;l<d.length;l++){var h=d[l];h.code=h.code.replace(/>/g,">").replace(/</g,"<")}t(c),c&&c.children?r(c.children):c&&c.dynamicChildren?(c.dynamicChildren&&c.dynamicChildren instanceof Map&&c.dynamicChildren.forEach((function(e){r(e)})),c.dynamicChildren&&c.dynamicChildren instanceof Array&&c.dynamicChildren.forEach((function(e){r(e[1])}))):(null==c?void 0:c.stateChildren)&&r(c.stateChildren)}};r(e)},setIndex=function(e){var t=e.length,r=function(e,t){for(var n=function(n){var i=e[n];if(i&&i.children&&i.children.length){var o=i.children.length;r(i.children,o)}else if(i&&i.dynamicChildren){var a=i.dynamicChildren.length;Array.from(i.dynamicChildren).forEach((function(e,t){r(e[1],a)}))}i.z=10*t-n},i=0;i<e.length;i++)n(i)};r(e,t)},resetID=function(e){var t=function(e,r){for(var n=function(n){var i=e[n],o=genID();r?i.pid=r:i.drag||(i.baseData.left=0,i.baseData.top=0),i.cid=o,i&&i.children&&i.children.length?t(i.children,o):i&&i.dynamicChildren&&Array.from(i.dynamicChildren).forEach((function(e,r){t(e[1],o)}))},i=0;i<e.length;i++)n(i)};t(e)},updataAttribute=function(e,t,r,n){try{if(!e||!e.hasOwnProperty(t)&&!e.hasOwnProperty(n))throw"The property you want to modify is not found. Please check whether the attribute ".concat(t," is entered correctly!");if(n){_$1.cloneDeep(e[n][t]);e[n][t]=r}else e[t]=r}catch(e){console.error(e)}},updataAttributeForOption=function(e,t){var r;try{var n="tmpData";if(!e||!(null===(r=e[n])||void 0===r?void 0:r.hasOwnProperty("option")))throw new Error("The property you want to modify is not found. Please check whether the attribute 'option' is entered correctly!");var i=_$1.cloneDeep(e[n].option),o={};Object.assign(o,i,t),console.log(o,i,"newOP"),e[n].option=o}catch(e){console.error(new Error("An error occurred: ".concat(e)))}},comToggle=function(e){try{if(!e)throw" 没有找到组件";e.isShow||"false"==e.isShow?e.isShow=!1:e.isShow=!0}catch(e){console.error(e)}},setAttr=function(e,t,r){for(var n,i=0;i<e.length;i++)(n=e[i]).cid!==t&&n.id!==t||(n[r]=!n[r])},setPositionForGroup=function(e,t){t.forEach((function(t){t.baseData.left=t.baseData.left-e.left,t.baseData.top=t.baseData.top-e.top}))},resetPositionForGroup=function(e,t){var r=t.map((function(e){return e.cid}));t.forEach((function(t){t.pid&&setPositionForWorld(t,e)}));var n=selectdArea(r,t);return setPositionForGroup(n,t),{left:n.left,top:n.top,width:n.width,height:n.height}},calculateNodePosition=function(e,t,r){var n=e.baseData.left,i=e.baseData.top,o=t;if(n+=o.baseData.left,i+=o.baseData.top,r){if(r.baseData.angle){var a=r.baseData.angle*Math.PI/180,s=Math.cos(a),c=Math.sin(a),u=n*c+i*s;n=n*s-i*c,i=u}r.baseData.scale&&(n*=r.baseData.scale.x,i*=r.baseData.scale.y)}return{left:n,top:i}},breakUp=function(e,t){var r=_$1.cloneDeep(e),n=[];return r.children&&r.children.length&&r.children.forEach((function(e){var i=t&&(null==r?void 0:r.pid)?findItemDeep$1(t,r.pid):null;setPositionForWorldNew(e,r,i),n.push(e)})),n},setPositionForWorldNew=function(e,t,r){var n=calculateNodePosition(e,t,r),i=n.left,o=n.top;e.baseData.left=i,e.baseData.top=o},setPositionForWorld=function(e,t){e.baseData.left=e.baseData.left+t.left,e.baseData.top=e.baseData.top+t.top},transformPosition=function(e,t,r){var n={left:0,top:0};return e.left=e.left||0,e.top=e.top||0,t.left=t.left||0,t.top=t.top||0,r&&0!==r?(n.left=e.left-t.left,n.top=e.top-t.top):(n.left=e.left+t.left,n.top=e.top+t.top),n},resizePosition=function(e,t){var r=_$1.cloneDeep(e),n=[],i=function(e,t){var r=findItemDeep$1(e,t);n.push(r.baseData),r.pid&&i(e,r.pid)};i(r,t);var o={left:0,top:0};return n.map((function(e){e&&(o.left+=e.left,o.top+=e.top)})),o},resziePositionForGroup=function(e,t,r,n){var i=e.baseData.left,o=e.baseData.top,a=t.left,s=t.top,c=_$1.cloneDeep(e.children),u=r||"";if(a-i<0)for(var l=0;l<c.length;l++){(d=c[l]).cid!==u&&(d.baseData.left=d.baseData.left+(i-a))}if(s-o<0)for(l=0;l<c.length;l++){var d;(d=c[l]).cid!==u&&(d.baseData.top=d.baseData.top+(o-s))}e.children=c},setPorp=function(e,t,r){var n=t.find((function(t){return t.cid===e}));"folder"===n.type?n.children.length&&n.children.forEach((function(e){e[r]=!e[r]})):n[r]=!n[r]},sortArray$1=function(e,t,r){var n=e.slice();return r||(n=_$1.cloneDeep(e)),n.length>1&&n.sort((function(e,r){return e.baseData[t]-r.baseData[t]})),n},selectdArea=function(e,t){var r=[];return e.map((function(e){var n=t.find((function(t){return t.cid===e}));n&&r.push(n)})),getPosition(r)},getPosition=function(e,t){if(e.length>0){var r={left:0,top:0,width:0,height:0},n=sortArray$1(e,"left",t),i=sortArray$1(e,"top",t),o=n[0].baseData,a=n[n.length-1].baseData,s=i[0].baseData,c=i[i.length-1].baseData,u=Math.max.apply(Math,i.map((function(e){return 1*e.baseData.top+1*e.baseData.height}))),l=Math.max.apply(Math,i.map((function(e){return 1*e.baseData.left+1*e.baseData.width})));return r.left=o.left,r.width=Math.max(1*a.left+1*a.width,l)-1*o.left,r.top=s.top,r.height=Math.max(1*c.top+1*c.height,u)-1*s.top,r}return{left:0,top:0,width:0,height:0}};function safeConvertToNumber(e){try{if(null==e||""===e)return 0;var t=e.toString().match(/^-?\d+\.?\d*/);return t?Number(t[0]):0}catch(e){return console.error("Error converting to number: ".concat(e)),0}}function validateAndFixObject(e){var t={};for(var r in e)if(e.hasOwnProperty(r))try{t[r]=safeConvertToNumber(e[r])}catch(e){console.error("Error processing key ".concat(r,": ").concat(e)),t[r]=0}return t}var upDataGroup=function(e,t,r,n){var i=e.children,o=_$1.cloneDeep(t),a=_$1.cloneDeep(getPosition(i,n)),s=validateAndFixObject(o),c=s.left,u=s.top;s.width,s.height;var l=validateAndFixObject(a),d=l.left,h=l.top,f=l.width,p=l.height,m={left:c+d,top:u+h,width:f,height:p,angle:t.angle?t.angle:0};return i.forEach((function(e){var t=_$1.cloneDeep(e.baseData);e.baseData.left<0?t.left=0:t.left=t.left-d,e.baseData.top<0?t.top=0:t.top=t.top-h,e.baseData=t})),e.baseData=m,e.children=i,m},upDataGroupChildren=function(e,t,r){var n=e.children,i=_$1.cloneDeep(t),o=_$1.cloneDeep(getPosition(n)),a=i.left,s=i.top;i.width,i.height;var c=o.left,u=o.top,l=o.width,d=o.height,h={left:a+c,top:s+u,width:l,height:d,angle:t.angle?t.angle:0};return n.forEach((function(e){var t=_$1.cloneDeep(e.baseData);e.baseData.left<0?t.left=0:t.left=t.left-c,e.baseData.top<0?t.top=0:t.top=t.top-u,e.baseData=t})),e.children=n,h},resizeListPosition=function(e,t){var r=function(e,n){for(var i,o=0;o<e.length;o++){var a=e[o];if(a.pid!=n){var s=resizePosition(t,a.cid),c=resizePosition(t,a.pid);a.baseData.left=s.left-c.left,a.baseData.top=s.top-c.top}(null===(i=null==a?void 0:a.children)||void 0===i?void 0:i.length)&&r(a.children,a.cid)}};r(e,t)},RecursiveList=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];e[r].index=r,n.children&&n.children.length?RecursiveList(n.children):t&&t(n)}},genID=function(){return(Math.random().toString().substr(3,10)+Date.now()).toString()},genCopyName=function(e,t,r){var n,i;void 0===r&&(r=" copy");var o=new RegExp("".concat(r,"( \\d+)?$")).exec(e);o?(n=o[1]?parseInt(o[1]):0,i=e.slice(0,o.index)):(n=0,i=e);var a=new RegExp("^".concat(i).concat(r,"( [1-9][0-9]*)?$")),s=[];t.forEach((function(e){if(o=a.exec(e)){var t=o[1]?parseInt(o[1]):1;s.push(t)}})),s.sort((function(e,t){return e-t})),n++;for(var c=0,u=s.length;c<u;c++)if(s[c]===n)n++;else if(s[c]>n)break;return i+r+" "+n},getUrlParams=function(e,t){try{var r=t||window.location.href;if(-1!=r.indexOf("?")){var n={};return r.slice(r.indexOf("?")+1).split("&").forEach((function(e){var t=e.split("=");n[t[0]]=t[1]})),e?n[e]?n[e]:null:n}return console.log("没有参数"),null}catch(e){console.error(e)}};function setActions(e,t){var r=e.types,n=e.element,i=e.actions,o=e.events,a=e.eventsComs;e.filter,store.state.globalVars;for(var s=function(e){var t=r[e],s=n.tmpData.actions[e];if(s&&s.use){a&&a.push(n.cid);var c=s[s.behave];if(!c)return"continue";"vars"===s.behave?c.map((function(e){e.type=t,e.id=n.cid,e.model=0,e.originalValue||(e.originalValue=e.value),e.mapField&&i.push(e)})):c.length>0&&c.forEach((function(e,r){"toggle"===s.behave&&""!==e.value&&e.value.length&&o.push({id:n.cid,type:s.behave,children:e.value.map((function(e){return{cid:e.cid,visible:e.visible}})),eventType:t,index:r}),"update"===s.behave&&""!==e.value&&e.value.length?o.push({id:n.cid,type:s.behave,children:e.value.map((function(e){return{cid:e.cid,visible:e.visible}})),eventType:t,index:r}):"link"===s.behave&&""!==e.value?o.push({id:n.cid,type:s.behave,link:e.value,eventType:t,target:e.target,index:r}):"page"===s.behave&&""!==e.value?o.push({id:n.cid,type:s.behave,page:e.value,params:e.params,eventType:t,index:r}):"dynamic"===s.behave&&""!==e.value&&e.value.length>0?o.push({id:n.cid,type:s.behave,dynamic:e.value,eventType:t,index:r}):o.push(void 0)}))}},c=0;c<r.length;c++)s(c)}var publicKey="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApWni7uLYVV8iyDPTR6Zs\naj+2BHCn4xTzFeVHADzTdtBiFH9i4fKeDK0IfbPV/9TGeRYNfl0qSfdLtU+1ZIzm\npqHppadukmk5+NbBG4Xm/lAZgVt3dUIrSyamxVjwnymN7PLdxaSOS/mgU6SDGMhN\nTM76AXKZZXWMK12UCXvKkh+TkGufcXzLe7LtrvHPLOgcnEED2CkWATuE9g8K9j4T\neOMxhJcHBUmXLgU6Chufa4nBed2899E7jxJa14+J1IDa2ahrDFLZN7H//ZsvwnXq\nxVbxm0k5jyWqfCpg13V7zD3DxNWlo3MIh2fPtIEUDVhugqPd0jPmqquqdBNTnu2I\nGQIDAQAB",privateKey="MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQClaeLu4thVXyLI\nM9NHpmxqP7YEcKfjFPMV5UcAPNN20GIUf2Lh8p4MrQh9s9X/1MZ5Fg1+XSpJ90u1\nT7VkjOamoemlp26SaTn41sEbheb+UBmBW3d1QitLJqbFWPCfKY3s8t3FpI5L+aBT\npIMYyE1MzvoBcplldYwrXZQJe8qSH5OQa59xfMt7su2u8c8s6BycQQPYKRYBO4T2\nDwr2PhN44zGElwcFSZcuBToKG59ricF53bz30TuPElrXj4nUgNrZqGsMUtk3sf/9\nmy/CderFVvGbSTmPJap8KmDXdXvMPcPE1aWjcwiHZ8+0gRQNWG6Co93SM+aqq6p0\nE1Oe7YgZAgMBAAECggEABN8LadGQYWM92Pt9u1xxUOezaooOx6c0SW7JGn6wE42r\ndcMSnGjSsrjdySXkpXYUqjg2CYSg3DDGL/667s0fdcTK5q/5l6I1rNhWM4NL/C1L\nsv2IlRFvyPTIcINgAq/smA/G7C0ea6pcSFpN6grsC9kEj8paLhy6FgTZeTYGDyuG\nwI3D7XWZNzWfyQlAsoWEYAmDx72rOuEaeK4W4SMf3BB2g1hJ6fZoKT3ehHozAGcJ\nB7R8k3tGALVYdOqQgXhj8t3vNu1OATG0Q6d4z28e4TwsVunxReTyRcofrgOVwpry\nEmb4C5RYaN/rWxRrL8aW+nB3wAD/PFDacVBz/8RvaQKBgQDX90jqlLtLRVAsqbiS\nSHmX67CqQzNNDWgysQLmF2YmmkGyth4QR+cNEenIEeSSt+vc0VMAbxYY5SVzVCRl\nSZHoKHNlLGmepd3aJw5ZcFnpU86J7aG8fhvgZGEmCR+1JOZU7pUbpTvka0WQC3AK\n2+O7nUYIU65xeOaJVZvUu6My+wKBgQDEE6DrFVMNgI3dDZM0buHMYDJ2mL9F1DZb\n2URxYAlmvjkpaQb9Vq1VXV0ApZ3ItXgIX6cVrJB+MILmrsoxAamFOl/9AYiKnpnb\nYMxxqFYPuME7fzEli041915j6CpMmOwrAq6SrLiZ//hNlobJf76dAY9qyX91BTC8\nBfEWVhnk+wKBgQDT5kb+G+bVSPIMkI6PwVrE7DWQKZV5YdE+A55TgtvwvmP95GEF\nGneixFO8wYmjR6C+LgihoV1uGc+wI/v+AbyOrLnkqDoNtrNB7BZRPUKLBHbfsHCE\nELxrZDJJ7qPUyZrR9LIKyQpF6db8KazKiswc9oiTfP/pSHXyhDP8/Ap55wKBgQC6\njDI9dzxdTEGsXo3/BL+vQpbAXvMb7JsLJ9sGQuiu56xayaHsxdqDrSAezXMg0gYx\ncU/2Pwf6Bw2DjCiyF3LBXpiUjjDqMZsQLThVqmK28oBlqs2HetIeZgtX4jrcRWHs\nSdDtm4bGfdIvf1cdvnwLxMA+SRcKrrV/LegB6EkaoQKBgEwE4rllfRxOSGaF47ew\nRxTLGphZmxhLDsx0fMOHflx/BnGnxruBLEhdv3mlp12YMmb2s6kwFJvngLq4fZll\nTmC7BW3Z9h8XsL9j2xtID+5gsxYHHOCcdbzGuQV5KWb51cBym7EP9qk/3NP8w3/+\nH0iKrgAII5Ym0yh41dGL5HCo";function encrypt$1(e){var t=new JSEncrypt;return t.setPublicKey(publicKey),t.encrypt(e)}function decrypt(e){var t=new JSEncrypt;return t.setPrivateKey(privateKey),t.decrypt(e)}var decryptKey={key:"anov@2019:helloX",iv:"anov@2020:helloX"};function decrypAES(e){var t=cryptoJs.enc.Utf8.parse(decryptKey.key),r=cryptoJs.enc.Utf8.parse(decryptKey.iv);return cryptoJs.AES.encrypt(e,t,{iv:r,mode:cryptoJs.mode.CBC,padding:cryptoJs.pad.Pkcs7}).toString()}function safeEval(e,t){var r=store.state.globalVars,n={};r.forEach((function(e){(null==e?void 0:e.name)&&(n[e.name]=e.value||e.originvalue)}));try{return/^(?:[^\r\n]*[\r\n]){0,2}(?:[^\r\n]*(?=\{))?\s*(?:function\s*[^\r\n]*|\(.*?\))?\s*[\w\s\$\._\[\]]*\s*(?:[=:]\s*)?(?:new\s+)?[A-Z]\w*\s*(?:\[.*?\]|\([^\r\n]*\))*\s*\{.*?\}/i.test(e),new Function("data","vars",e)(t,n)}catch(e){return console.error(e),t}}var globalSourceTemp={type:"static",converse:{use:!1,data:[]},static:{data:{},originData:""},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""},datasource:{data:"",inputSql:"",dsName:"",dsType:300,autoUpdate:{open:!1,time:10}},indicator:{zbId:"",zbName:"",params:"",data:"",autoUpdate:{open:!1,time:10}},staticFile:{data:"",dsName:"",dsType:201}},UpdataForContainer=function(e){var t;try{var r=[];if((null==e?void 0:e.dynamicChildren)instanceof Map)for(var n=Array.from(null==e?void 0:e.dynamicChildren),i=0;i<n.length;i++)n[i]instanceof Array&&r.push.apply(r,n[i][1]);else if((null==e?void 0:e.dynamicChildren)instanceof Array)for(n=null==e?void 0:e.dynamicChildren,i=0;i<n.length;i++)n[i]instanceof Array&&r.push.apply(r,n[i][1]);if(null==r?void 0:r.length)for(var o=0,a=r;o<a.length;o++){var s=a[o];if(s){var c=null===(t=null==s?void 0:s.tmpData)||void 0===t?void 0:t.source,u=c.type;c&&"packData"==u&&(s.tmpData.source.packData.data=e.source[0])}}}catch(e){console.log(e)}},__defProp$1=Object.defineProperty,__getOwnPropSymbols$1=Object.getOwnPropertySymbols,__hasOwnProp$1=Object.prototype.hasOwnProperty,__propIsEnum$1=Object.prototype.propertyIsEnumerable,__defNormalProp$1=(e,t,r)=>t in e?__defProp$1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues$1=(e,t)=>{for(var r in t||(t={}))__hasOwnProp$1.call(t,r)&&__defNormalProp$1(e,r,t[r]);if(__getOwnPropSymbols$1)for(var r of __getOwnPropSymbols$1(t))__propIsEnum$1.call(t,r)&&__defNormalProp$1(e,r,t[r]);return e},NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state"),errors="production"!==process$1.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function die(e,...t){if("production"!==process$1.env.NODE_ENV){const r=errors[e],n="function"==typeof r?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(e){return!!e&&!!e[DRAFT_STATE]}function isDraftable(e){var t;return!!e&&(isPlainObject(e)||Array.isArray(e)||!!e[DRAFTABLE]||!!(null==(t=e.constructor)?void 0:t[DRAFTABLE])||isMap(e)||isSet(e))}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject(e){if(!e||"object"!=typeof e)return!1;const t=getPrototypeOf(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===objectCtorString}function each(e,t){0===getArchtype(e)?Reflect.ownKeys(e).forEach((r=>{t(r,e[r],e)})):e.forEach(((r,n)=>t(n,r,e)))}function getArchtype(e){const t=e[DRAFT_STATE];return t?t.type_:Array.isArray(e)?1:isMap(e)?2:isSet(e)?3:0}function has(e,t){return 2===getArchtype(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function set(e,t,r){const n=getArchtype(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function is(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function isMap(e){return e instanceof Map}function isSet(e){return e instanceof Set}function latest(e){return e.copy_||e.base_}function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=isPlainObject(e);if(!0===t||"class_only"===t&&!r){const t=Object.getOwnPropertyDescriptors(e);delete t[DRAFT_STATE];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const i=r[n],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(getPrototypeOf(e),t)}{const t=getPrototypeOf(e);if(null!==t&&r)return __spreadValues$1({},e);const n=Object.create(t);return Object.assign(n,e)}}function freeze(e,t=!1){return isFrozen(e)||isDraft(e)||!isDraftable(e)||(getArchtype(e)>1&&(e.set=e.add=e.clear=e.delete=dontMutateFrozenCollections),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>freeze(t,!0)))),e}function dontMutateFrozenCollections(){die(2)}function isFrozen(e){return Object.isFrozen(e)}var plugins={},currentScope;function getPlugin(e){const t=plugins[e];return t||die(0,e),t}function getCurrentScope(){return currentScope}function createScope(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(e,t){t&&(getPlugin("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===currentScope&&(currentScope=e.parent_)}function enterScope(e){return currentScope=createScope(currentScope,e)}function revokeDraft(e){const t=e[DRAFT_STATE];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[DRAFT_STATE].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e),t.parent_||maybeFreeze(t,e)),t.patches_&&getPlugin("Patches").generateReplacementPatches_(r[DRAFT_STATE].base_,e,t.patches_,t.inversePatches_)):e=finalize(t,r,[]),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NOTHING?e:void 0}function finalize(e,t,r){if(isFrozen(t))return t;const n=t[DRAFT_STATE];if(!n)return each(t,((i,o)=>finalizeProperty(e,n,t,i,o,r))),t;if(n.scope_!==e)return t;if(!n.modified_)return maybeFreeze(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let i=t,o=!1;3===n.type_&&(i=new Set(t),t.clear(),o=!0),each(i,((i,a)=>finalizeProperty(e,n,t,i,a,r,o))),maybeFreeze(e,t,!1),r&&e.patches_&&getPlugin("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function finalizeProperty(e,t,r,n,i,o,a){if("production"!==process$1.env.NODE_ENV&&i===r&&die(5),isDraft(i)){const a=finalize(e,i,o&&t&&3!==t.type_&&!has(t.assigned_,n)?o.concat(n):void 0);if(set(r,n,a),!isDraft(a))return;e.canAutoFreeze_=!1}else a&&r.add(i);if(isDraftable(i)&&!isFrozen(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;finalize(e,i),t&&t.scope_.parent_||"symbol"==typeof n||!Object.prototype.propertyIsEnumerable.call(r,n)||maybeFreeze(e,i)}}function maybeFreeze(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze(t,r)}function createProxyProxy(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=objectTraps;r&&(i=[n],o=arrayTraps);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return n.draft_=s,n.revoke_=a,s}var objectTraps={get(e,t){if(t===DRAFT_STATE)return e;const r=latest(e);if(!has(r,t))return readPropFromProto(e,r,t);const n=r[t];return e.finalized_||!isDraftable(n)?n:n===peek(e.base_,t)?(prepareCopy(e),e.copy_[t]=createProxy(n,e)):n},has:(e,t)=>t in latest(e),ownKeys:e=>Reflect.ownKeys(latest(e)),set(e,t,r){const n=getDescriptorFromProto(latest(e),t);if(null==n?void 0:n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=peek(latest(e),t),i=null==n?void 0:n[DRAFT_STATE];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(is(r,n)&&(void 0!==r||has(e.base_,t)))return!0;prepareCopy(e),markChanged(e)}return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==peek(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,prepareCopy(e),markChanged(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=latest(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){die(11)},getPrototypeOf:e=>getPrototypeOf(e.base_),setPrototypeOf(){die(12)}},arrayTraps={};function peek(e,t){const r=e[DRAFT_STATE];return(r?latest(r):e)[t]}function readPropFromProto(e,t,r){var n;const i=getDescriptorFromProto(t,r);return i?"value"in i?i.value:null==(n=i.get)?void 0:n.call(e.draft_):void 0}function getDescriptorFromProto(e,t){if(!(t in e))return;let r=getPrototypeOf(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=getPrototypeOf(r)}}function markChanged(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}each(objectTraps,((e,t)=>{arrayTraps[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),arrayTraps.deleteProperty=function(e,t){return"production"!==process$1.env.NODE_ENV&&isNaN(parseInt(t))&&die(13),arrayTraps.set.call(this,e,t,void 0)},arrayTraps.set=function(e,t,r){return"production"!==process$1.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&die(14),objectTraps.set.call(this,e[0],t,r,e[0])};var Immer2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...i){return n.produce(e,(e=>t.call(this,e,...i)))}}let n;if("function"!=typeof t&&die(6),void 0!==r&&"function"!=typeof r&&die(7),isDraftable(e)){const i=enterScope(this),o=createProxy(e,void 0);let a=!0;try{n=t(o),a=!1}finally{a?revokeScope(i):leaveScope(i)}return usePatchesInScope(i,r),processResult(n,i)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===NOTHING&&(n=void 0),this.autoFreeze_&&freeze(n,!0),r){const t=[],i=[];getPlugin("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}die(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,(t=>e(t,...r)));let r,n;const i=this.produce(e,t,((e,t)=>{r=e,n=t}));return[i,r,n]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){isDraftable(e)||die(8),isDraft(e)&&(e=current(e));const t=enterScope(this),r=createProxy(e,void 0);return r[DRAFT_STATE].isManual_=!0,leaveScope(t),r}finishDraft(e,t){const r=e&&e[DRAFT_STATE];r&&r.isManual_||die(9);const{scope_:n}=r;return usePatchesInScope(n,t),processResult(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=getPlugin("Patches").applyPatches_;return isDraft(e)?n(e,t):this.produce(e,(e=>n(e,t)))}};function createProxy(e,t){const r=isMap(e)?getPlugin("MapSet").proxyMap_(e,t):isSet(e)?getPlugin("MapSet").proxySet_(e,t):createProxyProxy(e,t);return(t?t.scope_:getCurrentScope()).drafts_.push(r),r}function current(e){return isDraft(e)||die(10,e),currentImpl(e)}function currentImpl(e){if(!isDraftable(e)||isFrozen(e))return e;const t=e[DRAFT_STATE];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=shallowCopy(e,t.scope_.immer_.useStrictShallowCopy_)}else r=shallowCopy(e,!0);return each(r,((e,t)=>{set(r,e,currentImpl(t))})),t&&(t.finalized_=!1),r}var immer=new Immer2,produce=immer.produce;immer.produceWithPatches.bind(immer);var setAutoFreeze=immer.setAutoFreeze.bind(immer);function produceWithImmer(e,t){return setAutoFreeze(!1),produce(e,t)}immer.setUseStrictShallowCopy.bind(immer),immer.applyPatches.bind(immer),immer.createDraft.bind(immer),immer.finishDraft.bind(immer);var baseDataMutaitons={updataArea:function(e,t){e.currentArea=t},selectdArea:function(e,t){var r=selectdArea(t,e.list);e.currentArea=r},updataAngle:function(e,t){var r=t.id,n=t.angle,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.baseData.angle=n)},updataBaseData:function(e,t){var r,n=t.data;if(null==(null===(r=null==n?void 0:n.baseData)||void 0===r?void 0:r.opacity)&&(n.baseData.opacity=100),checkBaseData(t.data.baseData,"updataBaseData")){var i=t.ratio,o=findItemDeep$1(e.list,n.cid),a=t.oldData;if("object"!=typeof o||o.pid){if("object"==typeof o&&o.pid){var s=findItemDeep$1(e.list,o.pid);"object"==typeof s?(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,n.baseData),upDataGroup(s,s.baseData),e.groupFlag=!e.groupFlag):s||(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,n.baseData))}}else if(Object.assign(o.baseData,n.baseData),i&&o.children&&o.children.length>0){var c=o.baseData.width/a.width,u=o.baseData.height/a.height;updataSizeDeep(o.children,{xRatio:c,yRatio:u})}}},multipleUpdataBaseData:function(e,t){if(t.ratio)for(var r=t.newData,n=t.oldData,i=r.width/n.width,o=r.height/n.height,a=e.cache.length;a--;)e.cache[a].baseData.left=e.cache[a].baseData.left*i,e.cache[a].baseData.width=e.cache[a].baseData.width*i,e.cache[a].baseData.top=e.cache[a].baseData.top*o,e.cache[a].baseData.height=e.cache[a].baseData.height*o;else for(a=e.cache.length;a--;){var s=_$1.cloneDeep(e.cache[a].baseData);s.left=s.left+t.deltaX,s.top=s.top+t.deltaY,e.cache[a].comPanel?e.cache[a].comPanel.setAttrData(Object.assign(s,t.baseData)):e.cache[a].baseData=s}},multipleUpdata:function(e,t){var r=t.ids,n=t.data,i=findItemDeep$1(e.list,r);i&&Object.assign(i.baseData,n)},multipleMove:function(e,t){},move:function(e,t){var r=e.selectd,n=t.type,i=t.speed?t.speed:1;if(0!==r.length){var o=e.list.filter((function(e){return r.includes(e.cid)}));0==o.length&&(o=[findItemDeep$1(e.list,r[0])]);for(var a=0;a<o.length;a++){var s=o[a];if(s.pid&&e.selectd.length>1)return void console.warn("Only one component can be moved within a group");if("up"===n?s.baseData.top=s.baseData.top-i:"down"===n?s.baseData.top+=i:"left"===n?s.baseData.left-=i:"right"===n&&(s.baseData.left+=i),"object"==typeof s&&s.pid){var c=findItemDeep$1(e.list,s.pid);"object"==typeof c&&(upDataGroup(c,c.baseData),e.groupFlag=!e.groupFlag)}}}else console.warn("Warning! please select the component to move.")},updataGroupBaseData:function(e,t){var r=findItemDeep$1(e.list,t.pid),n=_$1.cloneDeep(r);findItemDeep$1(r.children,t.cid),upDataGroup(r,n.baseData)},editGroupBaseData:function(e,t){var r=findItemDeep$1(e.list,t);r.children.forEach((function(e){setPositionForWorld(e,r.baseData)}))},syncBaseData:function(e,t){var r=t.cid,n=t.data,i=t.isContainer,o=function(e){for(var t=0;t<e.length;t++)r===e[t].cid?(e[t].baseData=Object.assign({},e[t].baseData,n),console.log(__assign$1({},e[t].baseData))):e[t].hasOwnProperty("children")&&o(e[t].children)},a=produceWithImmer(e.list,(function(e){void 0!==i&&e.length&&o(e)}));if(i)e.list=a;else{var s=findItemDeep$1(a,r);if(s){var c=_$1.cloneDeep(s.baseData),u=Object.assign({},s.baseData,n);this.commit("GoCom/updataBaseData",{data:{cid:r,baseData:u},oldData:c,ratio:!0})}}},updataItemData:function(e,t){var r=t.cid,n=t.propsName,i=t.propsValue,o=findItemDeep$1(e.list,r);o&&(o[n]=i)},updataOpacity:function(e,t){var r=t.cid,n=t.propsValue,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&i&&(i.baseData.opacity=n)}},extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics(e,t)};
|
|
32
|
+
(r=core).mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}return e}function n(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var i=e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),n(a);var s=a.slice(0);r.encryptBlock(s,0);for(var l=0;l<i;l++)e[t+l]^=s[l]}});return e.Decryptor=i,e}(),r.mode.CTRGladman)})),modeOfb=createCommonjsModule((function(e,t){var r,n,i;e.exports=((i=core).mode.OFB=(r=i.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var a=0;a<n;a++)e[t+a]^=o[a]}}),r.Decryptor=n,r),i.mode.OFB)})),modeEcb=createCommonjsModule((function(e,t){var r,n;e.exports=((n=core).mode.ECB=((r=n.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),r.Decryptor=r.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),r),n.mode.ECB)})),padAnsix923=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,o=r+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)})),padIso10126=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)})),padIso97971=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)})),padZeropadding=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},r.pad.ZeroPadding)})),padNopadding=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)})),formatHex=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib.CipherParams,i=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return n.create({ciphertext:t})}}}(),r.format.Hex)})),aes=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],l=[],c=[],u=[],h=[],d=[],f=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var m=e[r],g=e[m],v=e[g],y=257*e[p]^16843008*p;a[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,l[r]=y<<8|y>>>24,c[r]=y,y=16843009*v^65537*g^257*m^16843008*r,u[p]=y<<24|y>>>8,h[p]=y<<16|y>>>16,d[p]=y<<8|y>>>24,f[p]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(c=o[a-1],a%r?r>6&&a%r==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=p[a/r|0]<<24),o[a]=o[a-r]^c);for(var s=this._invKeySchedule=[],l=0;l<n;l++){if(a=n-l,l%4)var c=o[a];else c=o[a-4];s[l]=l<4||a<=4?c:u[i[c>>>24]]^h[i[c>>>16&255]]^d[i[c>>>8&255]]^f[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,l,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,h,d,f,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var l=this._nRounds,c=e[t]^r[0],u=e[t+1]^r[1],h=e[t+2]^r[2],d=e[t+3]^r[3],f=4,p=1;p<l;p++){var m=n[c>>>24]^i[u>>>16&255]^o[h>>>8&255]^a[255&d]^r[f++],g=n[u>>>24]^i[h>>>16&255]^o[d>>>8&255]^a[255&c]^r[f++],v=n[h>>>24]^i[d>>>16&255]^o[c>>>8&255]^a[255&u]^r[f++],y=n[d>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&h]^r[f++];c=m,u=g,h=v,d=y}m=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&d])^r[f++],g=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[d>>>8&255]<<8|s[255&c])^r[f++],v=(s[h>>>24]<<24|s[d>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^r[f++],y=(s[d>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^r[f++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)})),tripledes=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],u=l[o];for(r=0;r<24;r++)c[r/6|0]|=t[(s[r]-1+u)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(s[r+24]-1+u)%28]<<31-r%6;for(c[0]=c[0]<<1|c[0]>>>31,r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var h=this._invSubKeys=[];for(r=0;r<16;r++)h[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),d.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((a^i[l])&u[l])>>>0];this._lBlock=a,this._rBlock=o^s}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,d.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function f(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}e.DES=i._createHelper(h);var p=o.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=h.createEncryptor(n.create(t)),this._des2=h.createEncryptor(n.create(r)),this._des3=h.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)})),rc4=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var l=n[i];n[i]=n[o],n[o]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)})),rabbit=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)l.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(i[0]^=c,i[1]^=h,i[2]^=u,i[3]^=d,i[4]^=c,i[5]^=h,i[6]^=u,i[7]^=d,r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(e,t){var r=this._X;l.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)})),rabbitLegacy=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=c>>>16|4294901760&u,d=u<<16|65535&c;for(n[0]^=c,n[1]^=h,n[2]^=u,n[3]^=d,n[4]^=c,n[5]^=h,n[6]^=u,n[7]^=d,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var r=this._X;l.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,l=((i*i>>>17)+i*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)})),blowfish=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.BlockCipher,n=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function l(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][r]+e.sbox[1][n];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function c(e,t,r){let n,o=t,a=r;for(let t=0;t<i;++t)o^=e.pbox[t],a=l(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[i],o^=e.pbox[i+1],{left:o,right:a}}function u(e,t,r){let n,o=t,a=r;for(let t=i+1;t>1;--t)o^=e.pbox[t],a=l(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[1],o^=e.pbox[0],{left:o,right:a}}function h(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=a[t][r]}let n=0;for(let a=0;a<i+2;a++)e.pbox[a]=o[a]^t[n],n++,n>=r&&(n=0);let s=0,l=0,u=0;for(let t=0;t<i+2;t+=2)u=c(e,s,l),s=u.left,l=u.right,e.pbox[t]=s,e.pbox[t+1]=l;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)u=c(e,s,l),s=u.left,l=u.right,e.sbox[t][r]=s,e.sbox[t][r+1]=l;return!0}var d=n.Blowfish=t.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4;h(s,t,r)}},encryptBlock:function(e,t){var r=c(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},decryptBlock:function(e,t){var r=u(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(d)}(),r.Blowfish)})),cryptoJs=createCommonjsModule((function(e,t){e.exports=core}));function setSessionData(e,t){var r=JSON.stringify(t);sessionStorage.setItem(e,r)}function getSessionData(e){var t=sessionStorage.getItem(e);return t?JSON.parse(t):null}var updataSizeDeep=function(e,t){try{var r=t.xRatio,n=t.yRatio;return isNaN(r)||isNaN(n)?(console.error("发生错误:on updataSizeDeep in go-code "),e):(e.forEach((function(e){var i;e.baseData.left=e.baseData.left*r,e.baseData.width=e.baseData.width*r,e.baseData.top=e.baseData.top*n,e.baseData.height=e.baseData.height*n,e.baseData.angle=e.baseData.angle,(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)&&updataSizeDeep(null==e?void 0:e.children,t)})),e)}catch(t){return e}},checkBaseData=function(e,t){var r=!0;try{for(var n=0,i=["width","height","left","top","opacity","angel","skewY","skewX","rotateX","rotateY"];n<i.length;n++){var o=i[n];if(Object.hasOwn(e,o)&&isNaN(e[o])){if(!("string"==typeof e[o]&&e[o].includes("%")||"NaN"==e[o])){console.warn(o+"--参数校验不合法:"+t),r=!1;break}r=!0}}return r}catch(e){return console.warn("参数校验不合法:"+t),!1}},arraySwap=function(e,t,r){var n=e[r];return e.splice(r,1),e.splice(t,0,n),e},arraySwapForId=function(e,t,r){var n=_$1.findIndex(e,(function(e){return e.cid==r})),i=_$1.findIndex(e,(function(e){return e.cid==t}));return arraySwap(e,i,n)},arraySwapDeep=function(e,t,r){for(var n=-1,i=0;i<e.length;i++){var o=e[i];if(o.children&&o.children.length)for(var a=0;a<o.children.length;a++){if(n=a,o.children[a].cid===r){switch(t){case"up":n>=1&&arraySwap(o.children,n-1,n);break;case"down":n<o.children.length-2&&arraySwap(o.children,n+1,n);break;case"top":0!==n&&arraySwap(o.children,0,n);break;case"bottom":var s=o.children.length-1;n!==s&&arraySwap(o.children,s,n)}break}}}return e},findItemDeep$1=function(e,t,r){var n=!1,i=function(e){for(var o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(function(e){return e.cid==t}));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){for(var a=Array.from(e[o].dynamicChildren),s=0;s<a.length;s++)if(a[s]instanceof Array){var l=a[s][1];i(l)}}else if(e[o].dynamicChildren instanceof Array)for(a=e[o].dynamicChildren,s=0;s<a.length;s++)if(a[s]instanceof Array){l=a[s][1];i(l)}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1},getAncestorsNodes=function(e,t){var r=[],n=function(e){for(var i=0;i<e.length;i++){if(e[i].cid===t)return!0;if(Array.isArray(e[i].children)){if(n(e[i].children))return r.push(e[i]),!0;n(e[i].children)}}};return n(e),r},findItemIndexDeep=function(e,t){for(var r,n=0,i=0;i<e.length;i++){var o=e[i];if(n+=1,o.cid==t)break;if(null===(r=null==o?void 0:o.children)||void 0===r?void 0:r.length)for(var a=0;a<(null==o?void 0:o.children.length);a++){if(n+=1,(null==o?void 0:o.children[a]).cid==t)return n}}return n},getLength=function(e){var t=0,r=function(e){for(var n=function(n){if(e[n].isShow&&e[n].children)r(e[n].children);else if(e[n].isShow&&e[n].dynamicChildren){if(e[n].dynamicChildren instanceof Map){for(var i=Array.from(e[n].dynamicChildren),o=0;o<i.length;o++)if(i[o]instanceof Array){var a=i[o][1];r(a)}}else if(e[n].isShow&&e[n].dynamicChildren instanceof Array){var s=e[n].dynamicChildren.find((function(t){return t[0]=e[n].activeDynamic}));s&&s.length&&r(s[1])}}else e[n].isShow&&e[n].stateChildren?r(e[n].stateChildren):e[n].isShow&&t++},i=0;i<e.length;i++)n(i)};return r(e),t||!1},findParentDeep=function(e,t){var r=null,n=function(e,i){for(var o=0,a=e;o<a.length;o++){var s=a[o];if(s.cid==t){r=i;break}if(s.children)n(s.children,s);else if(s.dynamicChildren)if(s.dynamicChildren instanceof Map){for(var l=Array.from(s.dynamicChildren),c=0;c<l.length;c++)if(l[c]instanceof Array){var u=l[c][1];n(u,s)}}else s.dynamicChildren;else s.stateChildren&&n(s.stateChildren,s)}};return n(e,null),r||!1},findItem=function(e,t,r){for(var n,i=function(i){var o=e[i];if(o.cid===t)return n=o,r&&e.splice(i,1),{value:n};if(o.children&&o.children.length){for(var a=0;a<o.children.length;a++)if(o.children[a].cid===t)return n=o.children[a],r&&o.children.splice(a,1),{value:n}}else if(o.stateChildren&&o.stateChildren.length){for(a=0;a<o.stateChildren.length;a++)if(o.stateChildren[a].cid===t)return n=o.stateChildren[a],r&&o.stateChildren.splice(a,1),{value:n}}else if(o.dynamicChildren){var s=void 0;if(o.dynamicChildren instanceof Map?s=o.dynamicChildren.get(o.activeDynamic):o.dynamicChildren instanceof Array&&(s=o.dynamicChildren.find((function(e){return e[0]==o.activeDynamic}))[1]),s)for(a=0;a<s.length;a++)if(s[a].cid===t)return n=s[a],r&&s.splice(a,1),{value:n}}},o=0;o<e.length;o++){var a=i(o);if("object"==typeof a)return a.value}return!!n},isPeer=function(e,t,r){var n=findItem(e,t),i=findItem(e,r);return n.pid&&i.pid||!n.pid&&!i.pid},recursion=function(e,t){var r=function(e){for(var n,i,o,a=0,s=e;a<s.length;a++){var l=s[a],c=null===(o=null===(i=null===(n=null==l?void 0:l.tmpData)||void 0===n?void 0:n.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;if(null==c?void 0:c.length)for(var u=0,h=c;u<h.length;u++){var d=h[u];d.code=d.code.replace(/>/g,">").replace(/</g,"<")}t(l),l&&l.children?r(l.children):l&&l.dynamicChildren?(l.dynamicChildren&&l.dynamicChildren instanceof Map&&l.dynamicChildren.forEach((function(e){r(e)})),l.dynamicChildren&&l.dynamicChildren instanceof Array&&l.dynamicChildren.forEach((function(e){r(e[1])}))):(null==l?void 0:l.stateChildren)&&r(l.stateChildren)}};r(e)},setIndex=function(e){var t=e.length,r=function(e,t){for(var n=function(n){var i=e[n];if(i&&i.children&&i.children.length){var o=i.children.length;r(i.children,o)}else if(i&&i.dynamicChildren){var a=i.dynamicChildren.length;Array.from(i.dynamicChildren).forEach((function(e,t){r(e[1],a)}))}i.z=10*t-n},i=0;i<e.length;i++)n(i)};r(e,t)},resetID=function(e){var t=function(e,r){for(var n=function(n){var i=e[n],o=genID();r?i.pid=r:i.drag||(i.baseData.left=0,i.baseData.top=0),i.cid=o,i&&i.children&&i.children.length?t(i.children,o):i&&i.dynamicChildren&&Array.from(i.dynamicChildren).forEach((function(e,r){t(e[1],o)}))},i=0;i<e.length;i++)n(i)};t(e)},updataAttribute=function(e,t,r,n){try{if(!e||!e.hasOwnProperty(t)&&!e.hasOwnProperty(n))throw"The property you want to modify is not found. Please check whether the attribute ".concat(t," is entered correctly!");if(n){_$1.cloneDeep(e[n][t]);e[n][t]=r}else e[t]=r}catch(e){console.error(e)}},updataAttributeForOption=function(e,t){var r;try{var n="tmpData";if(!e||!(null===(r=e[n])||void 0===r?void 0:r.hasOwnProperty("option")))throw new Error("The property you want to modify is not found. Please check whether the attribute 'option' is entered correctly!");var i=_$1.cloneDeep(e[n].option),o={};Object.assign(o,i,t),console.log(o,i,"newOP"),e[n].option=o}catch(e){console.error(new Error("An error occurred: ".concat(e)))}},comToggle=function(e){try{if(!e)throw" 没有找到组件";e.isShow||"false"==e.isShow?e.isShow=!1:e.isShow=!0}catch(e){console.error(e)}},setAttr=function(e,t,r){for(var n,i=0;i<e.length;i++)(n=e[i]).cid!==t&&n.id!==t||(n[r]=!n[r])},setPositionForGroup=function(e,t){t.forEach((function(t){t.baseData.left=t.baseData.left-e.left,t.baseData.top=t.baseData.top-e.top}))},resetPositionForGroup=function(e,t){var r=t.map((function(e){return e.cid}));t.forEach((function(t){t.pid&&setPositionForWorld(t,e)}));var n=selectdArea(r,t);return setPositionForGroup(n,t),{left:n.left,top:n.top,width:n.width,height:n.height}},calculateNodePosition=function(e,t,r){var n=e.baseData.left,i=e.baseData.top,o=t;if(n+=o.baseData.left,i+=o.baseData.top,r){if(r.baseData.angle){var a=r.baseData.angle*Math.PI/180,s=Math.cos(a),l=Math.sin(a),c=n*l+i*s;n=n*s-i*l,i=c}r.baseData.scale&&(n*=r.baseData.scale.x,i*=r.baseData.scale.y)}return{left:n,top:i}},breakUp=function(e,t){var r=_$1.cloneDeep(e),n=[];return r.children&&r.children.length&&r.children.forEach((function(e){var i=t&&(null==r?void 0:r.pid)?findItemDeep$1(t,r.pid):null;setPositionForWorldNew(e,r,i),n.push(e)})),n},setPositionForWorldNew=function(e,t,r){var n=calculateNodePosition(e,t,r),i=n.left,o=n.top;e.baseData.left=i,e.baseData.top=o},setPositionForWorld=function(e,t){e.baseData.left=e.baseData.left+t.left,e.baseData.top=e.baseData.top+t.top},transformPosition=function(e,t,r){var n={left:0,top:0};return e.left=e.left||0,e.top=e.top||0,t.left=t.left||0,t.top=t.top||0,r&&0!==r?(n.left=e.left-t.left,n.top=e.top-t.top):(n.left=e.left+t.left,n.top=e.top+t.top),n},resizePosition=function(e,t){var r=_$1.cloneDeep(e),n=[],i=function(e,t){var r=findItemDeep$1(e,t);n.push(r.baseData),r.pid&&i(e,r.pid)};i(r,t);var o={left:0,top:0};return n.map((function(e){e&&(o.left+=e.left,o.top+=e.top)})),o},resziePositionForGroup=function(e,t,r,n){var i=e.baseData.left,o=e.baseData.top,a=t.left,s=t.top,l=_$1.cloneDeep(e.children),c=r||"";if(a-i<0)for(var u=0;u<l.length;u++){(h=l[u]).cid!==c&&(h.baseData.left=h.baseData.left+(i-a))}if(s-o<0)for(u=0;u<l.length;u++){var h;(h=l[u]).cid!==c&&(h.baseData.top=h.baseData.top+(o-s))}e.children=l},setPorp=function(e,t,r){var n=t.find((function(t){return t.cid===e}));"folder"===n.type?n.children.length&&n.children.forEach((function(e){e[r]=!e[r]})):n[r]=!n[r]},sortArray$1=function(e,t,r){var n=e.slice();return r||(n=_$1.cloneDeep(e)),n.length>1&&n.sort((function(e,r){return e.baseData[t]-r.baseData[t]})),n},selectdArea=function(e,t){var r=[];return e.map((function(e){var n=t.find((function(t){return t.cid===e}));n&&r.push(n)})),getPosition(r)},getPosition=function(e,t){if(e.length>0){var r={left:0,top:0,width:0,height:0},n=sortArray$1(e,"left",t),i=sortArray$1(e,"top",t),o=n[0].baseData,a=n[n.length-1].baseData,s=i[0].baseData,l=i[i.length-1].baseData,c=Math.max.apply(Math,i.map((function(e){return 1*e.baseData.top+1*e.baseData.height}))),u=Math.max.apply(Math,i.map((function(e){return 1*e.baseData.left+1*e.baseData.width})));return r.left=o.left,r.width=Math.max(1*a.left+1*a.width,u)-1*o.left,r.top=s.top,r.height=Math.max(1*l.top+1*l.height,c)-1*s.top,r}return{left:0,top:0,width:0,height:0}};function safeConvertToNumber(e){try{if(null==e||""===e)return 0;var t=e.toString().match(/^-?\d+\.?\d*/);return t?Number(t[0]):0}catch(e){return console.error("Error converting to number: ".concat(e)),0}}function validateAndFixObject(e){var t={};for(var r in e)if(e.hasOwnProperty(r))try{t[r]=safeConvertToNumber(e[r])}catch(e){console.error("Error processing key ".concat(r,": ").concat(e)),t[r]=0}return t}var upDataGroup=function(e,t,r,n){var i=e.children,o=_$1.cloneDeep(t),a=_$1.cloneDeep(getPosition(i,n)),s=validateAndFixObject(o),l=s.left,c=s.top;s.width,s.height;var u=validateAndFixObject(a),h=u.left,d=u.top,f=u.width,p=u.height,m={left:l+h,top:c+d,width:f,height:p,angle:t.angle?t.angle:0};return i.forEach((function(e){var t=_$1.cloneDeep(e.baseData);e.baseData.left<0?t.left=0:t.left=t.left-h,e.baseData.top<0?t.top=0:t.top=t.top-d,e.baseData=t})),e.baseData=m,e.children=i,m},upDataGroupChildren=function(e,t,r){var n=e.children,i=_$1.cloneDeep(t),o=_$1.cloneDeep(getPosition(n)),a=i.left,s=i.top;i.width,i.height;var l=o.left,c=o.top,u=o.width,h=o.height,d={left:a+l,top:s+c,width:u,height:h,angle:t.angle?t.angle:0};return n.forEach((function(e){var t=_$1.cloneDeep(e.baseData);e.baseData.left<0?t.left=0:t.left=t.left-l,e.baseData.top<0?t.top=0:t.top=t.top-c,e.baseData=t})),e.children=n,d},resizeListPosition=function(e,t){var r=function(e,n){for(var i,o=0;o<e.length;o++){var a=e[o];if(a.pid!=n){var s=resizePosition(t,a.cid),l=resizePosition(t,a.pid);a.baseData.left=s.left-l.left,a.baseData.top=s.top-l.top}(null===(i=null==a?void 0:a.children)||void 0===i?void 0:i.length)&&r(a.children,a.cid)}};r(e,t)},RecursiveList=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];e[r].index=r,n.children&&n.children.length?RecursiveList(n.children):t&&t(n)}},genID=function(){return(Math.random().toString().substr(3,10)+Date.now()).toString()},genCopyName=function(e,t,r){var n,i;void 0===r&&(r=" copy");var o=new RegExp("".concat(r,"( \\d+)?$")).exec(e);o?(n=o[1]?parseInt(o[1]):0,i=e.slice(0,o.index)):(n=0,i=e);var a=new RegExp("^".concat(i).concat(r,"( [1-9][0-9]*)?$")),s=[];t.forEach((function(e){if(o=a.exec(e)){var t=o[1]?parseInt(o[1]):1;s.push(t)}})),s.sort((function(e,t){return e-t})),n++;for(var l=0,c=s.length;l<c;l++)if(s[l]===n)n++;else if(s[l]>n)break;return i+r+" "+n},getUrlParams=function(e,t){try{var r=t||window.location.href;if(-1!=r.indexOf("?")){var n={};return r.slice(r.indexOf("?")+1).split("&").forEach((function(e){var t=e.split("=");n[t[0]]=t[1]})),e?n[e]?n[e]:null:n}return console.log("没有参数"),null}catch(e){console.error(e)}};function setActions(e,t){var r=e.types,n=e.element,i=e.actions,o=e.events,a=e.eventsComs;e.filter,store.state.globalVars;for(var s=function(e){var t=r[e],s=n.tmpData.actions[e];if(s&&s.use){a&&a.push(n.cid);var l=s[s.behave];if(!l)return"continue";"vars"===s.behave?l.map((function(e){e.type=t,e.id=n.cid,e.model=0,e.originalValue||(e.originalValue=e.value),e.mapField&&i.push(e)})):l.length>0&&l.forEach((function(e,r){"toggle"===s.behave&&""!==e.value&&e.value.length&&o.push({id:n.cid,type:s.behave,children:e.value.map((function(e){return{cid:e.cid,visible:e.visible}})),eventType:t,index:r}),"update"===s.behave&&""!==e.value&&e.value.length?o.push({id:n.cid,type:s.behave,children:e.value.map((function(e){return{cid:e.cid,visible:e.visible}})),eventType:t,index:r}):"link"===s.behave&&""!==e.value?o.push({id:n.cid,type:s.behave,link:e.value,eventType:t,target:e.target,index:r}):"page"===s.behave&&""!==e.value?o.push({id:n.cid,type:s.behave,page:e.value,params:e.params,eventType:t,index:r}):"dynamic"===s.behave&&""!==e.value&&e.value.length>0?o.push({id:n.cid,type:s.behave,dynamic:e.value,eventType:t,index:r}):o.push(void 0)}))}},l=0;l<r.length;l++)s(l)}var publicKey="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApWni7uLYVV8iyDPTR6Zs\naj+2BHCn4xTzFeVHADzTdtBiFH9i4fKeDK0IfbPV/9TGeRYNfl0qSfdLtU+1ZIzm\npqHppadukmk5+NbBG4Xm/lAZgVt3dUIrSyamxVjwnymN7PLdxaSOS/mgU6SDGMhN\nTM76AXKZZXWMK12UCXvKkh+TkGufcXzLe7LtrvHPLOgcnEED2CkWATuE9g8K9j4T\neOMxhJcHBUmXLgU6Chufa4nBed2899E7jxJa14+J1IDa2ahrDFLZN7H//ZsvwnXq\nxVbxm0k5jyWqfCpg13V7zD3DxNWlo3MIh2fPtIEUDVhugqPd0jPmqquqdBNTnu2I\nGQIDAQAB",privateKey="MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQClaeLu4thVXyLI\nM9NHpmxqP7YEcKfjFPMV5UcAPNN20GIUf2Lh8p4MrQh9s9X/1MZ5Fg1+XSpJ90u1\nT7VkjOamoemlp26SaTn41sEbheb+UBmBW3d1QitLJqbFWPCfKY3s8t3FpI5L+aBT\npIMYyE1MzvoBcplldYwrXZQJe8qSH5OQa59xfMt7su2u8c8s6BycQQPYKRYBO4T2\nDwr2PhN44zGElwcFSZcuBToKG59ricF53bz30TuPElrXj4nUgNrZqGsMUtk3sf/9\nmy/CderFVvGbSTmPJap8KmDXdXvMPcPE1aWjcwiHZ8+0gRQNWG6Co93SM+aqq6p0\nE1Oe7YgZAgMBAAECggEABN8LadGQYWM92Pt9u1xxUOezaooOx6c0SW7JGn6wE42r\ndcMSnGjSsrjdySXkpXYUqjg2CYSg3DDGL/667s0fdcTK5q/5l6I1rNhWM4NL/C1L\nsv2IlRFvyPTIcINgAq/smA/G7C0ea6pcSFpN6grsC9kEj8paLhy6FgTZeTYGDyuG\nwI3D7XWZNzWfyQlAsoWEYAmDx72rOuEaeK4W4SMf3BB2g1hJ6fZoKT3ehHozAGcJ\nB7R8k3tGALVYdOqQgXhj8t3vNu1OATG0Q6d4z28e4TwsVunxReTyRcofrgOVwpry\nEmb4C5RYaN/rWxRrL8aW+nB3wAD/PFDacVBz/8RvaQKBgQDX90jqlLtLRVAsqbiS\nSHmX67CqQzNNDWgysQLmF2YmmkGyth4QR+cNEenIEeSSt+vc0VMAbxYY5SVzVCRl\nSZHoKHNlLGmepd3aJw5ZcFnpU86J7aG8fhvgZGEmCR+1JOZU7pUbpTvka0WQC3AK\n2+O7nUYIU65xeOaJVZvUu6My+wKBgQDEE6DrFVMNgI3dDZM0buHMYDJ2mL9F1DZb\n2URxYAlmvjkpaQb9Vq1VXV0ApZ3ItXgIX6cVrJB+MILmrsoxAamFOl/9AYiKnpnb\nYMxxqFYPuME7fzEli041915j6CpMmOwrAq6SrLiZ//hNlobJf76dAY9qyX91BTC8\nBfEWVhnk+wKBgQDT5kb+G+bVSPIMkI6PwVrE7DWQKZV5YdE+A55TgtvwvmP95GEF\nGneixFO8wYmjR6C+LgihoV1uGc+wI/v+AbyOrLnkqDoNtrNB7BZRPUKLBHbfsHCE\nELxrZDJJ7qPUyZrR9LIKyQpF6db8KazKiswc9oiTfP/pSHXyhDP8/Ap55wKBgQC6\njDI9dzxdTEGsXo3/BL+vQpbAXvMb7JsLJ9sGQuiu56xayaHsxdqDrSAezXMg0gYx\ncU/2Pwf6Bw2DjCiyF3LBXpiUjjDqMZsQLThVqmK28oBlqs2HetIeZgtX4jrcRWHs\nSdDtm4bGfdIvf1cdvnwLxMA+SRcKrrV/LegB6EkaoQKBgEwE4rllfRxOSGaF47ew\nRxTLGphZmxhLDsx0fMOHflx/BnGnxruBLEhdv3mlp12YMmb2s6kwFJvngLq4fZll\nTmC7BW3Z9h8XsL9j2xtID+5gsxYHHOCcdbzGuQV5KWb51cBym7EP9qk/3NP8w3/+\nH0iKrgAII5Ym0yh41dGL5HCo";function encrypt$1(e){var t=new JSEncrypt;return t.setPublicKey(publicKey),t.encrypt(e)}function decrypt(e){var t=new JSEncrypt;return t.setPrivateKey(privateKey),t.decrypt(e)}var decryptKey={key:"anov@2019:helloX",iv:"anov@2020:helloX"};function decrypAES(e){var t=cryptoJs.enc.Utf8.parse(decryptKey.key),r=cryptoJs.enc.Utf8.parse(decryptKey.iv);return cryptoJs.AES.encrypt(e,t,{iv:r,mode:cryptoJs.mode.CBC,padding:cryptoJs.pad.Pkcs7}).toString()}function safeEval(e,t){var r=store.state.globalVars,n={};r.forEach((function(e){(null==e?void 0:e.name)&&(n[e.name]=e.value||e.originvalue)}));try{return/^(?:[^\r\n]*[\r\n]){0,2}(?:[^\r\n]*(?=\{))?\s*(?:function\s*[^\r\n]*|\(.*?\))?\s*[\w\s\$\._\[\]]*\s*(?:[=:]\s*)?(?:new\s+)?[A-Z]\w*\s*(?:\[.*?\]|\([^\r\n]*\))*\s*\{.*?\}/i.test(e),new Function("data","vars",e)(t,n)}catch(e){return console.error(e),t}}var globalSourceTemp={type:"static",converse:{use:!1,data:[]},static:{data:{},originData:""},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""},datasource:{data:"",inputSql:"",dsName:"",dsType:300,autoUpdate:{open:!1,time:10}},indicator:{zbId:"",zbName:"",params:"",data:"",autoUpdate:{open:!1,time:10}},staticFile:{data:"",dsName:"",dsType:201}},UpdataForContainer=function(e){var t;try{var r=[];if((null==e?void 0:e.dynamicChildren)instanceof Map)for(var n=Array.from(null==e?void 0:e.dynamicChildren),i=0;i<n.length;i++)n[i]instanceof Array&&r.push.apply(r,n[i][1]);else if((null==e?void 0:e.dynamicChildren)instanceof Array)for(n=null==e?void 0:e.dynamicChildren,i=0;i<n.length;i++)n[i]instanceof Array&&r.push.apply(r,n[i][1]);if(null==r?void 0:r.length)for(var o=0,a=r;o<a.length;o++){var s=a[o];if(s){var l=null===(t=null==s?void 0:s.tmpData)||void 0===t?void 0:t.source,c=l.type;l&&"packData"==c&&(s.tmpData.source.packData.data=e.source[0])}}}catch(e){console.log(e)}},__defProp$1=Object.defineProperty,__getOwnPropSymbols$1=Object.getOwnPropertySymbols,__hasOwnProp$1=Object.prototype.hasOwnProperty,__propIsEnum$1=Object.prototype.propertyIsEnumerable,__defNormalProp$1=(e,t,r)=>t in e?__defProp$1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues$1=(e,t)=>{for(var r in t||(t={}))__hasOwnProp$1.call(t,r)&&__defNormalProp$1(e,r,t[r]);if(__getOwnPropSymbols$1)for(var r of __getOwnPropSymbols$1(t))__propIsEnum$1.call(t,r)&&__defNormalProp$1(e,r,t[r]);return e},NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state"),errors="production"!==process$1.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function die(e,...t){if("production"!==process$1.env.NODE_ENV){const r=errors[e],n="function"==typeof r?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(e){return!!e&&!!e[DRAFT_STATE]}function isDraftable(e){var t;return!!e&&(isPlainObject(e)||Array.isArray(e)||!!e[DRAFTABLE]||!!(null==(t=e.constructor)?void 0:t[DRAFTABLE])||isMap(e)||isSet(e))}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject(e){if(!e||"object"!=typeof e)return!1;const t=getPrototypeOf(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===objectCtorString}function each(e,t){0===getArchtype(e)?Reflect.ownKeys(e).forEach((r=>{t(r,e[r],e)})):e.forEach(((r,n)=>t(n,r,e)))}function getArchtype(e){const t=e[DRAFT_STATE];return t?t.type_:Array.isArray(e)?1:isMap(e)?2:isSet(e)?3:0}function has(e,t){return 2===getArchtype(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function set(e,t,r){const n=getArchtype(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function is(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function isMap(e){return e instanceof Map}function isSet(e){return e instanceof Set}function latest(e){return e.copy_||e.base_}function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=isPlainObject(e);if(!0===t||"class_only"===t&&!r){const t=Object.getOwnPropertyDescriptors(e);delete t[DRAFT_STATE];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const i=r[n],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(getPrototypeOf(e),t)}{const t=getPrototypeOf(e);if(null!==t&&r)return __spreadValues$1({},e);const n=Object.create(t);return Object.assign(n,e)}}function freeze(e,t=!1){return isFrozen(e)||isDraft(e)||!isDraftable(e)||(getArchtype(e)>1&&(e.set=e.add=e.clear=e.delete=dontMutateFrozenCollections),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>freeze(t,!0)))),e}function dontMutateFrozenCollections(){die(2)}function isFrozen(e){return Object.isFrozen(e)}var plugins={},currentScope;function getPlugin(e){const t=plugins[e];return t||die(0,e),t}function getCurrentScope(){return currentScope}function createScope(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(e,t){t&&(getPlugin("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===currentScope&&(currentScope=e.parent_)}function enterScope(e){return currentScope=createScope(currentScope,e)}function revokeDraft(e){const t=e[DRAFT_STATE];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[DRAFT_STATE].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e),t.parent_||maybeFreeze(t,e)),t.patches_&&getPlugin("Patches").generateReplacementPatches_(r[DRAFT_STATE].base_,e,t.patches_,t.inversePatches_)):e=finalize(t,r,[]),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NOTHING?e:void 0}function finalize(e,t,r){if(isFrozen(t))return t;const n=t[DRAFT_STATE];if(!n)return each(t,((i,o)=>finalizeProperty(e,n,t,i,o,r))),t;if(n.scope_!==e)return t;if(!n.modified_)return maybeFreeze(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let i=t,o=!1;3===n.type_&&(i=new Set(t),t.clear(),o=!0),each(i,((i,a)=>finalizeProperty(e,n,t,i,a,r,o))),maybeFreeze(e,t,!1),r&&e.patches_&&getPlugin("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function finalizeProperty(e,t,r,n,i,o,a){if("production"!==process$1.env.NODE_ENV&&i===r&&die(5),isDraft(i)){const a=finalize(e,i,o&&t&&3!==t.type_&&!has(t.assigned_,n)?o.concat(n):void 0);if(set(r,n,a),!isDraft(a))return;e.canAutoFreeze_=!1}else a&&r.add(i);if(isDraftable(i)&&!isFrozen(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;finalize(e,i),t&&t.scope_.parent_||"symbol"==typeof n||!Object.prototype.propertyIsEnumerable.call(r,n)||maybeFreeze(e,i)}}function maybeFreeze(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze(t,r)}function createProxyProxy(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=objectTraps;r&&(i=[n],o=arrayTraps);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return n.draft_=s,n.revoke_=a,s}var objectTraps={get(e,t){if(t===DRAFT_STATE)return e;const r=latest(e);if(!has(r,t))return readPropFromProto(e,r,t);const n=r[t];return e.finalized_||!isDraftable(n)?n:n===peek(e.base_,t)?(prepareCopy(e),e.copy_[t]=createProxy(n,e)):n},has:(e,t)=>t in latest(e),ownKeys:e=>Reflect.ownKeys(latest(e)),set(e,t,r){const n=getDescriptorFromProto(latest(e),t);if(null==n?void 0:n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=peek(latest(e),t),i=null==n?void 0:n[DRAFT_STATE];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(is(r,n)&&(void 0!==r||has(e.base_,t)))return!0;prepareCopy(e),markChanged(e)}return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==peek(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,prepareCopy(e),markChanged(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=latest(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){die(11)},getPrototypeOf:e=>getPrototypeOf(e.base_),setPrototypeOf(){die(12)}},arrayTraps={};function peek(e,t){const r=e[DRAFT_STATE];return(r?latest(r):e)[t]}function readPropFromProto(e,t,r){var n;const i=getDescriptorFromProto(t,r);return i?"value"in i?i.value:null==(n=i.get)?void 0:n.call(e.draft_):void 0}function getDescriptorFromProto(e,t){if(!(t in e))return;let r=getPrototypeOf(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=getPrototypeOf(r)}}function markChanged(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}each(objectTraps,((e,t)=>{arrayTraps[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),arrayTraps.deleteProperty=function(e,t){return"production"!==process$1.env.NODE_ENV&&isNaN(parseInt(t))&&die(13),arrayTraps.set.call(this,e,t,void 0)},arrayTraps.set=function(e,t,r){return"production"!==process$1.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&die(14),objectTraps.set.call(this,e[0],t,r,e[0])};var Immer2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...i){return n.produce(e,(e=>t.call(this,e,...i)))}}let n;if("function"!=typeof t&&die(6),void 0!==r&&"function"!=typeof r&&die(7),isDraftable(e)){const i=enterScope(this),o=createProxy(e,void 0);let a=!0;try{n=t(o),a=!1}finally{a?revokeScope(i):leaveScope(i)}return usePatchesInScope(i,r),processResult(n,i)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===NOTHING&&(n=void 0),this.autoFreeze_&&freeze(n,!0),r){const t=[],i=[];getPlugin("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}die(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,(t=>e(t,...r)));let r,n;const i=this.produce(e,t,((e,t)=>{r=e,n=t}));return[i,r,n]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){isDraftable(e)||die(8),isDraft(e)&&(e=current(e));const t=enterScope(this),r=createProxy(e,void 0);return r[DRAFT_STATE].isManual_=!0,leaveScope(t),r}finishDraft(e,t){const r=e&&e[DRAFT_STATE];r&&r.isManual_||die(9);const{scope_:n}=r;return usePatchesInScope(n,t),processResult(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=getPlugin("Patches").applyPatches_;return isDraft(e)?n(e,t):this.produce(e,(e=>n(e,t)))}};function createProxy(e,t){const r=isMap(e)?getPlugin("MapSet").proxyMap_(e,t):isSet(e)?getPlugin("MapSet").proxySet_(e,t):createProxyProxy(e,t);return(t?t.scope_:getCurrentScope()).drafts_.push(r),r}function current(e){return isDraft(e)||die(10,e),currentImpl(e)}function currentImpl(e){if(!isDraftable(e)||isFrozen(e))return e;const t=e[DRAFT_STATE];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=shallowCopy(e,t.scope_.immer_.useStrictShallowCopy_)}else r=shallowCopy(e,!0);return each(r,((e,t)=>{set(r,e,currentImpl(t))})),t&&(t.finalized_=!1),r}var immer=new Immer2,produce=immer.produce;immer.produceWithPatches.bind(immer);var setAutoFreeze=immer.setAutoFreeze.bind(immer);function produceWithImmer(e,t){return setAutoFreeze(!1),produce(e,t)}immer.setUseStrictShallowCopy.bind(immer),immer.applyPatches.bind(immer),immer.createDraft.bind(immer),immer.finishDraft.bind(immer);var baseDataMutaitons={updataArea:function(e,t){e.currentArea=t},selectdArea:function(e,t){var r=selectdArea(t,e.list);e.currentArea=r},updataAngle:function(e,t){var r=t.id,n=t.angle,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.baseData.angle=n)},updataBaseData:function(e,t){var r,n=t.data;if(null==(null===(r=null==n?void 0:n.baseData)||void 0===r?void 0:r.opacity)&&(n.baseData.opacity=100),checkBaseData(t.data.baseData,"updataBaseData")){var i=t.ratio,o=findItemDeep$1(e.list,n.cid),a=t.oldData;if("object"!=typeof o||o.pid){if("object"==typeof o&&o.pid){var s=findItemDeep$1(e.list,o.pid);"object"==typeof s?(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,n.baseData),upDataGroup(s,s.baseData),e.groupFlag=!e.groupFlag):s||(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,n.baseData))}}else if(Object.assign(o.baseData,n.baseData),i&&o.children&&o.children.length>0){var l=o.baseData.width/a.width,c=o.baseData.height/a.height;updataSizeDeep(o.children,{xRatio:l,yRatio:c})}}},multipleUpdataBaseData:function(e,t){if(t.ratio)for(var r=t.newData,n=t.oldData,i=r.width/n.width,o=r.height/n.height,a=e.cache.length;a--;)e.cache[a].baseData.left=e.cache[a].baseData.left*i,e.cache[a].baseData.width=e.cache[a].baseData.width*i,e.cache[a].baseData.top=e.cache[a].baseData.top*o,e.cache[a].baseData.height=e.cache[a].baseData.height*o;else for(a=e.cache.length;a--;){var s=_$1.cloneDeep(e.cache[a].baseData);s.left=s.left+t.deltaX,s.top=s.top+t.deltaY,e.cache[a].comPanel?e.cache[a].comPanel.setAttrData(Object.assign(s,t.baseData)):e.cache[a].baseData=s}},multipleUpdata:function(e,t){var r=t.ids,n=t.data,i=findItemDeep$1(e.list,r);i&&Object.assign(i.baseData,n)},multipleMove:function(e,t){},move:function(e,t){var r=e.selectd,n=t.type,i=t.speed?t.speed:1;if(0!==r.length){var o=e.list.filter((function(e){return r.includes(e.cid)}));0==o.length&&(o=[findItemDeep$1(e.list,r[0])]);for(var a=0;a<o.length;a++){var s=o[a];if(s.pid&&e.selectd.length>1)return void console.warn("Only one component can be moved within a group");if("up"===n?s.baseData.top=s.baseData.top-i:"down"===n?s.baseData.top+=i:"left"===n?s.baseData.left-=i:"right"===n&&(s.baseData.left+=i),"object"==typeof s&&s.pid){var l=findItemDeep$1(e.list,s.pid);"object"==typeof l&&(upDataGroup(l,l.baseData),e.groupFlag=!e.groupFlag)}}}else console.warn("Warning! please select the component to move.")},updataGroupBaseData:function(e,t){var r=findItemDeep$1(e.list,t.pid),n=_$1.cloneDeep(r);findItemDeep$1(r.children,t.cid),upDataGroup(r,n.baseData)},editGroupBaseData:function(e,t){var r=findItemDeep$1(e.list,t);r.children.forEach((function(e){setPositionForWorld(e,r.baseData)}))},syncBaseData:function(e,t){var r=t.cid,n=t.data,i=t.isContainer,o=function(e){for(var t=0;t<e.length;t++)r===e[t].cid?(e[t].baseData=Object.assign({},e[t].baseData,n),console.log(__assign$1({},e[t].baseData))):e[t].hasOwnProperty("children")&&o(e[t].children)},a=produceWithImmer(e.list,(function(e){void 0!==i&&e.length&&o(e)}));if(i)e.list=a;else{var s=findItemDeep$1(a,r);if(s){var l=_$1.cloneDeep(s.baseData),c=Object.assign({},s.baseData,n);this.commit("GoCom/updataBaseData",{data:{cid:r,baseData:c},oldData:l,ratio:!0})}}},updataItemData:function(e,t){var r=t.cid,n=t.propsName,i=t.propsValue,o=findItemDeep$1(e.list,r);o&&(o[n]=i)},updataOpacity:function(e,t){var r=t.cid,n=t.propsValue,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&i&&(i.baseData.opacity=n)}},extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics(e,t)};
|
|
33
33
|
/*! *****************************************************************************
|
|
34
34
|
Copyright (c) Microsoft Corporation.
|
|
35
35
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -41,7 +41,7 @@ function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,
|
|
|
41
41
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
42
42
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
43
43
|
PERFORMANCE OF THIS SOFTWARE.
|
|
44
|
-
***************************************************************************** */function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)};function __spreadArray(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,keys=Object.keys,isArray=Array.isArray;function extend(e,t){return"object"!=typeof t||keys(t).forEach((function(r){e[r]=t[r]})),e}"undefined"==typeof Promise||_global.Promise||(_global.Promise=Promise);var getProto=Object.getPrototypeOf,_hasOwn={}.hasOwnProperty;function hasOwn(e,t){return _hasOwn.call(e,t)}function props(e,t){"function"==typeof t&&(t=t(getProto(e))),("undefined"==typeof Reflect?keys:Reflect.ownKeys)(t).forEach((function(r){setProp(e,r,t[r])}))}var defineProperty=Object.defineProperty;function setProp(e,t,r,n){defineProperty(e,t,extend(r&&hasOwn(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function derive(e){return{from:function(t){return e.prototype=Object.create(t.prototype),setProp(e.prototype,"constructor",e),{extend:props.bind(null,e.prototype)}}}}var getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;function getPropertyDescriptor(e,t){var r;return getOwnPropertyDescriptor(e,t)||(r=getProto(e))&&getPropertyDescriptor(r,t)}var _slice$1=[].slice;function slice(e,t,r){return _slice$1.call(e,t,r)}function override(e,t){return t(e)}function assert(e){if(!e)throw new Error("Assertion Failed")}function asap$1(e){_global.setImmediate?setImmediate(e):setTimeout(e,0)}function arrayToObject(e,t){return e.reduce((function(e,r,n){var i=t(r,n);return i&&(e[i[0]]=i[1]),e}),{})}function getByKeyPath(e,t){if("string"==typeof t&&hasOwn(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,i=t.length;n<i;++n){var o=getByKeyPath(e,t[n]);r.push(o)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return null==s?void 0:getByKeyPath(s,t.substr(a+1))}}function setByKeyPath(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){assert("string"!=typeof r&&"length"in r);for(var n=0,i=t.length;n<i;++n)setByKeyPath(e,t[n],r[n])}else{var o=t.indexOf(".");if(-1!==o){var a=t.substr(0,o),s=t.substr(o+1);if(""===s)void 0===r?isArray(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var c=e[a];c&&hasOwn(e,a)||(c=e[a]={}),setByKeyPath(c,s,r)}}else void 0===r?isArray(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function delByKeyPath(e,t){"string"==typeof t?setByKeyPath(e,t,void 0):"length"in t&&[].map.call(t,(function(t){setByKeyPath(e,t,void 0)}))}function shallowClone(e){var t={};for(var r in e)hasOwn(e,r)&&(t[r]=e[r]);return t}var concat=[].concat;function flatten(e){return concat.apply([],e)}var intrinsicTypeNames="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(flatten([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return _global[e]})),intrinsicTypes=new Set(intrinsicTypeNames.map((function(e){return _global[e]})));function cloneSimpleObjectTree(e){var t={};for(var r in e)if(hasOwn(e,r)){var n=e[r];t[r]=!n||"object"!=typeof n||intrinsicTypes.has(n.constructor)?n:cloneSimpleObjectTree(n)}return t}function objectIsEmpty(e){for(var t in e)if(hasOwn(e,t))return!1;return!0}var circularRefs=null;function deepClone(e){circularRefs=new WeakMap;var t=innerDeepClone(e);return circularRefs=null,t}function innerDeepClone(e){if(!e||"object"!=typeof e)return e;var t=circularRefs.get(e);if(t)return t;if(isArray(e)){t=[],circularRefs.set(e,t);for(var r=0,n=e.length;r<n;++r)t.push(innerDeepClone(e[r]))}else if(intrinsicTypes.has(e.constructor))t=e;else{var i=getProto(e);for(var o in t=i===Object.prototype?{}:Object.create(i),circularRefs.set(e,t),e)hasOwn(e,o)&&(t[o]=innerDeepClone(e[o]))}return t}var toString={}.toString;function toStringTag(e){return toString.call(e).slice(8,-1)}var iteratorSymbol="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",getIteratorOf="symbol"==typeof iteratorSymbol?function(e){var t;return null!=e&&(t=e[iteratorSymbol])&&t.apply(e)}:function(){return null};function delArrayItem(e,t){var r=e.indexOf(t);return r>=0&&e.splice(r,1),r>=0}var NO_CHAR_ARRAY={};function getArrayOf(e){var t,r,n,i;if(1===arguments.length){if(isArray(e))return e.slice();if(this===NO_CHAR_ARRAY&&"string"==typeof e)return[e];if(i=getIteratorOf(e)){for(r=[];!(n=i.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=new Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}var isAsyncFunction="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dexieErrorNames=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],idbDomErrorNames=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],errorList=dexieErrorNames.concat(idbDomErrorNames),defaultTexts={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function DexieError(e,t){this.name=e,this.message=t}function getMultiErrorMessage(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,r){return r.indexOf(e)===t})).join("\n")}function ModifyError(e,t,r,n){this.failures=t,this.failedKeys=n,this.successCount=r,this.message=getMultiErrorMessage(e,t)}function BulkError(e,t){this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=getMultiErrorMessage(e,this.failures)}derive(DexieError).from(Error).extend({toString:function(){return this.name+": "+this.message}}),derive(ModifyError).from(DexieError),derive(BulkError).from(DexieError);var errnames=errorList.reduce((function(e,t){return e[t]=t+"Error",e}),{}),BaseException=DexieError,exceptions=errorList.reduce((function(e,t){var r=t+"Error";function n(e,n){this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=defaultTexts[t]||r,this.inner=null)}return derive(n).from(BaseException),e[t]=n,e}),{});exceptions.Syntax=SyntaxError,exceptions.Type=TypeError,exceptions.Range=RangeError;var exceptionMap=idbDomErrorNames.reduce((function(e,t){return e[t+"Error"]=exceptions[t],e}),{});function mapError(e,t){if(!e||e instanceof DexieError||e instanceof TypeError||e instanceof SyntaxError||!e.name||!exceptionMap[e.name])return e;var r=new exceptionMap[e.name](t||e.message,e);return"stack"in e&&setProp(r,"stack",{get:function(){return this.inner.stack}}),r}var fullNameExceptions=errorList.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=exceptions[t]),e}),{});function nop(){}function mirror(e){return e}function pureFunctionChain(e,t){return null==e||e===mirror?t:function(r){return t(e(r))}}function callBoth(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function hookCreatingChain(e,t){return e===nop?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?callBoth(n,this.onsuccess):n),i&&(this.onerror=this.onerror?callBoth(i,this.onerror):i),void 0!==o?o:r}}function hookDeletingChain(e,t){return e===nop?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?callBoth(r,this.onsuccess):r),n&&(this.onerror=this.onerror?callBoth(n,this.onerror):n)}}function hookUpdatingChain(e,t){return e===nop?t:function(r){var n=e.apply(this,arguments);extend(r,n);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?callBoth(i,this.onsuccess):i),o&&(this.onerror=this.onerror?callBoth(o,this.onerror):o),void 0===n?void 0===a?void 0:a:extend(n,a)}}function reverseStoppableEventChain(e,t){return e===nop?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function promisableChain(e,t){return e===nop?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return r.then((function(){return t.apply(n,o)}))}return t.apply(this,arguments)}}fullNameExceptions.ModifyError=ModifyError,fullNameExceptions.DexieError=DexieError,fullNameExceptions.BulkError=BulkError;var debug="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function setDebug(e,t){debug=e}var INTERNAL={},ZONE_ECHO_LIMIT=100,_a$1="undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,getProto(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,getProto(t),e]}(),resolvedNativePromise=_a$1[0],nativePromiseProto=_a$1[1],resolvedGlobalPromise=_a$1[2],nativePromiseThen=nativePromiseProto&&nativePromiseProto.then,NativePromise=resolvedNativePromise&&resolvedNativePromise.constructor,patchGlobalPromise=!!resolvedGlobalPromise;function schedulePhysicalTick(){queueMicrotask(physicalTick)}var asap=function(e,t){microtickQueue.push([e,t]),needsNewPhysicalTick&&(schedulePhysicalTick(),needsNewPhysicalTick=!1)},isOutsideMicroTick=!0,needsNewPhysicalTick=!0,unhandledErrors=[],rejectingErrors=[],rejectionMapper=mirror,globalPSD={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:nop,pgp:!1,env:{},finalize:nop},PSD=globalPSD,microtickQueue=[],numScheduledCalls=0,tickFinalizers=[];function DexiePromise(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=PSD;if("function"!=typeof e){if(e!==INTERNAL)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&handleRejection(this,this._value))}this._state=null,this._value=null,++t.ref,executePromiseTask(this,e)}var thenProp={get:function(){var e=PSD,t=totalEchoes;function r(r,n){var i=this,o=!e.global&&(e!==PSD||t!==totalEchoes),a=o&&!decrementExpectedAwaits(),s=new DexiePromise((function(t,s){propagateToListener(i,new Listener(nativeAwaitCompatibleWrap(r,e,o,a),nativeAwaitCompatibleWrap(n,e,o,a),t,s,e))}));return this._consoleTask&&(s._consoleTask=this._consoleTask),s}return r.prototype=INTERNAL,r},set:function(e){setProp(this,"then",e&&e.prototype===INTERNAL?thenProp:{get:function(){return e},set:thenProp.set})}};function Listener(e,t,r,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=i}function executePromiseTask(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&beginMicroTickScope();t&&"function"==typeof t.then?executePromiseTask(e,(function(e,r){t instanceof DexiePromise?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,propagateAllListeners(e)),r&&endMicroTickScope()}}),handleRejection.bind(null,e))}catch(t){handleRejection(e,t)}}function handleRejection(e,t){if(rejectingErrors.push(t),null===e._state){var r=e._lib&&beginMicroTickScope();t=rejectionMapper(t),e._state=!1,e._value=t,addPossiblyUnhandledError(e),propagateAllListeners(e),r&&endMicroTickScope()}}function propagateAllListeners(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)propagateToListener(e,t[r]);var i=e._PSD;--i.ref||i.finalize(),0===numScheduledCalls&&(++numScheduledCalls,asap((function(){0==--numScheduledCalls&&finalizePhysicalTick()}),[]))}function propagateToListener(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++numScheduledCalls,asap(callListener,[r,e,t])}else e._listeners.push(t)}function callListener(e,t,r){try{var n,i=t._value;!t._state&&rejectingErrors.length&&(rejectingErrors=[]),n=debug&&t._consoleTask?t._consoleTask.run((function(){return e(i)})):e(i),t._state||-1!==rejectingErrors.indexOf(i)||markErrorAsHandled(t),r.resolve(n)}catch(e){r.reject(e)}finally{0==--numScheduledCalls&&finalizePhysicalTick(),--r.psd.ref||r.psd.finalize()}}function physicalTick(){usePSD(globalPSD,(function(){beginMicroTickScope()&&endMicroTickScope()}))}function beginMicroTickScope(){var e=isOutsideMicroTick;return isOutsideMicroTick=!1,needsNewPhysicalTick=!1,e}function endMicroTickScope(){var e,t,r;do{for(;microtickQueue.length>0;)for(e=microtickQueue,microtickQueue=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(microtickQueue.length>0);isOutsideMicroTick=!0,needsNewPhysicalTick=!0}function finalizePhysicalTick(){var e=unhandledErrors;unhandledErrors=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=tickFinalizers.slice(0),r=t.length;r;)t[--r]()}function run_at_end_of_this_or_next_physical_tick(e){tickFinalizers.push((function t(){e(),tickFinalizers.splice(tickFinalizers.indexOf(t),1)})),++numScheduledCalls,asap((function(){0==--numScheduledCalls&&finalizePhysicalTick()}),[])}function addPossiblyUnhandledError(e){unhandledErrors.some((function(t){return t._value===e._value}))||unhandledErrors.push(e)}function markErrorAsHandled(e){for(var t=unhandledErrors.length;t;)if(unhandledErrors[--t]._value===e._value)return void unhandledErrors.splice(t,1)}function PromiseReject(e){return new DexiePromise(INTERNAL,!1,e)}function wrap$1(e,t){var r=PSD;return function(){var n=beginMicroTickScope(),i=PSD;try{return switchToZone(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{switchToZone(i,!1),n&&endMicroTickScope()}}}props(DexiePromise.prototype,{then:thenProp,_then:function(e,t){propagateToListener(this,new Listener(null,null,e,t,PSD))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,(function(e){return e instanceof t?r(e):PromiseReject(e)})):this.then(null,(function(e){return e&&e.name===t?r(e):PromiseReject(e)}))},finally:function(e){return this.then((function(t){return DexiePromise.resolve(e()).then((function(){return t}))}),(function(t){return DexiePromise.resolve(e()).then((function(){return PromiseReject(t)}))}))},timeout:function(e,t){var r=this;return e<1/0?new DexiePromise((function(n,i){var o=setTimeout((function(){return i(new exceptions.Timeout(t))}),e);r.then(n,i).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&setProp(DexiePromise.prototype,Symbol.toStringTag,"Dexie.Promise"),globalPSD.env=snapShot(),props(DexiePromise,{all:function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((function(i,o){return DexiePromise.resolve(i).then((function(r){e[o]=r,--n||t(e)}),r)}))}))},resolve:function(e){return e instanceof DexiePromise?e:e&&"function"==typeof e.then?new DexiePromise((function(t,r){e.then(t,r)})):new DexiePromise(INTERNAL,!0,e)},reject:PromiseReject,race:function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){e.map((function(e){return DexiePromise.resolve(e).then(t,r)}))}))},PSD:{get:function(){return PSD},set:function(e){return PSD=e}},totalEchoes:{get:function(){return totalEchoes}},newPSD:newScope,usePSD:usePSD,scheduler:{get:function(){return asap},set:function(e){asap=e}},rejectionMapper:{get:function(){return rejectionMapper},set:function(e){rejectionMapper=e}},follow:function(e,t){return new DexiePromise((function(r,n){return newScope((function(t,r){var n=PSD;n.unhandleds=[],n.onunhandled=r,n.finalize=callBoth((function(){var e=this;run_at_end_of_this_or_next_physical_tick((function(){0===e.unhandleds.length?t():r(e.unhandleds[0])}))}),n.finalize),e()}),t,r,n)}))}}),NativePromise&&(NativePromise.allSettled&&setProp(DexiePromise,"allSettled",(function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t){0===e.length&&t([]);var r=e.length,n=new Array(r);e.forEach((function(e,i){return DexiePromise.resolve(e).then((function(e){return n[i]={status:"fulfilled",value:e}}),(function(e){return n[i]={status:"rejected",reason:e}})).then((function(){return--r||t(n)}))}))}))})),NativePromise.any&&"undefined"!=typeof AggregateError&&setProp(DexiePromise,"any",(function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){0===e.length&&r(new AggregateError([]));var n=e.length,i=new Array(n);e.forEach((function(e,o){return DexiePromise.resolve(e).then((function(e){return t(e)}),(function(e){i[o]=e,--n||r(new AggregateError(i))}))}))}))})));var task={awaits:0,echoes:0,id:0},taskCounter=0,zoneStack=[],zoneEchoes=0,totalEchoes=0,zone_id_counter=0;function newScope(e,t,r,n){var i=PSD,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++zone_id_counter,globalPSD.env,o.env=patchGlobalPromise?{Promise:DexiePromise,PromiseProp:{value:DexiePromise,configurable:!0,writable:!0},all:DexiePromise.all,race:DexiePromise.race,allSettled:DexiePromise.allSettled,any:DexiePromise.any,resolve:DexiePromise.resolve,reject:DexiePromise.reject}:{},t&&extend(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=usePSD(o,e,r,n);return 0===o.ref&&o.finalize(),a}function incrementExpectedAwaits(){return task.id||(task.id=++taskCounter),++task.awaits,task.echoes+=ZONE_ECHO_LIMIT,task.id}function decrementExpectedAwaits(){return!!task.awaits&&(0==--task.awaits&&(task.id=0),task.echoes=task.awaits*ZONE_ECHO_LIMIT,!0)}function onPossibleParallellAsync(e){return task.echoes&&e&&e.constructor===NativePromise?(incrementExpectedAwaits(),e.then((function(e){return decrementExpectedAwaits(),e}),(function(e){return decrementExpectedAwaits(),rejection(e)}))):e}function zoneEnterEcho(e){++totalEchoes,task.echoes&&0!=--task.echoes||(task.echoes=task.awaits=task.id=0),zoneStack.push(PSD),switchToZone(e,!0)}function zoneLeaveEcho(){var e=zoneStack[zoneStack.length-1];zoneStack.pop(),switchToZone(e,!1)}function switchToZone(e,t){var r=PSD;if((t?!task.echoes||zoneEchoes++&&e===PSD:!zoneEchoes||--zoneEchoes&&e===PSD)||queueMicrotask(t?zoneEnterEcho.bind(null,e):zoneLeaveEcho),e!==PSD&&(PSD=e,r===globalPSD&&(globalPSD.env=snapShot()),patchGlobalPromise)){var n=globalPSD.env.Promise,i=e.env;(r.global||e.global)&&(Object.defineProperty(_global,"Promise",i.PromiseProp),n.all=i.all,n.race=i.race,n.resolve=i.resolve,n.reject=i.reject,i.allSettled&&(n.allSettled=i.allSettled),i.any&&(n.any=i.any))}}function snapShot(){var e=_global.Promise;return patchGlobalPromise?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(_global,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function usePSD(e,t,r,n,i){var o=PSD;try{return switchToZone(e,!0),t(r,n,i)}finally{switchToZone(o,!1)}}function nativeAwaitCompatibleWrap(e,t,r,n){return"function"!=typeof e?e:function(){var i=PSD;r&&incrementExpectedAwaits(),switchToZone(t,!0);try{return e.apply(this,arguments)}finally{switchToZone(i,!1),n&&queueMicrotask(decrementExpectedAwaits)}}}function execInGlobalContext(e){Promise===NativePromise&&0===task.echoes?0===zoneEchoes?e():enqueueNativeMicroTask(e):setTimeout(e,0)}-1===(""+nativePromiseThen).indexOf("[native code]")&&(incrementExpectedAwaits=decrementExpectedAwaits=nop);var rejection=DexiePromise.reject;function tempTransaction(e,t,r,n){if(e.idbdb&&(e._state.openComplete||PSD.letThrough||e._vip)){var i=e._createTransaction(t,r,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===errnames.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e.close({disableAutoOpen:!1}),e.open().then((function(){return tempTransaction(e,t,r,n)}))):rejection(i)}return i._promise(t,(function(e,t){return newScope((function(){return PSD.trans=i,n(e,t,i)}))})).then((function(e){if("readwrite"===t)try{i.idbtrans.commit()}catch(e){}return"readonly"===t?e:i._completion.then((function(){return e}))}))}if(e._state.openComplete)return rejection(new exceptions.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._state.autoOpen)return rejection(new exceptions.DatabaseClosed);e.open().catch(nop)}return e._state.dbReadyPromise.then((function(){return tempTransaction(e,t,r,n)}))}var DEXIE_VERSION="4.0.4",maxString=String.fromCharCode(65535),minKey=-1/0,INVALID_KEY_ARGUMENT="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",STRING_EXPECTED="String expected.",connections=[],DBNAMES_DB="__dbnames",READONLY="readonly",READWRITE="readwrite";function combine(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var AnyRange={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function workaroundForUndefinedPrimKey(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=deepClone(t))[e],t}}function Entity(){throw exceptions.Type()}function cmp(e,t){try{var r=type(e),n=type(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return compareUint8Arrays(getUint8Array(e),getUint8Array(t));case"Array":return compareArrays(e,t)}}catch(e){}return NaN}function compareArrays(e,t){for(var r=e.length,n=t.length,i=r<n?r:n,o=0;o<i;++o){var a=cmp(e[o],t[o]);if(0!==a)return a}return r===n?0:r<n?-1:1}function compareUint8Arrays(e,t){for(var r=e.length,n=t.length,i=r<n?r:n,o=0;o<i;++o)if(e[o]!==t[o])return e[o]<t[o]?-1:1;return r===n?0:r<n?-1:1}function type(e){var t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var r=toStringTag(e);return"ArrayBuffer"===r?"binary":r}function getUint8Array(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var Table=function(){function e(){}return e.prototype._trans=function(e,t,r){var n=this._tx||PSD.trans,i=this.name,o=debug&&"undefined"!=typeof console&&console.createTask&&console.createTask("Dexie: ".concat("readonly"===e?"read":"write"," ").concat(this.name));function a(e,r,n){if(!n.schema[i])throw new exceptions.NotFound("Table "+i+" not part of transaction");return t(n.idbtrans,n)}var s=beginMicroTickScope();try{var c=n&&n.db._novip===this.db._novip?n===PSD.trans?n._promise(e,a,r):newScope((function(){return n._promise(e,a,r)}),{trans:n,transless:PSD.transless||PSD}):tempTransaction(this.db,e,[this.name],a);return o&&(c._consoleTask=o,c=c.catch((function(e){return console.trace(e),rejection(e)}))),c}finally{s&&endMicroTickScope()}},e.prototype.get=function(e,t){var r=this;return e&&e.constructor===Object?this.where(e).first(t):null==e?rejection(new exceptions.Type("Invalid argument to Table.get()")):this._trans("readonly",(function(t){return r.core.get({trans:t,key:e}).then((function(e){return r.hook.reading.fire(e)}))})).then(t)},e.prototype.where=function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(isArray(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=keys(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){if(e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))){for(var r=0;r<t.length;++r)if(-1===t.indexOf(e.keyPath[r]))return!1;return!0}return!1})).sort((function(e,t){return e.keyPath.length-t.keyPath.length}))[0];if(r&&this.db._maxKey!==maxString){var n=r.keyPath.slice(0,t.length);return this.where(n).equals(n.map((function(t){return e[t]})))}!r&&debug&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var i=this.schema.idxByName,o=this.db._deps.indexedDB;function a(e,t){return 0===o.cmp(e,t)}var s=t.reduce((function(t,r){var n=t[0],o=t[1],s=i[r],c=e[r];return[n||s,n||!s?combine(o,s&&s.multi?function(e){var t=getByKeyPath(e,r);return isArray(t)&&t.some((function(e){return a(c,e)}))}:function(e){return a(c,getByKeyPath(e,r))}):o]}),[null,null]),c=s[0],u=s[1];return c?this.where(c.name).equals(e[c.keyPath]).filter(u):r?this.filter(u):this.where(t).equals("")},e.prototype.filter=function(e){return this.toCollection().and(e)},e.prototype.count=function(e){return this.toCollection().count(e)},e.prototype.offset=function(e){return this.toCollection().offset(e)},e.prototype.limit=function(e){return this.toCollection().limit(e)},e.prototype.each=function(e){return this.toCollection().each(e)},e.prototype.toArray=function(e){return this.toCollection().toArray(e)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,isArray(e)?"[".concat(e.join("+"),"]"):e))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(e){var t=this.db,r=this.name;this.schema.mappedClass=e,e.prototype instanceof Entity&&(e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return __extends(n,e),Object.defineProperty(n.prototype,"db",{get:function(){return t},enumerable:!1,configurable:!0}),n.prototype.table=function(){return r},n}(e));for(var n=new Set,i=e.prototype;i;i=getProto(i))Object.getOwnPropertyNames(i).forEach((function(e){return n.add(e)}));var o=function(t){if(!t)return t;var r=Object.create(e.prototype);for(var i in t)if(!n.has(i))try{r[i]=t[i]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=o,this.hook("reading",o),e},e.prototype.defineClass=function(){return this.mapToClass((function(e){extend(this,e)}))},e.prototype.add=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=workaroundForUndefinedPrimKey(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{setByKeyPath(e,o,t)}catch(e){}return t}))},e.prototype.update=function(e,t){if("object"!=typeof e||isArray(e))return this.where(":id").equals(e).modify(t);var r=getByKeyPath(e,this.schema.primKey.keyPath);return void 0===r?rejection(new exceptions.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(t)},e.prototype.put=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=workaroundForUndefinedPrimKey(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{setByKeyPath(e,o,t)}catch(e){}return t}))},e.prototype.delete=function(e){var t=this;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):void 0}))},e.prototype.clear=function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:AnyRange})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):void 0}))},e.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",(function(r){return t.core.getMany({keys:e,trans:r}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))},e.prototype.bulkAdd=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new exceptions.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,u=s&&a?e.map(workaroundForUndefinedPrimKey(s)):e;return n.core.mutate({trans:t,type:"add",keys:i,values:u,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new BulkError("".concat(n.name,".bulkAdd(): ").concat(t," of ").concat(c," operations failed"),a)}))}))},e.prototype.bulkPut=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new exceptions.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,u=s&&a?e.map(workaroundForUndefinedPrimKey(s)):e;return n.core.mutate({trans:t,type:"put",keys:i,values:u,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new BulkError("".concat(n.name,".bulkPut(): ").concat(t," of ").concat(c," operations failed"),a)}))}))},e.prototype.bulkUpdate=function(e){var t=this,r=this.core,n=e.map((function(e){return e.key})),i=e.map((function(e){return e.changes})),o=[];return this._trans("readwrite",(function(a){return r.getMany({trans:a,keys:n,cache:"clone"}).then((function(s){var c=[],u=[];e.forEach((function(e,r){var n=e.key,i=e.changes,a=s[r];if(a){for(var l=0,d=Object.keys(i);l<d.length;l++){var h=d[l],f=i[h];if(h===t.schema.primKey.keyPath){if(0!==cmp(f,n))throw new exceptions.Constraint("Cannot update primary key in bulkUpdate()")}else setByKeyPath(a,h,f)}o.push(r),c.push(n),u.push(a)}}));var l=c.length;return r.mutate({trans:a,type:"put",keys:c,values:u,updates:{keys:n,changeSpecs:i}}).then((function(e){var r=e.numFailures,n=e.failures;if(0===r)return l;for(var i=0,a=Object.keys(n);i<a.length;i++){var s=a[i],c=o[Number(s)];if(null!=c){var u=n[s];delete n[s],n[c]=u}}throw new BulkError("".concat(t.name,".bulkUpdate(): ").concat(r," of ").concat(l," operations failed"),n)}))}))}))},e.prototype.bulkDelete=function(e){var t=this,r=e.length;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:e})})).then((function(e){var n=e.numFailures,i=e.lastResult,o=e.failures;if(0===n)return i;throw new BulkError("".concat(t.name,".bulkDelete(): ").concat(n," of ").concat(r," operations failed"),o)}))},e}();function Events(e){var t={},r=function(r,n){if(n){for(var i=arguments.length,o=new Array(i-1);--i;)o[i-1]=arguments[i];return t[r].subscribe.apply(null,o),e}if("string"==typeof r)return t[r]};r.addEventType=o;for(var n=1,i=arguments.length;n<i;++n)o(arguments[n]);return r;function o(e,n,i){if("object"!=typeof e){var a;n||(n=reverseStoppableEventChain),i||(i=nop);var s={subscribers:[],fire:i,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=n(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter((function(t){return t!==e})),s.fire=s.subscribers.reduce(n,i)}};return t[e]=r[e]=s,s}keys(a=e).forEach((function(e){var t=a[e];if(isArray(t))o(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new exceptions.InvalidArgument("Invalid event config");var r=o(e,mirror,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){asap$1((function(){e.apply(null,t)}))}))}))}}))}}function makeClassConstructor(e,t){return derive(t).from({prototype:e}),t}function createTableConstructor(e){return makeClassConstructor(Table.prototype,(function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:Events(null,{creating:[hookCreatingChain,nop],reading:[pureFunctionChain,mirror],updating:[hookUpdatingChain,nop],deleting:[hookDeletingChain,nop]})}))}function isPlainKeyRange(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function addFilter(e,t){e.filter=combine(e.filter,t)}function addReplayFilter(e,t,r){var n=e.replayFilter;e.replayFilter=n?function(){return combine(n(),t())}:t,e.justLimit=r&&!n}function addMatchFilter(e,t){e.isMatch=combine(e.isMatch,t)}function getIndexOrStore(e,t){if(e.isPrimKey)return t.primaryKey;var r=t.getIndexByKeyPath(e.index);if(!r)throw new exceptions.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function openCursor(e,t,r){var n=getIndexOrStore(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function iter(e,t,r,n){var i=e.replayFilter?combine(e.filter,e.replayFilter()):e.filter;if(e.or){var o={},a=function(e,r,n){if(!i||i(r,n,(function(e){return r.stop(e)}),(function(e){return r.fail(e)}))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),hasOwn(o,s)||(o[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),iterate(openCursor(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return iterate(openCursor(e,n,r),combine(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function iterate(e,t,r,n){var i=n?function(e,t,i){return r(n(e),t,i)}:r,o=wrap$1(i);return e.then((function(e){if(e)return e.start((function(){var r=function(){return e.continue()};t&&!t(e,(function(e){return r=e}),(function(t){e.stop(t),r=nop}),(function(t){e.fail(t),r=nop}))||o(e.value,e,(function(e){return r=e})),r()}))}))}var PropModification=function(){function e(e){Object.assign(this,e)}return e.prototype.execute=function(e){var t,r=null===(t=this.replacePrefix)||void 0===t?void 0:t[0];return r&&"string"==typeof e&&e.startsWith(r)?this.replacePrefix[1]+e.substring(r.length):e},e}(),Collection=function(){function e(){}return e.prototype._read=function(e,t){var r=this._ctx;return r.error?r.table._trans(null,rejection.bind(null,r.error)):r.table._trans("readonly",e).then(t)},e.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,rejection.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},e.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=combine(t.algorithm,e)},e.prototype._iterate=function(e,t){return iter(this._ctx,e,t,this._ctx.table.core)},e.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&extend(r,e),t._ctx=r,t},e.prototype.raw=function(){return this._ctx.valueMapper=null,this},e.prototype.each=function(e){var t=this._ctx;return this._read((function(r){return iter(t,e,r,t.table.core)}))},e.prototype.count=function(e){var t=this;return this._read((function(e){var r=t._ctx,n=r.table.core;if(isPlainKeyRange(r,!0))return n.count({trans:e,query:{index:getIndexOrStore(r,n.schema),range:r.range}}).then((function(e){return Math.min(e,r.limit)}));var i=0;return iter(r,(function(){return++i,!1}),e,n).then((function(){return i}))})).then(e)},e.prototype.sortBy=function(e,t){var r=e.split(".").reverse(),n=r[0],i=r.length-1;function o(e,t){return t?o(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=o(e,i),n=o(t,i);return r<n?-a:r>n?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)},e.prototype.toArray=function(e){var t=this;return this._read((function(e){var r=t._ctx;if("next"===r.dir&&isPlainKeyRange(r,!0)&&r.limit>0){var n=r.valueMapper,i=getIndexOrStore(r,r.table.core.schema);return r.table.core.query({trans:e,limit:r.limit,values:!0,query:{index:i,range:r.range}}).then((function(e){var t=e.result;return n?t.map(n):t}))}var o=[];return iter(r,(function(e){return o.push(e)}),e,r.table.core).then((function(){return o}))}),e)},e.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,isPlainKeyRange(t)?addReplayFilter(t,(function(){var t=e;return function(e,r){return 0===t||(1===t?(--t,!1):(r((function(){e.advance(t),t=0})),!1))}})):addReplayFilter(t,(function(){var t=e;return function(){return--t<0}}))),this},e.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),addReplayFilter(this._ctx,(function(){var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this},e.prototype.until=function(e,t){return addFilter(this._ctx,(function(r,n,i){return!e(r.value)||(n(i),t)})),this},e.prototype.first=function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)},e.prototype.last=function(e){return this.reverse().first(e)},e.prototype.filter=function(e){return addFilter(this._ctx,(function(t){return e(t.value)})),addMatchFilter(this._ctx,e),this},e.prototype.and=function(e){return this.filter(e)},e.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},e.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.key,r)}))},e.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},e.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.primaryKey,r)}))},e.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.key)})).then((function(){return r})).then(e)},e.prototype.primaryKeys=function(e){var t=this._ctx;if("next"===t.dir&&isPlainKeyRange(t,!0)&&t.limit>0)return this._read((function(e){var r=getIndexOrStore(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.primaryKey)})).then((function(){return r})).then(e)},e.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},e.prototype.firstKey=function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)},e.prototype.lastKey=function(e){return this.reverse().firstKey(e)},e.prototype.distinct=function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return addFilter(this._ctx,(function(e){var t=e.primaryKey.toString(),n=hasOwn(r,t);return r[t]=!0,!n})),this},e.prototype.modify=function(e){var t=this,r=this._ctx;return this._write((function(n){var i;if("function"==typeof e)i=e;else{var o=keys(e),a=o.length;i=function(t){for(var r=!1,n=0;n<a;++n){var i=o[n],s=e[i],c=getByKeyPath(t,i);s instanceof PropModification?(setByKeyPath(t,i,s.execute(c)),r=!0):c!==s&&(setByKeyPath(t,i,s),r=!0)}return r}}var s=r.table.core,c=s.schema.primaryKey,u=c.outbound,l=c.extractKey,d=t.db._options.modifyChunkSize||200,h=[],f=0,p=[],m=function(e,t){var r=t.failures,n=t.numFailures;f+=e-n;for(var i=0,o=keys(r);i<o.length;i++){var a=o[i];h.push(r[a])}};return t.clone().primaryKeys().then((function(t){var o=function(a){var c=Math.min(d,t.length-a);return s.getMany({trans:n,keys:t.slice(a,a+c),cache:"immutable"}).then((function(h){for(var f=[],p=[],g=u?[]:null,v=[],y=0;y<c;++y){var _=h[y],b={value:deepClone(_),primKey:t[a+y]};!1!==i.call(b,b.value,b)&&(null==b.value?v.push(t[a+y]):u||0===cmp(l(_),l(b.value))?(p.push(b.value),u&&g.push(t[a+y])):(v.push(t[a+y]),f.push(b.value)))}var w=isPlainKeyRange(r)&&r.limit===1/0&&("function"!=typeof e||e===deleteCallback)&&{index:r.index,range:r.range};return Promise.resolve(f.length>0&&s.mutate({trans:n,type:"add",values:f}).then((function(e){for(var t in e.failures)v.splice(parseInt(t),1);m(f.length,e)}))).then((function(){return(p.length>0||w&&"object"==typeof e)&&s.mutate({trans:n,type:"put",keys:g,values:p,criteria:w,changeSpec:"function"!=typeof e&&e}).then((function(e){return m(p.length,e)}))})).then((function(){return(v.length>0||w&&e===deleteCallback)&&s.mutate({trans:n,type:"delete",keys:v,criteria:w}).then((function(e){return m(v.length,e)}))})).then((function(){return t.length>a+c&&o(a+d)}))}))};return o(0).then((function(){if(h.length>0)throw new ModifyError("Error modifying one or more objects",h,f,p);return t.length}))}))}))},e.prototype.delete=function(){var e=this._ctx,t=e.range;return isPlainKeyRange(e)&&(e.isPrimKey||3===t.type)?this._write((function(r){var n=e.table.core.schema.primaryKey,i=t;return e.table.core.count({trans:r,query:{index:n,range:i}}).then((function(t){return e.table.core.mutate({trans:r,type:"deleteRange",range:i}).then((function(e){var r=e.failures;e.lastResult,e.results;var n=e.numFailures;if(n)throw new ModifyError("Could not delete some values",Object.keys(r).map((function(e){return r[e]})),t-n);return t-n}))}))})):this.modify(deleteCallback)},e}(),deleteCallback=function(e,t){return t.value=null};function createCollectionConstructor(e){return makeClassConstructor(Collection.prototype,(function(t,r){this.db=e;var n=AnyRange,i=null;if(r)try{n=r()}catch(e){i=e}var o=t._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:o.or,valueMapper:s!==mirror?s:null}}))}function simpleCompare(e,t){return e<t?-1:e===t?0:1}function simpleCompareReverse(e,t){return e>t?-1:e===t?0:1}function fail(e,t,r){var n=e instanceof WhereClause?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function emptyCollection(e){return new e.Collection(e,(function(){return rangeEqual("")})).limit(0)}function upperFactory(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}function lowerFactory(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}function nextCasing(e,t,r,n,i,o){for(var a=Math.min(e.length,n.length),s=-1,c=0;c<a;++c){var u=t[c];if(u!==n[c])return i(e[c],r[c])<0?e.substr(0,c)+r[c]+r.substr(c+1):i(e[c],n[c])<0?e.substr(0,c)+n[c]+r.substr(c+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;i(e[c],u)<0&&(s=c)}return a<n.length&&"next"===o?e+r.substr(e.length):a<e.length&&"prev"===o?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}function addIgnoreCaseAlgorithm(e,t,r,n){var i,o,a,s,c,u,l,d=r.length;if(!r.every((function(e){return"string"==typeof e})))return fail(e,STRING_EXPECTED);function h(e){i=upperFactory(e),o=lowerFactory(e),a="next"===e?simpleCompare:simpleCompareReverse;var t=r.map((function(e){return{lower:o(e),upper:i(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),u=e,l="next"===e?"":n}h("next");var f=new e.Collection(e,(function(){return createRange(s[0],c[d-1]+n)}));f._ondirectionchange=function(e){h(e)};var p=0;return f._addAlgorithm((function(e,r,n){var i=e.key;if("string"!=typeof i)return!1;var h=o(i);if(t(h,c,p))return!0;for(var f=null,m=p;m<d;++m){var g=nextCasing(i,h,s[m],c[m],a,u);null===g&&null===f?p=m+1:(null===f||a(f,g)>0)&&(f=g)}return r(null!==f?function(){e.continue(f+l)}:n),!1})),f}function createRange(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function rangeEqual(e){return{type:1,lower:e,upper:e}}var WhereClause=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?emptyCollection(this):new this.Collection(this,(function(){return createRange(e,t,!r,!n)}))}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}},e.prototype.equals=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return rangeEqual(e)}))},e.prototype.above=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(e,void 0,!0)}))},e.prototype.aboveOrEqual=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(e,void 0,!1)}))},e.prototype.below=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(void 0,e,!1,!0)}))},e.prototype.belowOrEqual=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(void 0,e)}))},e.prototype.startsWith=function(e){return"string"!=typeof e?fail(this,STRING_EXPECTED):this.between(e,e+maxString,!0,!0)},e.prototype.startsWithIgnoreCase=function(e){return""===e?this.startsWith(e):addIgnoreCaseAlgorithm(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],maxString)},e.prototype.equalsIgnoreCase=function(e){return addIgnoreCaseAlgorithm(this,(function(e,t){return e===t[0]}),[e],"")},e.prototype.anyOfIgnoreCase=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return 0===e.length?emptyCollection(this):addIgnoreCaseAlgorithm(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return 0===e.length?emptyCollection(this):addIgnoreCaseAlgorithm(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,maxString)},e.prototype.anyOf=function(){var e=this,t=getArrayOf.apply(NO_CHAR_ARRAY,arguments),r=this._cmp;try{t.sort(r)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}if(0===t.length)return emptyCollection(this);var n=new this.Collection(this,(function(){return createRange(t[0],t[t.length-1])}));n._ondirectionchange=function(n){r="next"===n?e._ascending:e._descending,t.sort(r)};var i=0;return n._addAlgorithm((function(e,n,o){for(var a=e.key;r(a,t[i])>0;)if(++i===t.length)return n(o),!1;return 0===r(a,t[i])||(n((function(){e.continue(t[i])})),!1)})),n},e.prototype.notEqual=function(e){return this.inAnyRange([[minKey,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[minKey,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(e,t){var r=this,n=this._cmp,i=this._ascending,o=this._descending,a=this._min,s=this._max;if(0===e.length)return emptyCollection(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return fail(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",exceptions.InvalidArgument);var c=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;var l,d=i;function h(e,t){return d(e[0],t[0])}try{l=e.reduce((function(e,t){for(var r=0,i=e.length;r<i;++r){var o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=a(o[0],t[0]),o[1]=s(o[1],t[1]);break}}return r===i&&e.push(t),e}),[]),l.sort(h)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}var f=0,p=u?function(e){return i(e,l[f][1])>0}:function(e){return i(e,l[f][1])>=0},m=c?function(e){return o(e,l[f][0])>0}:function(e){return o(e,l[f][0])>=0};var g=p,v=new this.Collection(this,(function(){return createRange(l[0][0],l[l.length-1][1],!c,!u)}));return v._ondirectionchange=function(e){"next"===e?(g=p,d=i):(g=m,d=o),l.sort(h)},v._addAlgorithm((function(e,t,n){for(var o=e.key;g(o);)if(++f===l.length)return t(n),!1;return!!function(e){return!p(e)&&!m(e)}(o)||(0===r._cmp(o,l[f][1])||0===r._cmp(o,l[f][0])||t((function(){d===i?e.continue(l[f][0]):e.continue(l[f][1])})),!1)})),v},e.prototype.startsWithAnyOf=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?emptyCollection(this):this.inAnyRange(e.map((function(e){return[e,e+maxString]}))):fail(this,"startsWithAnyOf() only works with strings")},e}();function createWhereClauseConstructor(e){return makeClassConstructor(WhereClause.prototype,(function(t,r,n){if(this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n},this._cmp=this._ascending=cmp,this._descending=function(e,t){return cmp(t,e)},this._max=function(e,t){return cmp(e,t)>0?e:t},this._min=function(e,t){return cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange,!this._IDBKeyRange)throw new exceptions.MissingAPI}))}function eventRejectHandler(e){return wrap$1((function(t){return preventDefault(t),e(t.target.error),!1}))}function preventDefault(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var DEXIE_STORAGE_MUTATED_EVENT_NAME="storagemutated",STORAGE_MUTATED_DOM_EVENT_NAME="x-storagemutated-1",globalEvents=Events(null,DEXIE_STORAGE_MUTATED_EVENT_NAME),Transaction=function(){function e(){}return e.prototype._lock=function(){return assert(!PSD.global),++this._reculock,1!==this._reculock||PSD.global||(PSD.lockOwnerFor=this),this},e.prototype._unlock=function(){if(assert(!PSD.global),0==--this._reculock)for(PSD.global||(PSD.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{usePSD(e[1],e[0])}catch(e){}}return this},e.prototype._locked=function(){return this._reculock&&PSD.lockOwnerFor!==this},e.prototype.create=function(e){var t=this;if(!this.mode)return this;var r=this.db.idbdb,n=this.db._state.dbOpenError;if(assert(!this.idbtrans),!e&&!r)switch(n&&n.name){case"DatabaseClosedError":throw new exceptions.DatabaseClosed(n);case"MissingAPIError":throw new exceptions.MissingAPI(n.message,n);default:throw new exceptions.OpenFailed(n)}if(!this.active)throw new exceptions.TransactionInactive;return assert(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):r.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=wrap$1((function(r){preventDefault(r),t._reject(e.error)})),e.onabort=wrap$1((function(r){preventDefault(r),t.active&&t._reject(new exceptions.Abort(e.error)),t.active=!1,t.on("abort").fire(r)})),e.oncomplete=wrap$1((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&globalEvents.storagemutated.fire(e.mutatedParts)})),this},e.prototype._promise=function(e,t,r){var n=this;if("readwrite"===e&&"readwrite"!==this.mode)return rejection(new exceptions.ReadOnly("Transaction is readonly"));if(!this.active)return rejection(new exceptions.TransactionInactive);if(this._locked())return new DexiePromise((function(i,o){n._blockedFuncs.push([function(){n._promise(e,t,r).then(i,o)},PSD])}));if(r)return newScope((function(){var e=new DexiePromise((function(e,r){n._lock();var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return e.finally((function(){return n._unlock()})),e._lib=!0,e}));var i=new DexiePromise((function(e,r){var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return i._lib=!0,i},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(e){var t=this._root(),r=DexiePromise.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return r}));else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new DexiePromise((function(e,n){r.then((function(r){return t._waitingQueue.push(wrap$1(e.bind(null,r)))}),(function(e){return t._waitingQueue.push(wrap$1(n.bind(null,e)))})).finally((function(){t._waitingFor===i&&(t._waitingFor=null)}))}))},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new exceptions.Abort))},e.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(hasOwn(t,e))return t[e];var r=this.schema[e];if(!r)throw new exceptions.NotFound("Table "+e+" not part of transaction");var n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n},e}();function createTransactionConstructor(e){return makeClassConstructor(Transaction.prototype,(function(t,r,n,i,o){var a=this;this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=Events(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new DexiePromise((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),rejection(e)}))}))}function createIndexSpec(e,t,r,n,i,o,a){return{name:e,keyPath:t,unique:r,multi:n,auto:i,compound:o,src:(r&&!a?"&":"")+(n?"*":"")+(i?"++":"")+nameFromKeyPath(t)}}function nameFromKeyPath(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function createTableSchema(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:arrayToObject(r,(function(e){return[e.name,e]}))}}function safariMultiStoreFix(e){return 1===e.length?e[0]:e}var getMaxKey=function(e){try{return e.only([[]]),getMaxKey=function(){return[[]]},[[]]}catch(e){return getMaxKey=function(){return maxString},maxString}};function getKeyExtractor(e){return null==e?function(){}:"string"==typeof e?getSinglePathKeyExtractor(e):function(t){return getByKeyPath(t,e)}}function getSinglePathKeyExtractor(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return getByKeyPath(t,e)}}function arrayify(e){return[].slice.call(e)}var _id_counter=0;function getKeyPathAlias(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")}function createDBCore(e,t,r){function n(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var r=e.lower,n=e.upper,i=e.lowerOpen,o=e.upperOpen;return void 0===r?void 0===n?null:t.upperBound(n,!!o):void 0===n?t.lowerBound(r,!!i):t.bound(r,n,!!i,!!o)}var i=function(e,t){var r=arrayify(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,r=e.autoIncrement,n=isArray(t),i=null==t,o={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:getKeyExtractor(t)},indexes:arrayify(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,r=e.unique,n=e.multiEntry,i=e.keyPath,a={name:t,compound:isArray(i),keyPath:i,unique:r,multiEntry:n,extractKey:getKeyExtractor(i)};return o[getKeyPathAlias(i)]=a,a})),getIndexByKeyPath:function(e){return o[getKeyPathAlias(e)]}};return o[":id"]=a.primaryKey,null!=t&&(o[getKeyPathAlias(t)]=a.primaryKey),a}))},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,r),o=i.schema,a=i.hasGetAll,s=o.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var r=e.trans,i=e.type,o=e.keys,a=e.values,s=e.range;return new Promise((function(e,c){e=wrap$1(e);var u=r.objectStore(t),l=null==u.keyPath,d="put"===i||"add"===i;if(!d&&"delete"!==i&&"deleteRange"!==i)throw new Error("Invalid operation type: "+i);var h,f=(o||a||{length:1}).length;if(o&&a&&o.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===f)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var p=[],m=[],g=0,v=function(e){++g,preventDefault(e)};if("deleteRange"===i){if(4===s.type)return e({numFailures:g,failures:m,results:[],lastResult:void 0});3===s.type?p.push(h=u.clear()):p.push(h=u.delete(n(s)))}else{var y=d?l?[a,o]:[a,null]:[o,null],_=y[0],b=y[1];if(d)for(var w=0;w<f;++w)p.push(h=b&&void 0!==b[w]?u[i](_[w],b[w]):u[i](_[w])),h.onerror=v;else for(w=0;w<f;++w)p.push(h=u[i](_[w])),h.onerror=v}var D=function(t){var r=t.target.result;p.forEach((function(e,t){return null!=e.error&&(m[t]=e.error)})),e({numFailures:g,failures:m,results:"delete"===i?o:p.map((function(e){return e.result})),lastResult:r})};h.onerror=function(e){v(e),D(e)},h.onsuccess=D}))},getMany:function(e){var r=e.trans,n=e.keys;return new Promise((function(e,i){e=wrap$1(e);for(var o,a=r.objectStore(t),s=n.length,c=new Array(s),u=0,l=0,d=function(t){var r=t.target;c[r._pos]=r.result,++l===u&&e(c)},h=eventRejectHandler(i),f=0;f<s;++f)null!=n[f]&&((o=a.get(n[f]))._pos=f,o.onsuccess=d,o.onerror=h,++u);0===u&&e(c)}))},get:function(e){var r=e.trans,n=e.key;return new Promise((function(e,i){e=wrap$1(e);var o=r.objectStore(t).get(n);o.onsuccess=function(t){return e(t.target.result)},o.onerror=eventRejectHandler(i)}))},query:function(e){return function(r){return new Promise((function(i,o){i=wrap$1(i);var a=r.trans,s=r.values,c=r.limit,u=r.query,l=c===1/0?void 0:c,d=u.index,h=u.range,f=a.objectStore(t),p=d.isPrimaryKey?f:f.index(d.name),m=n(h);if(0===c)return i({result:[]});if(e){var g=s?p.getAll(m,l):p.getAllKeys(m,l);g.onsuccess=function(e){return i({result:e.target.result})},g.onerror=eventRejectHandler(o)}else{var v=0,y=s||!("openKeyCursor"in p)?p.openCursor(m):p.openKeyCursor(m),_=[];y.onsuccess=function(e){var t=y.result;return t?(_.push(s?t.value:t.primaryKey),++v===c?i({result:_}):void t.continue()):i({result:_})},y.onerror=eventRejectHandler(o)}}))}}(a),openCursor:function(e){var r=e.trans,i=e.values,o=e.query,a=e.reverse,s=e.unique;return new Promise((function(e,c){e=wrap$1(e);var u=o.index,l=o.range,d=r.objectStore(t),h=u.isPrimaryKey?d:d.index(u.name),f=a?s?"prevunique":"prev":s?"nextunique":"next",p=i||!("openKeyCursor"in h)?h.openCursor(n(l),f):h.openKeyCursor(n(l),f);p.onerror=eventRejectHandler(c),p.onsuccess=wrap$1((function(t){var n=p.result;if(n){n.___id=++_id_counter,n.done=!1;var i=n.continue.bind(n),o=n.continuePrimaryKey;o&&(o=o.bind(n));var a=n.advance.bind(n),s=function(){throw new Error("Cursor not stopped")};n.trans=r,n.stop=n.continue=n.continuePrimaryKey=n.advance=function(){throw new Error("Cursor not started")},n.fail=wrap$1(c),n.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},n.start=function(e){var t=new Promise((function(e,t){e=wrap$1(e),p.onerror=eventRejectHandler(t),n.fail=t,n.stop=function(t){n.stop=n.continue=n.continuePrimaryKey=n.advance=s,e(t)}})),r=function(){if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=function(){throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=wrap$1((function(e){p.onsuccess=r,r()})),n.continue=i,n.continuePrimaryKey=o,n.advance=a,r(),t},e(n)}else e(null)}),c)}))},count:function(e){var r=e.query,i=e.trans,o=r.index,a=r.range;return new Promise((function(e,r){var s=i.objectStore(t),c=o.isPrimaryKey?s:s.index(o.name),u=n(a),l=u?c.count(u):c.count();l.onsuccess=wrap$1((function(t){return e(t.target.result)})),l.onerror=eventRejectHandler(r)}))}}}(e)})),c={};return s.forEach((function(e){return c[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!c[e])throw new Error("Table '".concat(e,"' not found"));return c[e]},MIN_KEY:-1/0,MAX_KEY:getMaxKey(t),schema:o}}function createMiddlewareStack(e,t){return t.reduce((function(e,t){var r=t.create;return __assign(__assign({},e),r(e))}),e)}function createMiddlewareStacks(e,t,r,n){var i=r.IDBKeyRange;return r.indexedDB,{dbcore:createMiddlewareStack(createDBCore(t,i,n),e.dbcore)}}function generateMiddlewareStacks(e,t){var r=t.db,n=createMiddlewareStacks(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach((function(t){var r=t.name;e.core.schema.tables.some((function(e){return e.name===r}))&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))}))}function setApiOnPlace(e,t,r,n){r.forEach((function(r){var i=n[r];t.forEach((function(t){var n=getPropertyDescriptor(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?setProp(t,r,{get:function(){return this.table(r)},set:function(e){defineProperty(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,i))}))}))}function removeTablesApi(e,t){t.forEach((function(t){for(var r in t)t[r]instanceof e.Table&&delete t[r]}))}function lowerVersionFirst(e,t){return e._cfg.version-t._cfg.version}function runUpgraders(e,t,r,n){var i=e._dbSchema;r.objectStoreNames.contains("$meta")&&!i.$meta&&(i.$meta=createTableSchema("$meta",parseIndexSyntax("")[0],[]),e._storeNames.push("$meta"));var o=e._createTransaction("readwrite",e._storeNames,i);o.create(r),o._completion.catch(n);var a=o._reject.bind(o),s=PSD.transless||PSD;newScope((function(){if(PSD.trans=o,PSD.transless=s,0!==t)return generateMiddlewareStacks(e,r),getExistingVersion(e,o,t).then((function(t){return updateTablesAndIndexes(e,t,o,r)})).catch(a);keys(i).forEach((function(e){createTable(r,e,i[e].primKey,i[e].indexes)})),generateMiddlewareStacks(e,r),DexiePromise.follow((function(){return e.on.populate.fire(o)})).catch(a)}))}function patchCurrentVersion(e,t){createMissingTables(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var r=buildGlobalSchema(e,e.idbdb,t);adjustToExistingIndexNames(e,e._dbSchema,t);for(var n=function(e){if(e.change.length||e.recreate)return console.warn("Unable to patch indexes of table ".concat(e.name," because it has changes on the type of index or primary key.")),{value:void 0};var r=t.objectStore(e.name);e.add.forEach((function(t){debug&&console.debug("Dexie upgrade patch: Creating missing index ".concat(e.name,".").concat(t.src)),addIndex(r,t)}))},i=0,o=getSchemaDiff(r,e._dbSchema).change;i<o.length;i++){var a=n(o[i]);if("object"==typeof a)return a.value}}function getExistingVersion(e,t,r){return t.storeNames.includes("$meta")?t.table("$meta").get("version").then((function(e){return null!=e?e:r})):DexiePromise.resolve(r)}function updateTablesAndIndexes(e,t,r,n){var i=[],o=e._versions,a=e._dbSchema=buildGlobalSchema(e,e.idbdb,n),s=o.filter((function(e){return e._cfg.version>=t}));if(0===s.length)return DexiePromise.resolve();return s.forEach((function(o){i.push((function(){var i=a,s=o._cfg.dbschema;adjustToExistingIndexNames(e,i,n),adjustToExistingIndexNames(e,s,n),a=e._dbSchema=s;var c=getSchemaDiff(i,s);c.add.forEach((function(e){createTable(n,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((function(e){if(e.recreate)throw new exceptions.Upgrade("Not yet support for changing primary key");var t=n.objectStore(e.name);e.add.forEach((function(e){return addIndex(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),addIndex(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var u=o._cfg.contentUpgrade;if(u&&o._cfg.version>t){generateMiddlewareStacks(e,n),r._memoizedTables={};var l=shallowClone(s);c.del.forEach((function(e){l[e]=i[e]})),removeTablesApi(e,[e.Transaction.prototype]),setApiOnPlace(e,[e.Transaction.prototype],keys(l),l),r.schema=l;var d,h=isAsyncFunction(u);h&&incrementExpectedAwaits();var f=DexiePromise.follow((function(){if((d=u(r))&&h){var e=decrementExpectedAwaits.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?DexiePromise.resolve(d):f.then((function(){return d}))}})),i.push((function(t){deleteRemovedTables(o._cfg.dbschema,t),removeTablesApi(e,[e.Transaction.prototype]),setApiOnPlace(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})),i.push((function(t){e.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(e.idbdb.version/10)===o._cfg.version?(e.idbdb.deleteObjectStore("$meta"),delete e._dbSchema.$meta,e._storeNames=e._storeNames.filter((function(e){return"$meta"!==e}))):t.objectStore("$meta").put(o._cfg.version,"version"))}))})),function e(){return i.length?DexiePromise.resolve(i.shift()(r.idbtrans)).then(e):DexiePromise.resolve()}().then((function(){createMissingTables(a,n)}))}function getSchemaDiff(e,t){var r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(i){var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,c=o.idxByName,u=void 0;for(u in s)c[u]||a.del.push(u);for(u in c){var l=s[u],d=c[u];l?l.src!==d.src&&a.change.push(d):a.add.push(d)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}else n.add.push([r,o])}return n}function createTable(e,t,r,n){var i=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach((function(e){return addIndex(i,e)})),i}function createMissingTables(e,t){keys(e).forEach((function(r){t.db.objectStoreNames.contains(r)||(debug&&console.debug("Dexie: Creating missing table",r),createTable(t,r,e[r].primKey,e[r].indexes))}))}function deleteRemovedTables(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(r){return null==e[r]&&t.db.deleteObjectStore(r)}))}function addIndex(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function buildGlobalSchema(e,t,r){var n={};return slice(t.objectStoreNames,0).forEach((function(e){for(var t=r.objectStore(e),i=t.keyPath,o=createIndexSpec(nameFromKeyPath(i),i||"",!0,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[],s=0;s<t.indexNames.length;++s){var c=t.index(t.indexNames[s]);i=c.keyPath;var u=createIndexSpec(c.name,i,!!c.unique,!!c.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(u)}n[e]=createTableSchema(e,o,a)})),n}function readGlobalSchema(e,t,r){e.verno=t.version/10;var n=e._dbSchema=buildGlobalSchema(e,t,r);e._storeNames=slice(t.objectStoreNames,0),setApiOnPlace(e,[e._allTables],keys(n),n)}function verifyInstalledSchema(e,t){var r=getSchemaDiff(buildGlobalSchema(e,e.idbdb,t),e._dbSchema);return!(r.add.length||r.change.some((function(e){return e.add.length||e.change.length})))}function adjustToExistingIndexNames(e,t,r){for(var n=r.db.objectStoreNames,i=0;i<n.length;++i){var o=n[i],a=r.objectStore(o);e._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var c=a.indexNames[s],u=a.index(c).keyPath,l="string"==typeof u?u:"["+slice(u).join("+")+"]";if(t[o]){var d=t[o].idxByName[l];d&&(d.name=c,delete t[o].idxByName[l],t[o].idxByName[c]=d)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&_global.WorkerGlobalScope&&_global instanceof _global.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function parseIndexSyntax(e){return e.split(",").map((function(e,t){var r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return createIndexSpec(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),isArray(n),0===t)}))}var Version=function(){function e(){}return e.prototype._parseStoresSpec=function(e,t){keys(e).forEach((function(r){if(null!==e[r]){var n=parseIndexSyntax(e[r]),i=n.shift();if(i.unique=!0,i.multi)throw new exceptions.Schema("Primary key cannot be multi-valued");n.forEach((function(e){if(e.auto)throw new exceptions.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new exceptions.Schema("Index must have a name and cannot be an empty string")})),t[r]=createTableSchema(r,i,n)}}))},e.prototype.stores=function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?extend(this._cfg.storesSource,e):e;var r=t._versions,n={},i={};return r.forEach((function(e){extend(n,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(n,i)})),t._dbSchema=i,removeTablesApi(t,[t._allTables,t,t.Transaction.prototype]),setApiOnPlace(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],keys(i),i),t._storeNames=keys(i),this},e.prototype.upgrade=function(e){return this._cfg.contentUpgrade=promisableChain(this._cfg.contentUpgrade||nop,e),this},e}(),_a;function createVersionConstructor(e){return makeClassConstructor(Version.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}function getDbNamesTable(e,t){var r=e._dbNamesDB;return r||(r=e._dbNamesDB=new Dexie$1(DBNAMES_DB,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function hasDatabasesNative(e){return e&&"function"==typeof e.databases}function getDatabaseNames(e){var t=e.indexedDB,r=e.IDBKeyRange;return hasDatabasesNative(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return e!==DBNAMES_DB}))})):getDbNamesTable(t,r).toCollection().primaryKeys()}function _onDatabaseCreated(e,t){var r=e.indexedDB,n=e.IDBKeyRange;!hasDatabasesNative(r)&&t!==DBNAMES_DB&&getDbNamesTable(r,n).put({name:t}).catch(nop)}function _onDatabaseDeleted(e,t){var r=e.indexedDB,n=e.IDBKeyRange;!hasDatabasesNative(r)&&t!==DBNAMES_DB&&getDbNamesTable(r,n).delete(t).catch(nop)}function vip(e){return newScope((function(){return PSD.letThrough=!0,e()}))}function idbReady(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var r=function(){return indexedDB.databases().finally(t)};e=setInterval(r,100),r()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function isEmptyRange(e){return!("from"in e)}var RangeSet=function(e,t){if(!this){var r=new RangeSet;return e&&"d"in e&&extend(r,e),r}extend(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function addRange(e,t,r){var n=cmp(t,r);if(!isNaN(n)){if(n>0)throw RangeError();if(isEmptyRange(e))return extend(e,{from:t,to:r,d:1});var i=e.l,o=e.r;if(cmp(r,e.from)<0)return i?addRange(i,t,r):e.l={from:t,to:r,d:1,l:null,r:null},rebalance(e);if(cmp(t,e.to)>0)return o?addRange(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},rebalance(e);cmp(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),cmp(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;i&&!e.l&&mergeRanges(e,i),o&&a&&mergeRanges(e,o)}}function mergeRanges(e,t){isEmptyRange(t)||function e(t,r){var n=r.from,i=r.to,o=r.l,a=r.r;addRange(t,n,i),o&&e(t,o),a&&e(t,a)}(e,t)}function rangesOverlap(e,t){var r=getRangeSetIterator(t),n=r.next();if(n.done)return!1;for(var i=n.value,o=getRangeSetIterator(e),a=o.next(i.from),s=a.value;!n.done&&!a.done;){if(cmp(s.from,i.to)<=0&&cmp(s.to,i.from)>=0)return!0;cmp(i.from,s.from)<0?i=(n=r.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}function getRangeSetIterator(e){var t=isEmptyRange(e)?null:{s:0,n:e};return{next:function(e){for(var r=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&cmp(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||cmp(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function rebalance(e){var t,r,n=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(r=e.l)||void 0===r?void 0:r.d)||0),i=n>1?"r":n<-1?"l":"";if(i){var o="r"===i?"l":"r",a=__assign({},e),s=e[i];e.from=s.from,e.to=s.to,e[i]=s[i],a[i]=s[o],e[o]=a,a.d=computeDepth(a)}e.d=computeDepth(e)}function computeDepth(e){var t=e.r,r=e.l;return(t?r?Math.max(t.d,r.d):t.d:r?r.d:0)+1}function extendObservabilitySet(e,t){return keys(t).forEach((function(r){e[r]?mergeRanges(e[r],t[r]):e[r]=cloneSimpleObjectTree(t[r])})),e}function obsSetsOverlap(e,t){return e.all||t.all||Object.keys(e).some((function(r){return t[r]&&rangesOverlap(t[r],e[r])}))}props(RangeSet.prototype,(_a={add:function(e){return mergeRanges(this,e),this},addKey:function(e){return addRange(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return addRange(t,e,e)})),this}},_a[iteratorSymbol]=function(){return getRangeSetIterator(this)},_a));var cache={},unsignaledParts={},isTaskEnqueued=!1;function signalSubscribersLazily(e,t){extendObservabilitySet(unsignaledParts,e),isTaskEnqueued||(isTaskEnqueued=!0,setTimeout((function(){isTaskEnqueued=!1;var e=unsignaledParts;unsignaledParts={},signalSubscribersNow(e,!1)}),0))}function signalSubscribersNow(e,t){void 0===t&&(t=!1);var r=new Set;if(e.all)for(var n=0,i=Object.values(cache);n<i.length;n++){collectTableSubscribers(s=i[n],e,r,t)}else for(var o in e){var a=/^idb\:\/\/(.*)\/(.*)\//.exec(o);if(a){var s,c=a[1],u=a[2];(s=cache["idb://".concat(c,"/").concat(u)])&&collectTableSubscribers(s,e,r,t)}}r.forEach((function(e){return e()}))}function collectTableSubscribers(e,t,r,n){for(var i=[],o=0,a=Object.entries(e.queries.query);o<a.length;o++){for(var s=a[o],c=s[0],u=[],l=0,d=s[1];l<d.length;l++){var h=d[l];obsSetsOverlap(t,h.obsSet)?h.subscribers.forEach((function(e){return r.add(e)})):n&&u.push(h)}n&&i.push([c,u])}if(n)for(var f=0,p=i;f<p.length;f++){var m=p[f];c=m[0],u=m[1];e.queries.query[c]=u}}function dexieOpen(e){var t=e._state,r=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?rejection(t.dbOpenError):e}));t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var n=t.openCanceller,i=Math.round(10*e.verno),o=!1;function a(){if(t.openCanceller!==n)throw new exceptions.DatabaseClosed("db.open() was cancelled")}var s=t.dbReadyResolve,c=null,u=!1,l=function(){return new DexiePromise((function(n,s){if(a(),!r)throw new exceptions.MissingAPI;var d=e.name,h=t.autoSchema||!i?r.open(d):r.open(d,i);if(!h)throw new exceptions.MissingAPI;h.onerror=eventRejectHandler(s),h.onblocked=wrap$1(e._fireOnBlocked),h.onupgradeneeded=wrap$1((function(n){if(c=h.transaction,t.autoSchema&&!e._options.allowEmptyDB){h.onerror=preventDefault,c.abort(),h.result.close();var i=r.deleteDatabase(d);i.onsuccess=i.onerror=wrap$1((function(){s(new exceptions.NoSuchDatabase("Database ".concat(d," doesnt exist")))}))}else{c.onerror=eventRejectHandler(s);var a=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;u=a<1,e.idbdb=h.result,o&&patchCurrentVersion(e,c),runUpgraders(e,a/10,c,s)}}),s),h.onsuccess=wrap$1((function(){c=null;var r=e.idbdb=h.result,a=slice(r.objectStoreNames);if(a.length>0)try{var s=r.transaction(safariMultiStoreFix(a),"readonly");if(t.autoSchema)readGlobalSchema(e,r,s);else if(adjustToExistingIndexNames(e,e._dbSchema,s),!verifyInstalledSchema(e,s)&&!o)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),r.close(),i=r.version+1,o=!0,n(l());generateMiddlewareStacks(e,s)}catch(e){}connections.push(e),r.onversionchange=wrap$1((function(r){t.vcFired=!0,e.on("versionchange").fire(r)})),r.onclose=wrap$1((function(t){e.on("close").fire(t)})),u&&_onDatabaseCreated(e._deps,d),n()}),s)})).catch((function(e){switch(null==e?void 0:e.name){case"UnknownError":if(t.PR1398_maxLoop>0)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),l();break;case"VersionError":if(i>0)return i=0,l()}return DexiePromise.reject(e)}))};return DexiePromise.race([n,("undefined"==typeof navigator?DexiePromise.resolve():idbReady()).then(l)]).then((function(){return a(),t.onReadyBeingFired=[],DexiePromise.resolve(vip((function(){return e.on.ready.fire(e.vip)}))).then((function r(){if(t.onReadyBeingFired.length>0){var n=t.onReadyBeingFired.reduce(promisableChain,nop);return t.onReadyBeingFired=[],DexiePromise.resolve(vip((function(){return n(e.vip)}))).then(r)}}))})).finally((function(){t.openCanceller===n&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)})).catch((function(r){t.dbOpenError=r;try{c&&c.abort()}catch(e){}return n===t.openCanceller&&e._close(),rejection(r)})).finally((function(){t.openComplete=!0,s()})).then((function(){if(u){var t={};e.tables.forEach((function(r){r.schema.indexes.forEach((function(n){n.name&&(t["idb://".concat(e.name,"/").concat(r.name,"/").concat(n.name)]=new RangeSet(-1/0,[[[]]]))})),t["idb://".concat(e.name,"/").concat(r.name,"/")]=t["idb://".concat(e.name,"/").concat(r.name,"/:dels")]=new RangeSet(-1/0,[[[]]])})),globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME).fire(t),signalSubscribersNow(t,!0)}return e}))}function awaitIterator(e){var t=function(t){return e.next(t)},r=i(t),n=i((function(t){return e.throw(t)}));function i(e){return function(t){var i=e(t),o=i.value;return i.done?o:o&&"function"==typeof o.then?o.then(r,n):isArray(o)?Promise.all(o).then(r,n):r(o)}}return i(t)()}function extractTransactionArgs(e,t,r){var n=arguments.length;if(n<2)throw new exceptions.InvalidArgument("Too few arguments");for(var i=new Array(n-1);--n;)i[n-1]=arguments[n];return r=i.pop(),[e,flatten(i),r]}function enterTransactionScope(e,t,r,n,i){return DexiePromise.resolve().then((function(){var o=PSD.transless||PSD,a=e._createTransaction(t,r,e._dbSchema,n);a.explicit=!0;var s={trans:a,transless:o};if(n)a.idbtrans=n.idbtrans;else try{a.create(),a.idbtrans._explicit=!0,e._state.PR1398_maxLoop=3}catch(n){return n.name===errnames.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e.close({disableAutoOpen:!1}),e.open().then((function(){return enterTransactionScope(e,t,r,null,i)}))):rejection(n)}var c,u=isAsyncFunction(i);u&&incrementExpectedAwaits();var l=DexiePromise.follow((function(){if(c=i.call(a,a))if(u){var e=decrementExpectedAwaits.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=awaitIterator(c))}),s);return(c&&"function"==typeof c.then?DexiePromise.resolve(c).then((function(e){return a.active?e:rejection(new exceptions.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(e){return n&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),rejection(e)}))}))}function pad(e,t,r){for(var n=isArray(e)?e.slice():[e],i=0;i<r;++i)n.push(t);return n}function createVirtualIndexMiddleware(e){return __assign(__assign({},e),{table:function(t){var r=e.table(t),n=r.schema,i={},o=[];function a(e,t,r){var n=getKeyPathAlias(e),s=i[n]=i[n]||[],c=null==e?0:"string"==typeof e?1:e.length,u=t>0,l=__assign(__assign({},r),{name:u?"".concat(n,"(virtual-from:").concat(r.name,")"):r.name,lowLevelIndex:r,isVirtual:u,keyTail:t,keyLength:c,extractKey:getKeyExtractor(e),unique:!u&&r.unique});(s.push(l),l.isPrimaryKey||o.push(l),c>1)&&a(2===c?e[0]:e.slice(0,c-1),t+1,r);return s.sort((function(e,t){return e.keyTail-t.keyTail})),l}var s=a(n.primaryKey.keyPath,0,n.primaryKey);i[":id"]=[s];for(var c=0,u=n.indexes;c<u.length;c++){var l=u[c];a(l.keyPath,0,l)}function d(t){var r,n,i=t.query.index;return i.isVirtual?__assign(__assign({},t),{query:{index:i.lowLevelIndex,range:(r=t.query.range,n=i.keyTail,{type:1===r.type?2:r.type,lower:pad(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:pad(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}):t}var h=__assign(__assign({},r),{schema:__assign(__assign({},n),{primaryKey:s,indexes:o,getIndexByKeyPath:function(e){var t=i[getKeyPathAlias(e)];return t&&t[0]}}),count:function(e){return r.count(d(e))},query:function(e){return r.query(d(e))},openCursor:function(t){var n=t.query.index,i=n.keyTail,o=n.isVirtual,a=n.keyLength;if(!o)return r.openCursor(t);return r.openCursor(d(t)).then((function(r){return r&&function(r){var n=Object.create(r,{continue:{value:function(n){null!=n?r.continue(pad(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(r.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(pad(t,e.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var e=r.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return r.value}}});return n}(r)}))}});return h}})}var virtualIndexMiddleware={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:createVirtualIndexMiddleware};function getObjectDiff(e,t,r,n){return r=r||{},n=n||"",keys(e).forEach((function(i){if(hasOwn(t,i)){var o=e[i],a=t[i];if("object"==typeof o&&"object"==typeof a&&o&&a){var s=toStringTag(o);s!==toStringTag(a)?r[n+i]=t[i]:"Object"===s?getObjectDiff(o,a,r,n+i+"."):o!==a&&(r[n+i]=t[i])}else o!==a&&(r[n+i]=t[i])}else r[n+i]=void 0})),keys(t).forEach((function(i){hasOwn(e,i)||(r[n+i]=t[i])})),r}function getEffectiveKeys(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}var hooksMiddleware={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return __assign(__assign({},e),{table:function(t){var r=e.table(t),n=r.schema.primaryKey,i=__assign(__assign({},r),{mutate:function(e){var i=PSD.trans,o=i.table(t).hook,a=o.deleting,s=o.creating,c=o.updating;switch(e.type){case"add":if(s.fire===nop)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"put":if(s.fire===nop&&c.fire===nop)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"delete":if(a.fire===nop)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"deleteRange":if(a.fire===nop)break;return i._promise("readwrite",(function(){return function(e){return l(e.trans,e.range,1e4)}(e)}),!0)}return r.mutate(e);function u(e){var t=PSD.trans,i=e.keys||getEffectiveKeys(n,e);if(!i)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?__assign(__assign({},e),{keys:i}):__assign({},e)).type&&(e.values=__spreadArray([],e.values,!0)),e.keys&&(e.keys=__spreadArray([],e.keys,!0)),getExistingValues(r,e,i).then((function(o){var u=i.map((function(r,i){var u=o[i],l={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(l,r,u,t);else if("add"===e.type||void 0===u){var d=s.fire.call(l,r,e.values[i],t);null==r&&null!=d&&(r=d,e.keys[i]=r,n.outbound||setByKeyPath(e.values[i],n.keyPath,r))}else{var h=getObjectDiff(u,e.values[i]),f=c.fire.call(l,h,r,u,t);if(f){var p=e.values[i];Object.keys(f).forEach((function(e){hasOwn(p,e)?p[e]=f[e]:setByKeyPath(p,e,f[e])}))}}return l}));return r.mutate(e).then((function(t){for(var r=t.failures,n=t.results,a=t.numFailures,s=t.lastResult,c=0;c<i.length;++c){var l=n?n[c]:i[c],d=u[c];null==l?d.onerror&&d.onerror(r[c]):d.onsuccess&&d.onsuccess("put"===e.type&&o[c]?e.values[c]:l)}return{failures:r,results:n,numFailures:a,lastResult:s}})).catch((function(e){return u.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))}function l(e,t,i){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:i}).then((function(r){var n=r.result;return u({type:"delete",keys:n,trans:e}).then((function(r){return r.numFailures>0?Promise.reject(r.failures[0]):n.length<i?{failures:[],numFailures:0,lastResult:void 0}:l(e,__assign(__assign({},t),{lower:n[n.length-1],lowerOpen:!0}),i)}))}))}}});return i}})}};function getExistingValues(e,t,r){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:r,cache:"immutable"})}function getFromTransactionCache(e,t,r){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var n=[],i=0,o=0;i<t.keys.length&&o<e.length;++i)0===cmp(t.keys[i],e[o])&&(n.push(r?deepClone(t.values[i]):t.values[i]),++o);return n.length===e.length?n:null}catch(e){return null}}var cacheExistingValuesMiddleware={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var r=e.table(t);return __assign(__assign({},r),{getMany:function(e){if(!e.cache)return r.getMany(e);var t=getFromTransactionCache(e.keys,e.trans._cache,"clone"===e.cache);return t?DexiePromise.resolve(t):r.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?deepClone(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),r.mutate(e)}})}}}};function isCachableContext(e,t){return"readonly"===e.trans.mode&&!!e.subscr&&!e.trans.explicit&&"disabled"!==e.trans.db._options.cache&&!t.schema.primaryKey.outbound}function isCachableRequest(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var observabilityMiddleware={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,r=new RangeSet(e.MIN_KEY,e.MAX_KEY);return __assign(__assign({},e),{transaction:function(t,r,n){if(PSD.subscr&&"readonly"!==r)throw new exceptions.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(PSD.querier));return e.transaction(t,r,n)},table:function(n){var i=e.table(n),o=i.schema,a=o.primaryKey,s=o.indexes,c=a.extractKey,u=a.outbound,l=a.autoIncrement&&s.filter((function(e){return e.compound&&e.keyPath.includes(a.keyPath)})),d=__assign(__assign({},i),{mutate:function(e){var s=e.trans,c=e.mutatedParts||(e.mutatedParts={}),u=function(e){var r="idb://".concat(t,"/").concat(n,"/").concat(e);return c[r]||(c[r]=new RangeSet)},d=u(""),h=u(":dels"),f=e.type,p="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[getEffectiveKeys(a,e).filter((function(e){return e})),e.values]:[],m=p[0],g=p[1],v=e.trans._cache;if(isArray(m)){d.addKeys(m);var y="delete"===f||m.length===g.length?getFromTransactionCache(m,v):null;y||h.addKeys(m),(y||g)&&trackAffectedIndexes(u,o,y,g)}else if(m){var _={from:m.lower,to:m.upper};h.add(_),d.add(_)}else d.add(r),h.add(r),o.indexes.forEach((function(e){return u(e.name).add(r)}));return i.mutate(e).then((function(t){return!m||"add"!==e.type&&"put"!==e.type||(d.addKeys(t.results),l&&l.forEach((function(r){var n=e.values.map((function(e){return r.extractKey(e)})),i=r.keyPath.findIndex((function(e){return e===a.keyPath}));t.results.forEach((function(e){return n[i]=e})),u(r.name).addKeys(n)}))),s.mutatedParts=extendObservabilitySet(s.mutatedParts||{},c),t}))}}),h=function(t){var r,n,i=t.query,o=i.index,a=i.range;return[o,new RangeSet(null!==(r=a.lower)&&void 0!==r?r:e.MIN_KEY,null!==(n=a.upper)&&void 0!==n?n:e.MAX_KEY)]},f={get:function(e){return[a,new RangeSet(e.key)]},getMany:function(e){return[a,(new RangeSet).addKeys(e.keys)]},count:h,query:h,openCursor:h};return keys(f).forEach((function(e){d[e]=function(o){var a=PSD.subscr,s=!!a,l=isCachableContext(PSD,i)&&isCachableRequest(e,o)?o.obsSet={}:a;if(s){var d=function(e){var r="idb://".concat(t,"/").concat(n,"/").concat(e);return l[r]||(l[r]=new RangeSet)},h=d(""),p=d(":dels"),m=f[e](o),g=m[0],v=m[1];if("query"===e&&g.isPrimaryKey&&!o.values?p.add(v):d(g.name||"").add(v),!g.isPrimaryKey){if("count"!==e){var y="query"===e&&u&&o.values&&i.query(__assign(__assign({},o),{values:!1}));return i[e].apply(this,arguments).then((function(t){if("query"===e){if(u&&o.values)return y.then((function(e){var r=e.result;return h.addKeys(r),t}));var r=o.values?t.result.map(c):t.result;o.values?h.addKeys(r):p.addKeys(r)}else if("openCursor"===e){var n=t,i=o.values;return n&&Object.create(n,{key:{get:function(){return p.addKey(n.primaryKey),n.key}},primaryKey:{get:function(){var e=n.primaryKey;return p.addKey(e),e}},value:{get:function(){return i&&h.addKey(n.primaryKey),n.value}}})}return t}))}p.add(r)}}return i[e].apply(this,arguments)}})),d}})}};function trackAffectedIndexes(e,t,r,n){t.indexes.forEach((function(t){var i=e(t.name||"");function o(e){return null!=e?t.extractKey(e):null}var a=function(e){return t.multiEntry&&isArray(e)?e.forEach((function(e){return i.addKey(e)})):i.addKey(e)};(r||n).forEach((function(e,t){var i=r&&o(r[t]),s=n&&o(n[t]);0!==cmp(i,s)&&(null!=i&&a(i),null!=s&&a(s))}))}))}function adjustOptimisticFromFailures(e,t,r){if(0===r.numFailures)return t;if("deleteRange"===t.type)return null;var n=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;if(r.numFailures===n)return null;var i=__assign({},t);return isArray(i.keys)&&(i.keys=i.keys.filter((function(e,t){return!(t in r.failures)}))),"values"in i&&isArray(i.values)&&(i.values=i.values.filter((function(e,t){return!(t in r.failures)}))),i}function isAboveLower(e,t){return void 0===t.lower||(t.lowerOpen?cmp(e,t.lower)>0:cmp(e,t.lower)>=0)}function isBelowUpper(e,t){return void 0===t.upper||(t.upperOpen?cmp(e,t.upper)<0:cmp(e,t.upper)<=0)}function isWithinRange(e,t){return isAboveLower(e,t)&&isBelowUpper(e,t)}function applyOptimisticOps(e,t,r,n,i,o){if(!r||0===r.length)return e;var a=t.query.index,s=a.multiEntry,c=t.query.range,u=n.schema.primaryKey.extractKey,l=a.extractKey,d=(a.lowLevelIndex||a).extractKey,h=r.reduce((function(e,r){var n=e,i="add"===r.type||"put"===r.type?r.values.filter((function(e){var t=l(e);return s&&isArray(t)?t.some((function(e){return isWithinRange(e,c)})):isWithinRange(t,c)})).map((function(e){return e=deepClone(e),o&&Object.freeze(e),e})):[];switch(r.type){case"add":n=e.concat(t.values?i:i.map((function(e){return u(e)})));break;case"put":var a=(new RangeSet).addKeys(r.values.map((function(e){return u(e)})));n=e.filter((function(e){var r=t.values?u(e):e;return!rangesOverlap(new RangeSet(r),a)})).concat(t.values?i:i.map((function(e){return u(e)})));break;case"delete":var d=(new RangeSet).addKeys(r.keys);n=e.filter((function(e){var r=t.values?u(e):e;return!rangesOverlap(new RangeSet(r),d)}));break;case"deleteRange":var h=r.range;n=e.filter((function(e){return!isWithinRange(u(e),h)}))}return n}),e);return h===e?e:(h.sort((function(e,t){return cmp(d(e),d(t))||cmp(u(e),u(t))})),t.limit&&t.limit<1/0&&(h.length>t.limit?h.length=t.limit:e.length===t.limit&&h.length<t.limit&&(i.dirty=!0)),o?Object.freeze(h):h)}function areRangesEqual(e,t){return 0===cmp(e.lower,t.lower)&&0===cmp(e.upper,t.upper)&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function compareLowers(e,t,r,n){if(void 0===e)return void 0!==t?-1:0;if(void 0===t)return 1;var i=cmp(e,t);if(0===i){if(r&&n)return 0;if(r)return 1;if(n)return-1}return i}function compareUppers(e,t,r,n){if(void 0===e)return void 0!==t?1:0;if(void 0===t)return-1;var i=cmp(e,t);if(0===i){if(r&&n)return 0;if(r)return-1;if(n)return 1}return i}function isSuperRange(e,t){return compareLowers(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&compareUppers(e.upper,t.upper,e.upperOpen,t.upperOpen)>=0}function findCompatibleQuery(e,t,r,n){var i=cache["idb://".concat(e,"/").concat(t)];if(!i)return[];var o=i.queries[r];if(!o)return[null,!1,i,null];var a=o[(n.query?n.query.index.name:null)||""];if(!a)return[null,!1,i,null];switch(r){case"query":var s=a.find((function(e){return e.req.limit===n.limit&&e.req.values===n.values&&areRangesEqual(e.req.query.range,n.query.range)}));return s?[s,!0,i,a]:[a.find((function(e){return("limit"in e.req?e.req.limit:1/0)>=n.limit&&(!n.values||e.req.values)&&isSuperRange(e.req.query.range,n.query.range)})),!1,i,a];case"count":var c=a.find((function(e){return areRangesEqual(e.req.query.range,n.query.range)}));return[c,!!c,i,a]}}function subscribeToCacheEntry(e,t,r,n){e.subscribers.add(r),n.addEventListener("abort",(function(){e.subscribers.delete(r),0===e.subscribers.size&&enqueForDeletion(e,t)}))}function enqueForDeletion(e,t){setTimeout((function(){0===e.subscribers.size&&delArrayItem(t,e)}),3e3)}var cacheMiddleware={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name,r=__assign(__assign({},e),{transaction:function(r,n,i){var o=e.transaction(r,n,i);if("readwrite"===n){var a=new AbortController,s=a.signal,c=function(i){return function(){if(a.abort(),"readwrite"===n){for(var s=new Set,c=0,u=r;c<u.length;c++){var l=u[c],d=cache["idb://".concat(t,"/").concat(l)];if(d){var h=e.table(l),f=d.optimisticOps.filter((function(e){return e.trans===o}));if(o._explicit&&i&&o.mutatedParts)for(var p=0,m=Object.values(d.queries.query);p<m.length;p++)for(var g=0,v=(b=m[p]).slice();g<v.length;g++){obsSetsOverlap((S=v[g]).obsSet,o.mutatedParts)&&(delArrayItem(b,S),S.subscribers.forEach((function(e){return s.add(e)})))}else if(f.length>0){d.optimisticOps=d.optimisticOps.filter((function(e){return e.trans!==o}));for(var y=0,_=Object.values(d.queries.query);y<_.length;y++)for(var b,w=0,D=(b=_[y]).slice();w<D.length;w++){var S;if(null!=(S=D[w]).res&&o.mutatedParts)if(i&&!S.dirty){var x=Object.isFrozen(S.res),T=applyOptimisticOps(S.res,S.req,f,h,S,x);S.dirty?(delArrayItem(b,S),S.subscribers.forEach((function(e){return s.add(e)}))):T!==S.res&&(S.res=T,S.promise=DexiePromise.resolve({result:T}))}else S.dirty&&delArrayItem(b,S),S.subscribers.forEach((function(e){return s.add(e)}))}}}}s.forEach((function(e){return e()}))}}};o.addEventListener("abort",c(!1),{signal:s}),o.addEventListener("error",c(!1),{signal:s}),o.addEventListener("complete",c(!0),{signal:s})}return o},table:function(r){var n=e.table(r),i=n.schema.primaryKey,o=__assign(__assign({},n),{mutate:function(e){var o=PSD.trans;if(i.outbound||"disabled"===o.db._options.cache||o.explicit)return n.mutate(e);var a=cache["idb://".concat(t,"/").concat(r)];if(!a)return n.mutate(e);var s=n.mutate(e);return"add"!==e.type&&"put"!==e.type||!(e.values.length>=50||getEffectiveKeys(i,e).some((function(e){return null==e})))?(a.optimisticOps.push(e),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts),s.then((function(t){if(t.numFailures>0){delArrayItem(a.optimisticOps,e);var r=adjustOptimisticFromFailures(a,e,t);r&&a.optimisticOps.push(r),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}})),s.catch((function(){delArrayItem(a.optimisticOps,e),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}))):s.then((function(t){var r=__assign(__assign({},e),{values:e.values.map((function(e,r){var n,o=(null===(n=i.keyPath)||void 0===n?void 0:n.includes("."))?deepClone(e):__assign({},e);return setByKeyPath(o,i.keyPath,t.results[r]),o}))}),n=adjustOptimisticFromFailures(a,r,t);a.optimisticOps.push(n),queueMicrotask((function(){return e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}))})),s},query:function(e){var i;if(!isCachableContext(PSD,n)||!isCachableRequest("query",e))return n.query(e);var o="immutable"===(null===(i=PSD.trans)||void 0===i?void 0:i.db._options.cache),a=PSD,s=a.requery,c=a.signal,u=findCompatibleQuery(t,r,"query",e),l=u[0],d=u[1],h=u[2],f=u[3];if(l&&d)l.obsSet=e.obsSet;else{var p=n.query(e).then((function(e){var t=e.result;if(l&&(l.res=t),o){for(var r=0,n=t.length;r<n;++r)Object.freeze(t[r]);Object.freeze(t)}else e.result=deepClone(t);return e})).catch((function(e){return f&&l&&delArrayItem(f,l),Promise.reject(e)}));l={obsSet:e.obsSet,promise:p,subscribers:new Set,type:"query",req:e,dirty:!1},f?f.push(l):(f=[l],h||(h=cache["idb://".concat(t,"/").concat(r)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}}),h.queries.query[e.query.index.name||""]=f)}return subscribeToCacheEntry(l,f,s,c),l.promise.then((function(t){return{result:applyOptimisticOps(t.result,e,null==h?void 0:h.optimisticOps,n,l,o)}}))}});return o}});return r}};function vipify(e,t){return new Proxy(e,{get:function(e,r,n){return"db"===r?t:Reflect.get(e,r,n)}})}var Dexie$1=function(){function e(t,r){var n=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=r=__assign({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange,cache:"cloned"},r),this._deps={indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange};var o=r.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:nop,dbReadyPromise:null,cancelOpen:nop,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:r.autoOpen};a.dbReadyPromise=new DexiePromise((function(e){a.dbReadyResolve=e})),a.openCanceller=new DexiePromise((function(e,t){a.cancelOpen=t})),this._state=a,this.name=t,this.on=Events(this,"populate","blocked","versionchange","close",{ready:[promisableChain,nop]}),this.on.ready.subscribe=override(this.on.ready.subscribe,(function(t){return function(r,i){e.vip((function(){var e=n._state;if(e.openComplete)e.dbOpenError||DexiePromise.resolve().then(r),i&&t(r);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(r),i&&t(r);else{t(r);var o=n;i||t((function e(){o.on.ready.unsubscribe(r),o.on.ready.unsubscribe(e)}))}}))}})),this.Collection=createCollectionConstructor(this),this.Table=createTableConstructor(this),this.Transaction=createTransactionConstructor(this),this.Version=createVersionConstructor(this),this.WhereClause=createWhereClauseConstructor(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(n.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(n.name,"'. Closing db now to resume the delete request.")),n.close({disableAutoOpen:!1})})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(n.name,"') was blocked")):console.warn("Upgrade '".concat(n.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=getMaxKey(r.IDBKeyRange),this._createTransaction=function(e,t,r,i){return new n.Transaction(e,t,r,n._options.chromeTransactionDurability,i)},this._fireOnBlocked=function(e){n.on("blocked").fire(e),connections.filter((function(e){return e.name===n.name&&e!==n&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(cacheExistingValuesMiddleware),this.use(cacheMiddleware),this.use(observabilityMiddleware),this.use(virtualIndexMiddleware),this.use(hooksMiddleware);var s=new Proxy(this,{get:function(e,t,r){if("_vip"===t)return!0;if("table"===t)return function(e){return vipify(n.table(e),s)};var i=Reflect.get(e,t,r);return i instanceof Table?vipify(i,s):"tables"===t?i.map((function(e){return vipify(e,s)})):"_createTransaction"===t?function(){return vipify(i.apply(this,arguments),s)}:i}});this.vip=s,o.forEach((function(e){return e(n)}))}return e.prototype.version=function(e){if(isNaN(e)||e<.1)throw new exceptions.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new exceptions.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,r=t.filter((function(t){return t._cfg.version===e}))[0];return r||(r=new this.Version(e),t.push(r),t.sort(lowerVersionFirst),r.stores({}),this._state.autoSchema=!1,r)},e.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||PSD.letThrough||this._vip)?e():new DexiePromise((function(e,r){if(t._state.openComplete)return r(new exceptions.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void r(new exceptions.DatabaseClosed);t.open().catch(nop)}t._state.dbReadyPromise.then(e,r)})).then(e)},e.prototype.use=function(e){var t=e.stack,r=e.create,n=e.level,i=e.name;i&&this.unuse({stack:t,name:i});var o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:r,level:null==n?10:n,name:i}),o.sort((function(e,t){return e.level-t.level})),this},e.prototype.unuse=function(e){var t=e.stack,r=e.name,n=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return n?e.create!==n:!!r&&e.name!==r}))),this},e.prototype.open=function(){var e=this;return usePSD(globalPSD,(function(){return dexieOpen(e)}))},e.prototype._close=function(){var e=this._state,t=connections.indexOf(this);if(t>=0&&connections.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new DexiePromise((function(t){e.dbReadyResolve=t})),e.openCanceller=new DexiePromise((function(t,r){e.cancelOpen=r})))},e.prototype.close=function(e){var t=(void 0===e?{disableAutoOpen:!0}:e).disableAutoOpen,r=this._state;t?(r.isBeingOpened&&r.cancelOpen(new exceptions.DatabaseClosed),this._close(),r.autoOpen=!1,r.dbOpenError=new exceptions.DatabaseClosed):(this._close(),r.autoOpen=this._options.autoOpen||r.isBeingOpened,r.openComplete=!1,r.dbOpenError=null)},e.prototype.delete=function(e){var t=this;void 0===e&&(e={disableAutoOpen:!0});var r=arguments.length>0&&"object"!=typeof arguments[0],n=this._state;return new DexiePromise((function(i,o){var a=function(){t.close(e);var r=t._deps.indexedDB.deleteDatabase(t.name);r.onsuccess=wrap$1((function(){_onDatabaseDeleted(t._deps,t.name),i()})),r.onerror=eventRejectHandler(o),r.onblocked=t._fireOnBlocked};if(r)throw new exceptions.InvalidArgument("Invalid closeOptions argument to db.delete()");n.isBeingOpened?n.dbReadyPromise.then(a):a()}))},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return null!==this.idbdb},e.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name},e.prototype.hasFailed=function(){return null!==this._state.dbOpenError},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var e=this;return keys(this._allTables).map((function(t){return e._allTables[t]}))},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var e=extractTransactionArgs.apply(this,arguments);return this._transaction.apply(this,e)},e.prototype._transaction=function(e,t,r){var n=this,i=PSD.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);var o,a,s=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=e instanceof n.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||e===READONLY)o=READONLY;else{if("rw"!=e&&e!=READWRITE)throw new exceptions.InvalidArgument("Invalid transaction mode: "+e);o=READWRITE}if(i){if(i.mode===READONLY&&o===READWRITE){if(!s)throw new exceptions.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&a.forEach((function(e){if(i&&-1===i.storeNames.indexOf(e)){if(!s)throw new exceptions.SubTransaction("Table "+e+" not included in parent transaction.");i=null}})),s&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(function(t,r){r(e)})):rejection(e)}var c=enterTransactionScope.bind(null,this,o,a,i,r);return i?i._promise(o,c,"lock"):PSD.trans?usePSD(PSD.transless,(function(){return n._whenReady(c)})):this._whenReady(c)},e.prototype.table=function(e){if(!hasOwn(this._allTables,e))throw new exceptions.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},e}(),symbolObservable="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Observable=function(){function e(e){this._subscribe=e}return e.prototype.subscribe=function(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})},e.prototype[symbolObservable]=function(){return this},e}(),domDeps;try{domDeps={indexedDB:_global.indexedDB||_global.mozIndexedDB||_global.webkitIndexedDB||_global.msIndexedDB,IDBKeyRange:_global.IDBKeyRange||_global.webkitIDBKeyRange}}catch(e){domDeps={indexedDB:null,IDBKeyRange:null}}function liveQuery(e){var t,r=!1,n=new Observable((function(n){var i=isAsyncFunction(e);var o,a=!1,s={},c={},u={get closed(){return a},unsubscribe:function(){a||(a=!0,o&&o.abort(),l&&globalEvents.storagemutated.unsubscribe(h))}};n.start&&n.start(u);var l=!1,d=function(){return execInGlobalContext(f)};var h=function(e){extendObservabilitySet(s,e),obsSetsOverlap(c,s)&&d()},f=function(){if(!a&&domDeps.indexedDB){s={};var u={};o&&o.abort(),o=new AbortController;var f={subscr:u,signal:o.signal,requery:d,querier:e,trans:null},p=function(t){var r=beginMicroTickScope();try{i&&incrementExpectedAwaits();var n=newScope(e,t);return i&&(n=n.finally(decrementExpectedAwaits)),n}finally{r&&endMicroTickScope()}}(f);Promise.resolve(p).then((function(e){r=!0,t=e,a||f.signal.aborted||(s={},objectIsEmpty(c=u)||l||(globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,h),l=!0),execInGlobalContext((function(){return!a&&n.next&&n.next(e)})))}),(function(e){r=!1,["DatabaseClosedError","AbortError"].includes(null==e?void 0:e.name)||a||execInGlobalContext((function(){a||n.error&&n.error(e)}))}))}};return setTimeout(d,0),u}));return n.hasValue=function(){return r},n.getValue=function(){return t},n}var Dexie=Dexie$1;function propagateLocally(e){var t=propagatingLocally;try{propagatingLocally=!0,globalEvents.storagemutated.fire(e),signalSubscribersNow(e,!0)}finally{propagatingLocally=t}}props(Dexie,__assign(__assign({},fullNameExceptions),{delete:function(e){return new Dexie(e,{addons:[]}).delete()},exists:function(e){return new Dexie(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return getDatabaseNames(Dexie.dependencies).then(e)}catch(e){return rejection(new exceptions.MissingAPI)}},defineClass:function(){return function(e){extend(this,e)}},ignoreTransaction:function(e){return PSD.trans?usePSD(PSD.transless,e):e()},vip:vip,async:function(e){return function(){try{var t=awaitIterator(e.apply(this,arguments));return t&&"function"==typeof t.then?t:DexiePromise.resolve(t)}catch(e){return rejection(e)}}},spawn:function(e,t,r){try{var n=awaitIterator(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:DexiePromise.resolve(n)}catch(e){return rejection(e)}},currentTransaction:{get:function(){return PSD.trans||null}},waitFor:function(e,t){var r=DexiePromise.resolve("function"==typeof e?Dexie.ignoreTransaction(e):e).timeout(t||6e4);return PSD.trans?PSD.trans.waitFor(r):r},Promise:DexiePromise,debug:{get:function(){return debug},set:function(e){setDebug(e)}},derive:derive,extend:extend,props:props,override:override,Events:Events,on:globalEvents,liveQuery:liveQuery,extendObservabilitySet:extendObservabilitySet,getByKeyPath:getByKeyPath,setByKeyPath:setByKeyPath,delByKeyPath:delByKeyPath,shallowClone:shallowClone,deepClone:deepClone,getObjectDiff:getObjectDiff,cmp:cmp,asap:asap$1,minKey:minKey,addons:[],connections:connections,errnames:errnames,dependencies:domDeps,cache:cache,semVer:DEXIE_VERSION,version:DEXIE_VERSION.split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,r){return e+t/Math.pow(10,2*r)}))})),Dexie.maxKey=getMaxKey(Dexie.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,(function(e){var t;propagatingLocally||(t=new CustomEvent(STORAGE_MUTATED_DOM_EVENT_NAME,{detail:e}),propagatingLocally=!0,dispatchEvent(t),propagatingLocally=!1)})),addEventListener(STORAGE_MUTATED_DOM_EVENT_NAME,(function(e){var t=e.detail;propagatingLocally||propagateLocally(t)})));var propagatingLocally=!1,bc,createBC=function(){};"undefined"!=typeof BroadcastChannel&&(createBC=function(){(bc=new BroadcastChannel(STORAGE_MUTATED_DOM_EVENT_NAME)).onmessage=function(e){return e.data&&propagateLocally(e.data)}},createBC(),"function"==typeof bc.unref&&bc.unref(),globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,(function(e){propagatingLocally||bc.postMessage(e)}))),"undefined"!=typeof addEventListener&&(addEventListener("pagehide",(function(e){if(!Dexie$1.disableBfCache&&e.persisted){debug&&console.debug("Dexie: handling persisted pagehide"),null==bc||bc.close();for(var t=0,r=connections;t<r.length;t++){r[t].close({disableAutoOpen:!1})}}})),addEventListener("pageshow",(function(e){!Dexie$1.disableBfCache&&e.persisted&&(debug&&console.debug("Dexie: handling persisted pageshow"),createBC(),propagateLocally({all:new RangeSet(-1/0,[[]])}))}))),DexiePromise.rejectionMapper=mapError,setDebug(debug);var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \" + module + \" not found.') }"),requireFoolWebpack_1=requireFoolWebpack,environment=createCommonjsModule((function(e){var t=function(e){return void 0!==e&&null!=e.versions&&null!=e.versions.node};e.exports.isNode=t,e.exports.platform=void 0!==process$1&&t(process$1)?"node":"browser";var r=function(e){try{return requireFoolWebpack_1(e)}catch(e){return null}}("worker_threads");e.exports.isMainThread="node"===e.exports.platform?(!r||r.isMainThread)&&!process$1.connected:"undefined"!=typeof Window,e.exports.cpus="browser"===e.exports.platform?self.navigator.hardwareConcurrency:requireFoolWebpack_1("os").cpus().length}));function Promise$2(e,t){var r=this;if(!(this instanceof Promise$2))throw new SyntaxError("Constructor must be called with the new operator");if("function"!=typeof e)throw new SyntaxError("Function parameter handler(resolve, reject) missing");var n=[],i=[];this.resolved=!1,this.rejected=!1,this.pending=!0;var o=function(e,t){n.push(e),i.push(t)};this.then=function(e,t){return new Promise$2((function(r,n){var i=e?_then(e,r,n):r,a=t?_then(t,r,n):n;o(i,a)}),r)};var a=function(e){return r.resolved=!0,r.rejected=!1,r.pending=!1,n.forEach((function(t){t(e)})),o=function(t,r){t(e)},a=s=function(){},r},s=function(e){return r.resolved=!1,r.rejected=!0,r.pending=!1,i.forEach((function(t){t(e)})),o=function(t,r){r(e)},a=s=function(){},r};this.cancel=function(){return t?t.cancel():s(new CancellationError),r},this.timeout=function(e){if(t)t.timeout(e);else{var n=setTimeout((function(){s(new TimeoutError("Promise timed out after "+e+" ms"))}),e);r.always((function(){clearTimeout(n)}))}return r},e((function(e){a(e)}),(function(e){s(e)}))}function _then(e,t,r){return function(n){try{var i=e(n);i&&"function"==typeof i.then&&"function"==typeof i.catch?i.then(t,r):t(i)}catch(e){r(e)}}}function CancellationError(e){this.message=e||"promise cancelled",this.stack=(new Error).stack}function TimeoutError(e){this.message=e||"timeout exceeded",this.stack=(new Error).stack}environment.isNode,environment.platform,environment.isMainThread,environment.cpus,Promise$2.prototype.catch=function(e){return this.then(null,e)},Promise$2.prototype.always=function(e){return this.then(e,e)},Promise$2.all=function(e){return new Promise$2((function(t,r){var n=e.length,i=[];n?e.forEach((function(e,o){e.then((function(e){i[o]=e,0==--n&&t(i)}),(function(e){n=0,r(e)}))})):t(i)}))},Promise$2.defer=function(){var e={};return e.promise=new Promise$2((function(t,r){e.resolve=t,e.reject=r})),e},CancellationError.prototype=new Error,CancellationError.prototype.constructor=Error,CancellationError.prototype.name="CancellationError",Promise$2.CancellationError=CancellationError,TimeoutError.prototype=new Error,TimeoutError.prototype.constructor=Error,TimeoutError.prototype.name="TimeoutError",Promise$2.TimeoutError=TimeoutError;var _Promise=Promise$2,__dirname="/Users/wangshuai/workspace/web-design/go-design/node_modules/.pnpm/workerpool@6.4.0/node_modules/workerpool/src",embeddedWorker='!function(){var __webpack_modules__={577:function(e){e.exports=function(e,r){this.message=e,this.transfer=r}}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];return void 0!==r||(r=__webpack_module_cache__[e]={exports:{}},__webpack_modules__[e](r,r.exports,__webpack_require__)),r.exports}var __webpack_exports__={};!function(){var exports=__webpack_exports__,__webpack_unused_export__;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Transfer=__webpack_require__(577),requireFoolWebpack=eval("typeof require !== \'undefined\' ? require : function (module) { throw new Error(\'Module \\" + module + \\" not found.\') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}},WorkerThreads,parentPort;if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(e,r){addEventListener(e,function(e){r(e.data)})},worker.send=function(e){postMessage(e)};else{if("undefined"==typeof process)throw new Error("Script must be executed as a worker");try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(error){if("object"!==_typeof(error)||null===error||"MODULE_NOT_FOUND"!==error.code)throw error}WorkerThreads&&null!==WorkerThreads.parentPort?(parentPort=WorkerThreads.parentPort,worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort)):(worker.on=process.on.bind(process),worker.send=function(e){process.send(e)},worker.on("disconnect",function(){process.exit(1)})),worker.exit=process.exit.bind(process)}function convertError(o){return Object.getOwnPropertyNames(o).reduce(function(e,r){return Object.defineProperty(e,r,{value:o[r],enumerable:!0})},{})}function isPromise(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}worker.methods={},worker.methods.run=function(e,r){e=new Function("return ("+e+").apply(null, arguments);");return e.apply(e,r)},worker.methods.methods=function(){return Object.keys(worker.methods)},worker.terminationHandler=void 0,worker.cleanupAndExit=function(e){function r(){worker.exit(e)}if(!worker.terminationHandler)return r();var o=worker.terminationHandler(e);isPromise(o)?o.then(r,r):r()};var currentRequestId=null;worker.on("message",function(r){if(r===TERMINATE_METHOD_ID)return worker.cleanupAndExit(0);try{var e=worker.methods[r.method];if(!e)throw new Error(\'Unknown method "\'+r.method+\'"\');currentRequestId=r.id;var o=e.apply(e,r.params);isPromise(o)?o.then(function(e){e instanceof Transfer?worker.send({id:r.id,result:e.message,error:null},e.transfer):worker.send({id:r.id,result:e,error:null}),currentRequestId=null}).catch(function(e){worker.send({id:r.id,result:null,error:convertError(e)}),currentRequestId=null}):(o instanceof Transfer?worker.send({id:r.id,result:o.message,error:null},o.transfer):worker.send({id:r.id,result:o,error:null}),currentRequestId=null)}catch(e){worker.send({id:r.id,result:null,error:convertError(e)})}}),worker.register=function(e,r){if(e)for(var o in e)e.hasOwnProperty(o)&&(worker.methods[o]=e[o]);r&&(worker.terminationHandler=r.onTerminate),worker.send("ready")},worker.emit=function(e){currentRequestId&&(e instanceof Transfer?worker.send({id:currentRequestId,isEvent:!0,payload:e.message},e.transfer):worker.send({id:currentRequestId,isEvent:!0,payload:e}))},__webpack_unused_export__=worker.register,worker.emit}()}();',TERMINATE_METHOD_ID="__workerpool-terminate__";function ensureWorkerThreads(){var e=tryRequireWorkerThreads();if(!e)throw new Error("WorkerPool: workerType = 'thread' is not supported, Node >= 11.7.0 required");return e}function ensureWebWorker(){if("function"!=typeof Worker&&("object"!=typeof Worker||"function"!=typeof Worker.prototype.constructor))throw new Error("WorkerPool: Web Workers not supported")}function tryRequireWorkerThreads(){try{return requireFoolWebpack_1("worker_threads")}catch(e){if("object"==typeof e&&null!==e&&"MODULE_NOT_FOUND"===e.code)return null;throw e}}function getDefaultWorker(){if("browser"===environment.platform){if("undefined"==typeof Blob)throw new Error("Blob not supported by the browser");if(!window.URL||"function"!=typeof window.URL.createObjectURL)throw new Error("URL.createObjectURL not supported by the browser");var e=new Blob([embeddedWorker],{type:"text/javascript"});return window.URL.createObjectURL(e)}return __dirname+"/worker.js"}function setupWorker(e,t){if("web"===t.workerType)return ensureWebWorker(),setupBrowserWorker(e,Worker);if("thread"===t.workerType)return setupWorkerThreadWorker(e,r=ensureWorkerThreads(),t.workerThreadOpts);if("process"!==t.workerType&&t.workerType){if("browser"===environment.platform)return ensureWebWorker(),setupBrowserWorker(e,Worker);var r=tryRequireWorkerThreads();return r?setupWorkerThreadWorker(e,r):setupProcessWorker(e,resolveForkOptions(t),requireFoolWebpack_1("child_process"))}return setupProcessWorker(e,resolveForkOptions(t),requireFoolWebpack_1("child_process"))}function setupBrowserWorker(e,t){var r=new t(e);return r.isBrowserWorker=!0,r.on=function(e,t){this.addEventListener(e,(function(e){t(e.data)}))},r.send=function(e,t){this.postMessage(e,t)},r}function setupWorkerThreadWorker(e,t,r){var n=new t.Worker(e,{stdout:!1,stderr:!1,...r});return n.isWorkerThread=!0,n.send=function(e,t){this.postMessage(e,t)},n.kill=function(){return this.terminate(),!0},n.disconnect=function(){this.terminate()},n}function setupProcessWorker(e,t,r){var n=r.fork(e,t.forkArgs,t.forkOpts),i=n.send;return n.send=function(e){return i.call(n,e)},n.isChildProcess=!0,n}function resolveForkOptions(e){e=e||{};var t=process$1.execArgv.join(" "),r=-1!==t.indexOf("--inspect"),n=-1!==t.indexOf("--debug-brk"),i=[];return r&&(i.push("--inspect="+e.debugPort),n&&i.push("--debug-brk")),process$1.execArgv.forEach((function(e){e.indexOf("--max-old-space-size")>-1&&i.push(e)})),Object.assign({},e,{forkArgs:e.forkArgs,forkOpts:Object.assign({},e.forkOpts,{execArgv:(e.forkOpts&&e.forkOpts.execArgv||[]).concat(i)})})}function objectToError(e){for(var t=new Error(""),r=Object.keys(e),n=0;n<r.length;n++)t[r[n]]=e[r[n]];return t}function WorkerHandler(e,t){var r=this,n=t||{};function i(e){for(var t in r.terminated=!0,r.processing)void 0!==r.processing[t]&&r.processing[t].resolver.reject(e);r.processing=Object.create(null)}this.script=e||getDefaultWorker(),this.worker=setupWorker(this.script,n),this.debugPort=n.debugPort,this.forkOpts=n.forkOpts,this.forkArgs=n.forkArgs,this.workerThreadOpts=n.workerThreadOpts,this.workerTerminateTimeout=n.workerTerminateTimeout,e||(this.worker.ready=!0),this.requestQueue=[],this.worker.on("message",(function(e){if(!r.terminated)if("string"==typeof e&&"ready"===e)r.worker.ready=!0,function(){for(const e of r.requestQueue.splice(0))r.worker.send(e.message,e.transfer)}();else{var t=e.id,n=r.processing[t];void 0!==n&&(e.isEvent?n.options&&"function"==typeof n.options.on&&n.options.on(e.payload):(delete r.processing[t],!0===r.terminating&&r.terminate(),e.error?n.resolver.reject(objectToError(e.error)):n.resolver.resolve(e.result)))}}));var o=this.worker;this.worker.on("error",i),this.worker.on("exit",(function(e,t){var n="Workerpool Worker terminated Unexpectedly\n";n+=" exitCode: `"+e+"`\n",n+=" signalCode: `"+t+"`\n",n+=" workerpool.script: `"+r.script+"`\n",n+=" spawnArgs: `"+o.spawnargs+"`\n",n+=" spawnfile: `"+o.spawnfile+"`\n",n+=" stdout: `"+o.stdout+"`\n",n+=" stderr: `"+o.stderr+"`\n",i(new Error(n))})),this.processing=Object.create(null),this.terminating=!1,this.terminated=!1,this.cleaning=!1,this.terminationHandler=null,this.lastId=0}WorkerHandler.prototype.methods=function(){return this.exec("methods")},WorkerHandler.prototype.exec=function(e,t,r,n){r||(r=_Promise.defer());var i=++this.lastId;this.processing[i]={id:i,resolver:r,options:n};var o={message:{id:i,method:e,params:t},transfer:n&&n.transfer};this.terminated?r.reject(new Error("Worker is terminated")):this.worker.ready?this.worker.send(o.message,o.transfer):this.requestQueue.push(o);var a=this;return r.promise.catch((function(e){if(e instanceof _Promise.CancellationError||e instanceof _Promise.TimeoutError)return delete a.processing[i],a.terminateAndNotify(!0).then((function(){throw e}),(function(e){throw e}));throw e}))},WorkerHandler.prototype.busy=function(){return this.cleaning||Object.keys(this.processing).length>0},WorkerHandler.prototype.terminate=function(e,t){var r=this;if(e){for(var n in this.processing)void 0!==this.processing[n]&&this.processing[n].resolver.reject(new Error("Worker terminated"));this.processing=Object.create(null)}if("function"==typeof t&&(this.terminationHandler=t),this.busy())this.terminating=!0;else{var i=function(e){if(r.terminated=!0,r.cleaning=!1,null!=r.worker&&r.worker.removeAllListeners&&r.worker.removeAllListeners("message"),r.worker=null,r.terminating=!1,r.terminationHandler)r.terminationHandler(e,r);else if(e)throw e};if(this.worker){if("function"==typeof this.worker.kill){if(this.worker.killed)return void i(new Error("worker already killed!"));var o=setTimeout((function(){r.worker&&r.worker.kill()}),this.workerTerminateTimeout);return this.worker.once("exit",(function(){clearTimeout(o),r.worker&&(r.worker.killed=!0),i()})),this.worker.ready?this.worker.send(TERMINATE_METHOD_ID):this.requestQueue.push(TERMINATE_METHOD_ID),void(this.cleaning=!0)}if("function"!=typeof this.worker.terminate)throw new Error("Failed to terminate worker");this.worker.terminate(),this.worker.killed=!0}i()}},WorkerHandler.prototype.terminateAndNotify=function(e,t){var r=_Promise.defer();return t&&(r.promise.timeout=t),this.terminate(e,(function(e,t){e?r.reject(e):r.resolve(t)})),r.promise};var WorkerHandler_1=WorkerHandler,_tryRequireWorkerThreads=tryRequireWorkerThreads,_setupProcessWorker=setupProcessWorker,_setupBrowserWorker=setupBrowserWorker,_setupWorkerThreadWorker=setupWorkerThreadWorker,ensureWorkerThreads_1=ensureWorkerThreads;WorkerHandler_1._tryRequireWorkerThreads=_tryRequireWorkerThreads,WorkerHandler_1._setupProcessWorker=_setupProcessWorker,WorkerHandler_1._setupBrowserWorker=_setupBrowserWorker,WorkerHandler_1._setupWorkerThreadWorker=_setupWorkerThreadWorker,WorkerHandler_1.ensureWorkerThreads=ensureWorkerThreads_1;var MAX_PORTS=65535,debugPortAllocator=DebugPortAllocator;function DebugPortAllocator(){this.ports=Object.create(null),this.length=0}DebugPortAllocator.prototype.nextAvailableStartingAt=function(e){for(;!0===this.ports[e];)e++;if(e>=MAX_PORTS)throw new Error("WorkerPool debug port limit reached: "+e+">= "+MAX_PORTS);return this.ports[e]=!0,this.length++,e},DebugPortAllocator.prototype.releasePort=function(e){delete this.ports[e],this.length--};var DEBUG_PORT_ALLOCATOR=new debugPortAllocator;function Pool(e,t){"string"==typeof e?this.script=e||null:(this.script=null,t=e),this.workers=[],this.tasks=[],t=t||{},this.forkArgs=Object.freeze(t.forkArgs||[]),this.forkOpts=Object.freeze(t.forkOpts||{}),this.workerThreadOpts=Object.freeze(t.workerThreadOpts||{}),this.debugPortStart=t.debugPortStart||43210,this.nodeWorker=t.nodeWorker,this.workerType=t.workerType||t.nodeWorker||"auto",this.maxQueueSize=t.maxQueueSize||1/0,this.workerTerminateTimeout=t.workerTerminateTimeout||1e3,this.onCreateWorker=t.onCreateWorker||(()=>null),this.onTerminateWorker=t.onTerminateWorker||(()=>null),t&&"maxWorkers"in t?(validateMaxWorkers(t.maxWorkers),this.maxWorkers=t.maxWorkers):this.maxWorkers=Math.max((environment.cpus||4)-1,1),t&&"minWorkers"in t&&("max"===t.minWorkers?this.minWorkers=this.maxWorkers:(validateMinWorkers(t.minWorkers),this.minWorkers=t.minWorkers,this.maxWorkers=Math.max(this.minWorkers,this.maxWorkers)),this._ensureMinWorkers()),this._boundNext=this._next.bind(this),"thread"===this.workerType&&WorkerHandler_1.ensureWorkerThreads()}function validateMaxWorkers(e){if(!isNumber(e)||!isInteger(e)||e<1)throw new TypeError("Option maxWorkers must be an integer number >= 1")}function validateMinWorkers(e){if(!isNumber(e)||!isInteger(e)||e<0)throw new TypeError("Option minWorkers must be an integer number >= 0")}function isNumber(e){return"number"==typeof e}function isInteger(e){return Math.round(e)==e}Pool.prototype.exec=function(e,t,r){if(t&&!Array.isArray(t))throw new TypeError('Array expected as argument "params"');if("string"==typeof e){var n=_Promise.defer();if(this.tasks.length>=this.maxQueueSize)throw new Error("Max queue size of "+this.maxQueueSize+" reached");var i=this.tasks,o={method:e,params:t,resolver:n,timeout:null,options:r};i.push(o);var a=n.promise.timeout;return n.promise.timeout=function(e){return-1!==i.indexOf(o)?(o.timeout=e,n.promise):a.call(n.promise,e)},this._next(),n.promise}if("function"==typeof e)return this.exec("run",[String(e),t]);throw new TypeError('Function or string expected as argument "method"')},Pool.prototype.proxy=function(){if(arguments.length>0)throw new Error("No arguments expected");var e=this;return this.exec("methods").then((function(t){var r={};return t.forEach((function(t){r[t]=function(){return e.exec(t,Array.prototype.slice.call(arguments))}})),r}))},Pool.prototype._next=function(){if(this.tasks.length>0){var e=this._getWorker();if(e){var t=this,r=this.tasks.shift();if(r.resolver.promise.pending){var n=e.exec(r.method,r.params,r.resolver,r.options).then(t._boundNext).catch((function(){if(e.terminated)return t._removeWorker(e)})).then((function(){t._next()}));"number"==typeof r.timeout&&n.timeout(r.timeout)}else t._next()}}},Pool.prototype._getWorker=function(){for(var e=this.workers,t=0;t<e.length;t++){var r=e[t];if(!1===r.busy())return r}return e.length<this.maxWorkers?(r=this._createWorkerHandler(),e.push(r),r):null},Pool.prototype._removeWorker=function(e){var t=this;return DEBUG_PORT_ALLOCATOR.releasePort(e.debugPort),this._removeWorkerFromList(e),this._ensureMinWorkers(),new _Promise((function(r,n){e.terminate(!1,(function(i){t.onTerminateWorker({forkArgs:e.forkArgs,forkOpts:e.forkOpts,workerThreadOpts:e.workerThreadOpts,script:e.script}),i?n(i):r(e)}))}))},Pool.prototype._removeWorkerFromList=function(e){var t=this.workers.indexOf(e);-1!==t&&this.workers.splice(t,1)},Pool.prototype.terminate=function(e,t){var r=this;this.tasks.forEach((function(e){e.resolver.reject(new Error("Pool terminated"))})),this.tasks.length=0;var n=function(e){DEBUG_PORT_ALLOCATOR.releasePort(e.debugPort),this._removeWorkerFromList(e)}.bind(this),i=[];return this.workers.slice().forEach((function(o){var a=o.terminateAndNotify(e,t).then(n).always((function(){r.onTerminateWorker({forkArgs:o.forkArgs,forkOpts:o.forkOpts,workerThreadOpts:o.workerThreadOpts,script:o.script})}));i.push(a)})),_Promise.all(i)},Pool.prototype.stats=function(){var e=this.workers.length,t=this.workers.filter((function(e){return e.busy()})).length;return{totalWorkers:e,busyWorkers:t,idleWorkers:e-t,pendingTasks:this.tasks.length,activeTasks:t}},Pool.prototype._ensureMinWorkers=function(){if(this.minWorkers)for(var e=this.workers.length;e<this.minWorkers;e++)this.workers.push(this._createWorkerHandler())},Pool.prototype._createWorkerHandler=function(){const e=this.onCreateWorker({forkArgs:this.forkArgs,forkOpts:this.forkOpts,workerThreadOpts:this.workerThreadOpts,script:this.script})||{};return new WorkerHandler_1(e.script||this.script,{forkArgs:e.forkArgs||this.forkArgs,forkOpts:e.forkOpts||this.forkOpts,workerThreadOpts:e.workerThreadOpts||this.workerThreadOpts,debugPort:DEBUG_PORT_ALLOCATOR.nextAvailableStartingAt(this.debugPortStart),workerType:this.workerType,workerTerminateTimeout:this.workerTerminateTimeout})};var Pool_1=Pool;function Transfer$1(e,t){this.message=e,this.transfer=t}var transfer=Transfer$1,worker_1=createCommonjsModule((function(module,exports){var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \" + module + \" not found.') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}};if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(e,t){addEventListener(e,(function(e){t(e.data)}))},worker.send=function(e){postMessage(e)};else{if(void 0===process$1)throw new Error("Script must be executed as a worker");var WorkerThreads;try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(e){if("object"!=typeof e||null===e||"MODULE_NOT_FOUND"!==e.code)throw e}if(WorkerThreads&&null!==WorkerThreads.parentPort){var parentPort=WorkerThreads.parentPort;worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort),worker.exit=process$1.exit.bind(process$1)}else worker.on=process$1.on.bind(process$1),worker.send=function(e){process$1.send(e)},worker.on("disconnect",(function(){process$1.exit(1)})),worker.exit=process$1.exit.bind(process$1)}function convertError(e){return Object.getOwnPropertyNames(e).reduce((function(t,r){return Object.defineProperty(t,r,{value:e[r],enumerable:!0})}),{})}function isPromise(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}worker.methods={},worker.methods.run=function(e,t){var r=new Function("return ("+e+").apply(null, arguments);");return r.apply(r,t)},worker.methods.methods=function(){return Object.keys(worker.methods)},worker.terminationHandler=void 0,worker.cleanupAndExit=function(e){var t=function(){worker.exit(e)};if(!worker.terminationHandler)return t();var r=worker.terminationHandler(e);isPromise(r)?r.then(t,t):t()};var currentRequestId=null;worker.on("message",(function(e){if(e===TERMINATE_METHOD_ID)return worker.cleanupAndExit(0);try{var t=worker.methods[e.method];if(!t)throw new Error('Unknown method "'+e.method+'"');currentRequestId=e.id;var r=t.apply(t,e.params);isPromise(r)?r.then((function(t){t instanceof transfer?worker.send({id:e.id,result:t.message,error:null},t.transfer):worker.send({id:e.id,result:t,error:null}),currentRequestId=null})).catch((function(t){worker.send({id:e.id,result:null,error:convertError(t)}),currentRequestId=null})):(r instanceof transfer?worker.send({id:e.id,result:r.message,error:null},r.transfer):worker.send({id:e.id,result:r,error:null}),currentRequestId=null)}catch(t){worker.send({id:e.id,result:null,error:convertError(t)})}})),worker.register=function(e,t){if(e)for(var r in e)e.hasOwnProperty(r)&&(worker.methods[r]=e[r]);t&&(worker.terminationHandler=t.onTerminate),worker.send("ready")},worker.emit=function(e){if(currentRequestId){if(e instanceof transfer)return void worker.send({id:currentRequestId,isEvent:!0,payload:e.message},e.transfer);worker.send({id:currentRequestId,isEvent:!0,payload:e})}},exports.add=worker.register,exports.emit=worker.emit}));worker_1.add,worker_1.emit;var pool=function(e,t){return new Pool_1(e,t)},worker=function(e,t){var r=worker_1;r.add(e,t)},workerEmit=function(e){worker_1.emit(e)},Promise$1=_Promise,Transfer=transfer,platform=environment.platform,isMainThread=environment.isMainThread,cpus=environment.cpus,src={pool:pool,worker:worker,workerEmit:workerEmit,Promise:Promise$1,Transfer:Transfer,platform:platform,isMainThread:isMainThread,cpus:cpus};function s(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class l{constructor(){this.requests=[],console.log("RequestTracker")}static getInstance(){return l.instance||(l.instance=new l),l.instance}addRequest(e){if(this.isDuplicateRequest(e)){let t=this.findRequest(e);this.cancelRequest(t)}this.requests.push(e)}findRequest(e){let t;for(const r of this.requests)if(this.areRequestsEqual(r,e)){t=r;break}return t}removeRequest(e){const t=this.requests.indexOf(e);-1!==t&&this.requests.splice(t,1)}cancelRequest(e){e.cancelToken.cancel("Request canceled"),this.removeRequest(e)}isDuplicateRequest(e){return this.requests.some((t=>this.areRequestsEqual(t,e)))}areRequestsEqual(e,t){var r,n;return e.url===t.url&&JSON.stringify(null===(r=e.headers)||void 0===r?void 0:r.sponsor)===JSON.stringify(null===(n=t.headers)||void 0===n?void 0:n.sponsor)&&JSON.stringify(e.data)===JSON.stringify(t.data)&&JSON.stringify(e.params)===JSON.stringify(t.params)&&e.method===t.method}}const d=l.getInstance(),c=3e4,u=3e4,h=(t="",r)=>{let n,i=e.create({baseURL:t,timeout:c,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return i.interceptors.request.use((function(t){let{url:r,params:i,headers:o,data:a,method:s}=t;const c=e.CancelToken.source();return n={url:r,params:i,headers:o,data:a,method:s,cancelToken:c},t.cancelToken=c.token,d.addRequest(n),sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(t.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(t.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(t.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===t.method?(t.headers["Content-Type"]="application/json;",t):"get"===t.method?t:"put"===t.method?(t.headers["Content-Type"]="application/json; charset=UTF-8",t):"delete"===t.method?t:void 0}),(function(e){return Promise.reject(e)})),i.interceptors.response.use((function(e){return 200===e.status||e.data.code,r&&r(e),d.removeRequest(n),e.data}),(function(e){return r&&(d.removeRequest(n),r(null==e?void 0:e.response)),Promise.reject(e.response)})),i},p=(e,t)=>{try{let r=t||window.location.href;if(-1!=r.indexOf("?")){let t={};return r.slice(r.indexOf("?")+1).split("&").forEach((e=>{let r=e.split("=");t[r[0]]=r[1]})),e?t[e]?t[e]:null:t}return console.log("没有参数"),null}catch(e){console.error(e)}};function m(e,t=!1){try{return t?f(e)?e:JSON.stringify(e):f(e)?JSON.parse(e):e}catch(t){return console.log("转化JSON 发生错我!",e),e}}const f=e=>{if("string"==typeof e)try{const t=JSON.parse(e);return"object"==typeof t&&null!==t}catch(e){return!1}return!1},g=(e,t)=>{try{const r=JSON.stringify(t);sessionStorage.setItem(e,r)}catch(t){console.error(`Error setting session data for key ${e}:`,t)}},v=e=>{const t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(t){console.error(`Error parsing session data for key ${e}:`,t)}return null},y=e=>{for(const t of e)t.code&&(t.code=t.code.replace(/>/g,">").replace(/</g,"<"))},b=(e,t)=>{e instanceof Map?e.forEach((e=>{t([e])})):Array.isArray(e)&&e.forEach((e=>{t(e.children)}))},w=(e,t)=>{const r=e=>{var n,i,o;if(e)for(const a of e){const e=null===(o=null===(i=null===(n=null==a?void 0:a.tmpData)||void 0===n?void 0:n.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;(null==e?void 0:e.length)&&y(e),t(a),a.children?r(a.children):a.dynamicChildren?b(a.dynamicChildren,r):a.stateChildren&&r(a.stateChildren)}};r(e)},D=(e,t,r,n)=>{const i=e.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){const e=i.map((e=>e.replace(/{{|}}|@/gm,"")));for(const i of e)if(i&&t&&!(t.findIndex((e=>e.mapField===i))<0))return r&&n&&k(n,i,r.cid),!0}return!1},k=(e,t,r)=>{if(!e)throw new Error("Share variable tree is not defined");if("string"!=typeof t)throw new Error("Variable name should be a string");if(!r)throw new Error("ID is required");Array.isArray(e[t])||(e[t]=[]),e[t].includes(r)||e[t].push(r)},N=(e,t,r)=>{var n;let i=!1;const o=null==t?void 0:t.converse;if(o&&o.use&&o.data.length)for(const t of o.data)if((null==t?void 0:t.dependVars)&&t.dependVars.includes(e))return!0;const a=null==t?void 0:t[null==t?void 0:t.type];return((null==a?void 0:a.inputSql)||(null==a?void 0:a.url)||(null==a?void 0:a.headers)||(null==a?void 0:a.params))&&(i=D(a.inputSql||a.url||(null===(n=a.headers)||void 0===n?void 0:n.value)||a.params,r)),i},x=(e,t,r=!1)=>{let n=null;const i=e=>{for(const o of e){if(o.cid===t){n=o,r&&_$1.remove(e,(e=>e.cid===t));break}if(o.children&&i(o.children),o.dynamicChildren&&Array.isArray(o.dynamicChildren))for(const[,e]of Array.from(o.dynamicChildren))i(e);o.stateChildren&&i(o.stateChildren)}};return i(e),n},S=(e,t,r)=>{let n=!1;const i=e=>{for(let o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(e=>e.cid==t));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){let t=Array.from(e[o].dynamicChildren);for(let e=0;e<t.length;e++)if(t[e]instanceof Array){let r=t[e][1];i(r)}}else if(e[o].dynamicChildren instanceof Array){let t=e[o].dynamicChildren;for(let e=0;e<t.length;e++)if(t[e]instanceof Array){let r=t[e][1];i(r)}}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1};function C(e,t,r){const n={};r&&r.forEach((e=>{(null==e?void 0:e.name)&&(n[e.name]=e.value||e.originvalue)}));try{return new Function("data","vars",e)(t,n)}catch(e){return console.error(e),t}}function A(e,t,r){let n=_$1.cloneDeep(t);const i={};r&&r.forEach((e=>{(null==e?void 0:e.name)&&(i[e.name]=e.value||e.originvalue)}));try{return new Function("data","vars",e)(n,i)}catch(e){return console.error(e),n}}const O=e=>{let t=window.goFetchList;return t||(window.goFetchList={},t=window.goFetchList),t[e]?!t[e]&&void 0:(t[e]={id:e,time:(new Date).getTime()},!0)},I=e=>{let t=window.goFetchList;t&&t[e]&&delete t[e]},T="anov@2019:helloX",V="anov@2020:helloX";function F(e){let t=cryptoJs.enc.Utf8.parse(T),r=cryptoJs.enc.Utf8.parse(V);return cryptoJs.AES.encrypt(e,t,{iv:r,mode:cryptoJs.mode.CBC,padding:cryptoJs.pad.Pkcs7}).toString()}function E(e,t){if(0===e.length)throw new Error("Array is empty.");if(!t)return e[Math.floor(Math.random()*e.length)];if(t.length!==e.length)throw new Error("Length of probabilities array must match length of array.");const r=t.reduce(((e,t)=>e+t),0),n=Math.random()*r;let i=0;for(let r=0;r<e.length;r++)if(i+=t[r],n<i)return e[r];return e[0]}const P=new Blob(["\nfunction proxyObj(originObj) {\n const exposeObj = new Proxy(originObj, {\n has: (target, key) => {\n if (['fetch', 'XMLHttpRequest', 'postMessage'].indexOf(key) >= 0) {\n throw new Error('Illegal operation for key'+key)\n } else {\n return target[key]\n }\n },\n })\n return exposeObj\n}\nfunction compileCode(src) {\n src = 'with (exposeObj) {'+src+'}'\n //console.log(src)\n return new Function('exposeObj', src)\n}\nfunction run(code) {\n let proxy = proxyObj({})\n let result = compileCode(code)(proxy)\n return result\n}\n\nonmessage = (e) => {\n try {\n let result = run(e.data.code)\n postMessage({\n code: 1,\n result,\n })\n } catch (err) {\n postMessage({\n code: -1,\n err,\n })\n }\n}\n"]),j=URL.createObjectURL(P);function R(e,t){return s(this,arguments,void 0,(function*(e,t,r={},n="worker"){try{if("window"==n){let[n,i]=[["data"],[t]];"object"==typeof r&&Object.keys(r).forEach((e=>{n.push(e),i.push(r[e])}));return{success:!0,data:new Function(...n,e)(...i)}}{let[n,i,o]=[t,r,""];"object"==typeof n&&(n=JSON.stringify(t)),"object"==typeof r&&(i=JSON.stringify(r)),Object.keys(r).forEach((e=>o+=`${e},`));let a=`let data=eval(${n}); \n let app=${JSON.stringify({})};`;a+=o?`let {${o}} = eval(${i}); `:"",a+=`${e}`;let c=yield function(e){return s(this,arguments,void 0,(function*(e,t=5e3){let r=new Worker(j);return new Promise(((n,i)=>{const o=()=>{clearTimeout(s),r.removeEventListener("message",a),r.terminate(),r=null},a=e=>{let{code:t,result:r,err:a}=e.data;o(),1===t?n(r):i(a)};r.postMessage({code:e}),r.addEventListener("message",a);let s=setTimeout((()=>{o(),i("timeout")}),t)}))}))}(a);return{success:!0,data:c}}}catch(e){return{success:!1,error:e,data:t}}}))}var $,q,M,U;!function(e){e.StaticFile="staticFile",e.DataSource="datasource"}($||($={})),function(e){e.json="application/json;charset=UTF-8",e.form="application/x-www-form-urlencoded; charset=UTF-8"}(q||(q={})),function(e){e.get="GET",e.post="POST",e.put="PUT",e.patch="PATCH",e.delete="DELETE"}(M||(M={}));class L{constructor(e){this.db=null,this.dbName=e.databaseName,this.tableName=e.tableName,this.keyPath=e.keyPath}static getInstance(e){return L.instance||(L.instance=new L(e)),L.instance}init(){return s(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const r=indexedDB.open(this.dbName,1);r.onerror=e=>{t(e.target.error)},r.onupgradeneeded=e=>{this.db=e.target.result,this.db.objectStoreNames.contains(this.tableName)||this.db.createObjectStore(this.tableName,{keyPath:this.keyPath})},r.onsuccess=t=>{this.db=t.target.result,e()}}))}))}addRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).add(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}deleteRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}updateRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}getRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);n.onsuccess=()=>{t(n.result)},n.onerror=e=>{r(e.target.error)}}))}))}getAllRecords(){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((e,t)=>{const r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAll();r.onsuccess=()=>{e(r.result)},r.onerror=e=>{t(e.target.error)}}))}))}}L.instance=null,function(e){e[e.FATAL=0]="FATAL",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e[e.TRACE=5]="TRACE"}(U||(U={}));const H={databaseName:"GODB",tableName:"go-log",keyPath:"time"};class B{constructor(){this.logLevel=U.INFO,this.indexedDBInstance=L.getInstance(H);try{this.indexedDBInstance.init(),console.log("IndexedDB 初始化成功。")}catch(e){console.error("初始化 IndexedDB 时出错:",e)}}static getInstance(){return B.instance||(B.instance=new B),B.instance}setLogLevel(e){this.logLevel=e}getColor(e){switch(e){case U.FATAL:return"[31;1m";case U.ERROR:return"[31m";case U.WARN:return"[33m";case U.INFO:return"[32m";case U.DEBUG:return"[36m";case U.TRACE:return"[34m";default:return"[0m"}}log(e,t){if(t<=this.logLevel){const r=(new Date).toISOString(),n=`[${r}] [${U[t]}]`,i=this.getColor(t);if(null===window||void 0===window?void 0:window.goDev)console.log(`${i}${n} ${e}[0m`);else{let t=v("anov-go-userInfo"),o=v("anov-go-proid"),a=` [操作人:${null==t?void 0:t.userName} 项目ID:${o}] `;const s={time:r,value:`${e}`};try{this.indexedDBInstance.addRecord(s)}catch(e){console.error("添加记录时出错:",e)}console.log(`${i}${n} ${a} ${e}[0m`)}}}fatal(e){this.log(e,U.FATAL)}error(e){this.log(e,U.ERROR)}warn(e){this.log(e,U.WARN)}info(e){this.log(e,U.INFO)}debug(e){this.log(e,U.DEBUG)}trace(e){this.log(e,U.TRACE)}}const z=B.getInstance(),J=(e,t)=>"string"!=typeof e?Promise.reject(new Error("URL should be a string")):h(e,t),G$1=h();let _=h();function W(e){return s(this,arguments,void 0,(function*(e,t="get",r={},n={},i){try{const o={method:M[t],url:e,headers:n,timeout:u};return["post","put"].includes(t.toLowerCase())?o.data=_$1.cloneDeep(r):o.params=_$1.cloneDeep(r),i&&(o.headers.sponsor=i),/.json$/.test(e)?function(e){return s(this,void 0,void 0,(function*(){try{return(yield G$1({method:"get",url:e})).data}catch(e){throw console.error("JSON 数据请求:",e),e}}))}(e):function(e){return s(this,void 0,void 0,(function*(){try{return{code:2e4,data:(yield G$1(e)).data}}catch(e){throw console.error("请求数据发生错误-Error:",e),e}}))}(o)}catch(e){throw console.error("获取数据:Error:",e),e}}))}function X(e,t,r,n,i){return s(this,void 0,void 0,(function*(){try{const o=(window.anUrl||"")+(window.agentPath||"/ds/v1/api-proxy/v1/query"),a=m(r,!0);return yield G$1({url:o,method:"post",headers:{"Content-Type":"application/json;charset=UTF-8",sponsor:i||""},data:{body:"post"===e?a:void 0,headers:f(n)?m(n,!0):n,method:e,url:t}})}catch(e){throw console.error("代理请求数据:Error1:",e),e}}))}function K(e,t,r,n,i,o){return s(this,void 0,void 0,(function*(){return i?X(t,e,r,n,o):W(e,t,r,n,o)}))}function Q(e,t="",r){var n,i,o,a;const s=`${null!==(i=null===(n=null===window||void 0===window?void 0:window.BaseUrl)||void 0===n?void 0:n.replace("/management",""))&&void 0!==i?i:""}/ds/data-engine/v1/${e}/zb-query?token=${(null===(o=de("YZH_EXCHANGE_TOKEN"))||void 0===o?void 0:o.YZH_EXCHANGE_TOKEN)||(null===(a=null===window||void 0===window?void 0:window.yzhAuth)||void 0===a?void 0:a.getToken())}&passid=${null===window||void 0===window?void 0:window.gdPassid}${(null===window||void 0===window?void 0:window.BASE_RELEASE)?"&preview=1":""}`;let u={};try{u=t?JSON.parse(t):{}}catch(e){u=t||{}}return G$1({method:"POST",url:s,data:{headers:r,param:u},timeout:c})}function Y(e="",t){const r=`${null===window||void 0===window?void 0:window.BaseUrl}/ds/v1/data-views/query`;let n={};try{n=e?JSON.parse(e):{}}catch(t){n=e||{}}return G$1({method:"POST",url:r,data:{headers:t,param:n},timeout:c})}const Z=(e,t)=>s(void 0,void 0,void 0,(function*(){const r=window.BaseUrl,{dateType:n="",endPeriod:i="",metricsName:o=e,startPeriod:a=""}=t;return _({method:"GET",url:`${r}ds/v1/metrics/v1/data-alarm?dateType=${n}&endPeriod=${i}&metricsName=${o}&startPeriod=${a}`,timeout:c})})),ee=(e,t,r)=>s(void 0,void 0,void 0,(function*(){var n;const i=(null===(n=window.BaseUrl)||void 0===n?void 0:n.replace("/management",""))||"";t.newEncryption=!0;const o={staticFile:{method:"get",params:t,url:`${i}/ds/v1/file/v1/${e}/query`},datasource:{method:"post",url:`${i}/ds/v1/database/v1/${e}/query`,data:Object.assign({},t)}}[r];if(!o)throw new Error("Invalid data type provided");return G$1(Object.assign({timeout:c},o))})),te=e=>new Promise(((t,r)=>{let n;n=e.originData&&Object.keys(e.originData).length?e.originData:e.data,void 0!==n?t({data:n}):r("Failed to retrieve cdata")})),ie=(e,t,r)=>{try{switch(t){case"api":{let t=he(e,r);return{requestType:t.requestType,url:t.url,params:t.params,headers:t.headers,agency:t.agency}}case"static":return{data:e};case"datasource":{const t=ue(e.inputSql,r);return{dsName:e.dsName,dsType:"1",sql:F(t),filter:e.sqlFilter}}case"staticFile":return{dsName:e.dsName,dsType:e.dsType,sql:""};case"indicator":return{zbId:e.zbId,params:ue(e.params,r),headers:ue(e.headers,r)};case"dataSet":return{params:ue(e.params,r),headers:ue(e.headers,r)};case"indicatorCQ":return{zbName:e.zbName,params:ue(e.params,r)};case"packData":return{};default:throw new Error("Invalid type")}}catch(t){console.log("准备请求数据发生错误",t,e)}},oe=(e,t,r)=>s(void 0,void 0,void 0,(function*(){try{switch(t){case"api":return yield K(e.url,e.requestType,e.params,e.headers,e.agency,r);case"static":return yield te(e.data);case"datasource":return yield ee(e.dsName,{dsType:e.dsType,sql:e.sql,filter:e.filter},"datasource");case"staticFile":return yield ee(e.dsName,{dsType:e.dsType,sql:e.sql},"staticFile");case"indicator":return yield Q(e.zbId,e.params,e.headers);case"dataSet":return yield Y(e.params,e.headers);case"indicatorCQ":return yield Z(e.zbName,e.params);case"packData":return{};default:throw new Error("Invalid type")}}catch(e){return console.warn(e,"执行请求并获取数据发生错误"),yield new Promise(((e,t)=>{e({error:!0})}))}})),re=(e,t,r,...n)=>s(void 0,[e,t,r,...n],void 0,(function*(e,t,r,n=[],i=!1){const o=t||e.tmpData.source.dataType,a=e.tmpData.source["indicatorCQ"==o?"indicator":o];if("globalData"===o){const e=n.find((e=>e.key===a.id||e.key===a.key)),t=v(a.id);if(t&&!i)return t.data;if(e){let t=yield ae(e,r),n={key:a.id,data:t};return g(a.id,n),t}return}const s=ie(a,o,r),c=yield oe(s,o,e.cid?e.cid:"");return(null==c?void 0:c.data)?c.data:c})),ae=(e,t)=>s(void 0,void 0,void 0,(function*(){let r=Object.assign({},{tmpData:{source:e.value}});const n=r.tmpData.source.type,i=r.tmpData.source[n],o=ie(i,n,t),a=yield oe(o,n);return yield ne(a.data,r,!0,t)})),ne=(e,t,...r)=>s(void 0,[e,t,...r],void 0,(function*(e,t,r=!0,n){try{const{converse:i,mapFields:o}=t.tmpData.source;return i&&i.use&&r?yield new Promise(((t,r)=>{const o=function(e,t,r,n,i){return s(this,void 0,void 0,(function*(){let r,i=e,{use:o,data:a}=_$1.cloneDeep(t);if(o)for(let e=0;e<a.length;e++)if(a[e].use){let t=a[e].dependVars,o={};n&&o&&t&&t.length&&t.map((e=>{let t=_$1.cloneDeep(n).filter((t=>{let r=t.mapField==e;return r&&(o[e]=t.value),r}));t&&0!=t.length||(o[e]="")})),r=yield R(a[e].code,i,o,a[e].mode?a[e].mode:"worker"),i=r.data}return i}))}(e,i,0,n);t(o)})):yield new Promise(((t,r)=>{t(e)}))}catch(t){return console.error("执行过滤器发生错误:"+t),yield new Promise(((t,r)=>{t(e)}))}})),se=(e,t,r)=>{const{source:n}=e.tmpData,i=n.type;r?("static"===i&&n[i]&&(n[i].originData=r),"indicatorCQ"===i?n.indicator.data=t:n[i].data=t):"indicatorCQ"===i?n.indicator.data=t:n[i].data=t,e.source=t},le=(e,t,...r)=>s(void 0,[e,t,...r],void 0,(function*(e,t,r=[],n,i,o){try{let a=e.tmpData.source.type,s=yield re(e,a,r,n,o||!1);if(null==s||!s)return i&&i({error:!0}),Promise.resolve({error:!0});let c=yield ne(s,e,t,r);return se(e,c),i&&i(c),(null==e?void 0:e.cid)&&I(e.cid),Promise.resolve(c)}catch(e){return i&&i(e),z.error("Error in updateComData"),console.error("Error in updateComData:",e),Promise.reject(e)}})),de=e=>{const t={};if(e&&e.includes("?")){const r=e.split("?")[1].split("&");for(let e of r){const[r,n]=e.split("=").map(decodeURIComponent);t[r]=n}}return t},ce=e=>{try{return(null==e?void 0:e.value)&&"string"==typeof e.value?JSON.parse(e.value):"string"==typeof e?JSON.parse(e):e}catch(t){return e}},ue=(e,t)=>{if(!t)return ce(e);if("string"==typeof e){if(""===e.trim())return"";try{if("string"!=typeof JSON.parse(e))return ue(JSON.parse(e),t);{let r=e.replace(/@(\w+)|{{(\w+)}}/g,((e,r,n)=>{const i=r||n,o=t.find((e=>e.mapField===i));return o?o.value||o.originalValue||"":e}));return ce(r)}}catch(r){let n=e.replace(/@(\w+)|{{(\w+)}}/g,((e,r,n)=>{const i=r||n,o=t.find((e=>e.mapField===i));return o?o.value:e}));return ce(n)}}else{if(Array.isArray(e))return e.map((e=>ue(e,t)));if("object"==typeof e&&null!==e){const r={};for(let n in e)r[n]=ue(e[n],t);return ce(r)}}return ce(e)},he=(e,t)=>{const r=e.agency,n=e,{url:i=null,headers:o,params:a,requestType:s}=n,c=i?ue(i,t):void 0,u=o&&o.use?ue(o.value,t):{};return{url:c,requestType:s,params:a?ue(a,t):{},headers:u,agency:r}},pe=(e,t,r,n,i)=>s(void 0,void 0,void 0,(function*(){if(e&&e.length)for(const o of e)N(t,o.value,r)&&(yield le({tmpData:{source:{type:"globalData",globalData:{id:o.key}}}},!0,r,e,(e=>{console.log("数据更新成功-变量改变全局数据跟新")}),!0),w(n,(t=>{var n,a,s;"globalData"===(null===(a=null===(n=null==t?void 0:t.tmpData)||void 0===n?void 0:n.source)||void 0===a?void 0:a.type)&&(null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.source.globalData).id===o.key&&le(t,!0,r,e,(e=>{i(t,e)}),!1)})))})),me=(e,t,r,n,i)=>s(void 0,void 0,void 0,(function*(){e&&(yield le({tmpData:{source:{type:"globalData",globalData:{id:e.key}}}},!0,t,r,(e=>{console.log("数据更新成功-数据源编辑")}),!0),w(n,(n=>{var o,a,s;"globalData"===(null===(a=null===(o=null==n?void 0:n.tmpData)||void 0===o?void 0:o.source)||void 0===a?void 0:a.type)&&(null===(s=null==n?void 0:n.tmpData)||void 0===s?void 0:s.source.globalData).id===e.key&&le(n,!0,t,r,(e=>{i(n,e)}),!1)})))}));class fe{constructor(e,t){this.isUpdating=!1,this.des=e.des,this.field=e.field,this.id=e.id,this.key=e.key,this.mapping=e.mapping,this.mapField=e.mapField,this.type=e.type,this.originalValue=e.originalValue,this.model=(null==e?void 0:e.model)?null==e?void 0:e.model:1,this.converter=e.converter,this.converterCode=e.converterCode,this.fork=e.fork,this.delayUpdate=!!(null==e?void 0:e.delayUpdate),t&&(this.globalVariables=t),e.fork&&(this.model=5,this.forkValue=e.forkValue,this.originalValue=this.getForkedValue())}get value(){if(this.fork&&(this.originalValue=this.getForkedValue()),this.converter&&this.converterCode){let e=[];return A(this.converterCode,this.originalValue,e)}return this.originalValue}togglePropertyState(e){let t=Object.prototype.hasOwnProperty.call(this,e);this[e]=!t||!e}getForkedValue(){if(this.forkValue&&Array.isArray(this.forkValue))return this.forkValue.map((e=>{const t=this.globalVariables.get(e);return t?t.value:null}));if(this.forkValue){const e=this.globalVariables.get(this.forkValue);return e?e.value:null}return null}updateValue(e,t){var r;const n=Object.assign({},this,e);this.des=n.des,this.field=n.field,this.mapping=n.mapping,this.type=n.type,this.originalValue=n.originalValue,this.converter=n.converter,this.converterCode=n.converterCode,this.fork=n.fork,this.delayUpdate=null==n?void 0:n.delayUpdate,this.model=null==n?void 0:n.model,e.id&&(this.id?"string"==typeof this.id?e.id instanceof Array?this.id=_$1.uniq([this.id,...e.id]):this.id=[this.id,e.id]:this.id instanceof Array&&(e.id instanceof Array?this.id=_$1.uniq([...this.id,...e.id]):this.id=_$1.uniq([...this.id,e.id])):this.id=e.id),e.fork&&(this.model=5,this.forkValue=null!==(r=e.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),t&&t(this)}updateWidthOriginalValue(e,t){var r;this.originalValue=e,this.fork&&(this.forkValue=null!==(r=this.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),t&&t(this)}renew(e){e&&e(this)}static create(e,t){return new fe(e,t)}}class ge{constructor(){this.variables=new Map,this.globalObservers=[],this.url=window.location.search,this.list=[]}clearVars(){this.list=[],this.variables.clear()}togglePropertyState(e,t,r){try{let n=this.getVariable(e);if(!n)throw new Error("没有找到相应的变量!");n.togglePropertyState(t),this.addToObjectArray(this.list,n),r&&r()}catch(e){console.error(e)}}static getInstance(){return ge.instance||(ge.instance=new ge),ge.instance}getFullUrl(){this.url=window.location.search}getAllUrlParams(){const e=new URLSearchParams(window.location.search),t={};for(const[r,n]of e.entries())t[r]=n;return t}delVariable(e,t){this.variables.delete(e),this.list=this.list.filter((t=>t.mapField!=e)),t&&t()}addUrlParamsToGlobalVars(){this.getFullUrl();let e=this.getAllUrlParams(),t=Object.keys(e),r=[];for(const n of t)r.push({mapField:n,originalValue:e[n],model:4});if(r.length)for(const e of r)this.addVariable(e)}addVariables(e){Array.isArray(e)?e.map(((e,t)=>{this.addVariable(e)})):this.addVariable(e),this.addUrlParamsToGlobalVars()}addVariable(e,t){if(!e||!(null==e?void 0:e.mapField))return console.error(e+"参数不合法!"),!1;if(this.isVariableNameExist(e.mapField)){let r=this.getVariable(e.mapField);return this.sameValue(r,e)?r:(this.editVariable(e,t),!1)}const r=fe.create(e,this.variables);return this.variables.set(r.mapField,r),this.addToObjectArray(this.list,r),t&&t(r),this.notifyGlobalObservers(r),r}toJSON(e){try{return!!e&&JSON.stringify(e)}catch(e){return!1}}sameValue(e,t){if(e.mapfield!==t.mapfield)return!1;for(const r in t)if(!(["mapfield","field","key","value","name","globalVariables"].includes(r)||r in e&&e[r]==t[r]))return!1;return!0}creatVarJson(e){const{des:t,field:r,id:n,key:i,mapping:o,mapField:a,type:s,value:c,originalValue:u,model:l,converter:d,converterCode:h,fork:f,forkValue:p,update:m,delayUpdate:g}=e,v={};return void 0!==t&&(v.des=t),void 0!==r&&(v.field=r),void 0!==n&&(v.id=n),void 0!==i&&(v.key=i),void 0!==o&&(v.mapping=o),void 0!==a&&(v.mapField=a),void 0!==s&&(v.type=s),void 0!==c&&(v.value=c),void 0!==u&&(v.originalValue=u),void 0!==l&&(v.model=l),void 0!==d&&(v.converter=d),void 0!==h&&(v.converterCode=h),void 0!==f&&(v.fork=f),void 0!==p&&(v.forkValue=p),void 0!==m&&(v.update=m),void 0!==g&&(v.delayUpdate=g),v}addToObjectArray(e,t){let r=!1;for(let n=0;n<e.length;n++)if(e[n].mapField==t.mapField){e[n]=this.creatVarJson(t),r=!0;break}r||e.push(t)}editVariable(e,t){const r=this.getVariable(e.mapField);if(r&&this.isVariableNameExist(e.mapField)&&this.sameValue(r,e))return;const n=e=>{e.isUpdating||(e.isUpdating=!0,this.notifyGlobalObservers(e),this.isMapFieldInForkValues(e.mapField).forEach((e=>{let t=this.getVariable(e.mapField);t&&t.renew((e=>{this.addToObjectArray(this.list,e),this.notifyGlobalObservers(e)}))})),this.addToObjectArray(this.list,e),t&&t(e),e.isUpdating=!1)};r?r.updateValue(e,n):this.addVariable(e,n)}getForkList(e){return this.isMapFieldInForkValues(e)||[]}editVariableForValue(e,t,r){const n=this.getVariable(e);n&&n.updateWidthOriginalValue(t,(e=>{e.isUpdating||(e.isUpdating=!0,this.notifyGlobalObservers(e),this.isMapFieldInForkValues(e.mapField).forEach((e=>{let t=this.getVariable(e.mapField);t&&t.renew((e=>{this.addToObjectArray(this.list,e),this.notifyGlobalObservers(e)}))})),this.addToObjectArray(this.list,e),r&&r(e),e.isUpdating=!1)}))}isMapFieldInForkValues(e){return this.getAllVariables().filter((e=>e.fork&&e.forkValue)).filter((t=>t.forkValue==e||Array.from(t.forkValue).includes(e)))}isVariableNameExist(e){return this.variables.has(e)}checkExist(e,t){if("string"==typeof e&&this.isVariableNameExist(e)){let r=this.getVariable(e);return t==r.id&&!r.id.includes(t)&&[{key:e}]}if(Array.isArray(e)){const r=e.filter((e=>{let r=this.getVariable(e);return this.isVariableNameExist(e)&&t!=r.id&&!(r.id&&r.id.includes(t))})).map((e=>({key:e})));return!!r.length&&r}return!1}getVariable(e){return this.variables.get(e)}getVariableForId(e){var t;let r=[];for(const[,n]of this.variables)(n.id===e||(null===(t=n.id)||void 0===t?void 0:t.includes(e)))&&r.push(n);return _$1.uniq(r)}getAllVariables(e=!1){return this.addUrlParamsToGlobalVars(),e?(this.list=Array.from(this.variables.values()),this.list):[...this.list]}restoreVariables(e){e.forEach((e=>{this.addVariable(e)}))}registerGlobalObserver(e){this.globalObservers.push(e)}notifyGlobalObservers(e){this.globalObservers.forEach((t=>{t.update(e)}))}}ge.instance=null;const ve=ge.getInstance(),ye=(e,t)=>Array.isArray(t)?t.some((t=>e&&(void 0!==e[t]||e.hasOwnProperty(t)))):"string"==typeof t&&e&&(void 0!==e[t]||e.hasOwnProperty(t)),be=(e,t,r,n)=>{const i=((e,t,r,n)=>{var i;let o;if(ye(e,null==t?void 0:t.field)||ye(e,null==t?void 0:t.forkValue))o=e[null==t?void 0:t.field]||"";else if(ye(e.data,null==t?void 0:t.field)||ye(e.data,null==t?void 0:t.forkValue))o=e.data[null==t?void 0:t.field]||"";else{const e=x(r,n),a=(null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.actions)||[];for(const e of a){const r=e.vars.find((e=>(null==e?void 0:e.mapField)===(null==t?void 0:t.mapField)));if(r){o=r.value;break}}}return o})(e,t,r,n);return void 0!==i?i:t.value},we=(e,t,r,n,i,o,a,s,c)=>{var u;switch(e.type){case"link":let l=ue(e.link,o);window.open(l,e.target);break;case"page":if(null===(u=null==e?void 0:e.params)||void 0===u?void 0:u.length)for(let t=0;t<e.params.length;t++){const r=e.params[t],n=o.find((e=>e.mapField==r.mapField));n&&(r.value=n.value)}c&&c(e);break;case"dynamic":((e,t,r,n,i)=>{const o=e.dynamic||[];for(const a of o){if(e.id!==t.cid)continue;const o=x(r,a.pid);o&&(o.activeDynamic=a.name,o.isShow=a.visible||!n||e.index===t.index-1,i({cid:o.cid,flag:a.visible}))}})(e,t,r,n,i);break;case"toggle":((e,t,r,n,i)=>{const o=e.children||[];for(const r of o){const o=r.visible&&(!n||e.index===t.index-1);i({cid:r.cid,flag:o})}})(e,t,0,n,i);break;case"update":((e,t,r,n,i)=>{const o=e.children||[];for(const e of o){const o=x(t,e.cid);o&&le(o,!0,r,n,(e=>{i({cid:o.cid,data:e})}))}})(e,r,o,a,s)}},De=(e,t,r,n,i,o,a,s,c,u)=>{const{cid:l,actions:d,index:h}=i,{eventName:f,mode:p}=d,m=2===p;((e,t,r,n,i,o)=>{let a=ve.getVariableForId(t.cid);if(null==a?void 0:a.length)for(const s of a)if(s.type==e){let e=be(t,s,r,n);ve.editVariableForValue(s.mapField,e,(()=>{let e=i[s.mapField]||[],t=ve.getForkList(s.mapField);if(t)for(const r of t){let t=i[r.mapField];e=_$1.concat(e,t)}o&&o(s,_$1.uniq(e))}))}})(f,i,n,l,r,((e,t)=>{if(pe(c,e.mapFile,ve.getAllVariables(),n,((e,t)=>{a({cid:e.cid,data:t})})),null==t?void 0:t.length)for(const r of t){e.eventSourceId=r;const t=x(n,r);!(null==e?void 0:e.delayUpdate)&&t&&le(t,!0,ve.getAllVariables(),c,(e=>{a({cid:t.cid,data:e})}))}}));const g=((e,t,r,n,i)=>e.filter((e=>e.id===t&&e.eventType===r&&(!i||parseInt(e.index||"0")+1===parseInt(n||"0")))))(e,l,f,h,m);for(const e of g)we(e,i,n,m,o,ve.getAllVariables(),c,a,s)},ke=(e,t={})=>{let r={},n={type:"static",converse:{use:!1,data:[]},static:{data:e},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""}};return Object.assign(r,n,t),r},Ne=(e,t)=>{let{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:c}=((e,t)=>{let{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:c}=_$1.cloneDeep(t[e]);return{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:c}})(e,t);return{iconClass:null,isAssembly:null,source:i,cid:(Math.random().toString().substr(3,10)+Date.now()).toString(),isLock:!1,isShow:!0,tmpData:{option:r,source:ke(i,s),actions:n},baseData:Se(),dynamic:null,filePath:"",origin:"anov-ui",name:"",componentType:"",viewComName:e,optionComName:"AnOptionPanel",dataComName:"AnSourcePanel",eventComName:"AnActionsPanel",assemblyDeveloper:"",devEmail:"",version:"",devDept:""}},xe=(e,t,r)=>{let n=Ne(e,t);return r?_$1.merge(n,r):n},Se=e=>{let t={left:0,top:0,width:100,height:100,angle:0,penetrate:0,opacity:100,perspective:100,rotateX:0,rotateY:0,rotateZ:0,transformOriginX:"center",transformOriginY:"center",transformSwitch:!1};return e?Object.assign(t,e):t};class Ce{constructor(e,t,r){this.theme=null,this.plant=null,this.list=[],this.titleHeqadeHeight=70,this.clearance=3,this.checkComponentIntersection=(e,t,r=10)=>{const n=e.left,i=e.left+e.width,o=e.top,a=e.top+e.height,s=t.left,c=t.left+t.width,u=t.top,l=t.top+t.height,d=n<c&&i>s&&o<l&&a>u,h=Math.abs(e.left+e.width/2-(t.left+t.width/2)),f=Math.abs(e.top+e.height/2-(t.top+t.height/2));return d||h<r&&f<r},this.calculateCombinedComponent=e=>{if(0===e.length)return{left:0,top:0,width:0,height:0};let t=e[0].left,r=e[0].top,n=e[0].left+e[0].width,i=e[0].top+e[0].height;for(let o=1;o<e.length;o++){const a=e[o];t=Math.min(t,a.left),r=Math.min(r,a.top),n=Math.max(n,a.left+a.width),i=Math.max(i,a.top+a.height)}return{left:t,top:r,width:n-t,height:i-r}},this.getAnTextNormaltText=e=>{var t,r;try{return null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.text}catch(e){return console.error("配置优化(ConfigOptimizer):",e),""}},this.initProp(e),this.upgradePlant(),this.staticComponentData=t,this.upgradeHeaderComponent(),r&&Object.assign(this,r)}isStringOrObject(e){return"string"==typeof e?"string":"object"==typeof e&&null!==e&&"object"}initProp(e){try{let t,r=this.isStringOrObject(e);if(r&&"string"===r)t=JSON.parse(e);else{if(!r||"object"!==r)throw new Error(`initProp fn error :-- 传入参数${e}不合法!`);t=e}if(t){this.originData=t;const{theme:e,plant:r,list:n}=t;this.theme=e,this.plant=r,this.list=n,this.filterFileGroup()}}catch(e){console.error("配置优化(ConfigOptimizer):",e)}}upgradePlant(){this.plant&&(this.plant.option.bg={type:1,code:"70942ec525344c96aa32b81b2c9155f6",path:"/anov-prod/resources/page/png/bg22 科技星球背景.png",thumb:"/anov-prod/resources/page/thumbnail/1e48f8fb26ec4edfb1a0f499627e84fc.png"})}areComponentsIntersecting(e,t){let r=e.baseData,n=t.baseData;const i=Math.max(0,Math.min(r.left+r.width,n.left+n.width)-Math.max(r.left,n.left)),o=Math.max(0,Math.min(r.top+r.height,n.top+n.height)-Math.max(r.top,n.top));return i>0&&o>0}filterFileGroup(){this.list=_$1.cloneDeep(this.list).map((e=>{var t,r;if(1===(null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.length)&&!(null===(r=null==e?void 0:e.children[0])||void 0===r?void 0:r.children)){const t=e.children[0],{left:r,top:n}=e.baseData;return t.baseData.left=r,t.baseData.top=n,t}return e}))}getText(e,t,r){const n=document.createElement("canvas").getContext("2d");if(!n)throw new Error("Failed to get 2D context from canvas.");return n.font=`${r}px ${t}`,n.measureText(e).width}calculateMaxWidths(e){const t=Math.min(...e.map((e=>e.width))),r=[];let n=[],i=e[0].width;for(const o of e){const e=o.width;Math.abs(e-i)<=t?n.push(e):(n.length>0&&r.push(n),n=[e]),i=e}n.length>0&&r.push(n);const o=[];for(const e of r){const t=Math.max(...e);o.push(t)}return o}findClosestValue(e,t){let r=t[0],n=Math.abs(e-r);for(const i of t){const t=Math.abs(e-i);t<n&&(n=t,r=i)}return r}adjustHeightAndTop(e,t){const r=t-e.height;return Object.assign(Object.assign({},e),{height:t,top:e.top-r/2})}findNearestComponent(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=_$1.cloneDeep(e).sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=_$1.cloneDeep(t).baseData;a.top,a.height;for(const e of o){const t=e.baseData;if(t.top,t.height,a.left<t.left+t.width&&a.left+a.width>t.left){const r=t.top-a.top;r<i&&r<100&&(i=r,n=e)}}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestComponentForPoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=this.getDistance(a.left,a.top+a.height,t.left,t.top);r<i&&r<a.width&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestComponentForTitlePoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=this.getDistance(a.left,a.top+a.height,t.left,t.top);r<i&&r<a.width&&t.top-a.top>100&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestTitleForPoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=t.top-a.top;r<i&&r<a.width&&t.top-a.top>100&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}getDistance(e,t,r,n){return Math.sqrt(Math.pow(r-e,2)+Math.pow(n-t,2))}findNearestComponent2(e,t,r){let n=null,i=1/0,o=_$1.cloneDeep(e).sort(((e,t)=>e.baseData.top-t.baseData.top));try{const e=o.filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=_$1.cloneDeep(t).baseData,s=a.top+a.height;for(const t of e){const e=t.baseData,r=e.top+e.height;if(a.left<e.left+e.width&&a.left+a.width>e.left){const e=r-s;e>=0&&e<i&&(i=e,n=t)}}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}verticalDistance(e,t){e.left,e.width;const r=e.top+e.height,n=(t.left,t.width,t.top);return Math.abs(r-n)}extractAmount(e){const t=e.match(/(\d{1,3}(?:,\d{3})*)(\D+)/);if(t){const e=t[1].replace(/,/g,"");return[parseInt(e,10),t[2].trim()]}return[!1,!1]}getAnTextNormal(){return this.list.filter((e=>"AnTextNormal"==e.viewComName))}getAnDeckTitle3(){return this.list.filter((e=>"AnDeckTitle3"==e.viewComName)).sort(((e,t)=>e.baseData.left-t.baseData.left))}judgeAnOdometer(){let e=this.getAnTextNormal().sort(((e,t)=>e.baseData.left-t.baseData.left)),t=[],r=new Set;for(const n of e){if(r.has(n.cid))continue;let i=[];for(const t of e)r.has(t.cid)||n.cid==t.cid||this.checkComponentIntersection(n.baseData,t.baseData)&&(r.add(t.cid),r.add(n.cid),i.push(t));t.push([n,...i])}let n=[];for(const e of t)for(const t of e){let r=this.getAnTextNormaltText(t);this.extractAmount(r).every((e=>e))&&n.push(e)}return n}createAnOdometer(){var e,t;let r=this.judgeAnOdometer();for(const n of r){let r,i,o,a=this.calculateCombinedComponent(n.map((e=>e.baseData)));for(const e of n){let t=this.getAnTextNormaltText(e),n=this.extractAmount(t);n.every((e=>!e))&&(r=t),n.every((e=>e))&&(i=n[0],o=n[1]),_$1.remove(this.list,(t=>t.cid==e.cid))}let s=xe("AnIndicatorNormal",this.staticComponentData,_$1.cloneDeep({baseData:a}));(null===(t=null===(e=null==s?void 0:s.tmpData)||void 0===e?void 0:e.source)||void 0===t?void 0:t.static)&&(s.tmpData.source.static.data={text:r,num:i,unit:o},s.tmpData.source.static.originData={text:r,num:i,unit:o}),this.list.push(s)}}upgradeHeaderComponent(){for(let e=0;e<this.list.length;e++){const t=this.list[e];"AnDeckHeader3"==t.viewComName&&(t.baseData.left=0,t.baseData.top=0)}}upgradeTitleComponent(){let e=this.getAnDeckTitle3().map((e=>e.baseData)),t=this.calculateMaxWidths(e);for(let e=0;e<this.list.length;e++){const r=this.list[e];if("AnDeckTitle3"==r.viewComName){let e=this.findClosestValue(r.baseData.width,t);r.baseData.width=e>300?e:300,r.baseData=this.adjustHeightAndTop(r.baseData,this.titleHeqadeHeight)}}this.removeErroneousComponents()}containsFractionStructure(e){return/\b\d+\/\d+\b/.test(e)}removeErroneousComponents(){let e=this.getAnDeckTitle3(),t=[];for(let r=0;r<e.length;r++){const n=e[r];let i=n.tmpData.option.textNormal.text;if(this.containsFractionStructure(i))for(let r=0;r<e.length;r++){const i=e[r];n.cid!=i.cid&&this.areComponentsIntersecting(n,i)&&t.push(n.cid)}}this.list=this.list.filter((e=>!t.includes(e.cid)))}upgradeGroupComponent(){try{let e=this.getAnDeckTitle3(),t=this.list.filter((e=>"AnDeckTitle3"!=e.viewComName&&"AnDeckHeader3"!=e.viewComName&&"AnTextNormal"!=e.viewComName)),r=[],n=[];for(let i=0;i<e.length;i++){const o=e[i];let a=this.findNearestComponentForPoint(t,o,r);if(a&&a.cid&&r.push(a.cid),a){o.baseData.left=a.baseData.left;let t=this.upgradeComponentHeight(o,e,n);t&&t>=30&&(a.baseData=Object.assign({},a.baseData,{top:o.baseData.top+o.baseData.height+this.clearance}))}}}catch(e){console.error("配置优化(ConfigOptimizer):",e)}}upgradeComponentHeight(e,t,r=[]){const n=e;let i=this.findNearestTitleForPoint(_$1.cloneDeep(t),n);return i?i.baseData.top-n.baseData.top-this.titleHeqadeHeight:1080-n.baseData.top-this.titleHeqadeHeight}getData(){return this.originData.list=this.list,this.originData.plant=this.plant,this.originData}}const Ae=new class{randomNum(e,t){return Math.floor(Math.random()*(t-e+1))+e}generateRandomIntArray(e,t,r,n){const i=[];for(let n=0;n<e;n++){const e=this.randomNum(t,r);i.push(e)}return n&&"asc"===n?i.sort(((e,t)=>e-t)):n&&"desc"===n?i.sort(((e,t)=>t-e)):i}randomString(e,t){const r=this.randomNum(e,t);let n="";for(let e=0;e<r;e++){const e=Math.floor(26*Math.random());n+="abcdefghijklmnopqrstuvwxyz".charAt(e)}return n}generateRandomNameArray(e,t,r){const n=[];for(let i=0;i<e;i++){const e=this.randomString(t,r);n.push(e)}return n}pick(e,t){const r=void 0!==t?e.filter((e=>e!==t)):e;return r[Math.floor(Math.random()*r.length)]}},Oe=()=>{const e=[],t=Ae.pick([!0,!1]);let r=Ae.randomNum(3,20);const n=Ae.pick([null,null,null,{}]);let i=Ae.pick(["asc","desc",void 0,void 0,void 0]);for(let o=0;o<Ae.randomNum(1,9);o++)e.push({data:Ae.generateRandomIntArray(r,0,300,i),type:"line",smooth:t,symbolSize:Ae.randomNum(1,10),lineStyle:{width:Ae.randomNum(1,4)},areaStyle:n});return{xAxis:{type:"category",show:!1,boundaryGap:!1,data:Ae.generateRandomNameArray(r,3,6)},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:e}},Ie=(e,t)=>{let r={type:e,show:!1};return"category"===e&&(r.data=Ae.generateRandomNameArray(t,3,6)),r},Te=()=>{const e=[],t=Ae.pick([!0,!1]);let r=Ae.randomNum(3,20);const n=Ae.pick([null,null,null,{}]);let i=Ae.pick(["asc","desc",void 0,void 0,void 0]),o=Ae.randomNum(1,9),a=Ae.pick([!0,!1]);for(let s=0;s<o;s++){let o={data:Ae.generateRandomIntArray(r,0,300,i),type:"bar",smooth:t,stack:a,areaStyle:n};e.push(o)}let s=Ae.pick(["value","category"]),c=Ae.pick(["value","category"],s);return{xAxis:Ie(s,r),grid:{left:0,top:0,bottom:0,right:0},yAxis:Ie(c,r),series:e}},Ve=()=>{const e=[];let t=Ae.randomNum(3,20);Ae.pick([null,null,null,{}]);let r=Ae.pick(["asc","desc",void 0,void 0,void 0]),n=Ae.pick([1,2]),i=[Ae.pick(["10%","20%","30%","40%","50%","60%","70%","80%"]),Ae.pick(["90%","100%"])];return e.push({data:Ae.generateRandomIntArray(t,3,20,r),type:"pie",radius:1==n?"100%":i,roseType:1==n?Ae.pick(["area",null,null]):null,padAngle:1==n?0:Ae.randomNum(1,5),startAngle:1==n?Ae.pick([0,180]):0,endAngle:360,label:{show:!1},itemStyle:{borderRadius:3}}),{grid:{left:0,top:0,bottom:0,right:0},series:e}},Fe=()=>{const e=[];Ae.pick([!0,!1]),Ae.randomNum(3,20),Ae.pick([null,null,null,{}]),Ae.pick(["asc","desc",void 0,void 0,void 0]);for(let t=0;t<Ae.randomNum(1,20);t++){let t=Ae.randomNum(3,Ae.randomNum(3,20)),r=[];for(let e=0;e<t;e++){let e=[];for(let t=0;t<2;t++)e.push(Ae.randomNum(1,30));r.push(e)}e.push({type:"scatter",symbolSize:Ae.randomNum(3,30),data:r})}return{xAxis:{show:!1},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:e}},Ee=()=>{const e=[],t=Ae.pick(["polygon","circle"]);let r=Ae.randomNum(1e4,99999),n=Ae.randomNum(3,10),i=[];for(let e=0;e<n;e++)i.push({name:Ae.randomString(4,8),max:r});for(let t=0;t<Ae.randomNum(2,10);t++)e.push({value:Ae.generateRandomIntArray(n,1e4,r),name:Ae.randomString(4,8)});return{radar:{shape:t,indicator:i,axisName:{show:!1},radius:"100%"},grid:{left:0,top:0,bottom:0,right:0},series:[{type:"radar",symbol:"none",lineStyle:{width:1},data:e}]}},Pe=()=>{const e=[];for(let t=0;t<Ae.randomNum(4,15);t++)e.push({value:Ae.randomNum(1,100),name:Ae.randomString(4,8)});return{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"funnel",left:"0%",top:0,bottom:0,width:"100%",min:0,minSize:"0%",maxSize:"100%",label:{show:!1,position:"inside"},sort:Ae.pick(["descending","ascending"]),gap:2,lineStyle:{width:1},data:e}]}};let je=Ae.randomNum(5,20);const Re={width:je};Ae.pick([!0,!1])&&(Re.color=[[.3,"#67e0e3"],[.7,"#37a2da"],[1,"#fd666d"]]);class $e{constructor(){this.names=["line","bar","pie","scatter","radar","funnel","gauge"]}static getInstance(){return $e.instance||($e.instance=new $e),$e.instance}createLine(){switch(Ae.pick(this.names)){case"line":return{type:"line",typeNum:1,option:Oe()};case"bar":return{type:"bar",typeNum:2,option:Te()};case"pie":return{type:"pie",typeNum:3,option:Ve()};case"scatter":return{type:"scatter",typeNum:4,option:Fe()};case"radar":return{type:"radar",typeNum:5,option:Ee()};case"funnel":return{type:"funnel",typeNum:6,option:Pe()};case"gauge":return{type:"gauge",typeNum:7,option:{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"gauge",radius:"100%",detail:{formatter:"{value}"},progress:{show:Ae.pick([!0,!1]),width:je},axisLine:{lineStyle:Re},data:[{value:Ae.randomNum(1,100),name:"SCORE"}]}]}}}}}$e.instance=null;const qe=$e.getInstance(),Me=new class{constructor(){this.directions=["row","row"],this.direction="column",this.splitNumbers=24,this.margin=[0,0]}baseLayout(e){const t=(null==e?void 0:e.maRrows)?null==e?void 0:e.maRrows:this.splitNumbers,r=(null==e?void 0:e.colNum)?null==e?void 0:e.colNum:this.splitNumbers,n=e.wrapWidth/r,i=e.wrapHeight/t;let o=E(this.directions);o&&(this.direction=o);let a=[];if("row"===this.direction){let e=E([3,4]);a=this.simulateRandomSegments(24,4,12,e)}else{let e=E([2,3]);a=this.simulateRandomSegments(24,4,6,e)}let s=[],c=[];if("row"===this.direction){for(let e=0;e<a.length;e++)if(0==e)s.push({x:0,y:0,w:a[e],h:24,i:e,wStep:n,hStep:i});else{let t=s[e-1].x;s.push({x:a[e-1]+t,y:0,w:a[e],h:24,i:e,wStep:n,hStep:i})}let e=E([2,3]),t=this.simulateRandomSegments(24,6,12,e);for(let e=0;e<s.length;e++){const r=s[e];for(let o=0;o<t.length;o++){const a=t[o];c.push({x:r.x,y:a,w:r.w,h:a,i:10*e+o,wStep:n,hStep:i})}}}else{for(let e=0;e<a.length;e++)if(0==e)s.push({x:0,y:0,w:24,h:a[e],i:e,wStep:n,hStep:i});else{let t=s[e-1].y;s.push({x:0,y:a[e-1]+t,w:24,h:a[e],i:e,wStep:n,hStep:i})}for(let e=0;e<s.length;e++){const t=s[e];let r=E([1,2,3,4]),o=this.simulateRandomSegments(24,5,12,r),a=[];for(let r=0;r<o.length;r++){const s=o[r];if(0==r)a.push({x:0,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i}),c.push({x:0,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i});else{let u=a[r-1].x;a.push({x:o[r-1]+u,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i}),c.push({x:o[r-1]+u,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i})}}}}return{layouts:c.map((t=>{let{option:r,typeNum:n}=qe.createLine(),i=t.x*t.wStep+t.w*t.wStep/2,o=t.y*t.hStep+t.h*t.hStep/2,a=t.w*t.wStep,s=t.h*t.hStep;if(3==n||5==n||7==n){let e=Math.min(a,s);a=e,s=e}let c=e.wrapWidth,u=e.wrapHeight;return t.chartsOption=r,t.typeNum=n,t.txt=n+" "+i/c+" "+o/u+" "+a/c+" "+s/u,console.log(t.txt),t})),option:{colNum:r,margin:(null==e?void 0:e.margin)?null==e?void 0:e.margin:this.margin,isDraggable:!!(null==e?void 0:e.isDraggable)&&(null==e?void 0:e.isDraggable),isResizable:!!(null==e?void 0:e.isResizable)&&(null==e?void 0:e.isResizable),verticalCompact:!(null==e?void 0:e.verticalCompact)||(null==e?void 0:e.verticalCompact),useCssTransforms:!(null==e?void 0:e.useCssTransforms)||(null==e?void 0:e.useCssTransforms),rowHeight:e.wrapHeight/t,maRrows:t}}}simulateRandomSegments(e,t,r,n){const i=[];let o=e,a=n;for(;a>0;)if(1===a)i.push(o),a--;else{const e=Math.min(r,o-t*(a-1)),n=Math.floor(Math.random()*(e-t+1))+t;i.push(n),o-=n,a--}return i}simulateRandomSegments2(e,t,r,n){const i=[];let o=e,a=n;for(;a>0;)if(1==a){const t=e-i.reduce(((e,t)=>e+t),0);i.push(t),a--}else{let e=Math.floor(Math.random()*r),n=Math.max(t,e),s=o-t*a;const c=Math.min(n,s);i.push(c),o-=c,a--}return i}},Ue=src.pool(),Le=e=>{try{return JSON.parse(e)}catch(t){return e}},He=new class{constructor(){this.requested=new Set,this.db=new Dexie$1("go-db"),this.init()}init(){return s(this,void 0,void 0,(function*(){this.db.version(1).stores({store:"key, value"})}))}pushCaseIdToRequested(e){this.requested.add(e)}add(e,t){return s(this,void 0,void 0,(function*(){try{(yield this.isExist(e))||(t.caseDetailData&&(t.caseDetailData="string"==typeof t.caseDetailData?Le(t.caseDetailData):t.caseDetailData),this.pushCaseIdToRequested(e),yield this.db.table("store").add({key:e,value:t}))}catch(e){console.error(e)}}))}bulkPut(e){return s(this,void 0,void 0,(function*(){let t=yield Promise.all(e.map((e=>s(this,void 0,void 0,(function*(){const{caseId:t,id:r}=e,n=`${t}_${r}`;if(yield this.isExist(n))return null;if(e.caseDetailData){const t=yield Ue.exec(Le,[e.caseDetailData]);e.caseDetailData=t,Ue.terminate()}return e})))));t=t.filter((e=>null!==e));const r=t.map((e=>{const{caseId:t,id:r}=e,n=`${t}_${r}`;return this.pushCaseIdToRequested(n),{key:n,value:e}}));this.db.table("store").bulkPut(r).then((()=>{})).catch((e=>console.error(e)))}))}get(e){return s(this,void 0,void 0,(function*(){if(!(yield this.isExist(e)))return null;const t=yield this.db.table("store").where("key").equals(e).first();return t?t.value:null}))}getAllData(){return s(this,void 0,void 0,(function*(){return yield this.db.table("store").toArray()}))}update(e,t){return s(this,void 0,void 0,(function*(){if(yield this.isExist(e)){const r=yield this.get(e),n=yield Ue.exec(Le,[t]);Ue.terminate(),yield this.db.table("store").update(e,{value:Object.assign(Object.assign({},r),{caseDetailData:n})})}else console.error("update indexdb error")}))}delete(e){this.requested.delete(e),this.db.table("store").delete(e)}isExist(e){return s(this,void 0,void 0,(function*(){return(yield this.db.table("store").where("key").equals(e).count())>0}))}reset(){this.requested.clear(),this.db.table("store").clear()}clear(){return s(this,void 0,void 0,(function*(){yield this.db.table("store").clear()}))}isExistStore(){return s(this,void 0,void 0,(function*(){try{return yield this.db.open(),!0}catch(e){return!1}}))}},Be=function(e){return s(this,void 0,void 0,(function*(){try{let{fontUrl:t,fontName:r}=e;const n="__custom_font__";let i=document.getElementById(n);if(!i){i=document.createElement("style"),i.id=n;const e=document.head||document.getElementsByTagName("head")[0];yield e.appendChild(i)}i.innerText+=`@font-face{font-family:'${r}';src:url(${t});}`}catch(e){console.warn(e)}}))},ze=(e,...t)=>s(void 0,[e,...t],void 0,(function*(e,t="jspaths",r){const n="csspaths"===t?"link":"script",i=document.createElement(n);"jspaths"===t?i.defer=!0:i.rel="stylesheet",i.className=t,i.src=e,(r||document.head||document.getElementsByTagName("head")[0]).appendChild(i),yield new Promise(((e,t)=>{i.addEventListener("load",e),i.addEventListener("error",e)}))})),Je=(e,...t)=>s(void 0,[e,...t],void 0,(function*(e,t="jspaths"){const r="fonts"===t?Be:ze;yield Promise.all(e.map((e=>r(e))))}));function Ge(e){!function(e,t){e.depends?optionTheme_js.setOptionColorByTheme(e):_e(e,!1)}(e)}function _e(e,t=!0){let{theme:r,option:n,optionDes:i}=e;n&&i&&r&&Object.keys(i).forEach((o=>{"conditionSeries"!==i[o].type&&"tabs"!==i[o].type||!n[o]?i[o].theme?n.hasOwnProperty(o)&&function({theme:e,option:t,optionDes:r},n,i){let o;if("color"!=r[n].type||!i&&t[n]){if("bgcolor"==r[n].type&&(i||!t[n]||!t[n].style)){t[n]||(t[n]={});let{key:i,points:a,degree:s,type:c,opacity:u}=r[n].theme;if(a){s||(s=90),c||(c="linear");let r=`${c}-gradient(${s}deg`,i=100/(a.length-1),l=[];a.forEach(((t,n)=>{o=We(e,t),r+=`,${Xe(o,t.opacity)} ${i*n}%`;let{red:a,green:s,blue:c,alpha:d}=Ke(o,u);l.push({red:a,green:s,blue:c,alpha:d,left:i*n})})),r+=")",t[n].style=r,t[n].degree=s,t[n].flag=a.length?3:2,t[n].points=l,t[n].type=c}else i&&(o=We(e,r[n].theme),t[n]=Object.assign(Object.assign({},Ke(o,u)),{style:Xe(o,u)}))}}else{let{opacity:i}=r[n].theme;o=We(e,r[n].theme),t[n]=Xe(o,i)}}(e,o,t):i[o].hasOwnProperty("type")&&"slot"!=i[o].type&&"textStyle"!=i[o].type&&"sheet"!=i[o].type||i[o].constructor!=Object||_e({option:n[o],optionDes:i[o],theme:r},t):function(e,t,r,n,i,o){let a=t.form,s=e;if(Array.isArray(a))for(let e=0;e<a.length;e++){let t,r=a[e];t=o?s[e].form:s[e],_e({option:t,optionDes:r,theme:n},i)}else{let e=s.length;for(let t=0;t<e;t++){let e;e=o?s[t].form:s[t],_e({option:e,optionDes:a,theme:n},i)}}}(n[o],i[o],0,r,t,"conditionSeries"===i[o].type)}))}function We(e,t){return e[t.key]?e[t.key]||e.color:t.key.indexOf(".")>-1?[e,...t.key.split(".")].reduce(((t,r)=>"object"==typeof t&&r in t?t[r]:(Qe(`属性${r}不存在,获取主题颜色错误,将使用默认主题色`),e.color))):(Qe(`属性${t.key}不存在,获取主题颜色错误,将使用默认主题色`),e.color)}function Xe(e,t){let{red:r,green:n,blue:i,alpha:o}=Ke(e,t);return`rgba(${r},${n},${i},${o})`}function Ke(e,t){return-1!=e.indexOf("#")&&(e=e.substr(1)),null==t&&(t=1),{red:parseInt("0x"+e.slice(0,2)),green:parseInt("0x"+e.slice(2,4)),blue:parseInt("0x"+e.slice(4,6)),alpha:t}}function Qe(e){console.warn(e)}class Ye{constructor(e){this.processedIds=new Set,this.validateAccessResolve=null,e?(e.caseId&&(this.caseId=e.caseId),e.pageId&&(this.pageId=e.pageId),e.mode&&(this.mode=e.mode),e.environment&&(this.environment=e.environment),e.xhr&&(this.xhr=e.xhr),e.staticComponentData&&(this.staticComponentData=e.staticComponentData),e.theme&&(this.theme=e.theme)):console.log("初始化错误!"),this.defaultTheme={name:"科技蓝",color:"#006aee",background:"#00000033",pageBackground:"#051836",text:"#F0F0F0",groups:["#006aee","#00eae9","#00a9ec","#00ec80","#edc700","#9913ee"]}}checkHardware(){return s(this,void 0,void 0,(function*(){return yield new Promise(((e,t)=>{e("Hardware is not available")}))}))}checkSecurity(e){return s(this,void 0,void 0,(function*(){return yield new Promise(((t,r)=>{"preview"==this.environment?t(0):this.getShareForRelease(e).then((e=>{2e4==e.code&&e.data?(e.data,e.data.loginLimitSwitch?t(1):e.data.hasAuth?t(2):t(3)):t(4)}))}))}))}validateAccess(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{this.validateAccessResolve=r,t&&t(e)}))}))}initBefore(){return new Promise(((e,t)=>{let r=p("secretFree");r?sessionStorage.setItem("secret-free",r):sessionStorage.setItem("secret-free",null),console.log("运行免登录设置完成!"),e(!0)}))}fetchCaseId(e,t){return s(this,void 0,void 0,(function*(){try{const r=yield this.getKey(e,t);return 2e4===(null==r?void 0:r.code)&&(null==r?void 0:r.data)?r.data:e}catch(t){return console.error("Error fetching caseId:",t),e}}))}getDataForrelease(){return new Promise(((e,t)=>{e("data")}))}onProjectLoaded(e){}authenticate(){return s(this,void 0,void 0,(function*(){this.environment}))}getShareForRelease(e){return this.xhr.get(`/go/v1/go-share/v1/${e}/config`)}findById(e,t="",r=0,n=""){return"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${e}?pwd=${t}&mode=${r}&token=${n}`):this.xhr.get(`/go/v1/go-cases/v1/${e}?mode=${r}&token=${n}`)}getKey(e,t=0){return this.xhr.get(`/go/v1/go-cases/v1/key/${e}?caseMode=${t}`)}getPageData(e,t){return s(this,void 0,void 0,(function*(){const r=yield He.get(e+"_"+t);return r?{data:r}:"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${e}/pages/${t}`):this.xhr.get(`/go/v1/go-cases/v1/${e}/pages/${t}`)}))}getPageId(e,t){if(null==t?void 0:t.length){if(t.find((t=>t.id==e)))return e;let r=t.find((t=>t.caseDetailPath==e||t.caseDetailName==e));return r?r.id:e}return e}fetchProjectForId(e){return s(this,arguments,void 0,(function*(e,t="",r=0,n=""){return yield this.findById(e,t,r,n)}))}updataPageData(e,t){return s(this,void 0,void 0,(function*(){var r;let n=yield this.getPageDataForID(e,t);(null==n?void 0:n.data)?null===(r=null==this?void 0:this.lifecycleHooks)||void 0===r||r.onPageDataReady(n.data.caseDetailData):console.error("请求数据发生错误!")}))}getPageDataForID(e,t,r){return s(this,void 0,void 0,(function*(){const n=this.getPageId(t,this.projectInfo.details);if(this.processedIds.has(n)){console.log(`ID ${n} has already been processed.`);const t=yield He.get(e+"_"+n);if(t)return{data:t}}const i=this.getPageData(e,n);this.processedIds.add(n),r&&r.length&&r.map((t=>s(this,void 0,void 0,(function*(){try{if(this.processedIds.has(t))return void console.log(`ID ${n} has already been processed.`);const r=yield this.getPageData(e,t);He.add(e+"_"+t,r.data),this.processedIds.add(t)}catch(e){console.error(`Error processing ID ${t}: ${e}`)}}))));const o=yield i;return He.add(e+"_"+n,o.data),yield i}))}fetchPageDataForId(e){return s(this,arguments,void 0,(function*(e,t="",r=0,n=""){return yield this.findById(e,t,r,n)}))}setTheme(){console.log("设置主题")}setBackground(){console.log("设置背景信息")}updateVariables(){console.log("更新变量信息")}beforeRender(e){}renderComponents(){return s(this,void 0,void 0,(function*(){}))}setGlobalThemeVars(e){document.body.style.cssText=`\n --theme-background: ${e.background};\n --theme-color: ${e.color};\n --theme-pageBackground: ${e.pageBackground};\n --theme-text: ${e.text};\n ${e.groups.map(((e,t)=>`--theme-groups-${t}: ${e};`)).join("\n")}\n `}listenForRenderCompletion(){}showAnimation(){console.log("所有组件渲染完成,显示动画。")}setComTheme(e,t){var r,n;let i=null===(r=this.staticComponentData[t.viewComName])||void 0===r?void 0:r.optionDes,o=null===(n=this.staticComponentData[t.viewComName])||void 0===n?void 0:n.theme;return Ge({theme:e,option:t.tmpData.option,optionDes:i,depends:o}),t}getComData(e,t,r,n){return s(this,void 0,void 0,(function*(){return new Promise(((i,o)=>{if(e.tmpData&&e.tmpData.source){this.setComTheme(n,e);try{le(e,!0,t,r).then((t=>{t&&(e.source=t)})),i(1)}catch(e){i(e)}}else i("")}))}))}pageInit(e){return s(this,void 0,void 0,(function*(){var t;try{let r=null==e?void 0:e.caseDetailData,n=this.defaultTheme;if((null==r?void 0:r.theme)&&(n=r.theme),this.setGlobalThemeVars(n),r.resource){let e=(null===(t=null===window||void 0===window?void 0:window.anovuiConfig)||void 0===t?void 0:t.fonts)||[],n=_$1.concat(r.resource.fonts,e),i=_$1.cloneDeep(r.resource);i.fonts=n,yield(e=>s(void 0,[e],void 0,(function*({jspaths:e=[],csspaths:t=[],fonts:r=[]}){const n=_$1.uniqBy(r,"fontName");yield Promise.all([Je(e,"jspaths"),Je(t,"csspaths"),Je(n,"fonts")])})))(i)}ve.clearVars(),ve.addVariables(r.globalVars);let i=ve.getAllVariables();return w(r.list,(e=>s(this,void 0,void 0,(function*(){yield this.getComData(e,i,r.globalSource,n)})))),r}catch(t){return console.warn("页面初始化发生错误:",t),(null==e?void 0:e.data)?e.data:e}}))}validate(e,t,r){return s(this,void 0,void 0,(function*(){return new Promise(((n,i)=>{const o=(e,r)=>s(this,void 0,void 0,(function*(){let i=yield this.validateAccess(e,r),a=(null==i?void 0:i.pwd)?i.pwd:"",s=(null==i?void 0:i.mode)?i.mode:0,c=(null==i?void 0:i.token)?i.token:"",u=yield this.fetchProjectForId(t,a,s,c);2e4==(null==u?void 0:u.code)&&(null==u?void 0:u.data)?(this.projectInfo=u.data,console.log("验证成功!"),this.lifecycleHooks.message("验证成功!"),n(!0)):(this.lifecycleHooks.validateError(u),this.lifecycleHooks.message(u.msg,"warning"),o(e,r))}));o(e,r)}))}))}init(e){return s(this,void 0,void 0,(function*(){var t;try{this.lifecycleHooks=e,yield this.checkHardware();let r=yield this.fetchCaseId(this.caseId,this.mode),n=yield this.checkSecurity(r),i=e.onValidateAccess||(()=>{});(yield this.validate(n,r,i))&&e.onCaseReady(this.projectInfo);let o=(null===(t=this.projectInfo)||void 0===t?void 0:t.details).map((e=>e.id)),a=this.getPageId(this.pageId,this.projectInfo.details);console.log(a,this.pageId,"this.pageId");let s=yield this.getPageDataForID(r,a||o[0],o);const c=yield this.pageInit(s.data);return e.onPageDataReady(c),{currentData:this.projectInfo,currentPageData:c}}catch(e){console.error("加载页面时出错:",e)}}))}}var index$3=Object.freeze({__proto__:null,ConfigOptimizer:Ce,GlobalVariables:ge,Http:J,Log:z,PageLoader:Ye,agentData:X,delFetchStatus:I,displayGenerator:Me,editItem:se,emitEvent:De,fetchDataByGlobal:ae,fetchDataByType:re,filterData:ne,findItemDeep:x,findItemDeep2:S,getData:W,getDataForApi:K,getDataForDataSet:Y,getDataForSource:ee,getDataForStatic:te,getDataForZb:Q,getDataForZbCQ:Z,getSessionData:v,getStandardData:m,getStringVars:D,getUrlParams:p,getVarDefaultVal:be,globalVars:ve,hasVar:N,isJSON:f,recursion:w,replaceVariable:ue,safeEval:C,safeEvalForCode:A,setFetchStatus:O,setSessionData:g,updataGlobalDataSourceForVar:pe,updateComData:le,updateGlobalDataSource:me}),getInteractive=function(e,t,r,n,i){var o;try{var a={},s=[],c=[],u=[],l=_$1.cloneDeep(e);return(null===(o=null===window||void 0===window?void 0:window.go)||void 0===o?void 0:o.dev)&&recursion(e,(function(e){var t,r,n;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length)for(var i=0,o=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var c=0,u=s;c<u.length;c++){var l=u[c],d=l.value;(null==d?void 0:d.length)&&(l.value=l.value.map((function(e){return{cid:e.cid,viewComName:e.viewComName,name:e.name,visible:e.visible}})))}}}})),recursion(l,(function(e){var t,r;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length){var n=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:n,element:e,actions:s,events:c,eventsComs:u,filter:i})}})),ve.addVariables(s),s=ve.getAllVariables(),recursion(l,(function(e){var t,r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.source;getShareVariableTree(r,s,e,a)})),{shareVariableTree:a,globalVars:ve.getAllVariables(),globalEvents:c.filter((function(e){return e})),eventsComs:u}}catch(e){return console.error("error",e),{}}},getInteractive2=function(e,t,r,n,i){var o;try{var a={},s=[],c=[],u=[],l=_$1.cloneDeep(e);return(null===(o=null===window||void 0===window?void 0:window.go)||void 0===o?void 0:o.dev)&&recursion(e,(function(e){var t,r,n;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length)for(var i=0,o=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var c=0,u=s;c<u.length;c++){var l=u[c],d=l.value;(null==d?void 0:d.length)&&(l.value=l.value.map((function(e){return{cid:e.cid,viewComName:e.viewComName,name:e.name,visible:e.visible}})))}}}})),recursion(l,(function(e){var t,r;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length){var n=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:n,element:e,actions:s,events:c,eventsComs:u})}})),t&&t.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),t,!0)),r&&r.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),r,!0)),n&&n.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),n,!0)),recursion(l,(function(e){var t,r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.source;getShareVariableTree(r,s,e,a)})),s.filter((function(e){if(e.fork){var t=s.find((function(t){return t.mapField==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(t.mapField)}));(i?i==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(i):!!t)&&(Array.isArray(e.forkValue)?e.originalValue=e.forkValue.map((function(e){var t=s.find((function(t){return t.mapField==e}));if(t)return t.value})):e.originalValue=t.value)}})),{shareVariableTree:a,globalVars:s.filter((function(e){return i?(i==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(i))&&(e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue):(e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue),e})),globalEvents:c.filter((function(e){return e})),eventsComs:u}}catch(e){return console.error("error",e),{}}},checkVar=function(e,t){var r,n,i,o=!1,a=e.type,s=e.converse,c=e[a];if((null==s?void 0:s.use)&&(null===(r=null==s?void 0:s.data)||void 0===r?void 0:r.length))for(var u=0,l=s.data;u<l.length;u++){if((null==(v=l[u])?void 0:v.use)&&v.dependVars.includes(t)){o=!0;break}}if(o)return o;var d="",h="",f="";"api"==a&&(d=c.url,(null===(n=c.headers)||void 0===n?void 0:n.use)&&(h=c.headers.value),f=c.params),"datasource"==a&&(d=c.inputSql),"indicator"==a&&((null===(i=c.headers)||void 0===i?void 0:i.use)&&(h=c.headers.value),f=c.params);for(var p=/({{[\w]*}})|((@)[\w]*)/gm,m=0,g=[d,h,f];m<g.length;m++){var v,y=(v=g[m]).match(p);if((null==y?void 0:y.length)&&y.find((function(e){return e=="{{".concat(t,"}}")||e=="@".concat(t)}))){o=!0;break}}return o},executeFilter=function(e){return e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue,e},getShareTree=function(e,t){try{var r={},n=[],i=[];return recursion(e,(function(e){var o,a,s,c=null===(o=null==e?void 0:e.tmpData)||void 0===o?void 0:o.source;if(getShareVariableTree(c,t,e,r),null===(s=null===(a=null==e?void 0:e.tmpData)||void 0===a?void 0:a.actions)||void 0===s?void 0:s.length){var u=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:u,element:e,actions:n,events:i})}})),r}catch(e){return console.error(e),{}}},hasVar=function(e,t,r){var n,i,o,a,s=t[null==t?void 0:t.type],c=null==t?void 0:t.converse,u=!1;if(c&&c.use&&c.data.length)for(var l=0,d=c.data;l<d.length;l++){var h=d[l];if((null==h?void 0:h.dependVars)&&(null===(n=null==h?void 0:h.dependVars)||void 0===n?void 0:n.length)&&(null==h?void 0:h.dependVars.includes(e)))return u=!0}return(null==s?void 0:s.inputSql)&&(u=getStringVars(null==s?void 0:s.inputSql,r)),(null==s?void 0:s.url)&&(u=getStringVars(s.url,r)),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&(u=getStringVars(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,r)),(null==s?void 0:s.params)&&(u=getStringVars(null==s?void 0:s.params,r)),u},getShareVariableTree=function(e,t,r,n){var i,o,a;if(e){var s=e[null==e?void 0:e.type],c=null==e?void 0:e.converse;c&&c.use&&c.data.length&&c.data.map((function(e){var t;(null==e?void 0:e.dependVars)&&(null===(t=null==e?void 0:e.dependVars)||void 0===t?void 0:t.length)&&e.dependVars.map((function(e){setShareVariableTreeData(n,e,r.cid)}))})),(null==s?void 0:s.inputSql)&&getStringVars(null==s?void 0:s.inputSql,t,r,n),(null==s?void 0:s.url)&&getStringVars(s.url,t,r,n),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&getStringVars(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,t,r,n),(null==s?void 0:s.params)&&getStringVars(null==s?void 0:s.params,t,r,n)}},getStringVars=function(e,t,r,n){"string"!=typeof e&&(e=JSON.stringify(e));var i=e.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){var o=i.map((function(e){return e.replace(/{{|}}|@/gm,"")}));if(r)for(var a=function(e){var i=o[e];if(!i||!t||t.findIndex((function(e){return e.mapField===i}))<0)return"continue";r&&n&&setShareVariableTreeData(n,i,r.cid)},s=0;s<o.length;s++)a(s);else{var c=function(e){var i=o[e];return!i||!t||t.findIndex((function(e){return e.mapField===i}))<0?"continue":(r&&n&&setShareVariableTreeData(n,i,r.cid),{value:!0})};for(s=0;s<o.length;s++){var u=c(s);if("object"==typeof u)return u.value}}}return!1},setShareVariableTreeData=function(e,t,r){if(e[t]&&_$1.isArray(e[t])){e[t].push(r);var n=e[t];e[t]=_$1.uniq(n)}else e[t]=[],e[t].push(r)},isJSON=function(e){if("string"==typeof e)try{var t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1};function getStandardData(e,t){return void 0===t&&(t=!1),t?isJSON(e)?e:JSON.stringify(e):isJSON(e)?JSON.parse(e):e}var rightMenuMutaitons={delListItem:function(e,t){var r=_$1.cloneDeep(e.list);"string"==typeof t?findItemDeep$1(r,t,!0):t.forEach((function(e){findItemDeep$1(r,e,!0)})),e.list=r,e.globalVars=getInteractive(e.list,e.globalConstant,e.sysConst).globalVars},editCloneCache:function(e,t){var r=_$1.cloneDeep(e.cloneCache);r.length&&r.map((function(e){e.baseData=Object.assign({},e.baseData,t)})),e.cloneCache=r},cloneItem:function(e){if(e.selectd.length>0){e.cloneCache=[];for(var t=function(t){var r=findItemDeep$1(e.list,e.selectd[t]);if("boolean"!=typeof r){var n=_$1.cloneDeep(r);if(n.pid="",(null==n?void 0:n.stateChildren)||(null==n?void 0:n.children))((null==n?void 0:n.stateChildren)?null==n?void 0:n.stateChildren:null==n?void 0:n.children).forEach((function(e){var t,r,i,o,a=e.cid;if(e.cid=genID(),e.pid=n.cid,(null==n?void 0:n.stateChildren)&&(null===(r=null===(t=null==n?void 0:n.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.children)){var s=null===(o=null===(i=null==n?void 0:n.tmpData)||void 0===i?void 0:i.option)||void 0===o?void 0:o.children.find((function(e){return e.cid==a}));s&&(s.cid=e.cid)}}));e.cloneCache.push(n),window.localStorage.setItem("cloneCache",JSON.stringify(e.cloneCache))}},r=0;r<e.selectd.length;r++)t(r)}},shearItem:function(e,t){if(e.selectd.length>0){e.cloneCache=[];for(var r=0;r<e.selectd.length;r++){var n=findItemDeep$1(e.list,e.selectd[r],!0);if("boolean"!=typeof n){var i=_$1.cloneDeep(n);e.cloneCache.push(i)}}e.selectd=[]}},pasteItem:function(e){var t,r;try{var n=(null===(r=_$1.cloneDeep(e.cloneCache))||void 0===r?void 0:r.length)?_$1.cloneDeep(e.cloneCache):JSON.parse(window.localStorage.getItem("cloneCache"));if(n.length>0){var i=[],o={};recursion(n,(function(e){var t=genID();if(o[e.cid]=t,e.cid=t,e&&e.children)for(var r=0,n=e.children;r<n.length;r++){n[r].pid=e.cid}else if(e.stateChildren)for(var a=0,s=e.stateChildren;a<s.length;a++){s[a].pid=e.cid}if("dynamicComponent"==e.componentType){var c=void 0;e.dynamicChildren instanceof Map?c=e.dynamicChildren.get(e.activeDynamic):e.dynamicChildren instanceof Array&&(c=e.dynamicChildren.find((function(t){return t[0]==e.activeDynamic}))),c.length>1&&(Array.isArray(c[1])?c[1].forEach((function(t){t.pid=e.cid})):c.forEach((function(t){t.pid=e.cid}))),1==c.length&&c.forEach((function(t){t.pid=e.cid}))}i.push(e.cid)})),e.selectd.length>0?selectdArea(e.selectd,e.list):getPosition(n),n.forEach((function(e){var t,r,n,i;if(e.baseData.top=e.baseData.top+20,e.baseData.left=e.baseData.left+20,e&&e.hasOwnProperty("stateChildren")&&(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.children))for(var o=function(t){t.pid=e.cid;var r=null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.option)||void 0===i?void 0:i.children.find((function(e){return e.disName==t.name}));r&&(r.cid=t.cid)},a=0,s=e.stateChildren;a<s.length;a++){o(s[a])}}));try{var a=Object.keys(o),s=JSON.stringify(n);(null==a?void 0:a.length)&&a.forEach((function(e){var t=o[e];-1!==s.indexOf(e)&&(s=s.replaceAll(null==e?void 0:e.toString(),null==t?void 0:t.toString()))})),n=JSON.parse(s)}catch(e){}(t=e.list).unshift.apply(t,_$1.cloneDeep(n)),e.selectd=i}}catch(e){console.warn(e)}},updataShow:function(e,t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=!r.isShow;updataAttribute(r,"isShow",n,"")}},changeShow:function(e,t){var r=t.cid,n=t.flag,i=findItemDeep$1(e.list,r);i&&updataAttribute(i,"isShow",n,"")},comToggle:function(e,t){var r=findItemDeep$1(e.list,t);r&&comToggle(r)},updataLock:function(e,t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=!r.isLock;updataAttribute(r,"isLock",n,"")}},breakUp:function(e,t){var r,n;try{if(!t)throw"Please pass in the component CID correctly!";var i=findParentDeep(e.list,t),o=findItemDeep$1(e.list,t),a=o.baseData;if(isNaN(a.left)||isNaN(a.top))throw new Error("top or left is NAN");var s=breakUp(o,e.list);if(s.map((function(e){return e.pid=""})),i){var c=i.children.findIndex((function(e){return e.cid==t}));i.children.splice(c,1),(r=i.children).push.apply(r,s.reverse())}else{c=e.list.findIndex((function(e){return e.cid==t}));e.list.splice(c,1),(n=e.list).push.apply(n,s.reverse())}}catch(e){console.error(e)}},editGroup:function(e,t){var r,n=t.groupId;t.status;try{if(!n)throw"Please pass in the component CID correctly!";var i=e.list.findIndex((function(e){return e.cid===n})),o=e.list[i],a=breakUp(o);a.map((function(e){return e.pid=""})),e.list.splice(i,1),(r=e.list).push.apply(r,a)}catch(e){console.error(e)}},combination:function(e){_$1.cloneDeep(e.list);var t,r,n=[],i=[],o=genID(),a=findItemDeep$1(e.list,e.selectd[0]);a.pid?console.info("Sorry, only level 2 is supported group"):a.children&&1===e.selectd.length?console.info("Sorry, only level 2 is supported group"):(e.selectd.forEach((function(t){var r=e.list.findIndex((function(e){return e.cid===t}));if(r>-1){n.push(r);var a=e.list.splice(r,1)[0];a.pid=o,i.push(a)}})),t=n.sort((function(e,t){return e-t}))[0],r=1===i.length?_$1.cloneDeep(i[0].baseData):e.currentArea,Object.assign(r,{angle:0,opacity:100,rotate:0,rotateY:0}),setPositionForGroup(r,i),e.list.splice(t,0,{cid:o,pid:"",isShow:!0,isLock:!1,editer:!1,baseData:r,z:0,toggle:!0,name:"群组",type:"folder",origin:"anov-ui",tmpData:{actions:null,option:null,source:globalSourceTemp},children:i}),setIndex(e.list),e.selectd=[o])},moveUp:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>=1?arraySwap(e.list,r-1,r):arraySwapDeep(e.list,"up",t)}catch(e){console.error(e)}},moveDown:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>-1&&r<=e.list.length-2?arraySwap(e.list,r+1,r):arraySwapDeep(e.list,"down",t)}catch(e){console.error(e)}},moveTop:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>-1&&0!==r?arraySwap(e.list,0,r):arraySwapDeep(e.list,"top",t)}catch(e){console.error(e)}},moveBottom:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t})),n=e.list.length-1;r>-1&&r!==n?arraySwap(e.list,n,r):arraySwapDeep(e.list,"bottom",t)}catch(e){console.error(e)}}};function setComActions(e){var t=[],r=[];recursion(_$1.cloneDeep(e),(function(e){var n,i;if(null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions)||void 0===i?void 0:i.length){var o=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:o,element:e,actions:t,events:r})}}));var n=r.filter((function(e){return e}));return{actions:t,events:n}}var eventMutations={addGlobalSource:function(e,t){var r=t.name,n=t.value,i=genID();e.globalSource.push({key:i,name:r,value:n}),me({key:i,name:r,value:n},e.globalVars,e.globalSource,e.list,(function(e){}))},editGlobalSource:function(e,t){var r=this,n=t.key,i=t.value,o=e.globalSource.find((function(e){return e.key==n}));o&&(o.name=t.name,o.value=i,me(o,e.globalVars,e.globalSource,e.list,(function(e,t){r.commit("GoCom/updataSourceForComponent",{cid:e.cid,data:t})})))},delGlobalSource:function(e,t){try{var r=e.globalSource.findIndex((function(e){return e.key===t}));-1!==r&&e.globalSource.splice(r,1)}catch(e){console.error("删除错误",e)}},setSyncFlag:function(e,t){e.syncFlag=t},goUpShareVar:function(e,t){e.shareVariable[t.key]=__assign$1({},t)},addGoRunVar:function(e,t){try{var r=getInteractive(e.list,e.globalConstant,e.sysConst);e.globalVars=r.globalVars,e.eventsComs=r.eventsComs}catch(e){console.warn(e)}},copyGoVar:function(e,t){try{for(var r=t.mapField,n=(r.toString().trim(),e.globalConstant.filter((function(e){return e.mapField.includes(r)}))),i=1,o=0;o<n.length;o++)i++;var a="".concat(r," (").concat(i,")"),s=e.globalConstant.find((function(e){return e.mapField==r}));if(r&&s){var c=_$1.cloneDeep(s);c.mapField=a,e.globalConstant.push(c);var u=getInteractive(e.list,e.globalConstant,e.sysConst);e.globalVars=u.globalVars,e.eventsComs=u.eventsComs}}catch(e){console.warn(e)}},goDelShareVar:function(e,t){delete e.shareVariable[t]},signal:function(e,t){},goSynchroDataAll:function(e,t){e.list=_$1.cloneDeep(t)},goSynchroDataForOption:function(e,t){if(e){var r=t.cid,n=t.value,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&i&&updataAttributeForOption(i,n)}this.commit("GoCom/execute")},goSynchroData:function(e,t){if(e){var r=t.cid,n=t.attr,i=t.value,o=t.attrModel,a=findItemDeep$1(e.list,r);if("boolean"!=typeof a){if(a&&updataAttribute(a,n,i,o),"actions"===n.toLowerCase()){var s=e.list,c=_$1.uniqWith(_$1.concat(setComActions(s).actions,setComActions(e.caseList).actions),_$1.isEqual),u=_$1.uniqWith(_$1.concat(setComActions(s).events,setComActions(e.caseList).events),_$1.isEqual);ve.addVariables(c),e.globalVars=ve.getAllVariables(),e.globalEvents=u,e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalVars=c),e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalEvents=u)}if("source"===n){if(!a.tmpData.source)return!1;var l=a.tmpData.source,d=l.type;if("api"===d){var h=l[d].url.match(/{{[\w]*}}|(@)[\w]*/gm);if(h)for(var f=h.map((function(e){return e.replace(/{{|}}|@/gm,"")})),p=function(t){var r=f[t];if(!r||!e.globalVars||e.globalVars.findIndex((function(e){return e.mapField===r}))<0)return"continue";if(e.shareVariableTree||(e.shareVariableTree={}),e.shareVariableTree[r]&&_$1.isArray(e.shareVariableTree[r])){e.shareVariableTree[r].push(a.cid);var n=e.shareVariableTree[r];e.shareVariableTree[r]=_$1.uniq(n)}else e.shareVariableTree[r]=[],e.shareVariableTree[r].push(a.cid)},m=0;m<f.length;m++)p(m)}}}}this.commit("GoCom/execute")},goUpdataSysVars:function(e,t){var r={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},n=e.sysConst,i=Object.keys(r);n.map((function(e){if(e.originalValue=e.value,(null==e?void 0:e.name)&&(null==i?void 0:i.includes(e.name))){var n=r[e.name];e.value=t[n],e.originalValue=t[n]}return e})),ve.addVariables(n)},resetGlobalData:function(e){e.globalVars=e.sysConst,e.globalConstant=[],e.globalSource=[]},updateGlobalRelatedVars:function(e,t){var r=t.run,n=t.gvData;return r.length&&r.forEach((function(e){var t=n.filter((function(t){return t.mapField==e.mapField||t.fork&&t.forkValue==e.mapField}));if(t.length)for(var r=0,i=t;r<i.length;r++){var o=i[r],a=e.value;o.mapField==e.mapField?o.value=a:o.fork&&e.mapField==o.forkValue?(o.converter&&o.converterCode,o.originalValue=a):n.push(e)}})),n}},comTreeMutations={updataList:function(e,t){var r=t.cid,n=produceWithImmer(t.list,(function(e){var t=findItemDeep$1(e,r),n=t.pid,i=getAncestorsNodes(e,r),o=function(e){for(var t=0;t<e.length;t++){var r=e[t];upDataGroup(r,r.baseData,null,!0)}},a=function(e){return e.reduce((function(e,t){return{left:e.left+t.baseData.left,top:e.top+t.baseData.top}}),{left:0,top:0})},s=function(e,t){void 0===t&&(t=e);for(var r=0;r<e.length;r++){var n=e[r];if(n.children&&Array.isArray(n.children))return 0===n.children.length?(t.splice(r,1),!0):(s(n.children,n.children)&&0===n.children.length&&t.splice(r,1),!0)}};if(i.length>0)if(t.pid=i[0].cid,n){var c=__spreadArray$1([findItemDeep$1(e,n)],getAncestorsNodes(e,n),!0),u=a(c),l=a(i);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,u)),t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,l,1)),o(c),o(i)}else{l=a(i);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,l,1)),o(i)}n&&0==i.length&&(t.pid="",function(t,r){var n=getAncestorsNodes(e,r),i=findItemDeep$1(e,r);if(0===n.length)t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,i.baseData));else{n=__spreadArray$1([i],n,!0);var s=a(n);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,s))}o(__spreadArray$1([i],n,!0))}(t,n)),s(e),setIndex(e)}));e.list=n},updataListForContrast:function(e,t){var r=t.cid,n=t.list,i=findItemDeep$1(n,r);findParentDeep(n,r);var o=findParentDeep(e.list,r);if(!i.pid){i.pid=o.cid;var a=_$1.cloneDeep(i.baseData),s=transformPosition(i.baseData,o.baseData,1);Object.assign(i.baseData,s),upDataGroup(o,a)}setIndex(e.list)},updateTree:function(e){for(var t=e.list,r=0;r<t.length;r++){var n=t[r];if(n.pid)(a=findItemDeep$1(t,n.pid))&&Object.assign(n.baseData,transformPosition(n.baseData,a.baseData));if(n.children)for(var i=0;i<n.children.length;i++){var o=n.children[i];if(o.pid!=n.cid){var a=findItemDeep$1(t,o.pid);if(_$1.cloneDeep(o.baseData),a){Object.assign(o.baseData,transformPosition(o.baseData,a.baseData));var s=transformPosition(o.baseData,n.baseData,1);Object.assign(o.baseData,s),upDataGroup(n,n.baseData)}o.pid=n.cid}}}setIndex(t)}},ERR_OK=200,ERR_OK2=2e4,TIMEOUT=3e4,STATUS="status",xhr=function(t,r){void 0===t&&(t="");var n=e.create({baseURL:t,timeout:TIMEOUT,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return n.interceptors.request.use((function(e){return sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(e.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(e.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(e.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===e.method?(e.headers["Content-Type"]="application/json;",e):"get"===e.method?e:"put"===e.method?(e.headers["Content-Type"]="application/json; charset=UTF-8",e):"delete"===e.method?e:void 0}),(function(e){return Promise.reject(e)})),n.interceptors.response.use((function(e){return e[STATUS]===ERR_OK||e.data.code,r&&r(e),e.data}),(function(e){return r&&r(null==e?void 0:e.response),Promise.reject(e.response)})),n},Http=function(e,t){return xhr(e,t)},filterData=ne,parseSource=function(e,t,r,n,i,o,a,s){void 0===n&&(n=!0);console.log(t,r,n,i,"callback"),le(t,n,r,[],(function(e){i(e),("AnContainer"===(null==t?void 0:t.viewComName)&&n||"AnGridLayout"===(null==t?void 0:t.viewComName)&&n)&&UpdataForContainer(t)}),s)},updateComData=function(e,t,r,n,i,o,a){return void 0===r&&(r=!0),__awaiter(void 0,void 0,void 0,(function(){var o;return __generator(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,le(e,r,t,i,(function(e){n&&n(e)}),a)];case 1:return[2,s.sent()];case 2:return o=s.sent(),n&&n(o),console.log("error:11"+o),[3,3];case 3:return[2]}}))}))},autoUpdateComData=function(e,t,r){var n,i,o,a,s,c=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.source,u=null===(o=null===(i=c[null==c?void 0:c.type])||void 0===i?void 0:i.autoUpdate)||void 0===o?void 0:o.open,l=null===(s=null===(a=c[null==c?void 0:c.type])||void 0===a?void 0:a.autoUpdate)||void 0===s?void 0:s.time;u&&_$1.isNumber(l)&&l>0&&setInterval((function(){updateComData(e,t,!0,(function(t){r({cid:e.cid,data:t})}))}),1e3*l)},refreshData=function(e,t,r,n,i,o){void 0===o&&(o=!0),e&&le(e,o,t,[],(function(t){r({cid:e.clientWidth,data:t})}))},index$2=Object.freeze({__proto__:null,Http:Http,autoUpdateComData:autoUpdateComData,axios:e,filterData:filterData,getDataForEvaluator:getDataForEvaluator,parseSource:parseSource,refreshData:refreshData,updateComData:updateComData}),loadFontResource=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,i,o;return __generator(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),t=e.fontUrl,r=e.fontName,n="__custom_font__",(i=document.getElementById(n))?[3,2]:((i=document.createElement("style")).id=n,[4,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)]);case 1:a.sent(),a.label=2;case 2:return i.innerText+="@font-face{font-family:'".concat(r,"';src:url(").concat(t,");}"),[3,4];case 3:return o=a.sent(),console.warn(o),[3,4];case 4:return[2]}}))}))},loadScript=function(e,t,r){return void 0===t&&(t="jspaths"),__awaiter(void 0,void 0,void 0,(function(){var n,i;return __generator(this,(function(o){switch(o.label){case 0:return n="csspaths"===t?"link":"script",i=document.createElement(n),"jspaths"===t?i.defer=!0:i.rel="stylesheet",i.className=t,i.src=e,(r||document.head||document.getElementsByTagName("head")[0]).appendChild(i),[4,new Promise((function(e,t){i.addEventListener("load",e),i.addEventListener("error",e)}))];case 1:return o.sent(),[2]}}))}))},addTag=function(e,t){return void 0===t&&(t="jspaths"),__awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return r="fonts"===t?loadFontResource:loadScript,[4,Promise.all(e.map((function(e){return r(e)})))];case 1:return n.sent(),[2]}}))}))},loadFont=function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return e.fonts&&e.fonts.length?[4,addTag(e.fonts,"fonts")]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},loadTag=function(e){var t=e.jspaths,r=void 0===t?[]:t,n=e.csspaths,i=void 0===n?[]:n,o=e.fonts,a=void 0===o?[]:o;return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=_$1.uniqBy(a,"fontName"),[4,Promise.all([addTag(r,"jspaths"),addTag(i,"csspaths"),addTag(e,"fonts")])];case 1:return t.sent(),[2]}}))}))},loadFontTag=function(e){var t=e.fonts,r=void 0===t?[]:t;return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=_$1.uniqBy(r,"fontName"),[4,Promise.all([addTag(e,"fonts")])];case 1:return t.sent(),[2]}}))}))},removeTag=function(){removeFont(),Array.from(document.getElementsByTagName("script")).filter((function(e){return"jspaths"==e.className})).forEach((function(e){removeScript(e.src)})),Array.from(document.getElementsByTagName("link")).filter((function(e){return"csspaths"==e.className})).forEach((function(e){removeCss(e.href)}))};function removeScript(e){for(var t,r=Array.from(document.getElementsByTagName("script")),n=0;n<r.length;n++)r[n]&&r[n].src&&-1!=r[n].src.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}function removeCss(e){for(var t,r=Array.from(document.getElementsByTagName("link")),n=0;n<r.length;n++)r[n].href,r[n]&&r[n].href&&-1!=r[n].href.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}function removeFont(){var e=document.getElementById("__custom_font__");(null==e?void 0:e.parentNode)&&e.parentNode.removeChild(e)}var toolMutations={reset:function(e){e.selectd=[],e.list=[],e.plant=null,e.tw=null,e.watermark=null,e.endnotes=null,e.globalConstant=[]},setFonts:function(e,t){e.resource.fonts.push({fontName:t.name,fontUrl:t.src}),loadFont(e.resource)},setCaseInfo:function(e,t){e.caseInfo=t},setPageId:function(e,t){e.pageId=t},pagePush:function(e,t){try{var r=t.type,n=t.value,i=t.option,o=["name","path","id"];if(!o.includes(r))throw new Error("页面跳转错误!".concat(r," 不是一个正确的参数 请填以下参数 ").concat(o.join(",")));if(!n)throw new Error("页面跳转错误!".concat(r," 不是一个正确的参数 请填正确的页面路径或者页面名称"));e.toPage=i?{type:r,value:n,option:i}:{type:r,value:n}}catch(e){console.warn(e)}},updatComs:function(e,t){var r=this,n=findItemDeep$1(e.list,t);if("boolean"!=typeof n){(null==n?void 0:n.children)&&(null==n||n.children),updateComData(n,e.globalVars,!0,(function(e){r.commit("GoCom/updataSourceForComponent",{cid:n.cid,data:e})}),e.globalSource)}},updatComsForVar:function(e,t){var r=e.globalVars.map((function(e){var r,n;if((null===(r=null==e?void 0:e.forkValue)||void 0===r?void 0:r.length)&&(null===(n=null==e?void 0:e.forkValue)||void 0===n?void 0:n.includes(t))||e.forkValue==t)return e.mapField})).filter((function(e){return e})),n=[t];(null==r?void 0:r.length)&&(n=_$1.uniq(__spreadArray$1([t],r,!0)));for(var i=[],o=0,a=n;o<a.length;o++){var s=a[o];e.shareVariableTree[s]&&i.push.apply(i,e.shareVariableTree[s])}if(null==i?void 0:i.length)for(var c=0,u=i;c<u.length;c++){var l=u[c];this.commit("GoCom/updatComs",l)}},addConstant:function(e,t){var r=_$1.find(e.constant,{name:t.name});r?Object.assign(r,t):e.constant.push(t)},editConstant:function(e,t){var r=_$1.find(e.constant,{name:t.name});r&&Object.assign(r,t)},delConstant:function(e,t){_$1.remove(e.constant,(function(e){return e.name==t}))},setResource:function(e,t){var r=t.type,n=t.value;e.resource[r]=n,removeTag(),loadTag(e.resource)},updataResource:function(e){removeTag(),loadTag(e.resource)},resetResource:function(e){e.resource={jspaths:[],csspaths:[],otherpaths:[]}},setData:function(e,t){e.selectd=t.selectd},setList:function(e,t){e.list=t,setIndex(e.list)},saveDynamicChildren:function(e,t){var r=t.cid,n=t.data,i=t.name,o=e.pages[e.pageIndex].list,a=findItemDeep$1(o,r);a&&(a.activeDynamic=i,a.dynamicChildren instanceof Array&&(a.dynamicChildren=new Map(a.dynamicChildren)),a.dynamicChildren.set(i,n))},setTheme:function(e,t){e.theme=t},setPlant:function(e,t){var r=t.attr,n=t.value;e.plant||(e.plant={name:"",theme:null,baseData:{width:1920,height:1080,left:0,top:0},option:null,optionDes:null}),e.plant[r]=n},setPlantHeight:function(e,t){e.plant&&(e.plant.baseData.height=e.plant.baseData.height+t)},reversal:function(e,t){e.undos=[],e.undoRedoPointer=-1;var r=_$1.cloneDeep(t.globalVars);delete t.globalVars,e=Object.assign(e,t),ve.addVariables(r),e.globalVars=ve.getAllVariables(),setIndex(e.list)},setComTmp:function(e,t){var r=e.list.find((function(e){return e.cid===t[0]}));r.com=t[1],r.tmp=t[2]},setLoading:function(e,t){var r=t.cid,n=t.flag,i=e.list.find((function(e){return e.cid===r}));i&&(i.loading=n)},setMultiple:function(e,t){e.multiple=t},setCaseList:function(e,t){e.caseList=t},updataComponentForList:function(e,t){var r=t.cid,n=t.data,i=e.list,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataComponentForCaseList:function(e,t){var r=t.cid,n=t.data,i=e.caseList,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataComponent:function(e,t){var r=t.cid,n=t.data,i=e.pages&&e.pages[0]&&e.pages[0].list&&e.pages[0].list.length?e.pages[0].list:e.list,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataArea:function(e,t){e.currentArea.left+=t.deltaX,e.currentArea.top+=t.deltaY},updataSource:function(e,t){var r=t.cid,n=t.data,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&("indicatorCQ"===i.tmpData.source.type?i.tmpData.source.indicator.data=n:(console.log("更新数据:"+i.cid),i.tmpData.source[i.tmpData.source.type].data=n))},updataSourceForComponent:function(e,t){var r=t.cid,n=t.data;if(e.list.length){var i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.source=_$1.cloneDeep(n))}},updataAnimationForComponent:function(e,t){var r=t.cid,n=t.data;if(e.list.length){var i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.tw=n)}},updataWatermark:function(e,t){e.watermark=t},updataEndnotes:function(e,t){e.endnotes=t},updataAnimation:function(e,t){e.tw=t},setContext:function(e,t){var r=t.cid,n=t.data,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.example=n)},setContextList:function(e,t){var r=t.cid,n=t.data;e.contextList[r]=n},setPosition:function(e,t){setPositionForWorld(e.list.find((function(e){return e.cid===t[0]})),t[1])},setSelect:function(e,t){e.cache=[],e.selectd=t instanceof Array?t:[t],e.selectd.length>1&&e.selectd.forEach((function(t){e.cache.push(e.list.find((function(e){return e.cid===t&&"Other.Plant.Normal"!==e.type})))}))},setActive:function(e,t){var r=_$1.cloneDeep(t),n=r.id,i=r.multiple,o=r.origin,a=r.ctr,s=_$1.cloneDeep(e.selectd);if(i){var c=s.includes(n);if(s.length>=1){var u=s.every((function(r){return isPeer(e.list,r,t.id)}));if(!u)return void console.info("sorry Only sibling elements can be selected!")}c?s.splice(s.findIndex((function(e){return e===n})),1):s.push(n),e.selectd=s}else e.selectd=[n];e.selectd.forEach((function(t){var r=findItemDeep$1(e.list,t);if(r.pid){var n=findItemDeep$1(e.list,r.pid);n&&(n.toggle=!0)}a||(r.toggle=!0)})),e.selectdChangeOrigin=o||""},setCache:function(e){e.cache=[],e.selectd.length>1&&e.selectd.forEach((function(t){e.cache.push(e.list.find((function(e){return e.cid===t})))}))},clearActive:function(e){e.selectd=[]},setMultipleActive:function(e,t){e.selectd=t},syncMenuInfo:function(e){RecursiveList(e.menuList,(function(t){var r=10*t.lv+t.index;e.list.filter((function(e){return e.cid===t.id}))[0].z=1e4-r}))},addComs:function(e,t){var r=t.com,n=t.isMobile;"MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[]),r.lines={h:[],v:[]},"AnGridLayout"==r.viewComName&&r.dynamicChildren.set("状态1",null==r?void 0:r.AnGridChildren)),n?e.list.push(r):e.list.unshift(r),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},addComsForParent:function(e,t){var r=t.com,n=t.isMobile,i=t.PID;if("MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[])),i){var o=findItemDeep$1(e.list,i);n?(o.children=[],o.children.push(r)):o.children.unshift(r)}else n?e.list.splice(0,1,r):e.list.unshift(r);e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},addMyComs:function(e,t){var r;try{var n=t.data,i=t.shareVariableTree,o=t.globalVars,a=t.globalEvents;e.globalVars=_$1.uniq(_$1.concat(_$1.cloneDeep(e.globalVars),o)),e.globalEvents=_$1.uniq(_$1.concat(_$1.cloneDeep(e.globalEvents),a));var s=Object.keys(i),c=Object.keys(e.shareVariableTree),u=_$1.difference(s,c);u.length?u.forEach((function(t){e.shareVariableTree[t]=_$1.concat(_$1.cloneDeep(e.shareVariableTree[t]),i[t])})):e.shareVariableTree=Object.assign(_$1.cloneDeep(e.shareVariableTree),i),n instanceof Array?(resetID(n),(r=e.list).unshift.apply(r,n)):(resetID([n]),e.list.unshift(n)),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")}catch(e){}},addStateChildren:function(e,t){var r=findItemDeep$1(e.list,t.pid);r&&r.stateChildren.push(t)},addDynamicChildren:function(e,t){var r=findItemDeep$1(e.list,t.pid);r&&r.dynamicChildren.push(t)},arraySwap:function(e,t){var r;try{if(!t||2!=t.length)throw new Error("参数错误,方法接受两个组件的CID组成的数组!");var n=_$1.cloneDeep(e.list),i=findItemDeep$1(n,t[0]),o=findItemDeep$1(n,t[1]),a=findItemDeep$1(n,i.pid),s={},c=0,u=0;if(o)if("selectContainer"==o.componentType){var l=findItemDeep$1(n,t[1]);a?(c=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[c],a.children=a.children.filter((function(e){return e.cid!==s.cid}))):(s=findItemDeep$1(n,t[0]),n=n.filter((function(e){return e.cid!==s.cid}))),s.cid=genID(),s.pid=l.cid,l.children.push(s)}else if(i.pid||o.pid)if(a)if(c=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[c],i.pid!==o.pid){l=findItemDeep$1(n,o.pid);u=_$1.findIndex(l.children,(function(e){return e.cid==t[1]}));d=l.children[u];s.cid=genID(),s.pid=l.cid,d.cid=genID(),d.pid=a.cid,a.children.splice(c,1,d),l.children.splice(u,1,s)}else u=_$1.findIndex(a.children,(function(e){return e.cid==t[1]})),(r=a.children).splice.apply(r,__spreadArray$1([u,1],a.children.splice(c,1,a.children[u]),!1));else{var l=findItemDeep$1(n,o.pid);c=_$1.findIndex(n,(function(e){return e.cid==t[0]})),u=_$1.findIndex(l.children,(function(e){return e.cid==t[1]})),s=findItemDeep$1(n,i.cid);var d=l.children[u];s.cid=genID(),s.pid=l.cid,d.cid=genID(),d.pid=null,n.splice(c,1,d),l.children.splice(u,1,s)}else arraySwapForId(e.list,t[0],t[1]);else c=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[c],a.children.splice(c,1),s.cid=genID(),s.pid=null,n.push(s);e.list=n,setIndex(e.list)}catch(e){console.warn("组件位置交换发生错误",e)}},changeDynamicState:function(e,t){var r=findItemDeep$1(e.list,t.cid);r&&"dynamicComponent"==r.componentType&&(r.dynamicChildren instanceof Array&&r.dynamicChildren.find((function(e){return e[0]==t.activeName}))||r.dynamicChildren instanceof Map&&r.dynamicChildren.has(t.activeName)?r.activeDynamic=t.activeName:console.error(t.activeName+"不是一个正确的状态"))},addAlternateData:function(e,t){e.alternateData[t.pid]||(e.alternateData[t.pid]=[]),e.alternateData[t.pid].push(t)},setOptionForCom:function(e,t){var r;try{var n=t.cid,i=t.key,o=t.value,a=findItemDeep$1(e.list,n);if(!a)return;if("string"!=typeof i)return void console.error("key:[".concat(i,"]格式错误"));var s=null===(r=null==a?void 0:a.tmpData)||void 0===r?void 0:r.option,c=i.split(".");s&&(null==c?void 0:c.length)&&c.forEach((function(e,t){s.hasOwnProperty(e)&&(t===c.length-1?s[e]=o:s=s[e])}))}catch(e){console.warn("同步属性发生错误:"+e)}},mergeConfig:function(e,t){t.length>0&&t.forEach((function(t){e.list.unshift(t)})),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},updataName:function(e,t){var r=findItemDeep$1(e.list,t.cid);r&&(r.name=t.name)},setDynamicActive:function(e,t){t.cid;var r=t.name,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.activeDynamic=r)},updataScroll:function(e,t){t.cid;var r=t.data,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.srcollInfo={use:!!(null==r?void 0:r.use)&&(null==r?void 0:r.use),data:(null==r?void 0:r.data)?null==r?void 0:r.data:null})},updataDySetting:function(e,t){t.cid;var r=t.data,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.dyOption=r)},setCurrentEdited:function(e,t){if(t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=breakUp(r);r.children=n}e.currentEditerCid=t}else e.currentEditerCid=""},setDynamicLine:function(e,t){var r=_$1.cloneDeep(e.list),n=findItemDeep$1(r,t.cid);r.length&&"boolean"!=typeof n&&(n.lines=Object.assign({},n.lines,t.lines)),e.list=r}},findArray=function(e,t){try{var r=e.map((function(e){var r=findItemDeep$1(t,e);if("object"==typeof r)return r;throw"Please check whether the input and output parameters are correct!"}));if(_$1.every(r,Object))return r;throw"Please check whether the input and output parameters are correct!"}catch(e){return console.error(e),[]}},alignLeft=function(e,t){1===e.length&&(e[0].baseData.left=0);var r=_$1.sortBy(e,(function(e){return e.baseData.left})),n=r[0].baseData.left;e.map((function(e){return e.baseData.left=n}))},alignRight=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width-e[0].baseData.width}var n=_$1.sortBy(e,(function(e){return e.baseData.left})),i=1*n[n.length-1].baseData.left+1*n[n.length-1].baseData.width;e.map((function(e){return e.baseData.left=i-1*e.baseData.width}))},horizontally=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width/2-e[0].baseData.width/2}var n=_$1.sortBy(e,(function(e){return e.baseData.left})),i=_$1.sortBy(e,(function(e){return 1*e.baseData.left+1*e.baseData.width})),o=(1*n[0].baseData.left+(1*i[i.length-1].baseData.left+1*i[i.length-1].baseData.width))/2;e.map((function(e){return e.baseData.left=o-e.baseData.width/2}))},alignTop=function(e,t){1===e.length&&(e[0].baseData.top=0);var r=_$1.sortBy(e,(function(e){return e.baseData.top})),n=1*r[0].baseData.top;e.map((function(e){return e.baseData.top=n}))},alignBottom=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height-e[0].baseData.height}var n=_$1.sortBy(e,(function(e){return 1*e.baseData.top})),i=1*n[n.length-1].baseData.top+1*n[n.length-1].baseData.height;e.map((function(e){return e.baseData.top=i-1*e.baseData.height}))},verticalCenter=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height/2-e[0].baseData.height/2}var n=_$1.sortBy(e,(function(e){return e.baseData.top})),i=_$1.sortBy(e,(function(e){return 1*e.baseData.top+1*e.baseData.height})),o=(1*n[0].baseData.top+(1*i[i.length-1].baseData.top+1*i[i.length-1].baseData.height))/2;e.map((function(e){return e.baseData.top=o-e.baseData.height/2}))},topDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top})),r=(t[t.length-1].baseData.top-t[0].baseData.top)/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.top=1*t[0].baseData.top+r*n)}))},bottomDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top+e.baseData.height})),r=(t[t.length-1].baseData.top+t[t.length-1].baseData.height-(t[0].baseData.top+t[0].baseData.height))/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.top=1*t[0].baseData.top+1*t[0].baseData.height-1*e.baseData.height+r*n)}))},xCenterDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left+e.baseData.width/2})),r=1*t[t.length-1].baseData.left+t[t.length-1].baseData.width/2,n=1*t[0].baseData.left+t[0].baseData.width/2,i=(r-n)/(t.length-1);t.map((function(e,r){r>0&&r<t.length-1&&(e.baseData.left=n-e.baseData.width/2+i*r)}))},leftDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left})),r=(t[t.length-1].baseData.left-t[0].baseData.left)/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.left=t[0].baseData.left+r*n)}))},rightDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left+e.baseData.width})),r=(t[t.length-1].baseData.left+t[t.length-1].baseData.width-(t[0].baseData.left+t[0].baseData.width))/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.left=t[0].baseData.left+t[0].baseData.width-e.baseData.width+r*n)}))},yCenterDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top+e.baseData.height/2})),r=1*t[t.length-1].baseData.top+t[t.length-1].baseData.height/2,n=1*t[0].baseData.top+t[0].baseData.height/2,i=(r-n)/(t.length-1);t.map((function(e,r){r>0&&r<t.length-1&&(e.baseData.top=n-e.baseData.height/2+i*r)}))},layoutMutations={layout:function(e,t){var r=findArray(e.selectd,e.list);switch(t){case"alignLeft":alignLeft(r);break;case"alignRight":alignRight(r,e);break;case"horizontally":horizontally(r,e);break;case"alignTop":alignTop(r);break;case"alignBottom":alignBottom(r,e);break;case"verticalCenter":verticalCenter(r,e);break;case"topDistribution":topDistribution(r);break;case"bottomDistribution":bottomDistribution(r);break;case"xCenterDistribution":xCenterDistribution(r);break;case"leftDistribution":leftDistribution(r);break;case"rightDistribution":rightDistribution(r);break;case"yCenterDistribution":yCenterDistribution(r)}}},pages={setPageData:function(e,t){e.pages[0]=t},parasePages:function(e,t){t instanceof Array&&(e.pages=t.map((function(e,t){return e.name||(e.name="页面"+(t+1)),e.path||(e.path="page"+(t+1)),e})))},addPage:function(e,t){var r=e.pages.length+1;t.name="页面"+r,t.path="page"+r,e.pages.push(t),e.pageIndex=e.pages.length-1,e.resource={jspaths:[],csspaths:[],otherpaths:[]},e.globalVars=e.sysConst},setCurrentPageIndex:function(e,t){var r=e.globalEvents,n=e.globalVars,i=e.list,o=e.name,a=e.theme,s=e.plant,c=e.shareVariableTree,u=e.resource;e.pages[e.pageIndex]={globalEvents:r,globalVars:n,list:i,name:o,theme:a,plant:s,shareVariableTree:c,resource:u},e.pageIndex=t},setPageDataForIndex:function(e,t){var r=t.index,n=t.data;e.pages[r]=n},setPageName:function(e,t){e.name=t,e.pages[e.pageIndex].name=t},saveCurrentPageData:function(e){var t=e.globalEvents,r=e.globalVars,n=void 0===r?[]:r,i=e.list,o=e.name,a=e.theme,s=e.plant,c=e.shareVariableTree,u=e.resource;e.pages[e.pageIndex]={globalEvents:t,globalVars:n,list:i,name:o,theme:a,plant:s,shareVariableTree:c,resource:u}},getCurrentPageData:function(e){var t=e.globalEvents,r=e.globalVars,n=e.list,i=e.name,o=e.theme,a=e.plant,s=e.shareVariableTree,c=e.resource;e.pages[e.pageIndex]={globalEvents:t,globalVars:r,list:n,name:i,theme:o,plant:a,shareVariableTree:s,resource:c}}},containerMutaitons={segmentationContainer:function(e,t){var r=_$1.cloneDeep(e.list),n=t.containerData,i=t.direction,o=[];if("del"==i)if(n.pid){var a=findItemDeep$1(r,n.pid),s=a.children.length;if(a)if(s<=2)(o=a.children.filter((function(e){return e.cid!==n.cid&&e.children.length}))).length?(a.direction=o[0].direction,a.children=o[0].children.map((function(e){return e.pid=a.pid||a.cid,e}))):a.children=[];else{var c=a.children.find((function(e){return e.cid===n.cid})),u=a.children.findIndex((function(e){return e.cid===n.cid}));a.children=a.children.filter((function(e){return e.cid!==n.cid}));var l=a.children[u>=a.children.length-1?a.children.length-1:u],d="col"==a.direction?"height":"width";l.baseData[d]=(parseFloat(l.baseData[d])+parseFloat(c.baseData[d])).toFixed(2)+"%"}}else r.length&&(r=r.filter((function(e){return e.cid!==n.cid})));else{var h=findItemDeep$1(r,n.cid);if(h){h.direction=i,1===h.children.length&&(o=h.children,h.children=[]);for(var f=(s=h.children.length)>=2?1:2,p=(d=s>=2?(100/(s+1)).toFixed(2)+"%":"50%",0);p<f;p++)h.children.push({isLock:!1,isShow:!0,baseData:{width:"col"==i?"100%":d,height:"col"==i?d:"100%",angle:0,penetrate:0,opacity:100},direction:i,componentType:"selectContainer",iconClass:"__vue_devtool_undefined__",isAssembly:"__vue_devtool_undefined__",source:[],comData:{actions:[],option:{grid:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],bgColor:{alpha:1,blue:0,green:0,red:0,flag:1,style:"transparent"},imgOpt:"",bgScaleOpt:3,borderRadius:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],margins:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}]}},tmpData:{},dynamic:0,filePath:"/anov-prod/mgt/go/assembly/162-bgImage.png",origin:"anov-go",name:"容器组件",path:"/index.js",viewComName:"selectContainer",optionComName:"",dataComName:"",eventComName:"",assemblyDeveloper:"",devEmail:"",version:null,devDept:"",toggle:!0,cid:genID(),pid:h.cid,nestIndex:0,children:[],isTop:!1,isCol:"col"==i,isRow:"col"!=i,isDragged:!1,grandParentId:n.pid});o.length&&(o[0].cid=genID(),o[0].pid=h.children[0].cid,h.children[0].children=o)}}e.list=r,0==r.length&&(e.selectd=[])}},shareCom={goEditShareCom:function(e,t){var r=t.name,n=t.mapping;e.shareComs||(e.shareComs=new Map),e.shareComs.set(r,n)},delShareCom:function(e,t){var r=t.key;e.shareComs&&e.shareComs.has(r)&&e.shareComs.delete(r)}},globalVars={mutation:{addGoVar:function(e,t){try{ve.addVariable(t,(function(){e.globalVars=ve.getAllVariables()}))}catch(e){console.warn(e)}},delGoVar:function(e,t){try{var r=t.mapField;console.log(r,"mapFieldmapField"),ve.delVariable(r,(function(){e.globalVars=ve.getAllVariables()}))}catch(e){console.warn(e)}},editGoVar:function(e,t){var r=this;try{ve.editVariable(t,(function(n){e.globalVars=ve.getAllVariables(),pe(e.globalSource,t.mapField,e.globalVars,e.list,(function(e){r.commit("GoCom/updatComs",e.cid)})),(null==t?void 0:t.delayUpdate)||r.commit("GoCom/updatComsForVar",t.mapField)}))}catch(e){console.warn(e)}},goEditVar:function(e,t){var r=t.key,n=t.value,i=e.globalVars.find((function(e){return e.mapField==r}));i&&(i.originalValue=n,i.update=!0,this.commit("GoCom/editGoVar",i))},goUpdataSysVars:function(e,t){var r={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},n=e.sysConst,i=Object.keys(r);n.map((function(e){if(e.originalValue=e.value,(null==e?void 0:e.name)&&(null==i?void 0:i.includes(e.name))){var n=r[e.name];e.value=t[n],e.originalValue=t[n]}return e})),ve.addVariables(n)},updateGlobalVars:function(e,t){e.globalVars=t},updataVariables:function(e){e.globalVars=ve.getAllVariables()}},actions:{updateGlobalVarsAction:function(e){(0,e.commit)("updateGlobalVars",ve.getAllVariables())},goEditVar:function(e,t){(0,e.commit)("editGoVar",{mapField:t.key,originalValue:t.value})}}},mutations=__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1({},UndoRedo),baseDataMutaitons),rightMenuMutaitons),eventMutations),comTreeMutations),toolMutations),layoutMutations),pages),containerMutaitons),shareCom),globalVars.mutation),actions=__assign$1({updataList:function(e,t){var r=e.commit;t&&r("updataList",t),r("updateTree")},updataBaseData:function(e,t){var r=e.commit;t&&r("updataBaseData",t)},setActive:function(e,t){var r=e.commit;t&&r("setActive",t)},setSyncFlag:function(e,t){var r=e.commit;t&&r("setSyncFlag",t)},execute:function(e,t){var r=e.commit;t&&r("execute",t)},updataAnimationForComponent:function(e,t){var r=e.commit;t&&r("updataAnimationForComponent",t)},updataAnimation:function(e,t){(0,e.commit)("updataAnimation",t)},setOptionForCom:function(e,t){(0,e.commit)("setOptionForCom",t)},updatComs:function(e,t){var r=e.commit;setTimeout((function(){r("updatComs",t)}))},updatComsForVar:function(e,t){var r=e.dispatch,n=e.state,i=n.globalVars.map((function(e){var r,n;if((null===(r=null==e?void 0:e.forkValue)||void 0===r?void 0:r.length)&&(null===(n=null==e?void 0:e.forkValue)||void 0===n?void 0:n.includes(t))||e.forkValue==t)return e.mapField})).filter((function(e){return e})),o=[t];(null==i?void 0:i.length)&&(o=_$1.uniq(__spreadArray$1([t],i,!0)));for(var a=[],s=0,c=o;s<c.length;s++){var u=c[s];n.shareVariableTree[u]&&a.push.apply(a,n.shareVariableTree[u])}if(null==a?void 0:a.length)for(var l=0,d=a;l<d.length;l++){r("updatComs",d[l])}},goEditShareCom:function(e,t){var r=e.commit;e.state,r("goEditShareCom",t)},delShareCom:function(e,t){var r=e.commit;e.state,r("delShareCom",t)},updataSource:function(e,t){var r=e.commit;e.state,r("updataSource",t)}},globalVars.actions),getters={getCurrentPage:function(e){return e.pages.length?e.pages[e.pageIndex]:[]},globalSourceTree:function(e){if(e.list.length&&e.globalSource.length){var t=[];return recursion(_$1.cloneDeep(e.list),(function(e){var r,n,i;if("globalData"==(null===(n=null===(r=null==e?void 0:e.tmpData)||void 0===r?void 0:r.source)||void 0===n?void 0:n.type)){var o=null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.source.globalData;t.push({name:e.name,cid:e.cid,sourceId:o.id,viewComName:e.viewComName})}})),t}return[]}},store={namespaced:!0,state:state,mutations:mutations,actions:actions,getters:getters},VueServer=function(){function e(){}return e.setAppStore=function(t){e.store=t},e.prototype.getState=function(){return e.store.state[e.storeModule]},e.prototype.mapState=function(t){return mapState(e.storeModule,t)},e.prototype.mapGetters=function(t){return mapGetters(e.storeModule,t)},e.prototype.mapMutations=function(t){return mapMutations(e.storeModule,t)},e.prototype.callState=function(t){return e.store.state[e.storeModule][t]},e.prototype.callGetter=function(t,r){return e.store.getters[e.storeModule+"/"+t]},e.prototype.callMutation=function(t,r,n){n?e.store.commit(e.storeModule+"/"+t,r,!0):e.store.commit(e.storeModule+"/"+t,r)},e.prototype.callAction=function(t,r){e.store.dispatch(e.storeModule+"/"+t,r)},e.storeModule="GoCom",e}(),mapState=normalizeNamespace((function(e,t){var r;return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;r[n]=function(){var t=this.$store.state,r=this.$store.getters;if(e){var n=getModuleByNamespace(this.$store,"mapState",e);if(!n)return;t=n.context.state,r=n.context.getters}return"function"==typeof i?i.call(this,t,r):t[i]},r[n].VuexServer=!0})),r})),mapMutations=normalizeNamespace((function(e,t){var r;return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;r[n]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this.$store.commit;if(e){var o=getModuleByNamespace(this.$store,"mapMutations",e);if(!o)return;n=o.context.commit}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}})),r})),mapGetters=normalizeNamespace((function(e,t){var r={};return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;i=e+i,r[n]=function(){if(!e||getModuleByNamespace(this.$store,"mapGetters",e)){if("production"===process.env.NODE_ENV||i in this.$store.getters)return this.$store.getters[i];console.error("[VuexServer] unknown getter: ".concat(i))}},r[n].VuexServer=!0})),r}));function normalizeMap(e){return Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}}))}function normalizeNamespace(e){return function(t,r){return"string"!=typeof t?(r=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,r)}}function getModuleByNamespace(e,t,r){var n=e._modulesNamespaceMap[r];return"production"===process.env.NODE_ENV||n||console.error("[VuexServer] module namespace not found in ".concat(t,"(): ").concat(r)),n}var GoComponent=function(){function e(e){var t=this;if(this.isLock=!1,this.isShow=!0,this.baseData={left:0,top:0,width:300,height:200,angle:0,opacity:100,rotate:0,rotateY:0},this.componentType="BaseComponent",this.cid=genID(),e){Object.keys(e).forEach((function(r){t[r]=e[r]}));["AnEchartsMap","AnMaptalks","AnEchartsMap1","AnArcgisMapBase","AnAMap1","AnCesium","AnThreeMap3DChina","AnThreeMapForCesium","AnThreeMap","AnGisMap","AnMineMap","MineMapMarkerLayer","MineMapClusterLayer","AnChina3D","AncsAnovGis"].includes(e.viewComName)&&(this.componentType="MultiStateComponent"),"AnDynamic"!==e.viewComName&&"AmDynamic"!==e.viewComName&&"AnContainer"!==e.viewComName&&"AnGridLayout"!==e.viewComName||(this.componentType="dynamicComponent")}}return e.prototype.setIndex=function(e){this.z=e},e}(),Load=function(){function e(e){this.vueServer=e,this.loadScript=loadScript}return e.setStore=function(e){this.store=e},e.prototype.loadComponents=function(e){var t=e&&e.list?e.list:[];recursion(t,(function(e){e.viewComName&&(e&&e.path&&e.path,e.origin,e.viewComName?e.viewComName:e.rawData.viewComName)})),e&&this.vueServer.callMutation("reversal",_$1.cloneDeep(e))},e.prototype.addStore=function(e){this.vueServer.callMutation("setActive",{id:e}),this.vueServer.callMutation("addComs",this)},e.prototype._addPlantStore=function(){this.vueServer.callMutation("setPlant",this)},e.prototype._loadComTmp=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,i=this;return __generator(this,(function(o){switch(o.label){case 0:if(window[t])return[3,5];r=function(t){var r;return __generator(this,(function(n){switch(n.label){case 0:return r=e[t],[4,new Promise((function(e){e(i._load(r))}))];case 1:return n.sent(),[2]}}))},n=0,o.label=1;case 1:return n<e.length?[5,r(n)]:[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:window[t]=t,o.label=5;case 5:return[2]}}))}))},e.prototype._load=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){return[2,new Promise((function(r){r(t.loadScript(e))}))]}))}))},e}(),IndexedDB=function(){function e(e){var t=e.dbName,r=e.tables,n=e.version,i=void 0===n?1:n,o=__rest(e,["dbName","tables","version"]);this.dbName=t,this.tables=r,this.version=i,this.openDB(__assign$1({dbName:t,tables:r,version:i},o))}return e.deleteDB=function(e){var t;null===(t=window.indexedDB)||void 0===t||t.deleteDatabase(e)},e.prototype.deleteItem=function(e,t,r){var n=this.storage.transaction(e,"readwrite").objectStore(e).delete(t);return n.onsuccess=function(e){"function"==typeof r&&r(e)},n},e.prototype.getItem=function(e,t,r){var n=this.storage.transaction(e,"readwrite").objectStore(e),i=null;return(i=t?n.get(t):n.getAll()).onsuccess=function(e){var t;"function"==typeof r&&r(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.result)},i.onerror=function(e){console.error(e),r(e)},i},e.prototype.setItem=function(e,t,r,n){var i=this.storage.transaction(e,"readwrite").objectStore(e).put(r,t);return i.onsuccess=function(e){"function"==typeof n&&n(e)},i.onerror=function(e){"function"==typeof n&&n(e)},i},e.prototype.get=function(e,t){return this.getItem(this.tables[0],e,t)},e.prototype.set=function(e,t,r){return this.setItem(this.tables[0],e,t,r)},e.prototype.delete=function(e,t){return this.deleteItem(this.tables[0],e,t)},e.prototype.clear=function(e,t){var r=this.storage.transaction(this.dbName,"readwrite").objectStore(e).clear();return r.onsuccess=function(e){"function"==typeof t&&t(e)},r},e.prototype.getDB=function(){return this.storage},e.prototype.closeDB=function(){this.storage.close()},e.prototype.openDB=function(e){var t=this,r=e.dbName,n=e.tables,i=e.version,o=e.callback,a=window.indexedDB;if(a)if((null==n?void 0:n.length)<1)console.error("表名不能为空");else{var s=a.open(r,i);s.onerror=function(e){var t,r;console.error("打开数据库失败: ".concat(null===(r=null===(t=e.currentTarget)||void 0===t?void 0:t.error)||void 0===r?void 0:r.message)),"function"==typeof o&&o(e)},s.onsuccess=function(e){var r;t.storage=null===(r=e.target)||void 0===r?void 0:r.result,"function"==typeof o&&o(e)},s.onupgradeneeded=function(e){var r;t.storage=null===(r=e.target)||void 0===r?void 0:r.result,n.forEach((function(r){t.storage.objectStoreNames.contains(r)||(t.storage.createObjectStore(r),"function"==typeof o&&o(e))}))}}else console.error("你的浏览器不支持indexedDB")},e}(),Go=function(){function e(){this.VueServer=new VueServer}return e.getInstance=function(){return this.instance||(this.db=new IndexedDB({dbName:"AnovGo",tables:["logs"]}),this.instance=new e),this.instance},e.prototype.getAppStore=function(){return e.store},e.setAppStore=function(t){e.store=t,VueServer.setAppStore(t),Load.setStore(t)},e.prototype.add=function(e,t,r){t.MultiState?this.VueServer.callMutation("addStateChildren",t):(this.VueServer.callMutation("addComs",{com:t,isMobile:r}),this.VueServer.callMutation("setActive",{id:e}))},e.prototype.addForParent=function(e,t,r,n){this.VueServer.callMutation("addComsForParent",{com:t,PID:r,isMobile:n}),this.VueServer.callMutation("setActive",{id:e})},e.prototype.render=function(e,t){var r=new GoComponent(e);t?this.add(r.cid,r,!0):this.add(r.cid,r)},e.prototype.renderForParent=function(e,t,r){var n=new GoComponent(e);void 0!==r?this.addForParent(n.cid,n,t,r):this.addForParent(n.cid,n,t)},e.prototype.reversal=function(e){new Load(new VueServer).loadComponents(e)},e.prototype.emitEvent=function(e,t){var r=this,n=this.VueServer.callState("globalEvents"),i=this.VueServer.callState("globalVars"),o=this.VueServer.callState("shareVariableTree"),a=this.VueServer.callState("globalSource");this.VueServer.callState("globalConstant");var s=this.VueServer.callState("list");De(n,i,o,s,e,(function(e){r.VueServer.callMutation("changeShow",e)}),(function(e){r.VueServer.callMutation("updataSourceForComponent",e)}),t,a)},e}(),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__publicField=(e,t,r)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,r),r),__async=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{s(r.next(e))}catch(e){i(e)}},a=e=>{try{s(r.throw(e))}catch(e){i(e)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,a);s((r=r.apply(e,t)).next())})),defaultOptions={gapX:100,gapY:100,offsetLeft:0,offsetTop:0,width:120,height:64,opacity:.15,rotate:-22,fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"300",fontColor:"#000",fontFamily:"sans-serif",textAlign:"center",textBaseline:"alphabetic",monitor:!0,zIndex:9999,mode:"interval",pack:!0,blindFontSize:16,blindOpacity:.005},attributeNameTag="data-watermark-tag",observeOptions={childList:!0,subtree:!0,attributeFilter:["style","class",attributeNameTag]};function getMutationObserver(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function getDataSetKey(e){return e.split("-").slice(1).reduce(((e,t,r)=>0===r?t:`${e}${t[0].toUpperCase()+t.slice(1)}`))}var getStyleStr=e=>{let t="";return Object.keys(e).forEach((r=>{const n=r.replace(/([A-Z])/g,"-$1").toLowerCase();t+=`${n}:${e[r]};`})),t},encrypt=e=>window.btoa(decodeURI(encodeURIComponent(e))),getRandomId=(e="")=>`${encrypt(e)}-${(new Date).getTime()}-${Math.floor(Math.random()*Math.pow(10,8))}`,getContainer=(e,t,r={},n)=>{let i;if("string"==typeof e){if(i=document.getElementById(e),!i)throw new Error(`水印挂载节点未找到,请检查#${e}是否存在`)}else i=null!=e?e:document.body;i.setAttribute(attributeNameTag,t);const o=__spreadValues({position:"relative"},r);return n||delete o.position,i.setAttribute("style",getStyleStr(o)),i},getContent=e=>{const t=document.createElement("div");return t.setAttribute("style",getStyleStr({pointerEvents:"none"})),t.setAttribute(attributeNameTag,e),t};function getDrawPattern(e){const{text:t,gapX:r,gapY:n,offsetTop:i,offsetLeft:o,width:a,height:s,rotate:c,opacity:u,fontSize:l,fontStyle:d,fontVariant:h,fontWeight:f,fontFamily:p,fontColor:m,textAlign:g,textBaseline:v,image:y,blindText:_,blindFontSize:b,blindOpacity:w}=e;return new Promise(((e,D)=>{const S=document.createElement("canvas"),x=S.getContext("2d"),T=1*(Number(r)+Number(a)),k=1*(Number(n)+Number(s)),P=Number(o)||Number(r)/2,E=Number(i)||Number(n)/2;if(S.setAttribute("width",`${T}px`),S.setAttribute("height",`${k}px`),x){const r=1*a,n=1*s;if(x.translate(1*P,1*E),x.rotate(Math.PI/180*Number(c)),_&&(x.globalAlpha=w,x.font=`${b}px normal`,x.fillText(_,0,0)),x.globalAlpha=u,y){const t=new Image;return t.crossOrigin="anonymous",t.referrerPolicy="no-referrer",t.src=y,void(t.onload=()=>{x.drawImage(t,0,0,r,n),e({url:x.canvas.toDataURL(),width:T,height:k})})}const i=Array.isArray(t)?t:[t],o=i.map((e=>x.measureText(e).width)),d=Math.max(...o),h=1*Number(l);x.textAlign=g,x.textBaseline=v,x.fillStyle=m,x.font=A(`${h}px`),d>a&&(x.font=A(h/2+"px"));const f=h+5;let p=(n-(l*i.length+5*(i.length-1)))/2;p=p<0?0:p;for(let e=0;e<i.length;e++)x.fillText(i[e]||"",r/2,p+f*e);e({url:x.canvas.toDataURL(),width:T,height:k})}function A(e){return`${d} ${h} ${f} ${e} ${p}`}return D()}))}var MutationObserver=getMutationObserver(),Watermark=class{constructor(e={}){__publicField(this,"options"),__publicField(this,"container"),__publicField(this,"watermarkContent"),__publicField(this,"watermarkDom"),__publicField(this,"style"),__publicField(this,"watermarkTag"),__publicField(this,"shadowRoot"),__publicField(this,"mutationObserver"),__publicField(this,"_isAgainRender",(e=>{if("attributes"===e.type){if(e.attributeName===attributeNameTag)return!0;if(this.watermarkTag===this._getNodeRandomId(e.target))return!0}return!(!e.removedNodes.length||this.watermarkTag!==this._getNodeRandomId(e.removedNodes[0]))})),__publicField(this,"_getNodeRandomId",(e=>{var t;return null==(t=null==e?void 0:e.dataset)?void 0:t[getDataSetKey(attributeNameTag)]})),__publicField(this,"_destroyMutationObserver",(()=>{this.mutationObserver&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.mutationObserver=null)})),__publicField(this,"_getWatermarkDom",(e=>__async(this,null,(function*(){this.watermarkDom||(this.watermarkDom=document.createElement("div")),"number"==typeof e&&e&&(this.style.height=`${e}px`);const t=yield getDrawPattern(this.options);if(null==t?void 0:t.url){const e=t.url;"repeat"===this.options.mode?this.style.backgroundImage=`url(${e})`:(this.style.backgroundImage=`url(${e}), url(${e})`,this.style.backgroundRepeat="repeat, repeat",this.style.backgroundPosition=`${t.width/2}px ${t.height/2}px, 0 0`),this.options.container||(this.style.position="fixed",this.style.height=void 0),this.watermarkDom.setAttribute("style",getStyleStr(this.style))}return this.watermarkDom.setAttribute(attributeNameTag,this.watermarkTag),this.watermarkDom})))),__publicField(this,"_getWatermarkHeight",(()=>{if(!this.container)return 0;let e=0;const{scrollHeight:t=0,clientHeight:r=0}=this.options.container?this.container.parentNode:this.container;return t>r&&(e=Math.max(t,r)),e})),this.options=Object.assign({},defaultOptions,e),this.style={position:"absolute",left:0,top:0,right:0,bottom:0,pointerEvents:"none",overflow:"hidden",backgroundColor:"transparent",backgroundRepeat:"repeat"},this.style.zIndex=this.options.zIndex,this.watermarkTag=getRandomId("watermark"),this.mutationObserver=null,this._render()}update(e={}){this.options=__spreadValues(__spreadValues({},this.options),e),this.style.zIndex=this.options.zIndex,this._render()}show(){this.watermarkDom&&(this.style.display="block",this.watermarkDom.setAttribute("style",getStyleStr(this.style)))}hide(){this.watermarkDom&&(this.style.display="none",this.watermarkDom.setAttribute("style",getStyleStr(this.style)))}destroy(){this.shadowRoot=void 0,this.watermarkContent&&(this.watermarkContent.remove(),this.watermarkContent=void 0),this.watermarkDom&&(this.watermarkDom.remove(),this.watermarkDom=void 0),this._destroyMutationObserver()}_render(){return __async(this,null,(function*(){this._destroyMutationObserver(),this.container=getContainer(this.options.container,this.watermarkTag,this.options.containerStyle,this.options.pack),this.watermarkContent||(this.watermarkContent=getContent(this.watermarkTag),this.container.append(this.watermarkContent));const e=this._getWatermarkHeight();if(this.watermarkDom=yield this._getWatermarkDom(e),this.watermarkContent){const e=this.watermarkContent.childNodes||[];for(let t=0;t<e.length;t++)this.watermarkContent.removeChild(e[t])}"function"==typeof this.watermarkContent.attachShadow?this.shadowRoot||(this.shadowRoot=this.watermarkContent.attachShadow({mode:"open"})):this.shadowRoot=this.watermarkContent,this.shadowRoot.append(this.watermarkDom),MutationObserver&&this.options.monitor&&(this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{if(this._isAgainRender(e))return this.destroy(),void this._render()}))})),this.mutationObserver.observe(this.container,observeOptions),this.shadowRoot&&this.mutationObserver.observe(this.shadowRoot,observeOptions))}))}},FileSaver_min=createCommonjsModule((function(e,t){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){s(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,t,a){var s=o.URL||o.webkitURL,c=document.createElement("a");t=t||e.name||"download",c.download=t,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?i(c):n(c.href)?r(e,t,a):i(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){i(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,a){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),o);else if(n(e))r(e,o,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var s="application/octet-stream"===e.type,c=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||s&&c||a)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},l.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);i?i.location=h:location.href=h,i=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});o.saveAs=s.saveAs=s,e.exports=s}()})),getComOptions=function(e){var t=_$1.cloneDeep(e),r=_$1.omit(t,["comData","source"]);return __assign$1({},r)},generateComponentList=function(e){if(0===e.length)return[];var t=function(e){for(var r,n=0;n<e.length;n++)e[n].tmpData&&(e[n]=Object.assign({},getComOptions(e[n]))),e[n]&&e[n].children&&(null===(r=e[n])||void 0===r?void 0:r.children.length)?t(e[n].children):e[n]&&e[n].dynamicChildren&&Array.from(e[n].dynamicChildren).forEach((function(e,r){t(e[1])}))};return t(e),e},generateCaseDataJson=function(e){var t=_$1.cloneDeep(e)?_$1.cloneDeep(e):{};"string"==typeof e&&(t=JSON.parse(e));var r=[];if(t instanceof Array)t.forEach((function(e,t){var n=JSON.parse(e.caseDetailData)?JSON.parse(e.caseDetailData):{},i=e.caseDetailPath,o=e.caseDetailName,a=n.theme,s=void 0===a?null:a,c=n.globalVars,u=void 0===c?null:c,l=n.shareVariableTree,d=void 0===l?null:l,h=n.plant,f=void 0===h?null:h,p=n.list,m=void 0===p?[]:p,g=n.path,v=void 0===g?"":g;n.name;var y=n.resource,_=void 0===y?{jspaths:[],csspaths:[],otherpaths:[]}:y,b=n.watermark,w=void 0===b?null:b,D=n.tw,S=void 0===D?null:D,x=n.globalSource,T=void 0===x?[]:x,k=n.globalEvents,P=void 0===k?[]:k,E=n.globalConstant,A=void 0===E?[]:E;r.push({path:v||i,theme:s,name:o,resource:_,tw:S,watermark:w,globalSource:T,globalVars:u,globalEvents:P,globalConstant:A,shareVariableTree:d,plant:f,list:generateComponentList(m)})}));else{var n=t.theme,i=void 0===n?null:n,o=t.globalVars,a=void 0===o?null:o,s=t.shareVariableTree,c=void 0===s?null:s,u=t.plant,l=void 0===u?null:u,d=t.list,h=void 0===d?[]:d,f=t.resource,p=void 0===f?{jspaths:[],csspaths:[],otherpaths:[]}:f,m=t.watermark,g=void 0===m?null:m,v=t.tw,y=void 0===v?null:v,_=t.globalSource,b=void 0===_?[]:_,w=t.globalEvents,D=void 0===w?[]:w,S=t.globalConstant,x=void 0===S?[]:S;r.push({resource:p,tw:y,watermark:g,globalSource:b,theme:i,globalVars:a,globalEvents:D,shareVariableTree:c,globalConstant:x,plant:l,list:generateComponentList(h)})}return r},generatePageData=function(e){var t={},r=t.theme,n=void 0===r?null:r,i=t.globalVars,o=void 0===i?null:i,a=t.shareVariableTree,s=void 0===a?null:a,c=t.plant,u=void 0===c?null:c,l=t.list,d=void 0===l?[]:l,h=t.undos,f=void 0===h?[]:h,p=t.undoRedoPointer,m=void 0===p?-1:p,g=t.globalEvents,v=void 0===g?[]:g;return e&&(n=e.theme,u=e.plant),{theme:n,globalVars:o,globalEvents:v,shareVariableTree:s,plant:u,undos:f,undoRedoPointer:m,list:generateComponentList(d)}},exportJson=function(e){var t=e.caseName,r=void 0===t?"case-name":t,n=e.caseImg,i=void 0===n?"":n,o=e.caseRemark,a=void 0===o?"":o,s=e.details,c=e.caseClientType,u=void 0===c?"":c,l=e.id,d={caseClientType:u,caseName:r,caseImg:i,caseRemark:a,caseId:void 0===l?"":l,createTime:moment().format("YYYY-MM-DD , h:mm:ss"),caseData:generateCaseDataJson(s)},h=new Blob([JSON.stringify(d)],{type:"json"});FileSaver_min.saveAs(h,r+".json")},generateJson=function(e){var t=e.caseName,r=void 0===t?"":t,n=e.caseData;return e.plangInfoForPsd,{caseName:r,createTime:moment().format("YYYY-MM-DD , h:mm:ss"),caseData:generateCaseDataJson(n)}};function elementError(e,t){throw new Error("".concat(e,":Expected HTMLElement, got ").concat(t))}var SizeAdaption=function(){function e(e){this.option=e,this.option.isResize&&window.addEventListener("resize",this.resize.bind(this))}return Object.defineProperty(e,"defaultOption",{get:function(){return e._defaultOption},set:function(t){e._defaultOption=t},enumerable:!1,configurable:!0}),e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.removeResize=function(){window.removeEventListener("resize",this.resize.bind(this))},e.prototype.resize=function(){var e=this.option,t=e.isEqualScale,r=e.wrapSelector,n=e.viewSelector,i=e.designWidth,o=e.designHeight,a=e.horizontal,s=e.vertical,c=document.querySelector(r);c||elementError("wrap",c);var u=c.clientWidth,l=c.clientHeight,d=document.querySelector(n);d||elementError("view",d),d.style.position="absolute",d.style.width=i+"px",d.style.height=o+"px";var h,f,p,m,g=Math.min(u/i,l/o);if(t){switch(d.style.transform="scale(".concat(g,")"),a){case"center":h=(u-i)/2+"px";break;case"left":h=(g-1)/2*i+"px";break;case"right":p=(g-1)/2*i+"px"}switch(s){case"center":f=(l-o)/2+"px";break;case"top":f=(g-1)/2*o+"px";break;case"bottom":m=(g-1)/2*o+"px"}}else d.style.transform="scale('".concat(u/i,", ").concat(l/o,"')"),h=(u-i)/2+"px",f=(l-o)/2+"px";f?d.style.top=f:m&&(d.style.bottom=m),h?d.style.left=h:p&&(d.style.right=p)},e._defaultOption={isEqualScale:!0,designWidth:1920,designHeight:1080,wrapSelector:"body",viewSelector:"#app",horizontal:"center",vertical:"center",isResize:!0},e}(),Scale=function(){function e(e){this.wrap=null,this.target=null,this.type=0,this.minRatio=1,this.outSize={w:0,h:0},this.inSize={w:0,h:0};var t=e.wrap,r=e.target,n=e.type,i=e.size,o=e.callback;this.size=i,this.type=n,this.initOptions(t,r,i),this.initSize(i),this.layout(),this.scale(o),window.addEventListener("resize",this.reset.bind(this,o))}return e.prototype.reset=function(e){this.initSize(this.size),this.layout(),e?this.scale(e):this.scale()},e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.removeResize=function(){window.removeEventListener("resize",this.reset.bind(this,void 0))},e.prototype.getDom=function(e){if(_$1.isElement(e))return e;var t=document.querySelector(e);return _$1.isElement(t)?t:null},e.prototype.initOptions=function(e,t,r){this.wrap=this.getDom(e),this.target=this.getDom(t),this.target.style.width=r.w+"px",this.target.style.height=r.h+"px",this.verificationDom()},e.prototype.initSize=function(e){this.outSize.w=this.wrap.clientWidth,this.outSize.h=this.wrap.clientHeight,this.inSize=e},e.prototype.verificationDom=function(){null!=this.wrap&&null!=this.target&&this.isChildOf(this.wrap,this.target)||console.warn("Please pass in the DOM element correctly!")},e.prototype.layout=function(){if(0==this.type||3==this.type){var e=(this.outSize.w-this.inSize.w)/2,t=(this.outSize.h-this.inSize.h)/2;this.target.style.top=t+"px",this.target.style.left=e+"px"}else this.wrap.style.display="flex",this.wrap.style["align-items"]="center",this.wrap.style["justify-content"]="center",this.target.style.position="static",1==this.type?(this.wrap.style["overflow-y"]="auto",this.wrap.style["overflow-x"]="hidden"):2==this.type&&(this.wrap.style["overflow-y"]="hidden",this.wrap.style["overflow-x"]="auto")},e.prototype.isChildOf=function(e,t){var r;if(e&&t)for(r=e.parentNode;r;){if(t===r)return!0;r=r.parentNode}return!1},e.prototype.scale=function(e){var t=1,r=1;switch(this.type){case 0:t=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h),r=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h);break;case 1:r=t=this.outSize.w/this.inSize.w;break;case 2:t=r=this.outSize.h/this.inSize.h;break;case 3:t=this.outSize.w/this.inSize.w,r=this.outSize.h/this.inSize.h}e&&e([t,r]),this.target.style.transform="scale(".concat(t,",").concat(r,")")},e.prototype.resize=function(){},e}(),domToImage=createCommonjsModule((function(e){!function(t){var r=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var r=e(t).toLowerCase();return(n="application/font-woff",i="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[r]||"";var n,i},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var r=window.atob(e.toDataURL().split(",")[1]),n=r.length,i=new Uint8Array(n),o=0;o<n;o++)i[o]=r.charCodeAt(o);t(new Blob([i],{type:"image/png"}))}))}(e)},resolveUrl:function(e,t){var r=document.implementation.createHTMLDocument(),n=r.createElement("base");r.head.appendChild(n);var i=r.createElement("a");return r.body.appendChild(i),n.href=t,i.href=e,i.href},getAndEncode:function(e){var t=3e4;s.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());return new Promise((function(r){var n,i=new XMLHttpRequest;if(i.onreadystatechange=a,i.ontimeout=c,i.responseType="blob",i.timeout=t,i.open("GET",e,!0),i.send(),s.impl.options.imagePlaceholder){var o=s.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(n=o[1])}function a(){if(4===i.readyState)if(200===i.status){var t=new FileReader;t.onloadend=function(){var e=t.result.split(/,/)[1];r(e)},t.readAsDataURL(i.response)}else n?r(n):u("cannot fetch resource: "+e+", status: "+i.status)}function c(){n?r(n):u("timeout of "+t+"ms occured while fetching resource: "+e)}function u(e){console.error(e),r("")}}))},uid:function(){var e=0;return function(){return"u"+t()+e++;function t(){return("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)}}}(),delay:function(e){return function(t){return new Promise((function(r){setTimeout((function(){r(t)}),e)}))}},asArray:function(e){for(var t=[],r=e.length,n=0;n<r;n++)t.push(e[n]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise((function(t,r){var n=new Image;n.onload=function(){t(n)},n.onerror=r,n.src=e}))},width:function(e){var r=t(e,"border-left-width"),n=t(e,"border-right-width");return e.scrollWidth+r+n},height:function(e){var r=t(e,"border-top-width"),n=t(e,"border-bottom-width");return e.scrollHeight+r+n}};function e(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function t(e,t){var r=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(r.replace("px",""))}}(),n=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,r,o){return a()?Promise.resolve(e):Promise.resolve(e).then(n).then((function(t){var n=Promise.resolve(e);return t.forEach((function(e){n=n.then((function(t){return i(t,e,r,o)}))})),n}));function a(){return!t(e)}},shouldProcess:t,impl:{readUrls:n,inline:i}};function t(t){return-1!==t.search(e)}function n(t){for(var n,i=[];null!==(n=e.exec(t));)i.push(n[1]);return i.filter((function(e){return!r.isDataUrl(e)}))}function i(e,t,n,i){return Promise.resolve(t).then((function(e){return n?r.resolveUrl(e,n):e})).then(i||r.getAndEncode).then((function(e){return r.dataAsUrl(e,r.mimeType(t))})).then((function(n){return e.replace(function(e){return new RegExp("(url\\(['\"]?)("+r.escape(e)+")(['\"]?\\))","g")}(t),"$1"+n+"$3")}))}}(),i=function(){return{resolveAll:function(){return e().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:e}};function e(){return Promise.resolve(r.asArray(document.styleSheets)).then((function(e){var t=[];return e.forEach((function(e){try{r.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return n.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return n.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function t(i){return i instanceof Element?o(i).then((function(){return i instanceof HTMLImageElement?e(i).inline():Promise.all(r.asArray(i.childNodes).map((function(e){return t(e)})))})):Promise.resolve(i);function o(e){var t=e.style.getPropertyValue("background");return t?n.inlineAll(t).then((function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))})).then((function(){return e})):Promise.resolve(e)}},impl:{newImage:e}};function e(e){return{inline:function(t){return r.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||r.getAndEncode).then((function(t){return r.dataAsUrl(t,r.mimeType(e.src))})).then((function(t){return new Promise((function(r,n){e.onload=r,e.onerror=n,e.src=t}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},s={toSvg:c,toPng:function(e,t){return u(e,t||{}).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return u(e,t=t||{}).then((function(e){return e.toDataURL("image/jpeg",t.quality||1)}))},toBlob:function(e,t){return u(e,t||{}).then(r.canvasToBlob)},toPixelData:function(e,t){return u(e,t||{}).then((function(t){return t.getContext("2d").getImageData(0,0,r.width(e),r.height(e)).data}))},impl:{fontFaces:i,images:o,util:r,inliner:n,options:{}}};function c(e,t){return function(e){void 0===e.imagePlaceholder?s.impl.options.imagePlaceholder=a.imagePlaceholder:s.impl.options.imagePlaceholder=e.imagePlaceholder;void 0===e.cacheBust?s.impl.options.cacheBust=a.cacheBust:s.impl.options.cacheBust=e.cacheBust}(t=t||{}),Promise.resolve(e).then((function(e){return l(e,t.filter,!0)})).then(d).then((function(e){t.bgcolor&&(e.style.backgroundColor=t.bgcolor);t.width&&(e.style.width=t.width+"px");t.height&&(e.style.height=t.height+"px");t.style&&Object.keys(t.style).forEach((function(r){e.style[r]=t.style[r]}));return e})).then((function(n){return function(e,t,n){return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(r.escapeXhtml).then((function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"})).then((function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+n+'">'+e+"</svg>"})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(n,t.width||r.width(e),t.height||r.height(e))}))}function u(e,t){return c(e,t).then(r.makeImage).then(r.delay(100)).then((function(n){var i=function(e){var n=document.createElement("canvas");if(n.width=t.width||r.width(e),n.height=t.height||r.height(e),t.bgcolor){var i=n.getContext("2d");i.fillStyle=t.bgcolor,i.fillRect(0,0,n.width,n.height)}return n}(e);return i.getContext("2d").drawImage(n,0,0),i}))}function l(e,t,n){return n||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?r.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(n){return function(e,t,n){var i=e.childNodes;return 0===i.length?Promise.resolve(t):o(t,r.asArray(i),n).then((function(){return t}));function o(e,t,r){var n=Promise.resolve();return t.forEach((function(t){n=n.then((function(){return l(t,r)})).then((function(t){t&&e.appendChild(t)}))})),n}}(e,n,t)})).then((function(t){return function(e,t){var n=t;return n instanceof Element?Promise.resolve().then(i).then(o).then(a).then(s).then(c).then((function(){return n})):n;function i(){if(n instanceof HTMLVideoElement){var t=window.getComputedStyle(e),r=document.createElement("canvas");r.width=parseInt(t.width,10),r.height=parseInt(t.height,10);var i=Math.max(e.videoWidth/r.width,e.videoHeight/r.height),o=e.videoWidth/i,a=e.videoHeight/i,s=r.width/2-o/2,c=r.height/2-a/2;r.getContext("2d").drawImage(e,s,c,o,a);var u=n=document.createElement("img");try{u.src=r.toDataURL()}catch(e){u.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="}}}function o(){function t(e,t){function n(e,t){r.asArray(e).forEach((function(r){t.setProperty(r,e.getPropertyValue(r),e.getPropertyPriority(r))}))}e.cssText?t.cssText=e.cssText:n(e,t)}t(window.getComputedStyle(e),n.style)}function a(){function t(t){var i=window.getComputedStyle(e,t),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var a=r.uid();n.className=n.className+" "+a;var s=document.createElement("style");s.appendChild(c(a,t,i)),n.appendChild(s)}function c(e,t,n){var i="."+e+":"+t,o=n.cssText?a(n):s(n);return document.createTextNode(i+"{"+o+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function s(e){return r.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){t(e)}))}function s(){e instanceof HTMLTextAreaElement&&(n.innerHTML=e.value),e instanceof HTMLInputElement&&n.setAttribute("value",e.value)}function c(){n instanceof SVGElement&&(n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n instanceof SVGRectElement&&["width","height"].forEach((function(e){var t=n.getAttribute(e);t&&n.style.setProperty(e,t)})))}}(e,t)})):Promise.resolve()}function d(e){return o.inlineAll(e).then((function(){return e}))}e.exports=s}()})),isURL=function(e){if(!e)return!1;return 1==new RegExp(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/).test(e)},ArrayBufferToBase64=function(e){for(var t="",r=new Uint8Array(e),n=r.byteLength,i=0;i<n;i++)t+=String.fromCharCode(r[i]);return"data:image/jpeg;base64,".concat(window.btoa(t))},dataURLtoFile=function(e,t){void 0===t&&(t="screenshot.jpeg");try{for(var r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]),o=i.length,a=new Uint8Array(o);o--;)a[o]=i.charCodeAt(o);return new File([a],t,{type:n})}catch(e){console.error("dataURLtoFile:数据转换错误 : "+e)}},transformData=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,11,,12]),"File"!=t||"string"!=typeof e?[3,2]:[4,dataURLtoFile(e)];case 1:case 3:case 5:case 7:return[2,n.sent()];case 2:return"File"!=t||"[object ArrayBuffer]"!=e.toString()?[3,4]:[4,new File([e],"screenshot.jpeg")];case 4:return"Base64"!=t||"string"!=typeof e?[3,6]:[4,e];case 6:return"Base64"!=t||"[object ArrayBuffer]"!=e.toString()?[3,8]:[4,ArrayBufferToBase64(e)];case 8:return[4,new Error("transformData: 转换发生错误")];case 9:throw n.sent();case 10:return[3,12];case 11:return r=n.sent(),console.log(r),[3,12];case 12:return[2]}}))}))},fetch=function(t,r,n,i){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e({url:t,method:"GET",responseType:"arraybuffer",params:{url:r,dom:n,quality:i}})];case 1:return[2,o.sent()];case 2:return o.sent(),console.warn("请求截图服务器发生错误,请检查地址及参数是否正确!",{url:t,path:r,dom:n,quality:i}),[2,null];case 3:return[2]}}))}))},domToImg=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r,n;return __generator(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!(r=document.querySelector(e)))throw new Error("domToImg:"+e+" dom未被找到!");return[4,domToImage.toJpeg(r,{style:{transform:"scale(1)",position:"static"},quality:t})];case 1:return[2,i.sent()];case 2:return n=i.sent(),console.warn(n),[3,3];case 3:return[2]}}))}))},screenshot=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,n,i,o,a,s,c;return __generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,11,,12]),t=e.dom,r=e.servePath,n=e.targetPath,i=e.quality,o=e.type,a=void 0,isURL(r)&&isURL(n)?[4,fetch(r,n,t,i||.5)]:[3,5];case 1:return(s=u.sent())&&200==s.status&&s.data?(a=s.data,[3,4]):[3,2];case 2:return console.warn("截取错误,请检查网络或服务地址配置是否正确,已转换为dom-to-img."),[4,domToImg(t,i||.5)];case 3:a=u.sent(),u.label=4;case 4:return[3,7];case 5:return console.warn("地址错误,请检查传入的地址是否争取,已转换为dom-to-img."),[4,domToImg(t,i||.5)];case 6:a=u.sent(),u.label=7;case 7:return a?[4,transformData(a,o)]:[3,9];case 8:return[2,u.sent()];case 9:return[2,null];case 10:return[3,12];case 11:return c=u.sent(),console.error("截图发生错误:"+c),[2,null];case 12:return[2]}}))}))},toHex=function(e){return"".concat(e>15?"":0).concat(e.toString(16))},toHexString=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=void 0===i?1:i;return"#".concat(toHex(t)).concat(toHex(r)).concat(toHex(n)).concat(1===o?"":toHex(Math.floor(255*o)))},toRgbString=function(e){var t=e.r,r=e.g,n=e.b;return"rgb(".concat(t,",").concat(r,",").concat(n,")")},toRgbaString=function(e,t){void 0===t&&(t=1e4);var r=e.r,n=e.g,i=e.b,o=e.a,a=void 0===o?1:o;return"rgba(".concat(r,",").concat(n,",").concat(i,",").concat(Math.floor(a*t)/t,")")},parseHexColor=function(e){var t=e.slice(1),r=1;3===t.length&&(t="".concat(t[0]).concat(t[0]).concat(t[1]).concat(t[1]).concat(t[2]).concat(t[2])),8===t.length&&(r=parseInt(t.slice(6),16)/255,t=t.slice(0,6));var n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:255&n,a:r}},parseRgbaColor=function(e){var t=e.match(/(\d(\.\d+)?)+/g)||[],r=t.map((function(e){return parseInt(e,10)}));return{r:r[0],g:r[1],b:r[2],a:parseFloat(t[3])}},parseColorString=function(e){if(e.startsWith("#"))return parseHexColor(e);if(e.startsWith("rgb"))return parseRgbaColor(e);if("transparent"===e)return parseHexColor("#00000000");throw new Error("color string error: ".concat(e))},getColorInfo=function(e){var t=parseColorString(e);return{hex:toHexString(t),rgba:toRgbaString(t),rgb:toRgbString(t),rgbaObj:t}},hexToRgba=function(e){var t=parseColorString(e);return toRgbaString(t)},rgbaToHex=function(e){var t=parseColorString(e);return toHexString(t)},errCode=new Map([["E1001","系统未知错误"],["E1002","vue逻辑错误"],["E1003","JavaScript错误"],["E1004","静态资源加载错误"],["E1005","请求错误"],["E1006","Promise错误"]]),watchError=function(e,t){e.config.errorHandler=function(e){console.error("监测到E1002错误"),console.error(e.filename),errorHandler("E1002",e.name+":"+e.message,t)},window.addEventListener("error",(function(e){e.message?(console.error("监测到E1003错误"),errorHandler("E1003",e.message,e.filename,t)):(console.error("监测到E1004错误"),errorHandler("E1004",e.target.currentSrc,e.filename,t))}),!0)},errorHandler=function(e,t,r,n){void 0===n&&(n="null"),saveLog({code:e,type:errCode.get("".concat(e)),msg:t,router:r.currentRoute.value.fullPath,file:n,createTime:(new Date).toLocaleString()})},saveLog=function(e){var t=localStorage.getItem("ERROR");if(t){var r=JSON.parse(t);sortArray(r),r.length>50?(r[0]=e,sortArray(r)):r.push(e),localStorage.setItem("ERROR",JSON.stringify(r))}else localStorage.setItem("ERROR",JSON.stringify([e]))},sortArray=function(e){e.sort((function(e,t){return e.createTime>t.createTime?1:-1}))},index$1=Object.freeze({__proto__:null,RecursiveList:RecursiveList,Scale:Scale,SizeAdaption:SizeAdaption,UpdataForContainer:UpdataForContainer,Watermark:Watermark,arraySwap:arraySwap,arraySwapDeep:arraySwapDeep,arraySwapForId:arraySwapForId,breakUp:breakUp,checkBaseData:checkBaseData,checkVar:checkVar,comToggle:comToggle,decrypAES:decrypAES,decrypt:decrypt,encrypt:encrypt$1,errorHandler:errorHandler,executeFilter:executeFilter,exportJson:exportJson,findItem:findItem,findItemDeep:findItemDeep$1,findItemIndexDeep:findItemIndexDeep,findParentDeep:findParentDeep,genCopyName:genCopyName,genID:genID,generateCaseDataJson:generateCaseDataJson,generateComponentList:generateComponentList,generateJson:generateJson,generatePageData:generatePageData,getAncestorsNodes:getAncestorsNodes,getColorInfo:getColorInfo,getDataForEvaluator:getDataForEvaluator,getInteractive:getInteractive,getInteractive2:getInteractive2,getLength:getLength,getPosition:getPosition,getSessionData:getSessionData,getShareTree:getShareTree,getStandardData:getStandardData,getUrlParams:getUrlParams,globalSourceTemp:globalSourceTemp,hasVar:hasVar,hexToRgba:hexToRgba,isJSON:isJSON,isPeer:isPeer,loadFont:loadFont,loadFontResource:loadFontResource,loadFontTag:loadFontTag,loadScript:loadScript,loadTag:loadTag,parseColorString:parseColorString,parseHexColor:parseHexColor,parseRgbaColor:parseRgbaColor,recursion:recursion,removeTag:removeTag,resetID:resetID,resetPositionForGroup:resetPositionForGroup,resizeListPosition:resizeListPosition,resizePosition:resizePosition,resziePositionForGroup:resziePositionForGroup,rgbaToHex:rgbaToHex,safeConvertToNumber:safeConvertToNumber,safeEval:safeEval,screenshot:screenshot,selectdArea:selectdArea,setActions:setActions,setAttr:setAttr,setIndex:setIndex,setPorp:setPorp,setPositionForGroup:setPositionForGroup,setPositionForWorld:setPositionForWorld,setSessionData:setSessionData,toHex:toHex,toHexString:toHexString,toRgbString:toRgbString,toRgbaString:toRgbaString,transformPosition:transformPosition,upDataGroup:upDataGroup,upDataGroupChildren:upDataGroupChildren,updataAttribute:updataAttribute,updataAttributeForOption:updataAttributeForOption,updataSizeDeep:updataSizeDeep,validateAndFixObject:validateAndFixObject,watchError:watchError});function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}
|
|
44
|
+
***************************************************************************** */function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)};function __spreadArray(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,keys=Object.keys,isArray=Array.isArray;function extend(e,t){return"object"!=typeof t||keys(t).forEach((function(r){e[r]=t[r]})),e}"undefined"==typeof Promise||_global.Promise||(_global.Promise=Promise);var getProto=Object.getPrototypeOf,_hasOwn={}.hasOwnProperty;function hasOwn(e,t){return _hasOwn.call(e,t)}function props(e,t){"function"==typeof t&&(t=t(getProto(e))),("undefined"==typeof Reflect?keys:Reflect.ownKeys)(t).forEach((function(r){setProp(e,r,t[r])}))}var defineProperty=Object.defineProperty;function setProp(e,t,r,n){defineProperty(e,t,extend(r&&hasOwn(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function derive(e){return{from:function(t){return e.prototype=Object.create(t.prototype),setProp(e.prototype,"constructor",e),{extend:props.bind(null,e.prototype)}}}}var getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;function getPropertyDescriptor(e,t){var r;return getOwnPropertyDescriptor(e,t)||(r=getProto(e))&&getPropertyDescriptor(r,t)}var _slice$1=[].slice;function slice(e,t,r){return _slice$1.call(e,t,r)}function override(e,t){return t(e)}function assert(e){if(!e)throw new Error("Assertion Failed")}function asap$1(e){_global.setImmediate?setImmediate(e):setTimeout(e,0)}function arrayToObject(e,t){return e.reduce((function(e,r,n){var i=t(r,n);return i&&(e[i[0]]=i[1]),e}),{})}function getByKeyPath(e,t){if("string"==typeof t&&hasOwn(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,i=t.length;n<i;++n){var o=getByKeyPath(e,t[n]);r.push(o)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return null==s?void 0:getByKeyPath(s,t.substr(a+1))}}function setByKeyPath(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){assert("string"!=typeof r&&"length"in r);for(var n=0,i=t.length;n<i;++n)setByKeyPath(e,t[n],r[n])}else{var o=t.indexOf(".");if(-1!==o){var a=t.substr(0,o),s=t.substr(o+1);if(""===s)void 0===r?isArray(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var l=e[a];l&&hasOwn(e,a)||(l=e[a]={}),setByKeyPath(l,s,r)}}else void 0===r?isArray(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function delByKeyPath(e,t){"string"==typeof t?setByKeyPath(e,t,void 0):"length"in t&&[].map.call(t,(function(t){setByKeyPath(e,t,void 0)}))}function shallowClone(e){var t={};for(var r in e)hasOwn(e,r)&&(t[r]=e[r]);return t}var concat=[].concat;function flatten(e){return concat.apply([],e)}var intrinsicTypeNames="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(flatten([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return _global[e]})),intrinsicTypes=new Set(intrinsicTypeNames.map((function(e){return _global[e]})));function cloneSimpleObjectTree(e){var t={};for(var r in e)if(hasOwn(e,r)){var n=e[r];t[r]=!n||"object"!=typeof n||intrinsicTypes.has(n.constructor)?n:cloneSimpleObjectTree(n)}return t}function objectIsEmpty(e){for(var t in e)if(hasOwn(e,t))return!1;return!0}var circularRefs=null;function deepClone(e){circularRefs=new WeakMap;var t=innerDeepClone(e);return circularRefs=null,t}function innerDeepClone(e){if(!e||"object"!=typeof e)return e;var t=circularRefs.get(e);if(t)return t;if(isArray(e)){t=[],circularRefs.set(e,t);for(var r=0,n=e.length;r<n;++r)t.push(innerDeepClone(e[r]))}else if(intrinsicTypes.has(e.constructor))t=e;else{var i=getProto(e);for(var o in t=i===Object.prototype?{}:Object.create(i),circularRefs.set(e,t),e)hasOwn(e,o)&&(t[o]=innerDeepClone(e[o]))}return t}var toString={}.toString;function toStringTag(e){return toString.call(e).slice(8,-1)}var iteratorSymbol="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",getIteratorOf="symbol"==typeof iteratorSymbol?function(e){var t;return null!=e&&(t=e[iteratorSymbol])&&t.apply(e)}:function(){return null};function delArrayItem(e,t){var r=e.indexOf(t);return r>=0&&e.splice(r,1),r>=0}var NO_CHAR_ARRAY={};function getArrayOf(e){var t,r,n,i;if(1===arguments.length){if(isArray(e))return e.slice();if(this===NO_CHAR_ARRAY&&"string"==typeof e)return[e];if(i=getIteratorOf(e)){for(r=[];!(n=i.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=new Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}var isAsyncFunction="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dexieErrorNames=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],idbDomErrorNames=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],errorList=dexieErrorNames.concat(idbDomErrorNames),defaultTexts={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function DexieError(e,t){this.name=e,this.message=t}function getMultiErrorMessage(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,r){return r.indexOf(e)===t})).join("\n")}function ModifyError(e,t,r,n){this.failures=t,this.failedKeys=n,this.successCount=r,this.message=getMultiErrorMessage(e,t)}function BulkError(e,t){this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=getMultiErrorMessage(e,this.failures)}derive(DexieError).from(Error).extend({toString:function(){return this.name+": "+this.message}}),derive(ModifyError).from(DexieError),derive(BulkError).from(DexieError);var errnames=errorList.reduce((function(e,t){return e[t]=t+"Error",e}),{}),BaseException=DexieError,exceptions=errorList.reduce((function(e,t){var r=t+"Error";function n(e,n){this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=defaultTexts[t]||r,this.inner=null)}return derive(n).from(BaseException),e[t]=n,e}),{});exceptions.Syntax=SyntaxError,exceptions.Type=TypeError,exceptions.Range=RangeError;var exceptionMap=idbDomErrorNames.reduce((function(e,t){return e[t+"Error"]=exceptions[t],e}),{});function mapError(e,t){if(!e||e instanceof DexieError||e instanceof TypeError||e instanceof SyntaxError||!e.name||!exceptionMap[e.name])return e;var r=new exceptionMap[e.name](t||e.message,e);return"stack"in e&&setProp(r,"stack",{get:function(){return this.inner.stack}}),r}var fullNameExceptions=errorList.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=exceptions[t]),e}),{});function nop(){}function mirror(e){return e}function pureFunctionChain(e,t){return null==e||e===mirror?t:function(r){return t(e(r))}}function callBoth(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function hookCreatingChain(e,t){return e===nop?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?callBoth(n,this.onsuccess):n),i&&(this.onerror=this.onerror?callBoth(i,this.onerror):i),void 0!==o?o:r}}function hookDeletingChain(e,t){return e===nop?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?callBoth(r,this.onsuccess):r),n&&(this.onerror=this.onerror?callBoth(n,this.onerror):n)}}function hookUpdatingChain(e,t){return e===nop?t:function(r){var n=e.apply(this,arguments);extend(r,n);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?callBoth(i,this.onsuccess):i),o&&(this.onerror=this.onerror?callBoth(o,this.onerror):o),void 0===n?void 0===a?void 0:a:extend(n,a)}}function reverseStoppableEventChain(e,t){return e===nop?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function promisableChain(e,t){return e===nop?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return r.then((function(){return t.apply(n,o)}))}return t.apply(this,arguments)}}fullNameExceptions.ModifyError=ModifyError,fullNameExceptions.DexieError=DexieError,fullNameExceptions.BulkError=BulkError;var debug="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function setDebug(e,t){debug=e}var INTERNAL={},ZONE_ECHO_LIMIT=100,_a$1="undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,getProto(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,getProto(t),e]}(),resolvedNativePromise=_a$1[0],nativePromiseProto=_a$1[1],resolvedGlobalPromise=_a$1[2],nativePromiseThen=nativePromiseProto&&nativePromiseProto.then,NativePromise=resolvedNativePromise&&resolvedNativePromise.constructor,patchGlobalPromise=!!resolvedGlobalPromise;function schedulePhysicalTick(){queueMicrotask(physicalTick)}var asap=function(e,t){microtickQueue.push([e,t]),needsNewPhysicalTick&&(schedulePhysicalTick(),needsNewPhysicalTick=!1)},isOutsideMicroTick=!0,needsNewPhysicalTick=!0,unhandledErrors=[],rejectingErrors=[],rejectionMapper=mirror,globalPSD={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:nop,pgp:!1,env:{},finalize:nop},PSD=globalPSD,microtickQueue=[],numScheduledCalls=0,tickFinalizers=[];function DexiePromise(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=PSD;if("function"!=typeof e){if(e!==INTERNAL)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&handleRejection(this,this._value))}this._state=null,this._value=null,++t.ref,executePromiseTask(this,e)}var thenProp={get:function(){var e=PSD,t=totalEchoes;function r(r,n){var i=this,o=!e.global&&(e!==PSD||t!==totalEchoes),a=o&&!decrementExpectedAwaits(),s=new DexiePromise((function(t,s){propagateToListener(i,new Listener(nativeAwaitCompatibleWrap(r,e,o,a),nativeAwaitCompatibleWrap(n,e,o,a),t,s,e))}));return this._consoleTask&&(s._consoleTask=this._consoleTask),s}return r.prototype=INTERNAL,r},set:function(e){setProp(this,"then",e&&e.prototype===INTERNAL?thenProp:{get:function(){return e},set:thenProp.set})}};function Listener(e,t,r,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=i}function executePromiseTask(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&beginMicroTickScope();t&&"function"==typeof t.then?executePromiseTask(e,(function(e,r){t instanceof DexiePromise?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,propagateAllListeners(e)),r&&endMicroTickScope()}}),handleRejection.bind(null,e))}catch(t){handleRejection(e,t)}}function handleRejection(e,t){if(rejectingErrors.push(t),null===e._state){var r=e._lib&&beginMicroTickScope();t=rejectionMapper(t),e._state=!1,e._value=t,addPossiblyUnhandledError(e),propagateAllListeners(e),r&&endMicroTickScope()}}function propagateAllListeners(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)propagateToListener(e,t[r]);var i=e._PSD;--i.ref||i.finalize(),0===numScheduledCalls&&(++numScheduledCalls,asap((function(){0==--numScheduledCalls&&finalizePhysicalTick()}),[]))}function propagateToListener(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++numScheduledCalls,asap(callListener,[r,e,t])}else e._listeners.push(t)}function callListener(e,t,r){try{var n,i=t._value;!t._state&&rejectingErrors.length&&(rejectingErrors=[]),n=debug&&t._consoleTask?t._consoleTask.run((function(){return e(i)})):e(i),t._state||-1!==rejectingErrors.indexOf(i)||markErrorAsHandled(t),r.resolve(n)}catch(e){r.reject(e)}finally{0==--numScheduledCalls&&finalizePhysicalTick(),--r.psd.ref||r.psd.finalize()}}function physicalTick(){usePSD(globalPSD,(function(){beginMicroTickScope()&&endMicroTickScope()}))}function beginMicroTickScope(){var e=isOutsideMicroTick;return isOutsideMicroTick=!1,needsNewPhysicalTick=!1,e}function endMicroTickScope(){var e,t,r;do{for(;microtickQueue.length>0;)for(e=microtickQueue,microtickQueue=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(microtickQueue.length>0);isOutsideMicroTick=!0,needsNewPhysicalTick=!0}function finalizePhysicalTick(){var e=unhandledErrors;unhandledErrors=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=tickFinalizers.slice(0),r=t.length;r;)t[--r]()}function run_at_end_of_this_or_next_physical_tick(e){tickFinalizers.push((function t(){e(),tickFinalizers.splice(tickFinalizers.indexOf(t),1)})),++numScheduledCalls,asap((function(){0==--numScheduledCalls&&finalizePhysicalTick()}),[])}function addPossiblyUnhandledError(e){unhandledErrors.some((function(t){return t._value===e._value}))||unhandledErrors.push(e)}function markErrorAsHandled(e){for(var t=unhandledErrors.length;t;)if(unhandledErrors[--t]._value===e._value)return void unhandledErrors.splice(t,1)}function PromiseReject(e){return new DexiePromise(INTERNAL,!1,e)}function wrap$1(e,t){var r=PSD;return function(){var n=beginMicroTickScope(),i=PSD;try{return switchToZone(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{switchToZone(i,!1),n&&endMicroTickScope()}}}props(DexiePromise.prototype,{then:thenProp,_then:function(e,t){propagateToListener(this,new Listener(null,null,e,t,PSD))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,(function(e){return e instanceof t?r(e):PromiseReject(e)})):this.then(null,(function(e){return e&&e.name===t?r(e):PromiseReject(e)}))},finally:function(e){return this.then((function(t){return DexiePromise.resolve(e()).then((function(){return t}))}),(function(t){return DexiePromise.resolve(e()).then((function(){return PromiseReject(t)}))}))},timeout:function(e,t){var r=this;return e<1/0?new DexiePromise((function(n,i){var o=setTimeout((function(){return i(new exceptions.Timeout(t))}),e);r.then(n,i).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&setProp(DexiePromise.prototype,Symbol.toStringTag,"Dexie.Promise"),globalPSD.env=snapShot(),props(DexiePromise,{all:function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((function(i,o){return DexiePromise.resolve(i).then((function(r){e[o]=r,--n||t(e)}),r)}))}))},resolve:function(e){return e instanceof DexiePromise?e:e&&"function"==typeof e.then?new DexiePromise((function(t,r){e.then(t,r)})):new DexiePromise(INTERNAL,!0,e)},reject:PromiseReject,race:function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){e.map((function(e){return DexiePromise.resolve(e).then(t,r)}))}))},PSD:{get:function(){return PSD},set:function(e){return PSD=e}},totalEchoes:{get:function(){return totalEchoes}},newPSD:newScope,usePSD:usePSD,scheduler:{get:function(){return asap},set:function(e){asap=e}},rejectionMapper:{get:function(){return rejectionMapper},set:function(e){rejectionMapper=e}},follow:function(e,t){return new DexiePromise((function(r,n){return newScope((function(t,r){var n=PSD;n.unhandleds=[],n.onunhandled=r,n.finalize=callBoth((function(){var e=this;run_at_end_of_this_or_next_physical_tick((function(){0===e.unhandleds.length?t():r(e.unhandleds[0])}))}),n.finalize),e()}),t,r,n)}))}}),NativePromise&&(NativePromise.allSettled&&setProp(DexiePromise,"allSettled",(function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t){0===e.length&&t([]);var r=e.length,n=new Array(r);e.forEach((function(e,i){return DexiePromise.resolve(e).then((function(e){return n[i]={status:"fulfilled",value:e}}),(function(e){return n[i]={status:"rejected",reason:e}})).then((function(){return--r||t(n)}))}))}))})),NativePromise.any&&"undefined"!=typeof AggregateError&&setProp(DexiePromise,"any",(function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){0===e.length&&r(new AggregateError([]));var n=e.length,i=new Array(n);e.forEach((function(e,o){return DexiePromise.resolve(e).then((function(e){return t(e)}),(function(e){i[o]=e,--n||r(new AggregateError(i))}))}))}))})));var task={awaits:0,echoes:0,id:0},taskCounter=0,zoneStack=[],zoneEchoes=0,totalEchoes=0,zone_id_counter=0;function newScope(e,t,r,n){var i=PSD,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++zone_id_counter,globalPSD.env,o.env=patchGlobalPromise?{Promise:DexiePromise,PromiseProp:{value:DexiePromise,configurable:!0,writable:!0},all:DexiePromise.all,race:DexiePromise.race,allSettled:DexiePromise.allSettled,any:DexiePromise.any,resolve:DexiePromise.resolve,reject:DexiePromise.reject}:{},t&&extend(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=usePSD(o,e,r,n);return 0===o.ref&&o.finalize(),a}function incrementExpectedAwaits(){return task.id||(task.id=++taskCounter),++task.awaits,task.echoes+=ZONE_ECHO_LIMIT,task.id}function decrementExpectedAwaits(){return!!task.awaits&&(0==--task.awaits&&(task.id=0),task.echoes=task.awaits*ZONE_ECHO_LIMIT,!0)}function onPossibleParallellAsync(e){return task.echoes&&e&&e.constructor===NativePromise?(incrementExpectedAwaits(),e.then((function(e){return decrementExpectedAwaits(),e}),(function(e){return decrementExpectedAwaits(),rejection(e)}))):e}function zoneEnterEcho(e){++totalEchoes,task.echoes&&0!=--task.echoes||(task.echoes=task.awaits=task.id=0),zoneStack.push(PSD),switchToZone(e,!0)}function zoneLeaveEcho(){var e=zoneStack[zoneStack.length-1];zoneStack.pop(),switchToZone(e,!1)}function switchToZone(e,t){var r=PSD;if((t?!task.echoes||zoneEchoes++&&e===PSD:!zoneEchoes||--zoneEchoes&&e===PSD)||queueMicrotask(t?zoneEnterEcho.bind(null,e):zoneLeaveEcho),e!==PSD&&(PSD=e,r===globalPSD&&(globalPSD.env=snapShot()),patchGlobalPromise)){var n=globalPSD.env.Promise,i=e.env;(r.global||e.global)&&(Object.defineProperty(_global,"Promise",i.PromiseProp),n.all=i.all,n.race=i.race,n.resolve=i.resolve,n.reject=i.reject,i.allSettled&&(n.allSettled=i.allSettled),i.any&&(n.any=i.any))}}function snapShot(){var e=_global.Promise;return patchGlobalPromise?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(_global,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function usePSD(e,t,r,n,i){var o=PSD;try{return switchToZone(e,!0),t(r,n,i)}finally{switchToZone(o,!1)}}function nativeAwaitCompatibleWrap(e,t,r,n){return"function"!=typeof e?e:function(){var i=PSD;r&&incrementExpectedAwaits(),switchToZone(t,!0);try{return e.apply(this,arguments)}finally{switchToZone(i,!1),n&&queueMicrotask(decrementExpectedAwaits)}}}function execInGlobalContext(e){Promise===NativePromise&&0===task.echoes?0===zoneEchoes?e():enqueueNativeMicroTask(e):setTimeout(e,0)}-1===(""+nativePromiseThen).indexOf("[native code]")&&(incrementExpectedAwaits=decrementExpectedAwaits=nop);var rejection=DexiePromise.reject;function tempTransaction(e,t,r,n){if(e.idbdb&&(e._state.openComplete||PSD.letThrough||e._vip)){var i=e._createTransaction(t,r,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===errnames.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e.close({disableAutoOpen:!1}),e.open().then((function(){return tempTransaction(e,t,r,n)}))):rejection(i)}return i._promise(t,(function(e,t){return newScope((function(){return PSD.trans=i,n(e,t,i)}))})).then((function(e){if("readwrite"===t)try{i.idbtrans.commit()}catch(e){}return"readonly"===t?e:i._completion.then((function(){return e}))}))}if(e._state.openComplete)return rejection(new exceptions.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._state.autoOpen)return rejection(new exceptions.DatabaseClosed);e.open().catch(nop)}return e._state.dbReadyPromise.then((function(){return tempTransaction(e,t,r,n)}))}var DEXIE_VERSION="4.0.4",maxString=String.fromCharCode(65535),minKey=-1/0,INVALID_KEY_ARGUMENT="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",STRING_EXPECTED="String expected.",connections=[],DBNAMES_DB="__dbnames",READONLY="readonly",READWRITE="readwrite";function combine(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var AnyRange={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function workaroundForUndefinedPrimKey(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=deepClone(t))[e],t}}function Entity(){throw exceptions.Type()}function cmp(e,t){try{var r=type(e),n=type(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return compareUint8Arrays(getUint8Array(e),getUint8Array(t));case"Array":return compareArrays(e,t)}}catch(e){}return NaN}function compareArrays(e,t){for(var r=e.length,n=t.length,i=r<n?r:n,o=0;o<i;++o){var a=cmp(e[o],t[o]);if(0!==a)return a}return r===n?0:r<n?-1:1}function compareUint8Arrays(e,t){for(var r=e.length,n=t.length,i=r<n?r:n,o=0;o<i;++o)if(e[o]!==t[o])return e[o]<t[o]?-1:1;return r===n?0:r<n?-1:1}function type(e){var t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var r=toStringTag(e);return"ArrayBuffer"===r?"binary":r}function getUint8Array(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var Table=function(){function e(){}return e.prototype._trans=function(e,t,r){var n=this._tx||PSD.trans,i=this.name,o=debug&&"undefined"!=typeof console&&console.createTask&&console.createTask("Dexie: ".concat("readonly"===e?"read":"write"," ").concat(this.name));function a(e,r,n){if(!n.schema[i])throw new exceptions.NotFound("Table "+i+" not part of transaction");return t(n.idbtrans,n)}var s=beginMicroTickScope();try{var l=n&&n.db._novip===this.db._novip?n===PSD.trans?n._promise(e,a,r):newScope((function(){return n._promise(e,a,r)}),{trans:n,transless:PSD.transless||PSD}):tempTransaction(this.db,e,[this.name],a);return o&&(l._consoleTask=o,l=l.catch((function(e){return console.trace(e),rejection(e)}))),l}finally{s&&endMicroTickScope()}},e.prototype.get=function(e,t){var r=this;return e&&e.constructor===Object?this.where(e).first(t):null==e?rejection(new exceptions.Type("Invalid argument to Table.get()")):this._trans("readonly",(function(t){return r.core.get({trans:t,key:e}).then((function(e){return r.hook.reading.fire(e)}))})).then(t)},e.prototype.where=function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(isArray(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=keys(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){if(e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))){for(var r=0;r<t.length;++r)if(-1===t.indexOf(e.keyPath[r]))return!1;return!0}return!1})).sort((function(e,t){return e.keyPath.length-t.keyPath.length}))[0];if(r&&this.db._maxKey!==maxString){var n=r.keyPath.slice(0,t.length);return this.where(n).equals(n.map((function(t){return e[t]})))}!r&&debug&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var i=this.schema.idxByName,o=this.db._deps.indexedDB;function a(e,t){return 0===o.cmp(e,t)}var s=t.reduce((function(t,r){var n=t[0],o=t[1],s=i[r],l=e[r];return[n||s,n||!s?combine(o,s&&s.multi?function(e){var t=getByKeyPath(e,r);return isArray(t)&&t.some((function(e){return a(l,e)}))}:function(e){return a(l,getByKeyPath(e,r))}):o]}),[null,null]),l=s[0],c=s[1];return l?this.where(l.name).equals(e[l.keyPath]).filter(c):r?this.filter(c):this.where(t).equals("")},e.prototype.filter=function(e){return this.toCollection().and(e)},e.prototype.count=function(e){return this.toCollection().count(e)},e.prototype.offset=function(e){return this.toCollection().offset(e)},e.prototype.limit=function(e){return this.toCollection().limit(e)},e.prototype.each=function(e){return this.toCollection().each(e)},e.prototype.toArray=function(e){return this.toCollection().toArray(e)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,isArray(e)?"[".concat(e.join("+"),"]"):e))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(e){var t=this.db,r=this.name;this.schema.mappedClass=e,e.prototype instanceof Entity&&(e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return __extends(n,e),Object.defineProperty(n.prototype,"db",{get:function(){return t},enumerable:!1,configurable:!0}),n.prototype.table=function(){return r},n}(e));for(var n=new Set,i=e.prototype;i;i=getProto(i))Object.getOwnPropertyNames(i).forEach((function(e){return n.add(e)}));var o=function(t){if(!t)return t;var r=Object.create(e.prototype);for(var i in t)if(!n.has(i))try{r[i]=t[i]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=o,this.hook("reading",o),e},e.prototype.defineClass=function(){return this.mapToClass((function(e){extend(this,e)}))},e.prototype.add=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=workaroundForUndefinedPrimKey(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{setByKeyPath(e,o,t)}catch(e){}return t}))},e.prototype.update=function(e,t){if("object"!=typeof e||isArray(e))return this.where(":id").equals(e).modify(t);var r=getByKeyPath(e,this.schema.primKey.keyPath);return void 0===r?rejection(new exceptions.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(t)},e.prototype.put=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=workaroundForUndefinedPrimKey(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{setByKeyPath(e,o,t)}catch(e){}return t}))},e.prototype.delete=function(e){var t=this;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):void 0}))},e.prototype.clear=function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:AnyRange})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):void 0}))},e.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",(function(r){return t.core.getMany({keys:e,trans:r}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))},e.prototype.bulkAdd=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new exceptions.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length");var l=e.length,c=s&&a?e.map(workaroundForUndefinedPrimKey(s)):e;return n.core.mutate({trans:t,type:"add",keys:i,values:c,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new BulkError("".concat(n.name,".bulkAdd(): ").concat(t," of ").concat(l," operations failed"),a)}))}))},e.prototype.bulkPut=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new exceptions.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length");var l=e.length,c=s&&a?e.map(workaroundForUndefinedPrimKey(s)):e;return n.core.mutate({trans:t,type:"put",keys:i,values:c,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new BulkError("".concat(n.name,".bulkPut(): ").concat(t," of ").concat(l," operations failed"),a)}))}))},e.prototype.bulkUpdate=function(e){var t=this,r=this.core,n=e.map((function(e){return e.key})),i=e.map((function(e){return e.changes})),o=[];return this._trans("readwrite",(function(a){return r.getMany({trans:a,keys:n,cache:"clone"}).then((function(s){var l=[],c=[];e.forEach((function(e,r){var n=e.key,i=e.changes,a=s[r];if(a){for(var u=0,h=Object.keys(i);u<h.length;u++){var d=h[u],f=i[d];if(d===t.schema.primKey.keyPath){if(0!==cmp(f,n))throw new exceptions.Constraint("Cannot update primary key in bulkUpdate()")}else setByKeyPath(a,d,f)}o.push(r),l.push(n),c.push(a)}}));var u=l.length;return r.mutate({trans:a,type:"put",keys:l,values:c,updates:{keys:n,changeSpecs:i}}).then((function(e){var r=e.numFailures,n=e.failures;if(0===r)return u;for(var i=0,a=Object.keys(n);i<a.length;i++){var s=a[i],l=o[Number(s)];if(null!=l){var c=n[s];delete n[s],n[l]=c}}throw new BulkError("".concat(t.name,".bulkUpdate(): ").concat(r," of ").concat(u," operations failed"),n)}))}))}))},e.prototype.bulkDelete=function(e){var t=this,r=e.length;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:e})})).then((function(e){var n=e.numFailures,i=e.lastResult,o=e.failures;if(0===n)return i;throw new BulkError("".concat(t.name,".bulkDelete(): ").concat(n," of ").concat(r," operations failed"),o)}))},e}();function Events(e){var t={},r=function(r,n){if(n){for(var i=arguments.length,o=new Array(i-1);--i;)o[i-1]=arguments[i];return t[r].subscribe.apply(null,o),e}if("string"==typeof r)return t[r]};r.addEventType=o;for(var n=1,i=arguments.length;n<i;++n)o(arguments[n]);return r;function o(e,n,i){if("object"!=typeof e){var a;n||(n=reverseStoppableEventChain),i||(i=nop);var s={subscribers:[],fire:i,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=n(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter((function(t){return t!==e})),s.fire=s.subscribers.reduce(n,i)}};return t[e]=r[e]=s,s}keys(a=e).forEach((function(e){var t=a[e];if(isArray(t))o(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new exceptions.InvalidArgument("Invalid event config");var r=o(e,mirror,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){asap$1((function(){e.apply(null,t)}))}))}))}}))}}function makeClassConstructor(e,t){return derive(t).from({prototype:e}),t}function createTableConstructor(e){return makeClassConstructor(Table.prototype,(function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:Events(null,{creating:[hookCreatingChain,nop],reading:[pureFunctionChain,mirror],updating:[hookUpdatingChain,nop],deleting:[hookDeletingChain,nop]})}))}function isPlainKeyRange(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function addFilter(e,t){e.filter=combine(e.filter,t)}function addReplayFilter(e,t,r){var n=e.replayFilter;e.replayFilter=n?function(){return combine(n(),t())}:t,e.justLimit=r&&!n}function addMatchFilter(e,t){e.isMatch=combine(e.isMatch,t)}function getIndexOrStore(e,t){if(e.isPrimKey)return t.primaryKey;var r=t.getIndexByKeyPath(e.index);if(!r)throw new exceptions.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function openCursor(e,t,r){var n=getIndexOrStore(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function iter(e,t,r,n){var i=e.replayFilter?combine(e.filter,e.replayFilter()):e.filter;if(e.or){var o={},a=function(e,r,n){if(!i||i(r,n,(function(e){return r.stop(e)}),(function(e){return r.fail(e)}))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),hasOwn(o,s)||(o[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),iterate(openCursor(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return iterate(openCursor(e,n,r),combine(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function iterate(e,t,r,n){var i=n?function(e,t,i){return r(n(e),t,i)}:r,o=wrap$1(i);return e.then((function(e){if(e)return e.start((function(){var r=function(){return e.continue()};t&&!t(e,(function(e){return r=e}),(function(t){e.stop(t),r=nop}),(function(t){e.fail(t),r=nop}))||o(e.value,e,(function(e){return r=e})),r()}))}))}var PropModification=function(){function e(e){Object.assign(this,e)}return e.prototype.execute=function(e){var t,r=null===(t=this.replacePrefix)||void 0===t?void 0:t[0];return r&&"string"==typeof e&&e.startsWith(r)?this.replacePrefix[1]+e.substring(r.length):e},e}(),Collection=function(){function e(){}return e.prototype._read=function(e,t){var r=this._ctx;return r.error?r.table._trans(null,rejection.bind(null,r.error)):r.table._trans("readonly",e).then(t)},e.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,rejection.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},e.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=combine(t.algorithm,e)},e.prototype._iterate=function(e,t){return iter(this._ctx,e,t,this._ctx.table.core)},e.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&extend(r,e),t._ctx=r,t},e.prototype.raw=function(){return this._ctx.valueMapper=null,this},e.prototype.each=function(e){var t=this._ctx;return this._read((function(r){return iter(t,e,r,t.table.core)}))},e.prototype.count=function(e){var t=this;return this._read((function(e){var r=t._ctx,n=r.table.core;if(isPlainKeyRange(r,!0))return n.count({trans:e,query:{index:getIndexOrStore(r,n.schema),range:r.range}}).then((function(e){return Math.min(e,r.limit)}));var i=0;return iter(r,(function(){return++i,!1}),e,n).then((function(){return i}))})).then(e)},e.prototype.sortBy=function(e,t){var r=e.split(".").reverse(),n=r[0],i=r.length-1;function o(e,t){return t?o(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=o(e,i),n=o(t,i);return r<n?-a:r>n?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)},e.prototype.toArray=function(e){var t=this;return this._read((function(e){var r=t._ctx;if("next"===r.dir&&isPlainKeyRange(r,!0)&&r.limit>0){var n=r.valueMapper,i=getIndexOrStore(r,r.table.core.schema);return r.table.core.query({trans:e,limit:r.limit,values:!0,query:{index:i,range:r.range}}).then((function(e){var t=e.result;return n?t.map(n):t}))}var o=[];return iter(r,(function(e){return o.push(e)}),e,r.table.core).then((function(){return o}))}),e)},e.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,isPlainKeyRange(t)?addReplayFilter(t,(function(){var t=e;return function(e,r){return 0===t||(1===t?(--t,!1):(r((function(){e.advance(t),t=0})),!1))}})):addReplayFilter(t,(function(){var t=e;return function(){return--t<0}}))),this},e.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),addReplayFilter(this._ctx,(function(){var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this},e.prototype.until=function(e,t){return addFilter(this._ctx,(function(r,n,i){return!e(r.value)||(n(i),t)})),this},e.prototype.first=function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)},e.prototype.last=function(e){return this.reverse().first(e)},e.prototype.filter=function(e){return addFilter(this._ctx,(function(t){return e(t.value)})),addMatchFilter(this._ctx,e),this},e.prototype.and=function(e){return this.filter(e)},e.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},e.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.key,r)}))},e.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},e.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.primaryKey,r)}))},e.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.key)})).then((function(){return r})).then(e)},e.prototype.primaryKeys=function(e){var t=this._ctx;if("next"===t.dir&&isPlainKeyRange(t,!0)&&t.limit>0)return this._read((function(e){var r=getIndexOrStore(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.primaryKey)})).then((function(){return r})).then(e)},e.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},e.prototype.firstKey=function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)},e.prototype.lastKey=function(e){return this.reverse().firstKey(e)},e.prototype.distinct=function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return addFilter(this._ctx,(function(e){var t=e.primaryKey.toString(),n=hasOwn(r,t);return r[t]=!0,!n})),this},e.prototype.modify=function(e){var t=this,r=this._ctx;return this._write((function(n){var i;if("function"==typeof e)i=e;else{var o=keys(e),a=o.length;i=function(t){for(var r=!1,n=0;n<a;++n){var i=o[n],s=e[i],l=getByKeyPath(t,i);s instanceof PropModification?(setByKeyPath(t,i,s.execute(l)),r=!0):l!==s&&(setByKeyPath(t,i,s),r=!0)}return r}}var s=r.table.core,l=s.schema.primaryKey,c=l.outbound,u=l.extractKey,h=t.db._options.modifyChunkSize||200,d=[],f=0,p=[],m=function(e,t){var r=t.failures,n=t.numFailures;f+=e-n;for(var i=0,o=keys(r);i<o.length;i++){var a=o[i];d.push(r[a])}};return t.clone().primaryKeys().then((function(t){var o=function(a){var l=Math.min(h,t.length-a);return s.getMany({trans:n,keys:t.slice(a,a+l),cache:"immutable"}).then((function(d){for(var f=[],p=[],g=c?[]:null,v=[],y=0;y<l;++y){var _=d[y],b={value:deepClone(_),primKey:t[a+y]};!1!==i.call(b,b.value,b)&&(null==b.value?v.push(t[a+y]):c||0===cmp(u(_),u(b.value))?(p.push(b.value),c&&g.push(t[a+y])):(v.push(t[a+y]),f.push(b.value)))}var w=isPlainKeyRange(r)&&r.limit===1/0&&("function"!=typeof e||e===deleteCallback)&&{index:r.index,range:r.range};return Promise.resolve(f.length>0&&s.mutate({trans:n,type:"add",values:f}).then((function(e){for(var t in e.failures)v.splice(parseInt(t),1);m(f.length,e)}))).then((function(){return(p.length>0||w&&"object"==typeof e)&&s.mutate({trans:n,type:"put",keys:g,values:p,criteria:w,changeSpec:"function"!=typeof e&&e}).then((function(e){return m(p.length,e)}))})).then((function(){return(v.length>0||w&&e===deleteCallback)&&s.mutate({trans:n,type:"delete",keys:v,criteria:w}).then((function(e){return m(v.length,e)}))})).then((function(){return t.length>a+l&&o(a+h)}))}))};return o(0).then((function(){if(d.length>0)throw new ModifyError("Error modifying one or more objects",d,f,p);return t.length}))}))}))},e.prototype.delete=function(){var e=this._ctx,t=e.range;return isPlainKeyRange(e)&&(e.isPrimKey||3===t.type)?this._write((function(r){var n=e.table.core.schema.primaryKey,i=t;return e.table.core.count({trans:r,query:{index:n,range:i}}).then((function(t){return e.table.core.mutate({trans:r,type:"deleteRange",range:i}).then((function(e){var r=e.failures;e.lastResult,e.results;var n=e.numFailures;if(n)throw new ModifyError("Could not delete some values",Object.keys(r).map((function(e){return r[e]})),t-n);return t-n}))}))})):this.modify(deleteCallback)},e}(),deleteCallback=function(e,t){return t.value=null};function createCollectionConstructor(e){return makeClassConstructor(Collection.prototype,(function(t,r){this.db=e;var n=AnyRange,i=null;if(r)try{n=r()}catch(e){i=e}var o=t._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:o.or,valueMapper:s!==mirror?s:null}}))}function simpleCompare(e,t){return e<t?-1:e===t?0:1}function simpleCompareReverse(e,t){return e>t?-1:e===t?0:1}function fail(e,t,r){var n=e instanceof WhereClause?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function emptyCollection(e){return new e.Collection(e,(function(){return rangeEqual("")})).limit(0)}function upperFactory(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}function lowerFactory(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}function nextCasing(e,t,r,n,i,o){for(var a=Math.min(e.length,n.length),s=-1,l=0;l<a;++l){var c=t[l];if(c!==n[l])return i(e[l],r[l])<0?e.substr(0,l)+r[l]+r.substr(l+1):i(e[l],n[l])<0?e.substr(0,l)+n[l]+r.substr(l+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;i(e[l],c)<0&&(s=l)}return a<n.length&&"next"===o?e+r.substr(e.length):a<e.length&&"prev"===o?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}function addIgnoreCaseAlgorithm(e,t,r,n){var i,o,a,s,l,c,u,h=r.length;if(!r.every((function(e){return"string"==typeof e})))return fail(e,STRING_EXPECTED);function d(e){i=upperFactory(e),o=lowerFactory(e),a="next"===e?simpleCompare:simpleCompareReverse;var t=r.map((function(e){return{lower:o(e),upper:i(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),l=t.map((function(e){return e.lower})),c=e,u="next"===e?"":n}d("next");var f=new e.Collection(e,(function(){return createRange(s[0],l[h-1]+n)}));f._ondirectionchange=function(e){d(e)};var p=0;return f._addAlgorithm((function(e,r,n){var i=e.key;if("string"!=typeof i)return!1;var d=o(i);if(t(d,l,p))return!0;for(var f=null,m=p;m<h;++m){var g=nextCasing(i,d,s[m],l[m],a,c);null===g&&null===f?p=m+1:(null===f||a(f,g)>0)&&(f=g)}return r(null!==f?function(){e.continue(f+u)}:n),!1})),f}function createRange(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function rangeEqual(e){return{type:1,lower:e,upper:e}}var WhereClause=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?emptyCollection(this):new this.Collection(this,(function(){return createRange(e,t,!r,!n)}))}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}},e.prototype.equals=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return rangeEqual(e)}))},e.prototype.above=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(e,void 0,!0)}))},e.prototype.aboveOrEqual=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(e,void 0,!1)}))},e.prototype.below=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(void 0,e,!1,!0)}))},e.prototype.belowOrEqual=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(void 0,e)}))},e.prototype.startsWith=function(e){return"string"!=typeof e?fail(this,STRING_EXPECTED):this.between(e,e+maxString,!0,!0)},e.prototype.startsWithIgnoreCase=function(e){return""===e?this.startsWith(e):addIgnoreCaseAlgorithm(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],maxString)},e.prototype.equalsIgnoreCase=function(e){return addIgnoreCaseAlgorithm(this,(function(e,t){return e===t[0]}),[e],"")},e.prototype.anyOfIgnoreCase=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return 0===e.length?emptyCollection(this):addIgnoreCaseAlgorithm(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return 0===e.length?emptyCollection(this):addIgnoreCaseAlgorithm(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,maxString)},e.prototype.anyOf=function(){var e=this,t=getArrayOf.apply(NO_CHAR_ARRAY,arguments),r=this._cmp;try{t.sort(r)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}if(0===t.length)return emptyCollection(this);var n=new this.Collection(this,(function(){return createRange(t[0],t[t.length-1])}));n._ondirectionchange=function(n){r="next"===n?e._ascending:e._descending,t.sort(r)};var i=0;return n._addAlgorithm((function(e,n,o){for(var a=e.key;r(a,t[i])>0;)if(++i===t.length)return n(o),!1;return 0===r(a,t[i])||(n((function(){e.continue(t[i])})),!1)})),n},e.prototype.notEqual=function(e){return this.inAnyRange([[minKey,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[minKey,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(e,t){var r=this,n=this._cmp,i=this._ascending,o=this._descending,a=this._min,s=this._max;if(0===e.length)return emptyCollection(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return fail(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",exceptions.InvalidArgument);var l=!t||!1!==t.includeLowers,c=t&&!0===t.includeUppers;var u,h=i;function d(e,t){return h(e[0],t[0])}try{u=e.reduce((function(e,t){for(var r=0,i=e.length;r<i;++r){var o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=a(o[0],t[0]),o[1]=s(o[1],t[1]);break}}return r===i&&e.push(t),e}),[]),u.sort(d)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}var f=0,p=c?function(e){return i(e,u[f][1])>0}:function(e){return i(e,u[f][1])>=0},m=l?function(e){return o(e,u[f][0])>0}:function(e){return o(e,u[f][0])>=0};var g=p,v=new this.Collection(this,(function(){return createRange(u[0][0],u[u.length-1][1],!l,!c)}));return v._ondirectionchange=function(e){"next"===e?(g=p,h=i):(g=m,h=o),u.sort(d)},v._addAlgorithm((function(e,t,n){for(var o=e.key;g(o);)if(++f===u.length)return t(n),!1;return!!function(e){return!p(e)&&!m(e)}(o)||(0===r._cmp(o,u[f][1])||0===r._cmp(o,u[f][0])||t((function(){h===i?e.continue(u[f][0]):e.continue(u[f][1])})),!1)})),v},e.prototype.startsWithAnyOf=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?emptyCollection(this):this.inAnyRange(e.map((function(e){return[e,e+maxString]}))):fail(this,"startsWithAnyOf() only works with strings")},e}();function createWhereClauseConstructor(e){return makeClassConstructor(WhereClause.prototype,(function(t,r,n){if(this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n},this._cmp=this._ascending=cmp,this._descending=function(e,t){return cmp(t,e)},this._max=function(e,t){return cmp(e,t)>0?e:t},this._min=function(e,t){return cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange,!this._IDBKeyRange)throw new exceptions.MissingAPI}))}function eventRejectHandler(e){return wrap$1((function(t){return preventDefault(t),e(t.target.error),!1}))}function preventDefault(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var DEXIE_STORAGE_MUTATED_EVENT_NAME="storagemutated",STORAGE_MUTATED_DOM_EVENT_NAME="x-storagemutated-1",globalEvents=Events(null,DEXIE_STORAGE_MUTATED_EVENT_NAME),Transaction=function(){function e(){}return e.prototype._lock=function(){return assert(!PSD.global),++this._reculock,1!==this._reculock||PSD.global||(PSD.lockOwnerFor=this),this},e.prototype._unlock=function(){if(assert(!PSD.global),0==--this._reculock)for(PSD.global||(PSD.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{usePSD(e[1],e[0])}catch(e){}}return this},e.prototype._locked=function(){return this._reculock&&PSD.lockOwnerFor!==this},e.prototype.create=function(e){var t=this;if(!this.mode)return this;var r=this.db.idbdb,n=this.db._state.dbOpenError;if(assert(!this.idbtrans),!e&&!r)switch(n&&n.name){case"DatabaseClosedError":throw new exceptions.DatabaseClosed(n);case"MissingAPIError":throw new exceptions.MissingAPI(n.message,n);default:throw new exceptions.OpenFailed(n)}if(!this.active)throw new exceptions.TransactionInactive;return assert(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):r.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=wrap$1((function(r){preventDefault(r),t._reject(e.error)})),e.onabort=wrap$1((function(r){preventDefault(r),t.active&&t._reject(new exceptions.Abort(e.error)),t.active=!1,t.on("abort").fire(r)})),e.oncomplete=wrap$1((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&globalEvents.storagemutated.fire(e.mutatedParts)})),this},e.prototype._promise=function(e,t,r){var n=this;if("readwrite"===e&&"readwrite"!==this.mode)return rejection(new exceptions.ReadOnly("Transaction is readonly"));if(!this.active)return rejection(new exceptions.TransactionInactive);if(this._locked())return new DexiePromise((function(i,o){n._blockedFuncs.push([function(){n._promise(e,t,r).then(i,o)},PSD])}));if(r)return newScope((function(){var e=new DexiePromise((function(e,r){n._lock();var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return e.finally((function(){return n._unlock()})),e._lib=!0,e}));var i=new DexiePromise((function(e,r){var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return i._lib=!0,i},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(e){var t=this._root(),r=DexiePromise.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return r}));else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new DexiePromise((function(e,n){r.then((function(r){return t._waitingQueue.push(wrap$1(e.bind(null,r)))}),(function(e){return t._waitingQueue.push(wrap$1(n.bind(null,e)))})).finally((function(){t._waitingFor===i&&(t._waitingFor=null)}))}))},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new exceptions.Abort))},e.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(hasOwn(t,e))return t[e];var r=this.schema[e];if(!r)throw new exceptions.NotFound("Table "+e+" not part of transaction");var n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n},e}();function createTransactionConstructor(e){return makeClassConstructor(Transaction.prototype,(function(t,r,n,i,o){var a=this;this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=Events(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new DexiePromise((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),rejection(e)}))}))}function createIndexSpec(e,t,r,n,i,o,a){return{name:e,keyPath:t,unique:r,multi:n,auto:i,compound:o,src:(r&&!a?"&":"")+(n?"*":"")+(i?"++":"")+nameFromKeyPath(t)}}function nameFromKeyPath(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function createTableSchema(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:arrayToObject(r,(function(e){return[e.name,e]}))}}function safariMultiStoreFix(e){return 1===e.length?e[0]:e}var getMaxKey=function(e){try{return e.only([[]]),getMaxKey=function(){return[[]]},[[]]}catch(e){return getMaxKey=function(){return maxString},maxString}};function getKeyExtractor(e){return null==e?function(){}:"string"==typeof e?getSinglePathKeyExtractor(e):function(t){return getByKeyPath(t,e)}}function getSinglePathKeyExtractor(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return getByKeyPath(t,e)}}function arrayify(e){return[].slice.call(e)}var _id_counter=0;function getKeyPathAlias(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")}function createDBCore(e,t,r){function n(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var r=e.lower,n=e.upper,i=e.lowerOpen,o=e.upperOpen;return void 0===r?void 0===n?null:t.upperBound(n,!!o):void 0===n?t.lowerBound(r,!!i):t.bound(r,n,!!i,!!o)}var i=function(e,t){var r=arrayify(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,r=e.autoIncrement,n=isArray(t),i=null==t,o={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:getKeyExtractor(t)},indexes:arrayify(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,r=e.unique,n=e.multiEntry,i=e.keyPath,a={name:t,compound:isArray(i),keyPath:i,unique:r,multiEntry:n,extractKey:getKeyExtractor(i)};return o[getKeyPathAlias(i)]=a,a})),getIndexByKeyPath:function(e){return o[getKeyPathAlias(e)]}};return o[":id"]=a.primaryKey,null!=t&&(o[getKeyPathAlias(t)]=a.primaryKey),a}))},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,r),o=i.schema,a=i.hasGetAll,s=o.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var r=e.trans,i=e.type,o=e.keys,a=e.values,s=e.range;return new Promise((function(e,l){e=wrap$1(e);var c=r.objectStore(t),u=null==c.keyPath,h="put"===i||"add"===i;if(!h&&"delete"!==i&&"deleteRange"!==i)throw new Error("Invalid operation type: "+i);var d,f=(o||a||{length:1}).length;if(o&&a&&o.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===f)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var p=[],m=[],g=0,v=function(e){++g,preventDefault(e)};if("deleteRange"===i){if(4===s.type)return e({numFailures:g,failures:m,results:[],lastResult:void 0});3===s.type?p.push(d=c.clear()):p.push(d=c.delete(n(s)))}else{var y=h?u?[a,o]:[a,null]:[o,null],_=y[0],b=y[1];if(h)for(var w=0;w<f;++w)p.push(d=b&&void 0!==b[w]?c[i](_[w],b[w]):c[i](_[w])),d.onerror=v;else for(w=0;w<f;++w)p.push(d=c[i](_[w])),d.onerror=v}var D=function(t){var r=t.target.result;p.forEach((function(e,t){return null!=e.error&&(m[t]=e.error)})),e({numFailures:g,failures:m,results:"delete"===i?o:p.map((function(e){return e.result})),lastResult:r})};d.onerror=function(e){v(e),D(e)},d.onsuccess=D}))},getMany:function(e){var r=e.trans,n=e.keys;return new Promise((function(e,i){e=wrap$1(e);for(var o,a=r.objectStore(t),s=n.length,l=new Array(s),c=0,u=0,h=function(t){var r=t.target;l[r._pos]=r.result,++u===c&&e(l)},d=eventRejectHandler(i),f=0;f<s;++f)null!=n[f]&&((o=a.get(n[f]))._pos=f,o.onsuccess=h,o.onerror=d,++c);0===c&&e(l)}))},get:function(e){var r=e.trans,n=e.key;return new Promise((function(e,i){e=wrap$1(e);var o=r.objectStore(t).get(n);o.onsuccess=function(t){return e(t.target.result)},o.onerror=eventRejectHandler(i)}))},query:function(e){return function(r){return new Promise((function(i,o){i=wrap$1(i);var a=r.trans,s=r.values,l=r.limit,c=r.query,u=l===1/0?void 0:l,h=c.index,d=c.range,f=a.objectStore(t),p=h.isPrimaryKey?f:f.index(h.name),m=n(d);if(0===l)return i({result:[]});if(e){var g=s?p.getAll(m,u):p.getAllKeys(m,u);g.onsuccess=function(e){return i({result:e.target.result})},g.onerror=eventRejectHandler(o)}else{var v=0,y=s||!("openKeyCursor"in p)?p.openCursor(m):p.openKeyCursor(m),_=[];y.onsuccess=function(e){var t=y.result;return t?(_.push(s?t.value:t.primaryKey),++v===l?i({result:_}):void t.continue()):i({result:_})},y.onerror=eventRejectHandler(o)}}))}}(a),openCursor:function(e){var r=e.trans,i=e.values,o=e.query,a=e.reverse,s=e.unique;return new Promise((function(e,l){e=wrap$1(e);var c=o.index,u=o.range,h=r.objectStore(t),d=c.isPrimaryKey?h:h.index(c.name),f=a?s?"prevunique":"prev":s?"nextunique":"next",p=i||!("openKeyCursor"in d)?d.openCursor(n(u),f):d.openKeyCursor(n(u),f);p.onerror=eventRejectHandler(l),p.onsuccess=wrap$1((function(t){var n=p.result;if(n){n.___id=++_id_counter,n.done=!1;var i=n.continue.bind(n),o=n.continuePrimaryKey;o&&(o=o.bind(n));var a=n.advance.bind(n),s=function(){throw new Error("Cursor not stopped")};n.trans=r,n.stop=n.continue=n.continuePrimaryKey=n.advance=function(){throw new Error("Cursor not started")},n.fail=wrap$1(l),n.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},n.start=function(e){var t=new Promise((function(e,t){e=wrap$1(e),p.onerror=eventRejectHandler(t),n.fail=t,n.stop=function(t){n.stop=n.continue=n.continuePrimaryKey=n.advance=s,e(t)}})),r=function(){if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=function(){throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=wrap$1((function(e){p.onsuccess=r,r()})),n.continue=i,n.continuePrimaryKey=o,n.advance=a,r(),t},e(n)}else e(null)}),l)}))},count:function(e){var r=e.query,i=e.trans,o=r.index,a=r.range;return new Promise((function(e,r){var s=i.objectStore(t),l=o.isPrimaryKey?s:s.index(o.name),c=n(a),u=c?l.count(c):l.count();u.onsuccess=wrap$1((function(t){return e(t.target.result)})),u.onerror=eventRejectHandler(r)}))}}}(e)})),l={};return s.forEach((function(e){return l[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!l[e])throw new Error("Table '".concat(e,"' not found"));return l[e]},MIN_KEY:-1/0,MAX_KEY:getMaxKey(t),schema:o}}function createMiddlewareStack(e,t){return t.reduce((function(e,t){var r=t.create;return __assign(__assign({},e),r(e))}),e)}function createMiddlewareStacks(e,t,r,n){var i=r.IDBKeyRange;return r.indexedDB,{dbcore:createMiddlewareStack(createDBCore(t,i,n),e.dbcore)}}function generateMiddlewareStacks(e,t){var r=t.db,n=createMiddlewareStacks(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach((function(t){var r=t.name;e.core.schema.tables.some((function(e){return e.name===r}))&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))}))}function setApiOnPlace(e,t,r,n){r.forEach((function(r){var i=n[r];t.forEach((function(t){var n=getPropertyDescriptor(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?setProp(t,r,{get:function(){return this.table(r)},set:function(e){defineProperty(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,i))}))}))}function removeTablesApi(e,t){t.forEach((function(t){for(var r in t)t[r]instanceof e.Table&&delete t[r]}))}function lowerVersionFirst(e,t){return e._cfg.version-t._cfg.version}function runUpgraders(e,t,r,n){var i=e._dbSchema;r.objectStoreNames.contains("$meta")&&!i.$meta&&(i.$meta=createTableSchema("$meta",parseIndexSyntax("")[0],[]),e._storeNames.push("$meta"));var o=e._createTransaction("readwrite",e._storeNames,i);o.create(r),o._completion.catch(n);var a=o._reject.bind(o),s=PSD.transless||PSD;newScope((function(){if(PSD.trans=o,PSD.transless=s,0!==t)return generateMiddlewareStacks(e,r),getExistingVersion(e,o,t).then((function(t){return updateTablesAndIndexes(e,t,o,r)})).catch(a);keys(i).forEach((function(e){createTable(r,e,i[e].primKey,i[e].indexes)})),generateMiddlewareStacks(e,r),DexiePromise.follow((function(){return e.on.populate.fire(o)})).catch(a)}))}function patchCurrentVersion(e,t){createMissingTables(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var r=buildGlobalSchema(e,e.idbdb,t);adjustToExistingIndexNames(e,e._dbSchema,t);for(var n=function(e){if(e.change.length||e.recreate)return console.warn("Unable to patch indexes of table ".concat(e.name," because it has changes on the type of index or primary key.")),{value:void 0};var r=t.objectStore(e.name);e.add.forEach((function(t){debug&&console.debug("Dexie upgrade patch: Creating missing index ".concat(e.name,".").concat(t.src)),addIndex(r,t)}))},i=0,o=getSchemaDiff(r,e._dbSchema).change;i<o.length;i++){var a=n(o[i]);if("object"==typeof a)return a.value}}function getExistingVersion(e,t,r){return t.storeNames.includes("$meta")?t.table("$meta").get("version").then((function(e){return null!=e?e:r})):DexiePromise.resolve(r)}function updateTablesAndIndexes(e,t,r,n){var i=[],o=e._versions,a=e._dbSchema=buildGlobalSchema(e,e.idbdb,n),s=o.filter((function(e){return e._cfg.version>=t}));if(0===s.length)return DexiePromise.resolve();return s.forEach((function(o){i.push((function(){var i=a,s=o._cfg.dbschema;adjustToExistingIndexNames(e,i,n),adjustToExistingIndexNames(e,s,n),a=e._dbSchema=s;var l=getSchemaDiff(i,s);l.add.forEach((function(e){createTable(n,e[0],e[1].primKey,e[1].indexes)})),l.change.forEach((function(e){if(e.recreate)throw new exceptions.Upgrade("Not yet support for changing primary key");var t=n.objectStore(e.name);e.add.forEach((function(e){return addIndex(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),addIndex(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var c=o._cfg.contentUpgrade;if(c&&o._cfg.version>t){generateMiddlewareStacks(e,n),r._memoizedTables={};var u=shallowClone(s);l.del.forEach((function(e){u[e]=i[e]})),removeTablesApi(e,[e.Transaction.prototype]),setApiOnPlace(e,[e.Transaction.prototype],keys(u),u),r.schema=u;var h,d=isAsyncFunction(c);d&&incrementExpectedAwaits();var f=DexiePromise.follow((function(){if((h=c(r))&&d){var e=decrementExpectedAwaits.bind(null,null);h.then(e,e)}}));return h&&"function"==typeof h.then?DexiePromise.resolve(h):f.then((function(){return h}))}})),i.push((function(t){deleteRemovedTables(o._cfg.dbschema,t),removeTablesApi(e,[e.Transaction.prototype]),setApiOnPlace(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})),i.push((function(t){e.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(e.idbdb.version/10)===o._cfg.version?(e.idbdb.deleteObjectStore("$meta"),delete e._dbSchema.$meta,e._storeNames=e._storeNames.filter((function(e){return"$meta"!==e}))):t.objectStore("$meta").put(o._cfg.version,"version"))}))})),function e(){return i.length?DexiePromise.resolve(i.shift()(r.idbtrans)).then(e):DexiePromise.resolve()}().then((function(){createMissingTables(a,n)}))}function getSchemaDiff(e,t){var r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(i){var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,l=o.idxByName,c=void 0;for(c in s)l[c]||a.del.push(c);for(c in l){var u=s[c],h=l[c];u?u.src!==h.src&&a.change.push(h):a.add.push(h)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}else n.add.push([r,o])}return n}function createTable(e,t,r,n){var i=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach((function(e){return addIndex(i,e)})),i}function createMissingTables(e,t){keys(e).forEach((function(r){t.db.objectStoreNames.contains(r)||(debug&&console.debug("Dexie: Creating missing table",r),createTable(t,r,e[r].primKey,e[r].indexes))}))}function deleteRemovedTables(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(r){return null==e[r]&&t.db.deleteObjectStore(r)}))}function addIndex(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function buildGlobalSchema(e,t,r){var n={};return slice(t.objectStoreNames,0).forEach((function(e){for(var t=r.objectStore(e),i=t.keyPath,o=createIndexSpec(nameFromKeyPath(i),i||"",!0,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[],s=0;s<t.indexNames.length;++s){var l=t.index(t.indexNames[s]);i=l.keyPath;var c=createIndexSpec(l.name,i,!!l.unique,!!l.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(c)}n[e]=createTableSchema(e,o,a)})),n}function readGlobalSchema(e,t,r){e.verno=t.version/10;var n=e._dbSchema=buildGlobalSchema(e,t,r);e._storeNames=slice(t.objectStoreNames,0),setApiOnPlace(e,[e._allTables],keys(n),n)}function verifyInstalledSchema(e,t){var r=getSchemaDiff(buildGlobalSchema(e,e.idbdb,t),e._dbSchema);return!(r.add.length||r.change.some((function(e){return e.add.length||e.change.length})))}function adjustToExistingIndexNames(e,t,r){for(var n=r.db.objectStoreNames,i=0;i<n.length;++i){var o=n[i],a=r.objectStore(o);e._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var l=a.indexNames[s],c=a.index(l).keyPath,u="string"==typeof c?c:"["+slice(c).join("+")+"]";if(t[o]){var h=t[o].idxByName[u];h&&(h.name=l,delete t[o].idxByName[u],t[o].idxByName[l]=h)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&_global.WorkerGlobalScope&&_global instanceof _global.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function parseIndexSyntax(e){return e.split(",").map((function(e,t){var r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return createIndexSpec(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),isArray(n),0===t)}))}var Version=function(){function e(){}return e.prototype._parseStoresSpec=function(e,t){keys(e).forEach((function(r){if(null!==e[r]){var n=parseIndexSyntax(e[r]),i=n.shift();if(i.unique=!0,i.multi)throw new exceptions.Schema("Primary key cannot be multi-valued");n.forEach((function(e){if(e.auto)throw new exceptions.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new exceptions.Schema("Index must have a name and cannot be an empty string")})),t[r]=createTableSchema(r,i,n)}}))},e.prototype.stores=function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?extend(this._cfg.storesSource,e):e;var r=t._versions,n={},i={};return r.forEach((function(e){extend(n,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(n,i)})),t._dbSchema=i,removeTablesApi(t,[t._allTables,t,t.Transaction.prototype]),setApiOnPlace(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],keys(i),i),t._storeNames=keys(i),this},e.prototype.upgrade=function(e){return this._cfg.contentUpgrade=promisableChain(this._cfg.contentUpgrade||nop,e),this},e}(),_a;function createVersionConstructor(e){return makeClassConstructor(Version.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}function getDbNamesTable(e,t){var r=e._dbNamesDB;return r||(r=e._dbNamesDB=new Dexie$1(DBNAMES_DB,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function hasDatabasesNative(e){return e&&"function"==typeof e.databases}function getDatabaseNames(e){var t=e.indexedDB,r=e.IDBKeyRange;return hasDatabasesNative(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return e!==DBNAMES_DB}))})):getDbNamesTable(t,r).toCollection().primaryKeys()}function _onDatabaseCreated(e,t){var r=e.indexedDB,n=e.IDBKeyRange;!hasDatabasesNative(r)&&t!==DBNAMES_DB&&getDbNamesTable(r,n).put({name:t}).catch(nop)}function _onDatabaseDeleted(e,t){var r=e.indexedDB,n=e.IDBKeyRange;!hasDatabasesNative(r)&&t!==DBNAMES_DB&&getDbNamesTable(r,n).delete(t).catch(nop)}function vip(e){return newScope((function(){return PSD.letThrough=!0,e()}))}function idbReady(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var r=function(){return indexedDB.databases().finally(t)};e=setInterval(r,100),r()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function isEmptyRange(e){return!("from"in e)}var RangeSet=function(e,t){if(!this){var r=new RangeSet;return e&&"d"in e&&extend(r,e),r}extend(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function addRange(e,t,r){var n=cmp(t,r);if(!isNaN(n)){if(n>0)throw RangeError();if(isEmptyRange(e))return extend(e,{from:t,to:r,d:1});var i=e.l,o=e.r;if(cmp(r,e.from)<0)return i?addRange(i,t,r):e.l={from:t,to:r,d:1,l:null,r:null},rebalance(e);if(cmp(t,e.to)>0)return o?addRange(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},rebalance(e);cmp(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),cmp(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;i&&!e.l&&mergeRanges(e,i),o&&a&&mergeRanges(e,o)}}function mergeRanges(e,t){isEmptyRange(t)||function e(t,r){var n=r.from,i=r.to,o=r.l,a=r.r;addRange(t,n,i),o&&e(t,o),a&&e(t,a)}(e,t)}function rangesOverlap(e,t){var r=getRangeSetIterator(t),n=r.next();if(n.done)return!1;for(var i=n.value,o=getRangeSetIterator(e),a=o.next(i.from),s=a.value;!n.done&&!a.done;){if(cmp(s.from,i.to)<=0&&cmp(s.to,i.from)>=0)return!0;cmp(i.from,s.from)<0?i=(n=r.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}function getRangeSetIterator(e){var t=isEmptyRange(e)?null:{s:0,n:e};return{next:function(e){for(var r=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&cmp(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||cmp(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function rebalance(e){var t,r,n=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(r=e.l)||void 0===r?void 0:r.d)||0),i=n>1?"r":n<-1?"l":"";if(i){var o="r"===i?"l":"r",a=__assign({},e),s=e[i];e.from=s.from,e.to=s.to,e[i]=s[i],a[i]=s[o],e[o]=a,a.d=computeDepth(a)}e.d=computeDepth(e)}function computeDepth(e){var t=e.r,r=e.l;return(t?r?Math.max(t.d,r.d):t.d:r?r.d:0)+1}function extendObservabilitySet(e,t){return keys(t).forEach((function(r){e[r]?mergeRanges(e[r],t[r]):e[r]=cloneSimpleObjectTree(t[r])})),e}function obsSetsOverlap(e,t){return e.all||t.all||Object.keys(e).some((function(r){return t[r]&&rangesOverlap(t[r],e[r])}))}props(RangeSet.prototype,(_a={add:function(e){return mergeRanges(this,e),this},addKey:function(e){return addRange(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return addRange(t,e,e)})),this}},_a[iteratorSymbol]=function(){return getRangeSetIterator(this)},_a));var cache={},unsignaledParts={},isTaskEnqueued=!1;function signalSubscribersLazily(e,t){extendObservabilitySet(unsignaledParts,e),isTaskEnqueued||(isTaskEnqueued=!0,setTimeout((function(){isTaskEnqueued=!1;var e=unsignaledParts;unsignaledParts={},signalSubscribersNow(e,!1)}),0))}function signalSubscribersNow(e,t){void 0===t&&(t=!1);var r=new Set;if(e.all)for(var n=0,i=Object.values(cache);n<i.length;n++){collectTableSubscribers(s=i[n],e,r,t)}else for(var o in e){var a=/^idb\:\/\/(.*)\/(.*)\//.exec(o);if(a){var s,l=a[1],c=a[2];(s=cache["idb://".concat(l,"/").concat(c)])&&collectTableSubscribers(s,e,r,t)}}r.forEach((function(e){return e()}))}function collectTableSubscribers(e,t,r,n){for(var i=[],o=0,a=Object.entries(e.queries.query);o<a.length;o++){for(var s=a[o],l=s[0],c=[],u=0,h=s[1];u<h.length;u++){var d=h[u];obsSetsOverlap(t,d.obsSet)?d.subscribers.forEach((function(e){return r.add(e)})):n&&c.push(d)}n&&i.push([l,c])}if(n)for(var f=0,p=i;f<p.length;f++){var m=p[f];l=m[0],c=m[1];e.queries.query[l]=c}}function dexieOpen(e){var t=e._state,r=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?rejection(t.dbOpenError):e}));t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var n=t.openCanceller,i=Math.round(10*e.verno),o=!1;function a(){if(t.openCanceller!==n)throw new exceptions.DatabaseClosed("db.open() was cancelled")}var s=t.dbReadyResolve,l=null,c=!1,u=function(){return new DexiePromise((function(n,s){if(a(),!r)throw new exceptions.MissingAPI;var h=e.name,d=t.autoSchema||!i?r.open(h):r.open(h,i);if(!d)throw new exceptions.MissingAPI;d.onerror=eventRejectHandler(s),d.onblocked=wrap$1(e._fireOnBlocked),d.onupgradeneeded=wrap$1((function(n){if(l=d.transaction,t.autoSchema&&!e._options.allowEmptyDB){d.onerror=preventDefault,l.abort(),d.result.close();var i=r.deleteDatabase(h);i.onsuccess=i.onerror=wrap$1((function(){s(new exceptions.NoSuchDatabase("Database ".concat(h," doesnt exist")))}))}else{l.onerror=eventRejectHandler(s);var a=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;c=a<1,e.idbdb=d.result,o&&patchCurrentVersion(e,l),runUpgraders(e,a/10,l,s)}}),s),d.onsuccess=wrap$1((function(){l=null;var r=e.idbdb=d.result,a=slice(r.objectStoreNames);if(a.length>0)try{var s=r.transaction(safariMultiStoreFix(a),"readonly");if(t.autoSchema)readGlobalSchema(e,r,s);else if(adjustToExistingIndexNames(e,e._dbSchema,s),!verifyInstalledSchema(e,s)&&!o)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),r.close(),i=r.version+1,o=!0,n(u());generateMiddlewareStacks(e,s)}catch(e){}connections.push(e),r.onversionchange=wrap$1((function(r){t.vcFired=!0,e.on("versionchange").fire(r)})),r.onclose=wrap$1((function(t){e.on("close").fire(t)})),c&&_onDatabaseCreated(e._deps,h),n()}),s)})).catch((function(e){switch(null==e?void 0:e.name){case"UnknownError":if(t.PR1398_maxLoop>0)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),u();break;case"VersionError":if(i>0)return i=0,u()}return DexiePromise.reject(e)}))};return DexiePromise.race([n,("undefined"==typeof navigator?DexiePromise.resolve():idbReady()).then(u)]).then((function(){return a(),t.onReadyBeingFired=[],DexiePromise.resolve(vip((function(){return e.on.ready.fire(e.vip)}))).then((function r(){if(t.onReadyBeingFired.length>0){var n=t.onReadyBeingFired.reduce(promisableChain,nop);return t.onReadyBeingFired=[],DexiePromise.resolve(vip((function(){return n(e.vip)}))).then(r)}}))})).finally((function(){t.openCanceller===n&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)})).catch((function(r){t.dbOpenError=r;try{l&&l.abort()}catch(e){}return n===t.openCanceller&&e._close(),rejection(r)})).finally((function(){t.openComplete=!0,s()})).then((function(){if(c){var t={};e.tables.forEach((function(r){r.schema.indexes.forEach((function(n){n.name&&(t["idb://".concat(e.name,"/").concat(r.name,"/").concat(n.name)]=new RangeSet(-1/0,[[[]]]))})),t["idb://".concat(e.name,"/").concat(r.name,"/")]=t["idb://".concat(e.name,"/").concat(r.name,"/:dels")]=new RangeSet(-1/0,[[[]]])})),globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME).fire(t),signalSubscribersNow(t,!0)}return e}))}function awaitIterator(e){var t=function(t){return e.next(t)},r=i(t),n=i((function(t){return e.throw(t)}));function i(e){return function(t){var i=e(t),o=i.value;return i.done?o:o&&"function"==typeof o.then?o.then(r,n):isArray(o)?Promise.all(o).then(r,n):r(o)}}return i(t)()}function extractTransactionArgs(e,t,r){var n=arguments.length;if(n<2)throw new exceptions.InvalidArgument("Too few arguments");for(var i=new Array(n-1);--n;)i[n-1]=arguments[n];return r=i.pop(),[e,flatten(i),r]}function enterTransactionScope(e,t,r,n,i){return DexiePromise.resolve().then((function(){var o=PSD.transless||PSD,a=e._createTransaction(t,r,e._dbSchema,n);a.explicit=!0;var s={trans:a,transless:o};if(n)a.idbtrans=n.idbtrans;else try{a.create(),a.idbtrans._explicit=!0,e._state.PR1398_maxLoop=3}catch(n){return n.name===errnames.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e.close({disableAutoOpen:!1}),e.open().then((function(){return enterTransactionScope(e,t,r,null,i)}))):rejection(n)}var l,c=isAsyncFunction(i);c&&incrementExpectedAwaits();var u=DexiePromise.follow((function(){if(l=i.call(a,a))if(c){var e=decrementExpectedAwaits.bind(null,null);l.then(e,e)}else"function"==typeof l.next&&"function"==typeof l.throw&&(l=awaitIterator(l))}),s);return(l&&"function"==typeof l.then?DexiePromise.resolve(l).then((function(e){return a.active?e:rejection(new exceptions.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):u.then((function(){return l}))).then((function(e){return n&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),rejection(e)}))}))}function pad(e,t,r){for(var n=isArray(e)?e.slice():[e],i=0;i<r;++i)n.push(t);return n}function createVirtualIndexMiddleware(e){return __assign(__assign({},e),{table:function(t){var r=e.table(t),n=r.schema,i={},o=[];function a(e,t,r){var n=getKeyPathAlias(e),s=i[n]=i[n]||[],l=null==e?0:"string"==typeof e?1:e.length,c=t>0,u=__assign(__assign({},r),{name:c?"".concat(n,"(virtual-from:").concat(r.name,")"):r.name,lowLevelIndex:r,isVirtual:c,keyTail:t,keyLength:l,extractKey:getKeyExtractor(e),unique:!c&&r.unique});(s.push(u),u.isPrimaryKey||o.push(u),l>1)&&a(2===l?e[0]:e.slice(0,l-1),t+1,r);return s.sort((function(e,t){return e.keyTail-t.keyTail})),u}var s=a(n.primaryKey.keyPath,0,n.primaryKey);i[":id"]=[s];for(var l=0,c=n.indexes;l<c.length;l++){var u=c[l];a(u.keyPath,0,u)}function h(t){var r,n,i=t.query.index;return i.isVirtual?__assign(__assign({},t),{query:{index:i.lowLevelIndex,range:(r=t.query.range,n=i.keyTail,{type:1===r.type?2:r.type,lower:pad(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:pad(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}):t}var d=__assign(__assign({},r),{schema:__assign(__assign({},n),{primaryKey:s,indexes:o,getIndexByKeyPath:function(e){var t=i[getKeyPathAlias(e)];return t&&t[0]}}),count:function(e){return r.count(h(e))},query:function(e){return r.query(h(e))},openCursor:function(t){var n=t.query.index,i=n.keyTail,o=n.isVirtual,a=n.keyLength;if(!o)return r.openCursor(t);return r.openCursor(h(t)).then((function(r){return r&&function(r){var n=Object.create(r,{continue:{value:function(n){null!=n?r.continue(pad(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(r.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(pad(t,e.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var e=r.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return r.value}}});return n}(r)}))}});return d}})}var virtualIndexMiddleware={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:createVirtualIndexMiddleware};function getObjectDiff(e,t,r,n){return r=r||{},n=n||"",keys(e).forEach((function(i){if(hasOwn(t,i)){var o=e[i],a=t[i];if("object"==typeof o&&"object"==typeof a&&o&&a){var s=toStringTag(o);s!==toStringTag(a)?r[n+i]=t[i]:"Object"===s?getObjectDiff(o,a,r,n+i+"."):o!==a&&(r[n+i]=t[i])}else o!==a&&(r[n+i]=t[i])}else r[n+i]=void 0})),keys(t).forEach((function(i){hasOwn(e,i)||(r[n+i]=t[i])})),r}function getEffectiveKeys(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}var hooksMiddleware={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return __assign(__assign({},e),{table:function(t){var r=e.table(t),n=r.schema.primaryKey,i=__assign(__assign({},r),{mutate:function(e){var i=PSD.trans,o=i.table(t).hook,a=o.deleting,s=o.creating,l=o.updating;switch(e.type){case"add":if(s.fire===nop)break;return i._promise("readwrite",(function(){return c(e)}),!0);case"put":if(s.fire===nop&&l.fire===nop)break;return i._promise("readwrite",(function(){return c(e)}),!0);case"delete":if(a.fire===nop)break;return i._promise("readwrite",(function(){return c(e)}),!0);case"deleteRange":if(a.fire===nop)break;return i._promise("readwrite",(function(){return function(e){return u(e.trans,e.range,1e4)}(e)}),!0)}return r.mutate(e);function c(e){var t=PSD.trans,i=e.keys||getEffectiveKeys(n,e);if(!i)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?__assign(__assign({},e),{keys:i}):__assign({},e)).type&&(e.values=__spreadArray([],e.values,!0)),e.keys&&(e.keys=__spreadArray([],e.keys,!0)),getExistingValues(r,e,i).then((function(o){var c=i.map((function(r,i){var c=o[i],u={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(u,r,c,t);else if("add"===e.type||void 0===c){var h=s.fire.call(u,r,e.values[i],t);null==r&&null!=h&&(r=h,e.keys[i]=r,n.outbound||setByKeyPath(e.values[i],n.keyPath,r))}else{var d=getObjectDiff(c,e.values[i]),f=l.fire.call(u,d,r,c,t);if(f){var p=e.values[i];Object.keys(f).forEach((function(e){hasOwn(p,e)?p[e]=f[e]:setByKeyPath(p,e,f[e])}))}}return u}));return r.mutate(e).then((function(t){for(var r=t.failures,n=t.results,a=t.numFailures,s=t.lastResult,l=0;l<i.length;++l){var u=n?n[l]:i[l],h=c[l];null==u?h.onerror&&h.onerror(r[l]):h.onsuccess&&h.onsuccess("put"===e.type&&o[l]?e.values[l]:u)}return{failures:r,results:n,numFailures:a,lastResult:s}})).catch((function(e){return c.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))}function u(e,t,i){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:i}).then((function(r){var n=r.result;return c({type:"delete",keys:n,trans:e}).then((function(r){return r.numFailures>0?Promise.reject(r.failures[0]):n.length<i?{failures:[],numFailures:0,lastResult:void 0}:u(e,__assign(__assign({},t),{lower:n[n.length-1],lowerOpen:!0}),i)}))}))}}});return i}})}};function getExistingValues(e,t,r){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:r,cache:"immutable"})}function getFromTransactionCache(e,t,r){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var n=[],i=0,o=0;i<t.keys.length&&o<e.length;++i)0===cmp(t.keys[i],e[o])&&(n.push(r?deepClone(t.values[i]):t.values[i]),++o);return n.length===e.length?n:null}catch(e){return null}}var cacheExistingValuesMiddleware={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var r=e.table(t);return __assign(__assign({},r),{getMany:function(e){if(!e.cache)return r.getMany(e);var t=getFromTransactionCache(e.keys,e.trans._cache,"clone"===e.cache);return t?DexiePromise.resolve(t):r.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?deepClone(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),r.mutate(e)}})}}}};function isCachableContext(e,t){return"readonly"===e.trans.mode&&!!e.subscr&&!e.trans.explicit&&"disabled"!==e.trans.db._options.cache&&!t.schema.primaryKey.outbound}function isCachableRequest(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var observabilityMiddleware={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,r=new RangeSet(e.MIN_KEY,e.MAX_KEY);return __assign(__assign({},e),{transaction:function(t,r,n){if(PSD.subscr&&"readonly"!==r)throw new exceptions.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(PSD.querier));return e.transaction(t,r,n)},table:function(n){var i=e.table(n),o=i.schema,a=o.primaryKey,s=o.indexes,l=a.extractKey,c=a.outbound,u=a.autoIncrement&&s.filter((function(e){return e.compound&&e.keyPath.includes(a.keyPath)})),h=__assign(__assign({},i),{mutate:function(e){var s=e.trans,l=e.mutatedParts||(e.mutatedParts={}),c=function(e){var r="idb://".concat(t,"/").concat(n,"/").concat(e);return l[r]||(l[r]=new RangeSet)},h=c(""),d=c(":dels"),f=e.type,p="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[getEffectiveKeys(a,e).filter((function(e){return e})),e.values]:[],m=p[0],g=p[1],v=e.trans._cache;if(isArray(m)){h.addKeys(m);var y="delete"===f||m.length===g.length?getFromTransactionCache(m,v):null;y||d.addKeys(m),(y||g)&&trackAffectedIndexes(c,o,y,g)}else if(m){var _={from:m.lower,to:m.upper};d.add(_),h.add(_)}else h.add(r),d.add(r),o.indexes.forEach((function(e){return c(e.name).add(r)}));return i.mutate(e).then((function(t){return!m||"add"!==e.type&&"put"!==e.type||(h.addKeys(t.results),u&&u.forEach((function(r){var n=e.values.map((function(e){return r.extractKey(e)})),i=r.keyPath.findIndex((function(e){return e===a.keyPath}));t.results.forEach((function(e){return n[i]=e})),c(r.name).addKeys(n)}))),s.mutatedParts=extendObservabilitySet(s.mutatedParts||{},l),t}))}}),d=function(t){var r,n,i=t.query,o=i.index,a=i.range;return[o,new RangeSet(null!==(r=a.lower)&&void 0!==r?r:e.MIN_KEY,null!==(n=a.upper)&&void 0!==n?n:e.MAX_KEY)]},f={get:function(e){return[a,new RangeSet(e.key)]},getMany:function(e){return[a,(new RangeSet).addKeys(e.keys)]},count:d,query:d,openCursor:d};return keys(f).forEach((function(e){h[e]=function(o){var a=PSD.subscr,s=!!a,u=isCachableContext(PSD,i)&&isCachableRequest(e,o)?o.obsSet={}:a;if(s){var h=function(e){var r="idb://".concat(t,"/").concat(n,"/").concat(e);return u[r]||(u[r]=new RangeSet)},d=h(""),p=h(":dels"),m=f[e](o),g=m[0],v=m[1];if("query"===e&&g.isPrimaryKey&&!o.values?p.add(v):h(g.name||"").add(v),!g.isPrimaryKey){if("count"!==e){var y="query"===e&&c&&o.values&&i.query(__assign(__assign({},o),{values:!1}));return i[e].apply(this,arguments).then((function(t){if("query"===e){if(c&&o.values)return y.then((function(e){var r=e.result;return d.addKeys(r),t}));var r=o.values?t.result.map(l):t.result;o.values?d.addKeys(r):p.addKeys(r)}else if("openCursor"===e){var n=t,i=o.values;return n&&Object.create(n,{key:{get:function(){return p.addKey(n.primaryKey),n.key}},primaryKey:{get:function(){var e=n.primaryKey;return p.addKey(e),e}},value:{get:function(){return i&&d.addKey(n.primaryKey),n.value}}})}return t}))}p.add(r)}}return i[e].apply(this,arguments)}})),h}})}};function trackAffectedIndexes(e,t,r,n){t.indexes.forEach((function(t){var i=e(t.name||"");function o(e){return null!=e?t.extractKey(e):null}var a=function(e){return t.multiEntry&&isArray(e)?e.forEach((function(e){return i.addKey(e)})):i.addKey(e)};(r||n).forEach((function(e,t){var i=r&&o(r[t]),s=n&&o(n[t]);0!==cmp(i,s)&&(null!=i&&a(i),null!=s&&a(s))}))}))}function adjustOptimisticFromFailures(e,t,r){if(0===r.numFailures)return t;if("deleteRange"===t.type)return null;var n=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;if(r.numFailures===n)return null;var i=__assign({},t);return isArray(i.keys)&&(i.keys=i.keys.filter((function(e,t){return!(t in r.failures)}))),"values"in i&&isArray(i.values)&&(i.values=i.values.filter((function(e,t){return!(t in r.failures)}))),i}function isAboveLower(e,t){return void 0===t.lower||(t.lowerOpen?cmp(e,t.lower)>0:cmp(e,t.lower)>=0)}function isBelowUpper(e,t){return void 0===t.upper||(t.upperOpen?cmp(e,t.upper)<0:cmp(e,t.upper)<=0)}function isWithinRange(e,t){return isAboveLower(e,t)&&isBelowUpper(e,t)}function applyOptimisticOps(e,t,r,n,i,o){if(!r||0===r.length)return e;var a=t.query.index,s=a.multiEntry,l=t.query.range,c=n.schema.primaryKey.extractKey,u=a.extractKey,h=(a.lowLevelIndex||a).extractKey,d=r.reduce((function(e,r){var n=e,i="add"===r.type||"put"===r.type?r.values.filter((function(e){var t=u(e);return s&&isArray(t)?t.some((function(e){return isWithinRange(e,l)})):isWithinRange(t,l)})).map((function(e){return e=deepClone(e),o&&Object.freeze(e),e})):[];switch(r.type){case"add":n=e.concat(t.values?i:i.map((function(e){return c(e)})));break;case"put":var a=(new RangeSet).addKeys(r.values.map((function(e){return c(e)})));n=e.filter((function(e){var r=t.values?c(e):e;return!rangesOverlap(new RangeSet(r),a)})).concat(t.values?i:i.map((function(e){return c(e)})));break;case"delete":var h=(new RangeSet).addKeys(r.keys);n=e.filter((function(e){var r=t.values?c(e):e;return!rangesOverlap(new RangeSet(r),h)}));break;case"deleteRange":var d=r.range;n=e.filter((function(e){return!isWithinRange(c(e),d)}))}return n}),e);return d===e?e:(d.sort((function(e,t){return cmp(h(e),h(t))||cmp(c(e),c(t))})),t.limit&&t.limit<1/0&&(d.length>t.limit?d.length=t.limit:e.length===t.limit&&d.length<t.limit&&(i.dirty=!0)),o?Object.freeze(d):d)}function areRangesEqual(e,t){return 0===cmp(e.lower,t.lower)&&0===cmp(e.upper,t.upper)&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function compareLowers(e,t,r,n){if(void 0===e)return void 0!==t?-1:0;if(void 0===t)return 1;var i=cmp(e,t);if(0===i){if(r&&n)return 0;if(r)return 1;if(n)return-1}return i}function compareUppers(e,t,r,n){if(void 0===e)return void 0!==t?1:0;if(void 0===t)return-1;var i=cmp(e,t);if(0===i){if(r&&n)return 0;if(r)return-1;if(n)return 1}return i}function isSuperRange(e,t){return compareLowers(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&compareUppers(e.upper,t.upper,e.upperOpen,t.upperOpen)>=0}function findCompatibleQuery(e,t,r,n){var i=cache["idb://".concat(e,"/").concat(t)];if(!i)return[];var o=i.queries[r];if(!o)return[null,!1,i,null];var a=o[(n.query?n.query.index.name:null)||""];if(!a)return[null,!1,i,null];switch(r){case"query":var s=a.find((function(e){return e.req.limit===n.limit&&e.req.values===n.values&&areRangesEqual(e.req.query.range,n.query.range)}));return s?[s,!0,i,a]:[a.find((function(e){return("limit"in e.req?e.req.limit:1/0)>=n.limit&&(!n.values||e.req.values)&&isSuperRange(e.req.query.range,n.query.range)})),!1,i,a];case"count":var l=a.find((function(e){return areRangesEqual(e.req.query.range,n.query.range)}));return[l,!!l,i,a]}}function subscribeToCacheEntry(e,t,r,n){e.subscribers.add(r),n.addEventListener("abort",(function(){e.subscribers.delete(r),0===e.subscribers.size&&enqueForDeletion(e,t)}))}function enqueForDeletion(e,t){setTimeout((function(){0===e.subscribers.size&&delArrayItem(t,e)}),3e3)}var cacheMiddleware={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name,r=__assign(__assign({},e),{transaction:function(r,n,i){var o=e.transaction(r,n,i);if("readwrite"===n){var a=new AbortController,s=a.signal,l=function(i){return function(){if(a.abort(),"readwrite"===n){for(var s=new Set,l=0,c=r;l<c.length;l++){var u=c[l],h=cache["idb://".concat(t,"/").concat(u)];if(h){var d=e.table(u),f=h.optimisticOps.filter((function(e){return e.trans===o}));if(o._explicit&&i&&o.mutatedParts)for(var p=0,m=Object.values(h.queries.query);p<m.length;p++)for(var g=0,v=(b=m[p]).slice();g<v.length;g++){obsSetsOverlap((x=v[g]).obsSet,o.mutatedParts)&&(delArrayItem(b,x),x.subscribers.forEach((function(e){return s.add(e)})))}else if(f.length>0){h.optimisticOps=h.optimisticOps.filter((function(e){return e.trans!==o}));for(var y=0,_=Object.values(h.queries.query);y<_.length;y++)for(var b,w=0,D=(b=_[y]).slice();w<D.length;w++){var x;if(null!=(x=D[w]).res&&o.mutatedParts)if(i&&!x.dirty){var S=Object.isFrozen(x.res),k=applyOptimisticOps(x.res,x.req,f,d,x,S);x.dirty?(delArrayItem(b,x),x.subscribers.forEach((function(e){return s.add(e)}))):k!==x.res&&(x.res=k,x.promise=DexiePromise.resolve({result:k}))}else x.dirty&&delArrayItem(b,x),x.subscribers.forEach((function(e){return s.add(e)}))}}}}s.forEach((function(e){return e()}))}}};o.addEventListener("abort",l(!1),{signal:s}),o.addEventListener("error",l(!1),{signal:s}),o.addEventListener("complete",l(!0),{signal:s})}return o},table:function(r){var n=e.table(r),i=n.schema.primaryKey,o=__assign(__assign({},n),{mutate:function(e){var o=PSD.trans;if(i.outbound||"disabled"===o.db._options.cache||o.explicit)return n.mutate(e);var a=cache["idb://".concat(t,"/").concat(r)];if(!a)return n.mutate(e);var s=n.mutate(e);return"add"!==e.type&&"put"!==e.type||!(e.values.length>=50||getEffectiveKeys(i,e).some((function(e){return null==e})))?(a.optimisticOps.push(e),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts),s.then((function(t){if(t.numFailures>0){delArrayItem(a.optimisticOps,e);var r=adjustOptimisticFromFailures(a,e,t);r&&a.optimisticOps.push(r),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}})),s.catch((function(){delArrayItem(a.optimisticOps,e),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}))):s.then((function(t){var r=__assign(__assign({},e),{values:e.values.map((function(e,r){var n,o=(null===(n=i.keyPath)||void 0===n?void 0:n.includes("."))?deepClone(e):__assign({},e);return setByKeyPath(o,i.keyPath,t.results[r]),o}))}),n=adjustOptimisticFromFailures(a,r,t);a.optimisticOps.push(n),queueMicrotask((function(){return e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}))})),s},query:function(e){var i;if(!isCachableContext(PSD,n)||!isCachableRequest("query",e))return n.query(e);var o="immutable"===(null===(i=PSD.trans)||void 0===i?void 0:i.db._options.cache),a=PSD,s=a.requery,l=a.signal,c=findCompatibleQuery(t,r,"query",e),u=c[0],h=c[1],d=c[2],f=c[3];if(u&&h)u.obsSet=e.obsSet;else{var p=n.query(e).then((function(e){var t=e.result;if(u&&(u.res=t),o){for(var r=0,n=t.length;r<n;++r)Object.freeze(t[r]);Object.freeze(t)}else e.result=deepClone(t);return e})).catch((function(e){return f&&u&&delArrayItem(f,u),Promise.reject(e)}));u={obsSet:e.obsSet,promise:p,subscribers:new Set,type:"query",req:e,dirty:!1},f?f.push(u):(f=[u],d||(d=cache["idb://".concat(t,"/").concat(r)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}}),d.queries.query[e.query.index.name||""]=f)}return subscribeToCacheEntry(u,f,s,l),u.promise.then((function(t){return{result:applyOptimisticOps(t.result,e,null==d?void 0:d.optimisticOps,n,u,o)}}))}});return o}});return r}};function vipify(e,t){return new Proxy(e,{get:function(e,r,n){return"db"===r?t:Reflect.get(e,r,n)}})}var Dexie$1=function(){function e(t,r){var n=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=r=__assign({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange,cache:"cloned"},r),this._deps={indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange};var o=r.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:nop,dbReadyPromise:null,cancelOpen:nop,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:r.autoOpen};a.dbReadyPromise=new DexiePromise((function(e){a.dbReadyResolve=e})),a.openCanceller=new DexiePromise((function(e,t){a.cancelOpen=t})),this._state=a,this.name=t,this.on=Events(this,"populate","blocked","versionchange","close",{ready:[promisableChain,nop]}),this.on.ready.subscribe=override(this.on.ready.subscribe,(function(t){return function(r,i){e.vip((function(){var e=n._state;if(e.openComplete)e.dbOpenError||DexiePromise.resolve().then(r),i&&t(r);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(r),i&&t(r);else{t(r);var o=n;i||t((function e(){o.on.ready.unsubscribe(r),o.on.ready.unsubscribe(e)}))}}))}})),this.Collection=createCollectionConstructor(this),this.Table=createTableConstructor(this),this.Transaction=createTransactionConstructor(this),this.Version=createVersionConstructor(this),this.WhereClause=createWhereClauseConstructor(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(n.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(n.name,"'. Closing db now to resume the delete request.")),n.close({disableAutoOpen:!1})})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(n.name,"') was blocked")):console.warn("Upgrade '".concat(n.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=getMaxKey(r.IDBKeyRange),this._createTransaction=function(e,t,r,i){return new n.Transaction(e,t,r,n._options.chromeTransactionDurability,i)},this._fireOnBlocked=function(e){n.on("blocked").fire(e),connections.filter((function(e){return e.name===n.name&&e!==n&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(cacheExistingValuesMiddleware),this.use(cacheMiddleware),this.use(observabilityMiddleware),this.use(virtualIndexMiddleware),this.use(hooksMiddleware);var s=new Proxy(this,{get:function(e,t,r){if("_vip"===t)return!0;if("table"===t)return function(e){return vipify(n.table(e),s)};var i=Reflect.get(e,t,r);return i instanceof Table?vipify(i,s):"tables"===t?i.map((function(e){return vipify(e,s)})):"_createTransaction"===t?function(){return vipify(i.apply(this,arguments),s)}:i}});this.vip=s,o.forEach((function(e){return e(n)}))}return e.prototype.version=function(e){if(isNaN(e)||e<.1)throw new exceptions.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new exceptions.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,r=t.filter((function(t){return t._cfg.version===e}))[0];return r||(r=new this.Version(e),t.push(r),t.sort(lowerVersionFirst),r.stores({}),this._state.autoSchema=!1,r)},e.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||PSD.letThrough||this._vip)?e():new DexiePromise((function(e,r){if(t._state.openComplete)return r(new exceptions.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void r(new exceptions.DatabaseClosed);t.open().catch(nop)}t._state.dbReadyPromise.then(e,r)})).then(e)},e.prototype.use=function(e){var t=e.stack,r=e.create,n=e.level,i=e.name;i&&this.unuse({stack:t,name:i});var o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:r,level:null==n?10:n,name:i}),o.sort((function(e,t){return e.level-t.level})),this},e.prototype.unuse=function(e){var t=e.stack,r=e.name,n=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return n?e.create!==n:!!r&&e.name!==r}))),this},e.prototype.open=function(){var e=this;return usePSD(globalPSD,(function(){return dexieOpen(e)}))},e.prototype._close=function(){var e=this._state,t=connections.indexOf(this);if(t>=0&&connections.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new DexiePromise((function(t){e.dbReadyResolve=t})),e.openCanceller=new DexiePromise((function(t,r){e.cancelOpen=r})))},e.prototype.close=function(e){var t=(void 0===e?{disableAutoOpen:!0}:e).disableAutoOpen,r=this._state;t?(r.isBeingOpened&&r.cancelOpen(new exceptions.DatabaseClosed),this._close(),r.autoOpen=!1,r.dbOpenError=new exceptions.DatabaseClosed):(this._close(),r.autoOpen=this._options.autoOpen||r.isBeingOpened,r.openComplete=!1,r.dbOpenError=null)},e.prototype.delete=function(e){var t=this;void 0===e&&(e={disableAutoOpen:!0});var r=arguments.length>0&&"object"!=typeof arguments[0],n=this._state;return new DexiePromise((function(i,o){var a=function(){t.close(e);var r=t._deps.indexedDB.deleteDatabase(t.name);r.onsuccess=wrap$1((function(){_onDatabaseDeleted(t._deps,t.name),i()})),r.onerror=eventRejectHandler(o),r.onblocked=t._fireOnBlocked};if(r)throw new exceptions.InvalidArgument("Invalid closeOptions argument to db.delete()");n.isBeingOpened?n.dbReadyPromise.then(a):a()}))},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return null!==this.idbdb},e.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name},e.prototype.hasFailed=function(){return null!==this._state.dbOpenError},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var e=this;return keys(this._allTables).map((function(t){return e._allTables[t]}))},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var e=extractTransactionArgs.apply(this,arguments);return this._transaction.apply(this,e)},e.prototype._transaction=function(e,t,r){var n=this,i=PSD.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);var o,a,s=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=e instanceof n.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||e===READONLY)o=READONLY;else{if("rw"!=e&&e!=READWRITE)throw new exceptions.InvalidArgument("Invalid transaction mode: "+e);o=READWRITE}if(i){if(i.mode===READONLY&&o===READWRITE){if(!s)throw new exceptions.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&a.forEach((function(e){if(i&&-1===i.storeNames.indexOf(e)){if(!s)throw new exceptions.SubTransaction("Table "+e+" not included in parent transaction.");i=null}})),s&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(function(t,r){r(e)})):rejection(e)}var l=enterTransactionScope.bind(null,this,o,a,i,r);return i?i._promise(o,l,"lock"):PSD.trans?usePSD(PSD.transless,(function(){return n._whenReady(l)})):this._whenReady(l)},e.prototype.table=function(e){if(!hasOwn(this._allTables,e))throw new exceptions.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},e}(),symbolObservable="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Observable=function(){function e(e){this._subscribe=e}return e.prototype.subscribe=function(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})},e.prototype[symbolObservable]=function(){return this},e}(),domDeps;try{domDeps={indexedDB:_global.indexedDB||_global.mozIndexedDB||_global.webkitIndexedDB||_global.msIndexedDB,IDBKeyRange:_global.IDBKeyRange||_global.webkitIDBKeyRange}}catch(e){domDeps={indexedDB:null,IDBKeyRange:null}}function liveQuery(e){var t,r=!1,n=new Observable((function(n){var i=isAsyncFunction(e);var o,a=!1,s={},l={},c={get closed(){return a},unsubscribe:function(){a||(a=!0,o&&o.abort(),u&&globalEvents.storagemutated.unsubscribe(d))}};n.start&&n.start(c);var u=!1,h=function(){return execInGlobalContext(f)};var d=function(e){extendObservabilitySet(s,e),obsSetsOverlap(l,s)&&h()},f=function(){if(!a&&domDeps.indexedDB){s={};var c={};o&&o.abort(),o=new AbortController;var f={subscr:c,signal:o.signal,requery:h,querier:e,trans:null},p=function(t){var r=beginMicroTickScope();try{i&&incrementExpectedAwaits();var n=newScope(e,t);return i&&(n=n.finally(decrementExpectedAwaits)),n}finally{r&&endMicroTickScope()}}(f);Promise.resolve(p).then((function(e){r=!0,t=e,a||f.signal.aborted||(s={},objectIsEmpty(l=c)||u||(globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,d),u=!0),execInGlobalContext((function(){return!a&&n.next&&n.next(e)})))}),(function(e){r=!1,["DatabaseClosedError","AbortError"].includes(null==e?void 0:e.name)||a||execInGlobalContext((function(){a||n.error&&n.error(e)}))}))}};return setTimeout(h,0),c}));return n.hasValue=function(){return r},n.getValue=function(){return t},n}var Dexie=Dexie$1;function propagateLocally(e){var t=propagatingLocally;try{propagatingLocally=!0,globalEvents.storagemutated.fire(e),signalSubscribersNow(e,!0)}finally{propagatingLocally=t}}props(Dexie,__assign(__assign({},fullNameExceptions),{delete:function(e){return new Dexie(e,{addons:[]}).delete()},exists:function(e){return new Dexie(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return getDatabaseNames(Dexie.dependencies).then(e)}catch(e){return rejection(new exceptions.MissingAPI)}},defineClass:function(){return function(e){extend(this,e)}},ignoreTransaction:function(e){return PSD.trans?usePSD(PSD.transless,e):e()},vip:vip,async:function(e){return function(){try{var t=awaitIterator(e.apply(this,arguments));return t&&"function"==typeof t.then?t:DexiePromise.resolve(t)}catch(e){return rejection(e)}}},spawn:function(e,t,r){try{var n=awaitIterator(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:DexiePromise.resolve(n)}catch(e){return rejection(e)}},currentTransaction:{get:function(){return PSD.trans||null}},waitFor:function(e,t){var r=DexiePromise.resolve("function"==typeof e?Dexie.ignoreTransaction(e):e).timeout(t||6e4);return PSD.trans?PSD.trans.waitFor(r):r},Promise:DexiePromise,debug:{get:function(){return debug},set:function(e){setDebug(e)}},derive:derive,extend:extend,props:props,override:override,Events:Events,on:globalEvents,liveQuery:liveQuery,extendObservabilitySet:extendObservabilitySet,getByKeyPath:getByKeyPath,setByKeyPath:setByKeyPath,delByKeyPath:delByKeyPath,shallowClone:shallowClone,deepClone:deepClone,getObjectDiff:getObjectDiff,cmp:cmp,asap:asap$1,minKey:minKey,addons:[],connections:connections,errnames:errnames,dependencies:domDeps,cache:cache,semVer:DEXIE_VERSION,version:DEXIE_VERSION.split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,r){return e+t/Math.pow(10,2*r)}))})),Dexie.maxKey=getMaxKey(Dexie.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,(function(e){var t;propagatingLocally||(t=new CustomEvent(STORAGE_MUTATED_DOM_EVENT_NAME,{detail:e}),propagatingLocally=!0,dispatchEvent(t),propagatingLocally=!1)})),addEventListener(STORAGE_MUTATED_DOM_EVENT_NAME,(function(e){var t=e.detail;propagatingLocally||propagateLocally(t)})));var propagatingLocally=!1,bc,createBC=function(){};"undefined"!=typeof BroadcastChannel&&(createBC=function(){(bc=new BroadcastChannel(STORAGE_MUTATED_DOM_EVENT_NAME)).onmessage=function(e){return e.data&&propagateLocally(e.data)}},createBC(),"function"==typeof bc.unref&&bc.unref(),globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,(function(e){propagatingLocally||bc.postMessage(e)}))),"undefined"!=typeof addEventListener&&(addEventListener("pagehide",(function(e){if(!Dexie$1.disableBfCache&&e.persisted){debug&&console.debug("Dexie: handling persisted pagehide"),null==bc||bc.close();for(var t=0,r=connections;t<r.length;t++){r[t].close({disableAutoOpen:!1})}}})),addEventListener("pageshow",(function(e){!Dexie$1.disableBfCache&&e.persisted&&(debug&&console.debug("Dexie: handling persisted pageshow"),createBC(),propagateLocally({all:new RangeSet(-1/0,[[]])}))}))),DexiePromise.rejectionMapper=mapError,setDebug(debug);var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \" + module + \" not found.') }"),requireFoolWebpack_1=requireFoolWebpack,environment=createCommonjsModule((function(e){var t=function(e){return void 0!==e&&null!=e.versions&&null!=e.versions.node};e.exports.isNode=t,e.exports.platform=void 0!==process$1&&t(process$1)?"node":"browser";var r=function(e){try{return requireFoolWebpack_1(e)}catch(e){return null}}("worker_threads");e.exports.isMainThread="node"===e.exports.platform?(!r||r.isMainThread)&&!process$1.connected:"undefined"!=typeof Window,e.exports.cpus="browser"===e.exports.platform?self.navigator.hardwareConcurrency:requireFoolWebpack_1("os").cpus().length}));function Promise$2(e,t){var r=this;if(!(this instanceof Promise$2))throw new SyntaxError("Constructor must be called with the new operator");if("function"!=typeof e)throw new SyntaxError("Function parameter handler(resolve, reject) missing");var n=[],i=[];this.resolved=!1,this.rejected=!1,this.pending=!0;var o=function(e,t){n.push(e),i.push(t)};this.then=function(e,t){return new Promise$2((function(r,n){var i=e?_then(e,r,n):r,a=t?_then(t,r,n):n;o(i,a)}),r)};var a=function(e){return r.resolved=!0,r.rejected=!1,r.pending=!1,n.forEach((function(t){t(e)})),o=function(t,r){t(e)},a=s=function(){},r},s=function(e){return r.resolved=!1,r.rejected=!0,r.pending=!1,i.forEach((function(t){t(e)})),o=function(t,r){r(e)},a=s=function(){},r};this.cancel=function(){return t?t.cancel():s(new CancellationError),r},this.timeout=function(e){if(t)t.timeout(e);else{var n=setTimeout((function(){s(new TimeoutError("Promise timed out after "+e+" ms"))}),e);r.always((function(){clearTimeout(n)}))}return r},e((function(e){a(e)}),(function(e){s(e)}))}function _then(e,t,r){return function(n){try{var i=e(n);i&&"function"==typeof i.then&&"function"==typeof i.catch?i.then(t,r):t(i)}catch(e){r(e)}}}function CancellationError(e){this.message=e||"promise cancelled",this.stack=(new Error).stack}function TimeoutError(e){this.message=e||"timeout exceeded",this.stack=(new Error).stack}environment.isNode,environment.platform,environment.isMainThread,environment.cpus,Promise$2.prototype.catch=function(e){return this.then(null,e)},Promise$2.prototype.always=function(e){return this.then(e,e)},Promise$2.all=function(e){return new Promise$2((function(t,r){var n=e.length,i=[];n?e.forEach((function(e,o){e.then((function(e){i[o]=e,0==--n&&t(i)}),(function(e){n=0,r(e)}))})):t(i)}))},Promise$2.defer=function(){var e={};return e.promise=new Promise$2((function(t,r){e.resolve=t,e.reject=r})),e},CancellationError.prototype=new Error,CancellationError.prototype.constructor=Error,CancellationError.prototype.name="CancellationError",Promise$2.CancellationError=CancellationError,TimeoutError.prototype=new Error,TimeoutError.prototype.constructor=Error,TimeoutError.prototype.name="TimeoutError",Promise$2.TimeoutError=TimeoutError;var _Promise=Promise$2,__dirname="/Users/wangshuai/workspace/web-design/go-design/node_modules/.pnpm/workerpool@6.4.0/node_modules/workerpool/src",embeddedWorker='!function(){var __webpack_modules__={577:function(e){e.exports=function(e,r){this.message=e,this.transfer=r}}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];return void 0!==r||(r=__webpack_module_cache__[e]={exports:{}},__webpack_modules__[e](r,r.exports,__webpack_require__)),r.exports}var __webpack_exports__={};!function(){var exports=__webpack_exports__,__webpack_unused_export__;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Transfer=__webpack_require__(577),requireFoolWebpack=eval("typeof require !== \'undefined\' ? require : function (module) { throw new Error(\'Module \\" + module + \\" not found.\') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}},WorkerThreads,parentPort;if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(e,r){addEventListener(e,function(e){r(e.data)})},worker.send=function(e){postMessage(e)};else{if("undefined"==typeof process)throw new Error("Script must be executed as a worker");try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(error){if("object"!==_typeof(error)||null===error||"MODULE_NOT_FOUND"!==error.code)throw error}WorkerThreads&&null!==WorkerThreads.parentPort?(parentPort=WorkerThreads.parentPort,worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort)):(worker.on=process.on.bind(process),worker.send=function(e){process.send(e)},worker.on("disconnect",function(){process.exit(1)})),worker.exit=process.exit.bind(process)}function convertError(o){return Object.getOwnPropertyNames(o).reduce(function(e,r){return Object.defineProperty(e,r,{value:o[r],enumerable:!0})},{})}function isPromise(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}worker.methods={},worker.methods.run=function(e,r){e=new Function("return ("+e+").apply(null, arguments);");return e.apply(e,r)},worker.methods.methods=function(){return Object.keys(worker.methods)},worker.terminationHandler=void 0,worker.cleanupAndExit=function(e){function r(){worker.exit(e)}if(!worker.terminationHandler)return r();var o=worker.terminationHandler(e);isPromise(o)?o.then(r,r):r()};var currentRequestId=null;worker.on("message",function(r){if(r===TERMINATE_METHOD_ID)return worker.cleanupAndExit(0);try{var e=worker.methods[r.method];if(!e)throw new Error(\'Unknown method "\'+r.method+\'"\');currentRequestId=r.id;var o=e.apply(e,r.params);isPromise(o)?o.then(function(e){e instanceof Transfer?worker.send({id:r.id,result:e.message,error:null},e.transfer):worker.send({id:r.id,result:e,error:null}),currentRequestId=null}).catch(function(e){worker.send({id:r.id,result:null,error:convertError(e)}),currentRequestId=null}):(o instanceof Transfer?worker.send({id:r.id,result:o.message,error:null},o.transfer):worker.send({id:r.id,result:o,error:null}),currentRequestId=null)}catch(e){worker.send({id:r.id,result:null,error:convertError(e)})}}),worker.register=function(e,r){if(e)for(var o in e)e.hasOwnProperty(o)&&(worker.methods[o]=e[o]);r&&(worker.terminationHandler=r.onTerminate),worker.send("ready")},worker.emit=function(e){currentRequestId&&(e instanceof Transfer?worker.send({id:currentRequestId,isEvent:!0,payload:e.message},e.transfer):worker.send({id:currentRequestId,isEvent:!0,payload:e}))},__webpack_unused_export__=worker.register,worker.emit}()}();',TERMINATE_METHOD_ID="__workerpool-terminate__";function ensureWorkerThreads(){var e=tryRequireWorkerThreads();if(!e)throw new Error("WorkerPool: workerType = 'thread' is not supported, Node >= 11.7.0 required");return e}function ensureWebWorker(){if("function"!=typeof Worker&&("object"!=typeof Worker||"function"!=typeof Worker.prototype.constructor))throw new Error("WorkerPool: Web Workers not supported")}function tryRequireWorkerThreads(){try{return requireFoolWebpack_1("worker_threads")}catch(e){if("object"==typeof e&&null!==e&&"MODULE_NOT_FOUND"===e.code)return null;throw e}}function getDefaultWorker(){if("browser"===environment.platform){if("undefined"==typeof Blob)throw new Error("Blob not supported by the browser");if(!window.URL||"function"!=typeof window.URL.createObjectURL)throw new Error("URL.createObjectURL not supported by the browser");var e=new Blob([embeddedWorker],{type:"text/javascript"});return window.URL.createObjectURL(e)}return __dirname+"/worker.js"}function setupWorker(e,t){if("web"===t.workerType)return ensureWebWorker(),setupBrowserWorker(e,Worker);if("thread"===t.workerType)return setupWorkerThreadWorker(e,r=ensureWorkerThreads(),t.workerThreadOpts);if("process"!==t.workerType&&t.workerType){if("browser"===environment.platform)return ensureWebWorker(),setupBrowserWorker(e,Worker);var r=tryRequireWorkerThreads();return r?setupWorkerThreadWorker(e,r):setupProcessWorker(e,resolveForkOptions(t),requireFoolWebpack_1("child_process"))}return setupProcessWorker(e,resolveForkOptions(t),requireFoolWebpack_1("child_process"))}function setupBrowserWorker(e,t){var r=new t(e);return r.isBrowserWorker=!0,r.on=function(e,t){this.addEventListener(e,(function(e){t(e.data)}))},r.send=function(e,t){this.postMessage(e,t)},r}function setupWorkerThreadWorker(e,t,r){var n=new t.Worker(e,{stdout:!1,stderr:!1,...r});return n.isWorkerThread=!0,n.send=function(e,t){this.postMessage(e,t)},n.kill=function(){return this.terminate(),!0},n.disconnect=function(){this.terminate()},n}function setupProcessWorker(e,t,r){var n=r.fork(e,t.forkArgs,t.forkOpts),i=n.send;return n.send=function(e){return i.call(n,e)},n.isChildProcess=!0,n}function resolveForkOptions(e){e=e||{};var t=process$1.execArgv.join(" "),r=-1!==t.indexOf("--inspect"),n=-1!==t.indexOf("--debug-brk"),i=[];return r&&(i.push("--inspect="+e.debugPort),n&&i.push("--debug-brk")),process$1.execArgv.forEach((function(e){e.indexOf("--max-old-space-size")>-1&&i.push(e)})),Object.assign({},e,{forkArgs:e.forkArgs,forkOpts:Object.assign({},e.forkOpts,{execArgv:(e.forkOpts&&e.forkOpts.execArgv||[]).concat(i)})})}function objectToError(e){for(var t=new Error(""),r=Object.keys(e),n=0;n<r.length;n++)t[r[n]]=e[r[n]];return t}function WorkerHandler(e,t){var r=this,n=t||{};function i(e){for(var t in r.terminated=!0,r.processing)void 0!==r.processing[t]&&r.processing[t].resolver.reject(e);r.processing=Object.create(null)}this.script=e||getDefaultWorker(),this.worker=setupWorker(this.script,n),this.debugPort=n.debugPort,this.forkOpts=n.forkOpts,this.forkArgs=n.forkArgs,this.workerThreadOpts=n.workerThreadOpts,this.workerTerminateTimeout=n.workerTerminateTimeout,e||(this.worker.ready=!0),this.requestQueue=[],this.worker.on("message",(function(e){if(!r.terminated)if("string"==typeof e&&"ready"===e)r.worker.ready=!0,function(){for(const e of r.requestQueue.splice(0))r.worker.send(e.message,e.transfer)}();else{var t=e.id,n=r.processing[t];void 0!==n&&(e.isEvent?n.options&&"function"==typeof n.options.on&&n.options.on(e.payload):(delete r.processing[t],!0===r.terminating&&r.terminate(),e.error?n.resolver.reject(objectToError(e.error)):n.resolver.resolve(e.result)))}}));var o=this.worker;this.worker.on("error",i),this.worker.on("exit",(function(e,t){var n="Workerpool Worker terminated Unexpectedly\n";n+=" exitCode: `"+e+"`\n",n+=" signalCode: `"+t+"`\n",n+=" workerpool.script: `"+r.script+"`\n",n+=" spawnArgs: `"+o.spawnargs+"`\n",n+=" spawnfile: `"+o.spawnfile+"`\n",n+=" stdout: `"+o.stdout+"`\n",n+=" stderr: `"+o.stderr+"`\n",i(new Error(n))})),this.processing=Object.create(null),this.terminating=!1,this.terminated=!1,this.cleaning=!1,this.terminationHandler=null,this.lastId=0}WorkerHandler.prototype.methods=function(){return this.exec("methods")},WorkerHandler.prototype.exec=function(e,t,r,n){r||(r=_Promise.defer());var i=++this.lastId;this.processing[i]={id:i,resolver:r,options:n};var o={message:{id:i,method:e,params:t},transfer:n&&n.transfer};this.terminated?r.reject(new Error("Worker is terminated")):this.worker.ready?this.worker.send(o.message,o.transfer):this.requestQueue.push(o);var a=this;return r.promise.catch((function(e){if(e instanceof _Promise.CancellationError||e instanceof _Promise.TimeoutError)return delete a.processing[i],a.terminateAndNotify(!0).then((function(){throw e}),(function(e){throw e}));throw e}))},WorkerHandler.prototype.busy=function(){return this.cleaning||Object.keys(this.processing).length>0},WorkerHandler.prototype.terminate=function(e,t){var r=this;if(e){for(var n in this.processing)void 0!==this.processing[n]&&this.processing[n].resolver.reject(new Error("Worker terminated"));this.processing=Object.create(null)}if("function"==typeof t&&(this.terminationHandler=t),this.busy())this.terminating=!0;else{var i=function(e){if(r.terminated=!0,r.cleaning=!1,null!=r.worker&&r.worker.removeAllListeners&&r.worker.removeAllListeners("message"),r.worker=null,r.terminating=!1,r.terminationHandler)r.terminationHandler(e,r);else if(e)throw e};if(this.worker){if("function"==typeof this.worker.kill){if(this.worker.killed)return void i(new Error("worker already killed!"));var o=setTimeout((function(){r.worker&&r.worker.kill()}),this.workerTerminateTimeout);return this.worker.once("exit",(function(){clearTimeout(o),r.worker&&(r.worker.killed=!0),i()})),this.worker.ready?this.worker.send(TERMINATE_METHOD_ID):this.requestQueue.push(TERMINATE_METHOD_ID),void(this.cleaning=!0)}if("function"!=typeof this.worker.terminate)throw new Error("Failed to terminate worker");this.worker.terminate(),this.worker.killed=!0}i()}},WorkerHandler.prototype.terminateAndNotify=function(e,t){var r=_Promise.defer();return t&&(r.promise.timeout=t),this.terminate(e,(function(e,t){e?r.reject(e):r.resolve(t)})),r.promise};var WorkerHandler_1=WorkerHandler,_tryRequireWorkerThreads=tryRequireWorkerThreads,_setupProcessWorker=setupProcessWorker,_setupBrowserWorker=setupBrowserWorker,_setupWorkerThreadWorker=setupWorkerThreadWorker,ensureWorkerThreads_1=ensureWorkerThreads;WorkerHandler_1._tryRequireWorkerThreads=_tryRequireWorkerThreads,WorkerHandler_1._setupProcessWorker=_setupProcessWorker,WorkerHandler_1._setupBrowserWorker=_setupBrowserWorker,WorkerHandler_1._setupWorkerThreadWorker=_setupWorkerThreadWorker,WorkerHandler_1.ensureWorkerThreads=ensureWorkerThreads_1;var MAX_PORTS=65535,debugPortAllocator=DebugPortAllocator;function DebugPortAllocator(){this.ports=Object.create(null),this.length=0}DebugPortAllocator.prototype.nextAvailableStartingAt=function(e){for(;!0===this.ports[e];)e++;if(e>=MAX_PORTS)throw new Error("WorkerPool debug port limit reached: "+e+">= "+MAX_PORTS);return this.ports[e]=!0,this.length++,e},DebugPortAllocator.prototype.releasePort=function(e){delete this.ports[e],this.length--};var DEBUG_PORT_ALLOCATOR=new debugPortAllocator;function Pool(e,t){"string"==typeof e?this.script=e||null:(this.script=null,t=e),this.workers=[],this.tasks=[],t=t||{},this.forkArgs=Object.freeze(t.forkArgs||[]),this.forkOpts=Object.freeze(t.forkOpts||{}),this.workerThreadOpts=Object.freeze(t.workerThreadOpts||{}),this.debugPortStart=t.debugPortStart||43210,this.nodeWorker=t.nodeWorker,this.workerType=t.workerType||t.nodeWorker||"auto",this.maxQueueSize=t.maxQueueSize||1/0,this.workerTerminateTimeout=t.workerTerminateTimeout||1e3,this.onCreateWorker=t.onCreateWorker||(()=>null),this.onTerminateWorker=t.onTerminateWorker||(()=>null),t&&"maxWorkers"in t?(validateMaxWorkers(t.maxWorkers),this.maxWorkers=t.maxWorkers):this.maxWorkers=Math.max((environment.cpus||4)-1,1),t&&"minWorkers"in t&&("max"===t.minWorkers?this.minWorkers=this.maxWorkers:(validateMinWorkers(t.minWorkers),this.minWorkers=t.minWorkers,this.maxWorkers=Math.max(this.minWorkers,this.maxWorkers)),this._ensureMinWorkers()),this._boundNext=this._next.bind(this),"thread"===this.workerType&&WorkerHandler_1.ensureWorkerThreads()}function validateMaxWorkers(e){if(!isNumber(e)||!isInteger(e)||e<1)throw new TypeError("Option maxWorkers must be an integer number >= 1")}function validateMinWorkers(e){if(!isNumber(e)||!isInteger(e)||e<0)throw new TypeError("Option minWorkers must be an integer number >= 0")}function isNumber(e){return"number"==typeof e}function isInteger(e){return Math.round(e)==e}Pool.prototype.exec=function(e,t,r){if(t&&!Array.isArray(t))throw new TypeError('Array expected as argument "params"');if("string"==typeof e){var n=_Promise.defer();if(this.tasks.length>=this.maxQueueSize)throw new Error("Max queue size of "+this.maxQueueSize+" reached");var i=this.tasks,o={method:e,params:t,resolver:n,timeout:null,options:r};i.push(o);var a=n.promise.timeout;return n.promise.timeout=function(e){return-1!==i.indexOf(o)?(o.timeout=e,n.promise):a.call(n.promise,e)},this._next(),n.promise}if("function"==typeof e)return this.exec("run",[String(e),t]);throw new TypeError('Function or string expected as argument "method"')},Pool.prototype.proxy=function(){if(arguments.length>0)throw new Error("No arguments expected");var e=this;return this.exec("methods").then((function(t){var r={};return t.forEach((function(t){r[t]=function(){return e.exec(t,Array.prototype.slice.call(arguments))}})),r}))},Pool.prototype._next=function(){if(this.tasks.length>0){var e=this._getWorker();if(e){var t=this,r=this.tasks.shift();if(r.resolver.promise.pending){var n=e.exec(r.method,r.params,r.resolver,r.options).then(t._boundNext).catch((function(){if(e.terminated)return t._removeWorker(e)})).then((function(){t._next()}));"number"==typeof r.timeout&&n.timeout(r.timeout)}else t._next()}}},Pool.prototype._getWorker=function(){for(var e=this.workers,t=0;t<e.length;t++){var r=e[t];if(!1===r.busy())return r}return e.length<this.maxWorkers?(r=this._createWorkerHandler(),e.push(r),r):null},Pool.prototype._removeWorker=function(e){var t=this;return DEBUG_PORT_ALLOCATOR.releasePort(e.debugPort),this._removeWorkerFromList(e),this._ensureMinWorkers(),new _Promise((function(r,n){e.terminate(!1,(function(i){t.onTerminateWorker({forkArgs:e.forkArgs,forkOpts:e.forkOpts,workerThreadOpts:e.workerThreadOpts,script:e.script}),i?n(i):r(e)}))}))},Pool.prototype._removeWorkerFromList=function(e){var t=this.workers.indexOf(e);-1!==t&&this.workers.splice(t,1)},Pool.prototype.terminate=function(e,t){var r=this;this.tasks.forEach((function(e){e.resolver.reject(new Error("Pool terminated"))})),this.tasks.length=0;var n=function(e){DEBUG_PORT_ALLOCATOR.releasePort(e.debugPort),this._removeWorkerFromList(e)}.bind(this),i=[];return this.workers.slice().forEach((function(o){var a=o.terminateAndNotify(e,t).then(n).always((function(){r.onTerminateWorker({forkArgs:o.forkArgs,forkOpts:o.forkOpts,workerThreadOpts:o.workerThreadOpts,script:o.script})}));i.push(a)})),_Promise.all(i)},Pool.prototype.stats=function(){var e=this.workers.length,t=this.workers.filter((function(e){return e.busy()})).length;return{totalWorkers:e,busyWorkers:t,idleWorkers:e-t,pendingTasks:this.tasks.length,activeTasks:t}},Pool.prototype._ensureMinWorkers=function(){if(this.minWorkers)for(var e=this.workers.length;e<this.minWorkers;e++)this.workers.push(this._createWorkerHandler())},Pool.prototype._createWorkerHandler=function(){const e=this.onCreateWorker({forkArgs:this.forkArgs,forkOpts:this.forkOpts,workerThreadOpts:this.workerThreadOpts,script:this.script})||{};return new WorkerHandler_1(e.script||this.script,{forkArgs:e.forkArgs||this.forkArgs,forkOpts:e.forkOpts||this.forkOpts,workerThreadOpts:e.workerThreadOpts||this.workerThreadOpts,debugPort:DEBUG_PORT_ALLOCATOR.nextAvailableStartingAt(this.debugPortStart),workerType:this.workerType,workerTerminateTimeout:this.workerTerminateTimeout})};var Pool_1=Pool;function Transfer$1(e,t){this.message=e,this.transfer=t}var transfer=Transfer$1,worker_1=createCommonjsModule((function(module,exports){var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \" + module + \" not found.') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}};if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(e,t){addEventListener(e,(function(e){t(e.data)}))},worker.send=function(e){postMessage(e)};else{if(void 0===process$1)throw new Error("Script must be executed as a worker");var WorkerThreads;try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(e){if("object"!=typeof e||null===e||"MODULE_NOT_FOUND"!==e.code)throw e}if(WorkerThreads&&null!==WorkerThreads.parentPort){var parentPort=WorkerThreads.parentPort;worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort),worker.exit=process$1.exit.bind(process$1)}else worker.on=process$1.on.bind(process$1),worker.send=function(e){process$1.send(e)},worker.on("disconnect",(function(){process$1.exit(1)})),worker.exit=process$1.exit.bind(process$1)}function convertError(e){return Object.getOwnPropertyNames(e).reduce((function(t,r){return Object.defineProperty(t,r,{value:e[r],enumerable:!0})}),{})}function isPromise(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}worker.methods={},worker.methods.run=function(e,t){var r=new Function("return ("+e+").apply(null, arguments);");return r.apply(r,t)},worker.methods.methods=function(){return Object.keys(worker.methods)},worker.terminationHandler=void 0,worker.cleanupAndExit=function(e){var t=function(){worker.exit(e)};if(!worker.terminationHandler)return t();var r=worker.terminationHandler(e);isPromise(r)?r.then(t,t):t()};var currentRequestId=null;worker.on("message",(function(e){if(e===TERMINATE_METHOD_ID)return worker.cleanupAndExit(0);try{var t=worker.methods[e.method];if(!t)throw new Error('Unknown method "'+e.method+'"');currentRequestId=e.id;var r=t.apply(t,e.params);isPromise(r)?r.then((function(t){t instanceof transfer?worker.send({id:e.id,result:t.message,error:null},t.transfer):worker.send({id:e.id,result:t,error:null}),currentRequestId=null})).catch((function(t){worker.send({id:e.id,result:null,error:convertError(t)}),currentRequestId=null})):(r instanceof transfer?worker.send({id:e.id,result:r.message,error:null},r.transfer):worker.send({id:e.id,result:r,error:null}),currentRequestId=null)}catch(t){worker.send({id:e.id,result:null,error:convertError(t)})}})),worker.register=function(e,t){if(e)for(var r in e)e.hasOwnProperty(r)&&(worker.methods[r]=e[r]);t&&(worker.terminationHandler=t.onTerminate),worker.send("ready")},worker.emit=function(e){if(currentRequestId){if(e instanceof transfer)return void worker.send({id:currentRequestId,isEvent:!0,payload:e.message},e.transfer);worker.send({id:currentRequestId,isEvent:!0,payload:e})}},exports.add=worker.register,exports.emit=worker.emit}));worker_1.add,worker_1.emit;var pool=function(e,t){return new Pool_1(e,t)},worker=function(e,t){var r=worker_1;r.add(e,t)},workerEmit=function(e){worker_1.emit(e)},Promise$1=_Promise,Transfer=transfer,platform=environment.platform,isMainThread=environment.isMainThread,cpus=environment.cpus,src={pool:pool,worker:worker,workerEmit:workerEmit,Promise:Promise$1,Transfer:Transfer,platform:platform,isMainThread:isMainThread,cpus:cpus},interopRequireDefault=createCommonjsModule((function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}));unwrapExports(interopRequireDefault);var colorName={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]},isArrayish=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))},simpleSwizzle=createCommonjsModule((function(e){var t=Array.prototype.concat,r=Array.prototype.slice,n=e.exports=function(e){for(var n=[],i=0,o=e.length;i<o;i++){var a=e[i];isArrayish(a)?n=t.call(n,r.call(a)):n.push(a)}return n};n.wrap=function(e){return function(){return e(n(arguments))}}})),colorString=createCommonjsModule((function(e){var t=Object.hasOwnProperty,r=Object.create(null);for(var n in colorName)t.call(colorName,n)&&(r[colorName[n]]=n);var i=e.exports={to:{},get:{}};function o(e,t,r){return Math.min(Math.max(t,e),r)}function a(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}i.get=function(e){var t,r;switch(e.substring(0,3).toLowerCase()){case"hsl":t=i.get.hsl(e),r="hsl";break;case"hwb":t=i.get.hwb(e),r="hwb";break;default:t=i.get.rgb(e),r="rgb"}return t?{model:r,value:t}:null},i.get.rgb=function(e){if(!e)return null;var r,n,i,a=[0,0,0,1];if(r=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=r[2],r=r[1],n=0;n<3;n++){var s=2*n;a[n]=parseInt(r.slice(s,s+2),16)}i&&(a[3]=parseInt(i,16)/255)}else if(r=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(r=r[1])[3],n=0;n<3;n++)a[n]=parseInt(r[n]+r[n],16);i&&(a[3]=parseInt(i+i,16)/255)}else if(r=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=parseInt(r[n+1],0);r[4]&&(r[5]?a[3]=.01*parseFloat(r[4]):a[3]=parseFloat(r[4]))}else{if(!(r=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(r=e.match(/^(\w+)$/))?"transparent"===r[1]?[0,0,0,0]:t.call(colorName,r[1])?((a=colorName[r[1]])[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(r[n+1]));r[4]&&(r[5]?a[3]=.01*parseFloat(r[4]):a[3]=parseFloat(r[4]))}for(n=0;n<3;n++)a[n]=o(a[n],0,255);return a[3]=o(a[3],0,1),a},i.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,o(parseFloat(t[2]),0,100),o(parseFloat(t[3]),0,100),o(isNaN(r)?1:r,0,1)]}return null},i.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var r=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,o(parseFloat(t[2]),0,100),o(parseFloat(t[3]),0,100),o(isNaN(r)?1:r,0,1)]}return null},i.to.hex=function(){var e=simpleSwizzle(arguments);return"#"+a(e[0])+a(e[1])+a(e[2])+(e[3]<1?a(Math.round(255*e[3])):"")},i.to.rgb=function(){var e=simpleSwizzle(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},i.to.rgb.percent=function(){var e=simpleSwizzle(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"},i.to.hsl=function(){var e=simpleSwizzle(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},i.to.hwb=function(){var e=simpleSwizzle(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},i.to.keyword=function(e){return r[e.slice(0,3)]}}));colorString.to,colorString.get;const reverseKeywords={};for(const e of Object.keys(colorName))reverseKeywords[colorName[e]]=e;const convert$1={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var conversions=convert$1;for(const e of Object.keys(convert$1)){if(!("channels"in convert$1[e]))throw new Error("missing channels property: "+e);if(!("labels"in convert$1[e]))throw new Error("missing channel labels property: "+e);if(convert$1[e].labels.length!==convert$1[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=convert$1[e];delete convert$1[e].channels,delete convert$1[e].labels,Object.defineProperty(convert$1[e],"channels",{value:t}),Object.defineProperty(convert$1[e],"labels",{value:r})}function comparativeDistance(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}function buildGraph(){const e={},t=Object.keys(conversions);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}function deriveBFS(e){const t=buildGraph(),r=[e];for(t[e].distance=0;r.length;){const e=r.pop(),n=Object.keys(conversions[e]);for(let i=n.length,o=0;o<i;o++){const i=n[o],a=t[i];-1===a.distance&&(a.distance=t[e].distance+1,a.parent=e,r.unshift(i))}}return t}function link(e,t){return function(r){return t(e(r))}}function wrapConversion(e,t){const r=[t[e].parent,e];let n=conversions[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)r.unshift(t[i].parent),n=link(conversions[t[i].parent][i],n),i=t[i].parent;return n.conversion=r,n}convert$1.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=o-i;let s,l;o===i?s=0:t===o?s=(r-n)/a:r===o?s=2+(n-t)/a:n===o&&(s=4+(t-r)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(i+o)/2;return l=o===i?0:c<=.5?a/(o+i):a/(2-o-i),[s,100*l,100*c]},convert$1.rgb.hsv=function(e){let t,r,n,i,o;const a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),h=function(e){return(c-e)/6/u+.5};return 0===u?(i=0,o=0):(o=u/c,t=h(a),r=h(s),n=h(l),a===c?i=n-r:s===c?i=1/3+t-n:l===c&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},convert$1.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const i=convert$1.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[i,100*o,100*n]},convert$1.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n);return[100*((1-t-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},convert$1.rgb.keyword=function(e){const t=reverseKeywords[e];if(t)return t;let r,n=1/0;for(const t of Object.keys(colorName)){const i=comparativeDistance(e,colorName[t]);i<n&&(n=i,r=t)}return r},convert$1.keyword.rgb=function(e){return colorName[e]},convert$1.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},convert$1.rgb.lab=function(e){const t=convert$1.rgb.xyz(e);let r=t[0],n=t[1],i=t[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*n-16,500*(r-n),200*(n-i)]},convert$1.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let i,o,a;if(0===r)return a=255*n,[a,a,a];i=n<.5?n*(1+r):n+r-n*r;const s=2*n-i,l=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,a=6*o<1?s+6*(i-s)*o:2*o<1?i:3*o<2?s+(i-s)*(2/3-o)*6:s,l[e]=255*a;return l},convert$1.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,i=r;const o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=o<=1?o:2-o;return[t,100*(0===n?2*i/(o+i):2*r/(n+r)),100*((n+r)/2)]},convert$1.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),a=255*n*(1-r),s=255*n*(1-r*o),l=255*n*(1-r*(1-o));switch(n*=255,i){case 0:return[n,l,a];case 1:return[s,n,a];case 2:return[a,n,l];case 3:return[a,s,n];case 4:return[l,a,n];case 5:return[n,a,s]}},convert$1.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01);let o,a;a=(2-r)*n;const s=(2-r)*i;return o=r*i,o/=s<=1?s:2-s,o=o||0,a/=2,[t,100*o,100*a]},convert$1.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const i=r+n;let o;i>1&&(r/=i,n/=i);const a=Math.floor(6*t),s=1-n;o=6*t-a,1&a&&(o=1-o);const l=r+o*(s-r);let c,u,h;switch(a){default:case 6:case 0:c=s,u=l,h=r;break;case 1:c=l,u=s,h=r;break;case 2:c=r,u=s,h=l;break;case 3:c=r,u=l,h=s;break;case 4:c=l,u=r,h=s;break;case 5:c=s,u=r,h=l}return[255*c,255*u,255*h]},convert$1.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},convert$1.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let i,o,a;return i=3.2406*t+-1.5372*r+-.4986*n,o=-.9689*t+1.8758*r+.0415*n,a=.0557*t+-.204*r+1.057*n,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[255*i,255*o,255*a]},convert$1.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},convert$1.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const i=r**3,o=t**3,a=n**3;return r=i>.008856?i:(r-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,n=a>.008856?a:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},convert$1.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let i;i=360*Math.atan2(n,r)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(r*r+n*n),i]},convert$1.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},convert$1.rgb.ansi16=function(e,t=null){const[r,n,i]=e;let o=null===t?convert$1.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let a=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===o&&(a+=60),a},convert$1.hsv.ansi16=function(e){return convert$1.rgb.ansi16(convert$1.hsv.rgb(e),e[2])},convert$1.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},convert$1.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},convert$1.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},convert$1.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},convert$1.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map((e=>e+e)).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},convert$1.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),a=i-o;let s,l;return s=a<1?o/(1-a):0,l=a<=0?0:i===t?(r-n)/a%6:i===r?2+(n-t)/a:4+(t-r)/a,l/=6,l%=1,[360*l,100*a,100*s]},convert$1.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},convert$1.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},convert$1.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const i=[0,0,0],o=t%1*6,a=o%1,s=1-a;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-r)*n,[255*(r*i[0]+l),255*(r*i[1]+l),255*(r*i[2]+l)]},convert$1.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},convert$1.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},convert$1.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},convert$1.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},convert$1.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},convert$1.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},convert$1.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},convert$1.gray.hsl=function(e){return[0,0,e[0]]},convert$1.gray.hsv=convert$1.gray.hsl,convert$1.gray.hwb=function(e){return[0,100,e[0]]},convert$1.gray.cmyk=function(e){return[0,0,0,e[0]]},convert$1.gray.lab=function(e){return[e[0],0,0]},convert$1.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},convert$1.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};var route=function(e){const t=deriveBFS(e),r={},n=Object.keys(t);for(let e=n.length,i=0;i<e;i++){const e=n[i];null!==t[e].parent&&(r[e]=wrapConversion(e,t))}return r};const convert={},models=Object.keys(conversions);function wrapRaw(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function wrapRounded(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}models.forEach((e=>{convert[e]={},Object.defineProperty(convert[e],"channels",{value:conversions[e].channels}),Object.defineProperty(convert[e],"labels",{value:conversions[e].labels});const t=route(e);Object.keys(t).forEach((r=>{const n=t[r];convert[e][r]=wrapRounded(n),convert[e][r].raw=wrapRaw(n)}))}));var colorConvert=convert;const skippedModels=["keyword","gray","hex"],hashedModelKeys={};for(const e of Object.keys(colorConvert))hashedModelKeys[[...colorConvert[e].labels].sort().join("")]=e;const limiters={};function Color(e,t){if(!(this instanceof Color))return new Color(e,t);if(t&&t in skippedModels&&(t=null),t&&!(t in colorConvert))throw new Error("Unknown model: "+t);let r,n;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof Color)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=colorString.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,n=colorConvert[this.model].channels,this.color=t.value.slice(0,n),this.valpha="number"==typeof t.value[n]?t.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=colorConvert[this.model].channels;const r=Array.prototype.slice.call(e,0,n);this.color=zeroArray(r,n),this.valpha="number"==typeof e[n]?e[n]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const n=t.sort().join("");if(!(n in hashedModelKeys))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=hashedModelKeys[n];const{labels:i}=colorConvert[this.model],o=[];for(r=0;r<i.length;r++)o.push(e[i[r]]);this.color=zeroArray(o)}if(limiters[this.model])for(n=colorConvert[this.model].channels,r=0;r<n;r++){const e=limiters[this.model][r];e&&(this.color[r]=e(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}Color.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in colorString.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const r=1===t.valpha?t.color:[...t.color,this.valpha];return colorString.to[t.model](r)},percentString(e){const t=this.rgb().round("number"==typeof e?e:1),r=1===t.valpha?t.color:[...t.color,this.valpha];return colorString.to.rgb.percent(r)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=colorConvert[this.model],{labels:r}=colorConvert[this.model];for(let n=0;n<t;n++)e[r[n]]=this.color[n];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new Color([...this.color.map(roundToPlace(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new Color([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:getset("rgb",0,maxfn(255)),green:getset("rgb",1,maxfn(255)),blue:getset("rgb",2,maxfn(255)),hue:getset(["hsl","hsv","hsl","hwb","hcg"],0,(e=>(e%360+360)%360)),saturationl:getset("hsl",1,maxfn(100)),lightness:getset("hsl",2,maxfn(100)),saturationv:getset("hsv",1,maxfn(100)),value:getset("hsv",2,maxfn(100)),chroma:getset("hcg",1,maxfn(100)),gray:getset("hcg",2,maxfn(100)),white:getset("hwb",1,maxfn(100)),wblack:getset("hwb",2,maxfn(100)),cyan:getset("cmyk",0,maxfn(100)),magenta:getset("cmyk",1,maxfn(100)),yellow:getset("cmyk",2,maxfn(100)),black:getset("cmyk",3,maxfn(100)),x:getset("xyz",0,maxfn(95.047)),y:getset("xyz",1,maxfn(100)),z:getset("xyz",2,maxfn(108.833)),l:getset("lab",0,maxfn(100)),a:getset("lab",1),b:getset("lab",2),keyword(e){return void 0!==e?new Color(e):colorConvert[this.model].keyword(this.color)},hex(e){return void 0!==e?new Color(e):colorString.to.hex(this.rgb().round().color)},hexa(e){if(void 0!==e)return new Color(e);const t=this.rgb().round().color;let r=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===r.length&&(r="0"+r),colorString.to.hex(t)+r},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[r,n]of e.entries()){const e=n/255;t[r]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return Color.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const r=e.rgb(),n=this.rgb(),i=void 0===t?.5:t,o=2*i-1,a=r.alpha()-n.alpha(),s=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return Color.rgb(s*r.red()+l*n.red(),s*r.green()+l*n.green(),s*r.blue()+l*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};for(const e of Object.keys(colorConvert)){if(skippedModels.includes(e))continue;const{channels:t}=colorConvert[e];Color.prototype[e]=function(...t){return this.model===e?new Color(this):t.length>0?new Color(t,e):new Color([...assertArray(colorConvert[this.model][e].raw(this.color)),this.valpha],e)},Color[e]=function(...r){let n=r[0];return"number"==typeof n&&(n=zeroArray(r,t)),new Color(n,e)}}function roundTo(e,t){return Number(e.toFixed(t))}function roundToPlace(e){return function(t){return roundTo(t,e)}}function getset(e,t,r){e=Array.isArray(e)?e:[e];for(const n of e)(limiters[n]||(limiters[n]=[]))[t]=r;return e=e[0],function(n){let i;return void 0!==n?(r&&(n=r(n)),i=this[e](),i.color[t]=n,i):(i=this[e]().color[t],r&&(i=r(i)),i)}}function maxfn(e){return function(t){return Math.max(0,Math.min(e,t))}}function assertArray(e){return Array.isArray(e)?e:[e]}function zeroArray(e,t){for(let r=0;r<t;r++)"number"!=typeof e[r]&&(e[r]=0);return e}var color=Color,tools=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.array2obj=function(e,t){for(var r={},n=0;n<e.length;n++)r[e[n][t]]=e[n];return r},t.assignIn=function e(t,r){if(!r)return t;for(let n in r)n in t&&t[n]&&"object"==typeof t[n]&&!Array.isArray(t[n])?e(t[n],r[n]):t[n]=r[n];return t},t.capitalize=function(e){return`${e[0].toUpperCase()}${e.slice(1)}`},t.deepClone=function(e){return e&&JSON.parse(JSON.stringify(e))},t.determineResourcePath=function(e,t){if(e.startsWith("http"))return e;let r="";r=e.startsWith("/anov-prod")||e.startsWith("./anov-prod")?e:`${t}${e}`;return r},t.getMax=function(e,t){for(var r=0,n=e.length,i=0;i<n;i++){var o=e[i][t];r<o&&(r=o)}return r},t.getValueByPath=n,t.guid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.queryString=void 0,t.randomStr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t="";t="string"==typeof e?e:new Array(e).fill("%");let n=new Array(t.length).fill(null);for(let e=0;e<t.length;e++){let i=t[e];if("%"===i){let e=Math.random()*r.length|0;i=r[e]}n[e]=i}return n.join("")},t.round=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return+e.toFixed(t)},t.scaleLinear=function(e,t,r,n){if(e===t)throw Error("min 和 max 值不能相等");const i=(n-r)/(t-e);return e=>r+i*e},t.setValueByPath=function(e,t,r){if(t.startsWith(".")||t.endsWith("."))throw new Error("path 路径不符合规范,不能以'.'开头或结尾");let i=t;const o=t.lastIndexOf(".");if(o>0){e=n(e,t.slice(0,o)),i=t.slice(o+1)}null!=e&&(e[i]=r)},t.trimEndWhiteLine=t.stringFormatter=void 0;t.stringFormatter=(e,t)=>e.replace(/\{([^{^}]*)\}/g,((e,r)=>n(t,r)));t.queryString=e=>{for(var t=window.location.search.substring(1).split("&"),r=0;r<t.length;r++){var n=t[r].split("=");if(n[0]==e)return n[1]}return!1};const r=[...new Array(26).fill(0).map(((e,t)=>String.fromCharCode("a".charCodeAt(0)+t))),...new Array(26).fill(0).map(((e,t)=>String.fromCharCode("A".charCodeAt(0)+t))),...new Array(10).fill(0).map(((e,t)=>String.fromCharCode("0".charCodeAt(0)+t)))];function n(e,t){if(t.startsWith(".")||t.endsWith("."))throw new Error("path 路径不符合规范,不能以'.'开头或结尾");const r=t.split(".");let n=e;for(let e=0;e<r.length;e++){if(n=n[r[e]],null==n)break}return n}t.trimEndWhiteLine=e=>e.replace(/[\n\s]+$/,"")}));unwrapExports(tools),tools.array2obj,tools.assignIn,tools.capitalize,tools.deepClone,tools.determineResourcePath,tools.getMax,tools.getValueByPath,tools.guid,tools.queryString,tools.randomStr,tools.round,tools.scaleLinear,tools.setValueByPath,tools.trimEndWhiteLine,tools.stringFormatter;var optionTheme=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.setColorByTheme=function(e){n(e,!0)},t.setDefaultColorByTheme=function(e){n(e,!1)},t.setOptionColorByTheme=function(e,t,n){if(console.log(e,t,n),!n||!e||!t)return;let i=Reflect.ownKeys(n);for(let l of i){const i=n[l];let c,u=null,h=1,d=0;if("string"==typeof i)u=i;else if(Reflect.has(i,"key")){var o,a;u=i.key,h=null!==(o=i.opacity)&&void 0!==o?o:1,d=null!==(a=i.opacityStep)&&void 0!==a?a:0}if(u&&(c=(0,tools.getValueByPath)(t,u)),c){s(e,l,(0,r.default)(c),h,d)}}};var r=interopRequireDefault(color);function n(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],{theme:r,option:s,optionDes:l}=e;s&&l&&r&&Object.keys(l).forEach((c=>{"conditionSeries"===l[c].type||"tabs"===l[c].type?function(e,t,r,i,o,a){let s=t.form,l=e;if(Array.isArray(s))for(let e=0;e<s.length;e++){let t,r=s[e];t=a?l[e].form:l[e],n({option:t,optionDes:r,theme:i},o)}else{let e=l.length;for(let t=0;t<e;t++){let e;e=a?l[t].form:l[t],n({option:e,optionDes:s,theme:i},o)}}}(s[c],l[c],0,r,t,"conditionSeries"===l[c].type):l[c].theme?s.hasOwnProperty(c)&&function(e,t,r){let n,{theme:s,option:l,optionDes:c}=e;if("color"!=c[t].type||!r&&l[t]){if("bgcolor"==c[t].type&&(r||!l[t]||!l[t].style)){l[t]||(l[t]={});let{key:e,points:r,degree:u,type:h,opacity:d}=c[t].theme;if(r){u||(u=90),h||(h="linear");let e=`${h}-gradient(${u}deg`,c=100/(r.length-1),f=[];r.forEach(((t,r)=>{n=i(s,t),e+=`,${o(n,t.opacity)} ${c*r}%`;let{red:l,green:u,blue:h,alpha:p}=a(n,d);f.push({red:l,green:u,blue:h,alpha:p,left:c*r})})),e+=")",l[t].style=e,l[t].degree=u,l[t].flag=r.length?3:2,l[t].points=f,l[t].type=h}else e&&(n=i(s,c[t].theme),l[t]={...a(n,d),style:o(n,d)})}}else{let{opacity:e}=c[t].theme;n=i(s,c[t].theme),l[t]=o(n,e)}}(e,c,t):l[c].hasOwnProperty("type")&&"slot"!=l[c].type&&"textStyle"!=l[c].type&&"sheet"!=l[c].type||l[c].constructor!=Object||n({option:s[c],optionDes:l[c],theme:r},t)}))}function i(e,t){if(e[t.key])return e[t.key]||e.color;if(t.key.indexOf(".")>-1){return[e,...t.key.split(".")].reduce(((t,r)=>"object"==typeof t&&r in t?t[r]:(l(`属性${r}不存在,获取主题颜色错误,将使用默认主题色`),e.color)))}return l(`属性${t.key}不存在,获取主题颜色错误,将使用默认主题色`),e.color}function o(e,t){let{red:r,green:n,blue:i,alpha:o}=a(e,t);return`rgba(${r},${n},${i},${o})`}function a(e,t){return-1!=e.indexOf("#")&&(e=e.substr(1)),null==t&&(t=1),{red:parseInt("0x"+e.slice(0,2)),green:parseInt("0x"+e.slice(2,4)),blue:parseInt("0x"+e.slice(4,6)),alpha:t}}function s(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;const a=t.indexOf("@i");if(a>=0){const r=a>0?t.slice(0,a-1):"",l=r?(0,tools.getValueByPath)(e,r):e,c=t.indexOf(".",a),u=c>=0?t.slice(c):"";if(Array.isArray(l))for(let e=0;e<l.length;e++){s(l,`${e}${u}`,n,+(i+(o||0)*e).toFixed(2),o)}}else{let o=(0,tools.getValueByPath)(e,t);if(o){i=(0,r.default)(o).alpha()}const a=`rgba(${n.red()}, ${n.green()}, ${n.blue()}, ${null===i?1:Math.min(1,Math.max(0,i))})`;(0,tools.setValueByPath)(e,t,a)}}function l(e){console.warn(e)}}));unwrapExports(optionTheme),optionTheme.setColorByTheme,optionTheme.setDefaultColorByTheme;var optionTheme_3=optionTheme.setOptionColorByTheme;function s(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const l=3e4,d=3e4,c=(e="",t)=>{let r=axios.create({baseURL:e,timeout:l,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return r.interceptors.request.use((function(e){return sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(e.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(e.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(e.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===e.method?(e.headers["Content-Type"]="application/json;",e):"get"===e.method?e:"put"===e.method?(e.headers["Content-Type"]="application/json; charset=UTF-8",e):"delete"===e.method?e:void 0}),(function(e){return Promise.reject(e)})),r.interceptors.response.use((function(e){return 200===e.status||e.data.code,t&&t(e),e.data}),(function(e){return t&&t(null==e?void 0:e.response),Promise.reject(e.response)})),r},u=(e,t)=>{try{let r=t||window.location.href;if(-1!=r.indexOf("?")){let t={};return r.slice(r.indexOf("?")+1).split("&").forEach((e=>{let r=e.split("=");t[r[0]]=r[1]})),e?t[e]?t[e]:null:t}return console.log("没有参数"),null}catch(e){console.error(e)}};function h(e,t=!1){try{return t?p(e)?e:JSON.stringify(e):p(e)?JSON.parse(e):e}catch(t){return console.log("转化JSON 发生错我!",e),e}}const p=e=>{if("string"==typeof e)try{const t=JSON.parse(e);return"object"==typeof t&&null!==t}catch(e){return!1}return!1},m=(e,t)=>{try{const r=JSON.stringify(t);sessionStorage.setItem(e,r)}catch(t){console.error(`Error setting session data for key ${e}:`,t)}},f=e=>{const t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(t){console.error(`Error parsing session data for key ${e}:`,t)}return null},g=e=>{for(const t of e)t.code&&(t.code=t.code.replace(/>/g,">").replace(/</g,"<"))},v=(e,t)=>{e instanceof Map?e.forEach((e=>{t([e])})):Array.isArray(e)&&e.forEach((e=>{t(e.children)}))},y=(e,t)=>{const r=e=>{var n,i,o;if(e)for(const a of e){const e=null===(o=null===(i=null===(n=null==a?void 0:a.tmpData)||void 0===n?void 0:n.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;(null==e?void 0:e.length)&&g(e),t(a),a.children?r(a.children):a.dynamicChildren?v(a.dynamicChildren,r):a.stateChildren&&r(a.stateChildren)}};r(e)},b=(e,t,r,n)=>{const i=e.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){const e=i.map((e=>e.replace(/{{|}}|@/gm,"")));for(const i of e)if(i&&t&&!(t.findIndex((e=>e.mapField===i))<0))return r&&n&&w(n,i,r.cid),!0}return!1},w=(e,t,r)=>{if(!e)throw new Error("Share variable tree is not defined");if("string"!=typeof t)throw new Error("Variable name should be a string");if(!r)throw new Error("ID is required");Array.isArray(e[t])||(e[t]=[]),e[t].includes(r)||e[t].push(r)},D=(e,t,r)=>{var n;let i=!1;const o=null==t?void 0:t.converse;if(o&&o.use&&o.data.length)for(const t of o.data)if((null==t?void 0:t.dependVars)&&t.dependVars.includes(e))return!0;const a=null==t?void 0:t[null==t?void 0:t.type];return((null==a?void 0:a.inputSql)||(null==a?void 0:a.url)||(null==a?void 0:a.headers)||(null==a?void 0:a.params))&&(i=b(a.inputSql||a.url||(null===(n=a.headers)||void 0===n?void 0:n.value)||a.params,r)),i},k=(e,t,r=!1)=>{let n=null;const i=e=>{for(const o of e){if(o.cid===t){n=o,r&&_$1.remove(e,(e=>e.cid===t));break}if(o.children&&i(o.children),o.dynamicChildren&&Array.isArray(o.dynamicChildren))for(const[,e]of Array.from(o.dynamicChildren))i(e);o.stateChildren&&i(o.stateChildren)}};return i(e),n},N=(e,t,r)=>{let n=!1;const i=e=>{for(let o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(e=>e.cid==t));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){let t=Array.from(e[o].dynamicChildren);for(let e=0;e<t.length;e++)if(t[e]instanceof Array){let r=t[e][1];i(r)}}else if(e[o].dynamicChildren instanceof Array){let t=e[o].dynamicChildren;for(let e=0;e<t.length;e++)if(t[e]instanceof Array){let r=t[e][1];i(r)}}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1};function x(e,t,r){const n={};r&&r.forEach((e=>{(null==e?void 0:e.name)&&(n[e.name]=e.value||e.originvalue)}));try{return new Function("data","vars",e)(t,n)}catch(e){return console.error(e),t}}function A(e,t,r){let n=_$1.cloneDeep(t);const i={};r&&r.forEach((e=>{(null==e?void 0:e.name)&&(i[e.name]=e.value||e.originvalue)}));try{return new Function("data","vars",e)(n,i)}catch(e){return console.error(e),n}}const S=e=>{let t=window.goFetchList;return t||(window.goFetchList={},t=window.goFetchList),t[e]?!t[e]&&void 0:(t[e]={id:e,time:(new Date).getTime()},!0)},C=e=>{let t=window.goFetchList;t&&t[e]&&delete t[e]},O="anov@2019:helloX",I="anov@2020:helloX";function T(e){let t=cryptoJs.enc.Utf8.parse(O),r=cryptoJs.enc.Utf8.parse(I);return cryptoJs.AES.encrypt(e,t,{iv:r,mode:cryptoJs.mode.CBC,padding:cryptoJs.pad.Pkcs7}).toString()}function V(e,t){if(0===e.length)throw new Error("Array is empty.");if(!t)return e[Math.floor(Math.random()*e.length)];if(t.length!==e.length)throw new Error("Length of probabilities array must match length of array.");const r=t.reduce(((e,t)=>e+t),0),n=Math.random()*r;let i=0;for(let r=0;r<e.length;r++)if(i+=t[r],n<i)return e[r];return e[0]}const F=new Blob(["\nfunction proxyObj(originObj) {\n const exposeObj = new Proxy(originObj, {\n has: (target, key) => {\n if (['fetch', 'XMLHttpRequest', 'postMessage'].indexOf(key) >= 0) {\n throw new Error('Illegal operation for key'+key)\n } else {\n return target[key]\n }\n },\n })\n return exposeObj\n}\nfunction compileCode(src) {\n src = 'with (exposeObj) {'+src+'}'\n //console.log(src)\n return new Function('exposeObj', src)\n}\nfunction run(code) {\n let proxy = proxyObj({})\n let result = compileCode(code)(proxy)\n return result\n}\n\nonmessage = (e) => {\n try {\n let result = run(e.data.code)\n postMessage({\n code: 1,\n result,\n })\n } catch (err) {\n postMessage({\n code: -1,\n err,\n })\n }\n}\n"]),E=URL.createObjectURL(F);function P(e,t,r={},n="worker"){return s(this,void 0,void 0,(function*(){try{if("window"==n){let[n,i]=[["data"],[t]];"object"==typeof r&&Object.keys(r).forEach((e=>{n.push(e),i.push(r[e])}));return{success:!0,data:new Function(...n,e)(...i)}}{let[n,i,o]=[t,r,""];"object"==typeof n&&(n=JSON.stringify(t)),"object"==typeof r&&(i=JSON.stringify(r)),Object.keys(r).forEach((e=>o+=`${e},`));let a=`let data=eval(${n}); \n let app=${JSON.stringify({})};`;a+=o?`let {${o}} = eval(${i}); `:"",a+=`${e}`;let l=yield function(e,t=5e3){return s(this,void 0,void 0,(function*(){let r=new Worker(E);return new Promise(((n,i)=>{const o=()=>{clearTimeout(s),r.removeEventListener("message",a),r.terminate(),r=null},a=e=>{let{code:t,result:r,err:a}=e.data;o(),1===t?n(r):i(a)};r.postMessage({code:e}),r.addEventListener("message",a);let s=setTimeout((()=>{o(),i("timeout")}),t)}))}))}(a);return{success:!0,data:l}}}catch(e){return{success:!1,error:e,data:t}}}))}var j,$,R,M,e;e=j||(j={}),e.StaticFile="staticFile",e.DataSource="datasource",function(e){e.json="application/json;charset=UTF-8",e.form="application/x-www-form-urlencoded; charset=UTF-8"}($||($={})),function(e){e.get="GET",e.post="POST",e.put="PUT",e.patch="PATCH",e.delete="DELETE"}(R||(R={}));class U{constructor(e){this.db=null,this.dbName=e.databaseName,this.tableName=e.tableName,this.keyPath=e.keyPath}static getInstance(e){return U.instance||(U.instance=new U(e)),U.instance}init(){return s(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const r=indexedDB.open(this.dbName,1);r.onerror=e=>{t(e.target.error)},r.onupgradeneeded=e=>{this.db=e.target.result,this.db.objectStoreNames.contains(this.tableName)||this.db.createObjectStore(this.tableName,{keyPath:this.keyPath})},r.onsuccess=t=>{this.db=t.target.result,e()}}))}))}addRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).add(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}deleteRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}updateRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}getRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);n.onsuccess=()=>{t(n.result)},n.onerror=e=>{r(e.target.error)}}))}))}getAllRecords(){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((e,t)=>{const r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAll();r.onsuccess=()=>{e(r.result)},r.onerror=e=>{t(e.target.error)}}))}))}}U.instance=null,function(e){e[e.FATAL=0]="FATAL",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e[e.TRACE=5]="TRACE"}(M||(M={}));const q={databaseName:"GODB",tableName:"go-log",keyPath:"time"};class L{constructor(){this.logLevel=M.INFO,this.indexedDBInstance=U.getInstance(q);try{this.indexedDBInstance.init(),console.log("IndexedDB 初始化成功。")}catch(e){console.error("初始化 IndexedDB 时出错:",e)}}static getInstance(){return L.instance||(L.instance=new L),L.instance}setLogLevel(e){this.logLevel=e}getColor(e){switch(e){case M.FATAL:return"[31;1m";case M.ERROR:return"[31m";case M.WARN:return"[33m";case M.INFO:return"[32m";case M.DEBUG:return"[36m";case M.TRACE:return"[34m";default:return"[0m"}}log(e,t){if(t<=this.logLevel){const r=(new Date).toISOString(),n=`[${r}] [${M[t]}]`,i=this.getColor(t);if(null===window||void 0===window?void 0:window.goDev)console.log(`${i}${n} ${e}[0m`);else{let t=f("anov-go-userInfo"),o=f("anov-go-proid"),a=` [操作人:${null==t?void 0:t.userName} 项目ID:${o}] `;const s={time:r,value:`${e}`};try{this.indexedDBInstance.addRecord(s)}catch(e){console.error("添加记录时出错:",e)}console.log(`${i}${n} ${a} ${e}[0m`)}}}fatal(e){this.log(e,M.FATAL)}error(e){this.log(e,M.ERROR)}warn(e){this.log(e,M.WARN)}info(e){this.log(e,M.INFO)}debug(e){this.log(e,M.DEBUG)}trace(e){this.log(e,M.TRACE)}}const H=L.getInstance(),B=(e,t)=>"string"!=typeof e?Promise.reject(new Error("URL should be a string")):c(e,t),z=c();let G$1=c();function J(e,t="get",r={},n={},i){return s(this,void 0,void 0,(function*(){try{const o={method:R[t],url:e,headers:n,timeout:d};return["post","put"].includes(t.toLowerCase())?o.data=_$1.cloneDeep(r):o.params=_$1.cloneDeep(r),i&&(o.headers.sponsor=i),/.json$/.test(e)?function(e){return s(this,void 0,void 0,(function*(){try{return(yield z({method:"get",url:e})).data}catch(e){throw console.error("JSON 数据请求:",e),e}}))}(e):function(e){return s(this,void 0,void 0,(function*(){try{return{code:2e4,data:(yield z(e)).data}}catch(e){throw console.error("请求数据发生错误-Error:",e),e}}))}(o)}catch(e){throw console.error("获取数据:Error:",e),e}}))}function _(e,t,r,n,i){return s(this,void 0,void 0,(function*(){try{const o=(window.anUrl||"")+(window.agentPath||"/ds/v1/api-proxy/v1/query"),a=h(r,!0);return yield z({url:o,method:"post",headers:{"Content-Type":"application/json;charset=UTF-8",sponsor:i||""},data:{body:"post"===e?a:void 0,headers:p(n)?h(n,!0):n,method:e,url:t}})}catch(e){throw console.error("代理请求数据:Error12:",e),e}}))}function W(e,t,r,n,i,o){return s(this,void 0,void 0,(function*(){return i?_(t,e,r,n,o):J(e,t,r,n,o)}))}function X(e,t="",r){var n,i,o,a;const s=`${null!==(i=null===(n=null===window||void 0===window?void 0:window.BaseUrl)||void 0===n?void 0:n.replace("/management",""))&&void 0!==i?i:""}/ds/data-engine/v1/${e}/zb-query?token=${(null===(o=se("YZH_EXCHANGE_TOKEN"))||void 0===o?void 0:o.YZH_EXCHANGE_TOKEN)||(null===(a=null===window||void 0===window?void 0:window.yzhAuth)||void 0===a?void 0:a.getToken())}&passid=${null===window||void 0===window?void 0:window.gdPassid}${(null===window||void 0===window?void 0:window.BASE_RELEASE)?"&preview=1":""}`;let c={};try{c=t?JSON.parse(t):{}}catch(e){c=t||{}}return z({method:"POST",url:s,data:{headers:r,param:c},timeout:l})}function K(e="",t){const r=`${null===window||void 0===window?void 0:window.BaseUrl}/ds/v1/data-views/query`;let n={};try{n=e?JSON.parse(e):{}}catch(t){n=e||{}}return z({method:"POST",url:r,data:{headers:t,param:n},timeout:l})}const Q=(e,t)=>s(void 0,void 0,void 0,(function*(){const r=window.BaseUrl,{dateType:n="",endPeriod:i="",metricsName:o=e,startPeriod:a=""}=t;return G$1({method:"GET",url:`${r}ds/v1/metrics/v1/data-alarm?dateType=${n}&endPeriod=${i}&metricsName=${o}&startPeriod=${a}`,timeout:l})})),Y=(e,t,r)=>s(void 0,void 0,void 0,(function*(){var n;const i=(null===(n=window.BaseUrl)||void 0===n?void 0:n.replace("/management",""))||"";t.newEncryption=!0;const o={staticFile:{method:"get",params:t,url:`${i}/ds/v1/file/v1/${e}/query`},datasource:{method:"post",url:`${i}/ds/v1/database/v1/${e}/query`,data:Object.assign({},t)}}[r];if(!o)throw new Error("Invalid data type provided");return z(Object.assign({timeout:l},o))})),Z=e=>new Promise(((t,r)=>{let n;n=e.originData&&Object.keys(e.originData).length?e.originData:e.data,void 0!==n?t({data:n}):r("Failed to retrieve cdata")})),ee=(e,t,r)=>{try{switch(t){case"api":{let t=ce(e,r);return{requestType:t.requestType,url:t.url,params:t.params,headers:t.headers,agency:t.agency}}case"static":return{data:e};case"datasource":{const t=de(e.inputSql,r);return{dsName:e.dsName,dsType:"1",sql:T(t),filter:e.sqlFilter}}case"staticFile":return{dsName:e.dsName,dsType:e.dsType,sql:""};case"indicator":return{zbId:e.zbId,params:de(e.params,r),headers:de(e.headers,r)};case"dataSet":return{params:de(e.params,r),headers:de(e.headers,r)};case"indicatorCQ":return{zbName:e.zbName,params:de(e.params,r)};case"packData":return{};default:throw new Error("Invalid type")}}catch(t){console.log("准备请求数据发生错误",t,e)}},te=(e,t,r)=>s(void 0,void 0,void 0,(function*(){try{switch(t){case"api":return yield W(e.url,e.requestType,e.params,e.headers,e.agency,r);case"static":return yield Z(e.data);case"datasource":return yield Y(e.dsName,{dsType:e.dsType,sql:e.sql,filter:e.filter},"datasource");case"staticFile":return yield Y(e.dsName,{dsType:e.dsType,sql:e.sql},"staticFile");case"indicator":return yield X(e.zbId,e.params,e.headers);case"dataSet":return yield K(e.params,e.headers);case"indicatorCQ":return yield Q(e.zbName,e.params);case"packData":return{};default:throw new Error("Invalid type")}}catch(e){return console.warn(e,"执行请求并获取数据发生错误"),yield new Promise(((e,t)=>{e({error:!0})}))}})),ie=(e,t,r,n=[],i=!1)=>s(void 0,void 0,void 0,(function*(){const o=t||e.tmpData.source.dataType;if(!o)return console.warn(`fetdata error on fetchDataByType', dataType is ${o}`),new Promise(((e,t)=>{e({error:!0,data:null,msg:`dataType is ${o}`})}));const a=e.tmpData.source["indicatorCQ"==o?"indicator":o];if("globalData"===o){const e=n.find((e=>e.key===a.id||e.key===a.key)),t=f(a.id);if(t&&!i)return t.data;if(e){let t=yield oe(e,r),n={key:a.id,data:t};return m(a.id,n),t}return}const s=ee(a,o,r),l=yield te(s,o,e.cid?e.cid:"");return(null==l?void 0:l.data)?l.data:l})),oe=(e,t)=>s(void 0,void 0,void 0,(function*(){let r=Object.assign({},{tmpData:{source:e.value}});const n=r.tmpData.source.type,i=r.tmpData.source[n],o=ee(i,n,t),a=yield te(o,n);return yield re(a.data,r,!0,t)})),re=(e,t,r=!0,n)=>s(void 0,void 0,void 0,(function*(){try{const{converse:i,mapFields:o}=t.tmpData.source;return i&&i.use&&r?yield new Promise(((t,r)=>{const o=function(e,t,r,n,i){return s(this,void 0,void 0,(function*(){let r,i=e,{use:o,data:a}=_$1.cloneDeep(t);if(o)for(let e=0;e<a.length;e++)if(a[e].use){let t=a[e].dependVars,o={};n&&o&&t&&t.length&&t.map((e=>{let t=_$1.cloneDeep(n).filter((t=>{let r=t.mapField==e;return r&&(o[e]=t.value),r}));t&&0!=t.length||(o[e]="")})),r=yield P(a[e].code,i,o,a[e].mode?a[e].mode:"worker"),i=r.data}return i}))}(_$1.cloneDeep(e),i,0,n);t(o)})):yield new Promise(((t,r)=>{t(e)}))}catch(t){return console.error("执行过滤器发生错误:"+t),yield new Promise(((t,r)=>{t(e)}))}})),ae=(e,t,r)=>{const{source:n}=e.tmpData,i=n.type;r?("static"===i&&n[i]&&(n[i].originData=r),"indicatorCQ"===i?n.indicator.data=t:n[i].data=t):"indicatorCQ"===i?n.indicator.data=t:n[i].data=t,e.source=t},ne=(e,t,r=[],n,i,o)=>s(void 0,void 0,void 0,(function*(){try{let a=e.tmpData.source.type,s=yield ie(e,a,r,n,o||!1);if(null==s||!s)return i&&i({error:!0}),Promise.resolve({error:!0});let l=yield re(s,e,t,r);return ae(e,l),i&&i(l),(null==e?void 0:e.cid)&&C(e.cid),Promise.resolve(l)}catch(t){return i&&i(t),H.error("Error in updateComData"),console.error("Error in updateComData:",t,e),Promise.reject(t)}})),se=e=>{const t={};if(e&&e.includes("?")){const r=e.split("?")[1].split("&");for(let e of r){const[r,n]=e.split("=").map(decodeURIComponent);t[r]=n}}return t},le=e=>{try{return(null==e?void 0:e.value)&&"string"==typeof e.value?JSON.parse(e.value):"string"==typeof e?JSON.parse(e):e}catch(t){return e}},de=(e,t)=>{if(!t)return le(e);if("string"==typeof e){if(""===e.trim())return"";try{if("string"!=typeof JSON.parse(e))return de(JSON.parse(e),t);{let r=e.replace(/@(\w+)|{{(\w+)}}/g,((e,r,n)=>{const i=r||n,o=t.find((e=>e.mapField===i));return o?o.value||o.originalValue||"":e}));return le(r)}}catch(r){let n=e.replace(/@(\w+)|{{(\w+)}}/g,((e,r,n)=>{const i=r||n,o=t.find((e=>e.mapField===i));return o?o.value:e}));return le(n)}}else{if(Array.isArray(e))return e.map((e=>de(e,t)));if("object"==typeof e&&null!==e){const r={};for(let n in e)r[n]=de(e[n],t);return le(r)}}return le(e)},ce=(e,t)=>{const r=e.agency,n=e,{url:i=null,headers:o,params:a,requestType:s}=n,l=i?de(i,t):void 0,c=o&&o.use?de(o.value,t):{};return{url:l,requestType:s,params:a?de(a,t):{},headers:c,agency:r}},ue=(e,t,r,n,i)=>s(void 0,void 0,void 0,(function*(){if(e&&e.length)for(const o of e)D(t,o.value,r)&&(yield ne({tmpData:{source:{type:"globalData",globalData:{id:o.key}}}},!0,r,e,(e=>{console.log("数据更新成功-变量改变全局数据跟新")}),!0),y(n,(t=>{var n,a,s;"globalData"===(null===(a=null===(n=null==t?void 0:t.tmpData)||void 0===n?void 0:n.source)||void 0===a?void 0:a.type)&&(null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.source.globalData).id===o.key&&ne(t,!0,r,e,(e=>{i(t,e)}),!1)})))})),he=(e,t,r,n,i)=>s(void 0,void 0,void 0,(function*(){e&&(yield ne({tmpData:{source:{type:"globalData",globalData:{id:e.key}}}},!0,t,r,(e=>{console.log("数据更新成功-数据源编辑")}),!0),y(n,(n=>{var o,a,s;"globalData"===(null===(a=null===(o=null==n?void 0:n.tmpData)||void 0===o?void 0:o.source)||void 0===a?void 0:a.type)&&(null===(s=null==n?void 0:n.tmpData)||void 0===s?void 0:s.source.globalData).id===e.key&&ne(n,!0,t,r,(e=>{i(n,e)}),!1)})))}));class pe{constructor(e,t){this.isUpdating=!1,this.des=e.des,this.field=e.field,this.id=e.id,this.key=e.key,this.mapping=e.mapping,this.mapField=e.mapField,this.type=e.type,this.originalValue=e.originalValue,this.model=(null==e?void 0:e.model)?null==e?void 0:e.model:1,this.converter=e.converter,this.converterCode=e.converterCode,this.fork=e.fork,this.delayUpdate=!!(null==e?void 0:e.delayUpdate),t&&(this.globalVariables=t),e.fork&&(this.model=5,this.forkValue=e.forkValue,this.originalValue=this.getForkedValue())}get value(){if(this.fork&&(this.originalValue=this.getForkedValue()),this.converter&&this.converterCode){let e=[];return A(this.converterCode,this.originalValue,e)}return this.originalValue}togglePropertyState(e){let t=Object.prototype.hasOwnProperty.call(this,e);this[e]=!t||!e}getForkedValue(){if(this.forkValue&&Array.isArray(this.forkValue))return this.forkValue.map((e=>{const t=this.globalVariables.get(e);return t?t.value:null}));if(this.forkValue){const e=this.globalVariables.get(this.forkValue);return e?e.value:null}return null}updateValue(e,t){var r;const n=Object.assign({},this,e);this.des=n.des,this.field=n.field,this.mapping=n.mapping,this.type=n.type,this.originalValue=n.originalValue,this.converter=n.converter,this.converterCode=n.converterCode,this.fork=n.fork,this.delayUpdate=null==n?void 0:n.delayUpdate,this.model=null==n?void 0:n.model,e.id&&(this.id?"string"==typeof this.id?e.id instanceof Array?this.id=_$1.uniq([this.id,...e.id]):this.id=[this.id,e.id]:this.id instanceof Array&&(e.id instanceof Array?this.id=_$1.uniq([...this.id,...e.id]):this.id=_$1.uniq([...this.id,e.id])):this.id=e.id),e.fork&&(this.model=5,this.forkValue=null!==(r=e.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),t&&t(this)}updateWidthOriginalValue(e,t){var r;this.originalValue=e,this.fork&&(this.forkValue=null!==(r=this.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),t&&t(this)}renew(e){e&&e(this)}static create(e,t){return new pe(e,t)}}class me{constructor(){this.variables=new Map,this.globalObservers=[],this.url=window.location.search,this.list=[]}clearVars(){this.list=[],this.variables.clear()}togglePropertyState(e,t,r){try{let n=this.getVariable(e);if(!n)throw new Error("没有找到相应的变量!");n.togglePropertyState(t),this.addToObjectArray(this.list,n),r&&r()}catch(e){console.error(e)}}static getInstance(){return me.instance||(me.instance=new me),me.instance}getFullUrl(){this.url=window.location.search}getAllUrlParams(){const e=new URLSearchParams(window.location.search),t={};for(const[r,n]of e.entries())t[r]=n;return t}delVariable(e,t){this.variables.delete(e),this.list=this.list.filter((t=>t.mapField!=e)),t&&t()}addUrlParamsToGlobalVars(){this.getFullUrl();let e=this.getAllUrlParams(),t=Object.keys(e),r=[];for(const n of t)r.push({mapField:n,originalValue:e[n],model:4});if(r.length)for(const e of r)this.addVariable(e)}addVariables(e){Array.isArray(e)?e.map(((e,t)=>{this.addVariable(e)})):this.addVariable(e),this.addUrlParamsToGlobalVars()}addVariable(e,t){if(!e||!(null==e?void 0:e.mapField))return console.error(e+"参数不合法!"),!1;if(this.isVariableNameExist(e.mapField)){let r=this.getVariable(e.mapField);return this.sameValue(r,e)?r:(this.editVariable(e,t),!1)}const r=pe.create(e,this.variables);return this.variables.set(r.mapField,r),this.addToObjectArray(this.list,r),t&&t(r),this.notifyGlobalObservers(r),r}toJSON(e){try{return!!e&&JSON.stringify(e)}catch(e){return!1}}sameValue(e,t){if(e.mapfield!==t.mapfield)return!1;for(const r in t)if(!(["mapfield","field","key","value","name","globalVariables"].includes(r)||r in e&&e[r]==t[r]))return!1;return!0}creatVarJson(e){const{des:t,field:r,id:n,key:i,mapping:o,mapField:a,type:s,value:l,originalValue:c,model:u,converter:h,converterCode:d,fork:f,forkValue:p,update:m,delayUpdate:g}=e,v={};return void 0!==t&&(v.des=t),void 0!==r&&(v.field=r),void 0!==n&&(v.id=n),void 0!==i&&(v.key=i),void 0!==o&&(v.mapping=o),void 0!==a&&(v.mapField=a),void 0!==s&&(v.type=s),void 0!==l&&(v.value=l),void 0!==c&&(v.originalValue=c),void 0!==u&&(v.model=u),void 0!==h&&(v.converter=h),void 0!==d&&(v.converterCode=d),void 0!==f&&(v.fork=f),void 0!==p&&(v.forkValue=p),void 0!==m&&(v.update=m),void 0!==g&&(v.delayUpdate=g),v}addToObjectArray(e,t){let r=!1;for(let n=0;n<e.length;n++)if(e[n].mapField==t.mapField){e[n]=this.creatVarJson(t),r=!0;break}r||e.push(t)}editVariable(e,t){const r=this.getVariable(e.mapField);if(r&&this.isVariableNameExist(e.mapField)&&this.sameValue(r,e))return;const n=e=>{e.isUpdating||(e.isUpdating=!0,this.notifyGlobalObservers(e),this.isMapFieldInForkValues(e.mapField).forEach((e=>{let t=this.getVariable(e.mapField);t&&t.renew((e=>{this.addToObjectArray(this.list,e),this.notifyGlobalObservers(e)}))})),this.addToObjectArray(this.list,e),t&&t(e),e.isUpdating=!1)};r?r.updateValue(e,n):this.addVariable(e,n)}getForkList(e){return this.isMapFieldInForkValues(e)||[]}editVariableForValue(e,t,r){const n=this.getVariable(e);n&&n.updateWidthOriginalValue(t,(e=>{e.isUpdating||(e.isUpdating=!0,this.notifyGlobalObservers(e),this.isMapFieldInForkValues(e.mapField).forEach((e=>{let t=this.getVariable(e.mapField);t&&t.renew((e=>{this.addToObjectArray(this.list,e),this.notifyGlobalObservers(e)}))})),this.addToObjectArray(this.list,e),r&&r(e),e.isUpdating=!1)}))}isMapFieldInForkValues(e){return this.getAllVariables().filter((e=>e.fork&&e.forkValue)).filter((t=>t.forkValue==e||Array.from(t.forkValue).includes(e)))}isVariableNameExist(e){return this.variables.has(e)}checkExist(e,t){if("string"==typeof e&&this.isVariableNameExist(e)){let r=this.getVariable(e);return t==r.id&&!r.id.includes(t)&&[{key:e}]}if(Array.isArray(e)){const r=e.filter((e=>{let r=this.getVariable(e);return this.isVariableNameExist(e)&&t!=r.id&&!(r.id&&r.id.includes(t))})).map((e=>({key:e})));return!!r.length&&r}return!1}getVariable(e){return this.variables.get(e)}getVariableForId(e){var t;let r=[];for(const[,n]of this.variables)(n.id===e||(null===(t=n.id)||void 0===t?void 0:t.includes(e)))&&r.push(n);return _$1.uniq(r)}getAllVariables(e=!1){return this.addUrlParamsToGlobalVars(),e?(this.list=Array.from(this.variables.values()),this.list):[...this.list]}restoreVariables(e){e.forEach((e=>{this.addVariable(e)}))}registerGlobalObserver(e){this.globalObservers.push(e)}notifyGlobalObservers(e){this.globalObservers.forEach((t=>{t.update(e)}))}}me.instance=null;const fe=me.getInstance(),ge=(e,t)=>Array.isArray(t)?t.some((t=>e&&(void 0!==e[t]||e.hasOwnProperty(t)))):"string"==typeof t&&e&&(void 0!==e[t]||e.hasOwnProperty(t)),ve=(e,t,r,n)=>{const i=((e,t,r,n)=>{var i;let o;if(ge(e,null==t?void 0:t.field)||ge(e,null==t?void 0:t.forkValue))o=e[null==t?void 0:t.field]||"";else if(ge(e.data,null==t?void 0:t.field)||ge(e.data,null==t?void 0:t.forkValue))o=e.data[null==t?void 0:t.field]||"";else{const e=k(r,n),a=(null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.actions)||[];for(const e of a){const r=e.vars.find((e=>(null==e?void 0:e.mapField)===(null==t?void 0:t.mapField)));if(r){o=r.value;break}}}return o})(e,t,r,n);return void 0!==i?i:t.value},ye=(e,t,r,n,i,o,a,s,l)=>{var c;switch(e.type){case"link":let u=de(e.link,o);window.open(u,e.target);break;case"page":if(null===(c=null==e?void 0:e.params)||void 0===c?void 0:c.length)for(let t=0;t<e.params.length;t++){const r=e.params[t],n=o.find((e=>e.mapField==r.mapField));n&&(r.value=n.value)}l&&l(e);break;case"dynamic":((e,t,r,n,i)=>{const o=e.dynamic||[];for(const a of o){if(e.id!==t.cid)continue;const o=k(r,a.pid);o&&(o.activeDynamic=a.name,o.isShow=a.visible||!n||e.index===t.index-1,i({cid:o.cid,flag:a.visible}))}})(e,t,r,n,i);break;case"toggle":((e,t,r,n,i)=>{const o=e.children||[];for(const r of o){const o=r.visible&&(!n||e.index===t.index-1);i({cid:r.cid,flag:o})}})(e,t,0,n,i);break;case"update":((e,t,r,n,i)=>{const o=e.children||[];for(const e of o){const o=k(t,e.cid);o&&ne(o,!0,r,n,(e=>{i({cid:o.cid,data:e})}))}})(e,r,o,a,s)}},be=(e,t,r,n,i,o,a,s,l,c)=>{const{cid:u,actions:h,index:d}=i,{eventName:f,mode:p}=h,m=2===p;((e,t,r,n,i,o)=>{let a=fe.getVariableForId(t.cid);if(null==a?void 0:a.length)for(const s of a)if(s.type==e){let e=ve(t,s,r,n);fe.editVariableForValue(s.mapField,e,(()=>{let e=i[s.mapField]||[],t=fe.getForkList(s.mapField);if(t)for(const r of t){let t=i[r.mapField];e=_$1.concat(e,t)}o&&o(s,_$1.uniq(e))}))}})(f,i,n,u,r,((e,t)=>{if(ue(l,e.mapFile,fe.getAllVariables(),n,((e,t)=>{a({cid:e.cid,data:t})})),null==t?void 0:t.length)for(const r of t){e.eventSourceId=r;const t=k(n,r);!(null==e?void 0:e.delayUpdate)&&t&&ne(t,!0,fe.getAllVariables(),l,(e=>{a({cid:t.cid,data:e})}))}}));const g=((e,t,r,n,i)=>e.filter((e=>e.id===t&&e.eventType===r&&(!i||parseInt(e.index||"0")+1===parseInt(n||"0")))))(e,u,f,d,m);for(const e of g)ye(e,i,n,m,o,fe.getAllVariables(),l,a,s)};function we(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n))if("object"!=typeof e[n]||null===e[n]||Array.isArray(e[n]))Array.isArray(e[n])?JSON.stringify(e[n])!==JSON.stringify(t[n])&&(r[n]=t[n]):e[n]!==t[n]&&(r[n]=t[n]);else{const i=we(e[n],t[n]);null!==i&&Object.keys(i).length>0&&(r[n]=i)}return Object.keys(r).length>0?r:null}function De(e,t){const r=Object.assign({},e);for(const e in t)t.hasOwnProperty(e)&&("object"!=typeof t[e]||null===t[e]||Array.isArray(t[e])?r[e]=t[e]:r[e]=De(r[e],t[e]));return r}const ke=(e,t={})=>{let r={},n={type:"static",converse:{use:!1,data:[]},static:{data:e},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""}};return Object.assign(r,n,t),r},Ne=(e,t)=>{let{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:l}=((e,t)=>{let{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:l}=_$1.cloneDeep(t[e]);return{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:l}})(e,t);return{iconClass:null,isAssembly:null,source:i,cid:(Math.random().toString().substr(3,10)+Date.now()).toString(),isLock:!1,isShow:!0,tmpData:{option:r,source:ke(i,s),actions:n},baseData:Ae(),dynamic:null,filePath:"",origin:"anov-ui",name:"",componentType:"",viewComName:e,optionComName:"AnOptionPanel",dataComName:"AnSourcePanel",eventComName:"AnActionsPanel",assemblyDeveloper:"",devEmail:"",version:"",devDept:""}},xe=(e,t,r)=>{let n=Ne(e,t);return r?_$1.merge(n,r):n},Ae=e=>{let t={left:0,top:0,width:100,height:100,angle:0,penetrate:0,opacity:100,perspective:100,rotateX:0,rotateY:0,rotateZ:0,transformOriginX:"center",transformOriginY:"center",transformSwitch:!1};return e?Object.assign(t,e):t};class Se{constructor(e,t,r){this.theme=null,this.plant=null,this.list=[],this.titleHeqadeHeight=70,this.clearance=3,this.checkComponentIntersection=(e,t,r=10)=>{const n=e.left,i=e.left+e.width,o=e.top,a=e.top+e.height,s=t.left,l=t.left+t.width,c=t.top,u=t.top+t.height,h=n<l&&i>s&&o<u&&a>c,d=Math.abs(e.left+e.width/2-(t.left+t.width/2)),f=Math.abs(e.top+e.height/2-(t.top+t.height/2));return h||d<r&&f<r},this.calculateCombinedComponent=e=>{if(0===e.length)return{left:0,top:0,width:0,height:0};let t=e[0].left,r=e[0].top,n=e[0].left+e[0].width,i=e[0].top+e[0].height;for(let o=1;o<e.length;o++){const a=e[o];t=Math.min(t,a.left),r=Math.min(r,a.top),n=Math.max(n,a.left+a.width),i=Math.max(i,a.top+a.height)}return{left:t,top:r,width:n-t,height:i-r}},this.getAnTextNormaltText=e=>{var t,r;try{return null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.text}catch(e){return console.error("配置优化(ConfigOptimizer):",e),""}},this.initProp(e),this.upgradePlant(),this.staticComponentData=t,this.upgradeHeaderComponent(),r&&Object.assign(this,r)}isStringOrObject(e){return"string"==typeof e?"string":"object"==typeof e&&null!==e&&"object"}initProp(e){try{let t,r=this.isStringOrObject(e);if(r&&"string"===r)t=JSON.parse(e);else{if(!r||"object"!==r)throw new Error(`initProp fn error :-- 传入参数${e}不合法!`);t=e}if(t){this.originData=t;const{theme:e,plant:r,list:n}=t;this.theme=e,this.plant=r,this.list=n,this.filterFileGroup()}}catch(e){console.error("配置优化(ConfigOptimizer):",e)}}upgradePlant(){this.plant&&(this.plant.option.bg={type:1,code:"70942ec525344c96aa32b81b2c9155f6",path:"/anov-prod/resources/page/png/bg22 科技星球背景.png",thumb:"/anov-prod/resources/page/thumbnail/1e48f8fb26ec4edfb1a0f499627e84fc.png"})}areComponentsIntersecting(e,t){let r=e.baseData,n=t.baseData;const i=Math.max(0,Math.min(r.left+r.width,n.left+n.width)-Math.max(r.left,n.left)),o=Math.max(0,Math.min(r.top+r.height,n.top+n.height)-Math.max(r.top,n.top));return i>0&&o>0}filterFileGroup(){this.list=_$1.cloneDeep(this.list).map((e=>{var t,r;if(1===(null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.length)&&!(null===(r=null==e?void 0:e.children[0])||void 0===r?void 0:r.children)){const t=e.children[0],{left:r,top:n}=e.baseData;return t.baseData.left=r,t.baseData.top=n,t}return e}))}getText(e,t,r){const n=document.createElement("canvas").getContext("2d");if(!n)throw new Error("Failed to get 2D context from canvas.");return n.font=`${r}px ${t}`,n.measureText(e).width}calculateMaxWidths(e){const t=Math.min(...e.map((e=>e.width))),r=[];let n=[],i=e[0].width;for(const o of e){const e=o.width;Math.abs(e-i)<=t?n.push(e):(n.length>0&&r.push(n),n=[e]),i=e}n.length>0&&r.push(n);const o=[];for(const e of r){const t=Math.max(...e);o.push(t)}return o}findClosestValue(e,t){let r=t[0],n=Math.abs(e-r);for(const i of t){const t=Math.abs(e-i);t<n&&(n=t,r=i)}return r}adjustHeightAndTop(e,t){const r=t-e.height;return Object.assign(Object.assign({},e),{height:t,top:e.top-r/2})}findNearestComponent(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=_$1.cloneDeep(e).sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=_$1.cloneDeep(t).baseData;a.top,a.height;for(const e of o){const t=e.baseData;if(t.top,t.height,a.left<t.left+t.width&&a.left+a.width>t.left){const r=t.top-a.top;r<i&&r<100&&(i=r,n=e)}}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestComponentForPoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=this.getDistance(a.left,a.top+a.height,t.left,t.top);r<i&&r<a.width&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestComponentForTitlePoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=this.getDistance(a.left,a.top+a.height,t.left,t.top);r<i&&r<a.width&&t.top-a.top>100&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestTitleForPoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=t.top-a.top;r<i&&r<a.width&&t.top-a.top>100&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}getDistance(e,t,r,n){return Math.sqrt(Math.pow(r-e,2)+Math.pow(n-t,2))}findNearestComponent2(e,t,r){let n=null,i=1/0,o=_$1.cloneDeep(e).sort(((e,t)=>e.baseData.top-t.baseData.top));try{const e=o.filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=_$1.cloneDeep(t).baseData,s=a.top+a.height;for(const t of e){const e=t.baseData,r=e.top+e.height;if(a.left<e.left+e.width&&a.left+a.width>e.left){const e=r-s;e>=0&&e<i&&(i=e,n=t)}}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}verticalDistance(e,t){e.left,e.width;const r=e.top+e.height,n=(t.left,t.width,t.top);return Math.abs(r-n)}extractAmount(e){const t=e.match(/(\d{1,3}(?:,\d{3})*)(\D+)/);if(t){const e=t[1].replace(/,/g,"");return[parseInt(e,10),t[2].trim()]}return[!1,!1]}getAnTextNormal(){return this.list.filter((e=>"AnTextNormal"==e.viewComName))}getAnDeckTitle3(){return this.list.filter((e=>"AnDeckTitle3"==e.viewComName)).sort(((e,t)=>e.baseData.left-t.baseData.left))}judgeAnOdometer(){let e=this.getAnTextNormal().sort(((e,t)=>e.baseData.left-t.baseData.left)),t=[],r=new Set;for(const n of e){if(r.has(n.cid))continue;let i=[];for(const t of e)r.has(t.cid)||n.cid==t.cid||this.checkComponentIntersection(n.baseData,t.baseData)&&(r.add(t.cid),r.add(n.cid),i.push(t));t.push([n,...i])}let n=[];for(const e of t)for(const t of e){let r=this.getAnTextNormaltText(t);this.extractAmount(r).every((e=>e))&&n.push(e)}return n}createAnOdometer(){var e,t;let r=this.judgeAnOdometer();for(const n of r){let r,i,o,a=this.calculateCombinedComponent(n.map((e=>e.baseData)));for(const e of n){let t=this.getAnTextNormaltText(e),n=this.extractAmount(t);n.every((e=>!e))&&(r=t),n.every((e=>e))&&(i=n[0],o=n[1]),_$1.remove(this.list,(t=>t.cid==e.cid))}let s=xe("AnIndicatorNormal",this.staticComponentData,_$1.cloneDeep({baseData:a}));(null===(t=null===(e=null==s?void 0:s.tmpData)||void 0===e?void 0:e.source)||void 0===t?void 0:t.static)&&(s.tmpData.source.static.data={text:r,num:i,unit:o},s.tmpData.source.static.originData={text:r,num:i,unit:o}),this.list.push(s)}}upgradeHeaderComponent(){for(let e=0;e<this.list.length;e++){const t=this.list[e];"AnDeckHeader3"==t.viewComName&&(t.baseData.left=0,t.baseData.top=0)}}upgradeTitleComponent(){let e=this.getAnDeckTitle3().map((e=>e.baseData)),t=this.calculateMaxWidths(e);for(let e=0;e<this.list.length;e++){const r=this.list[e];if("AnDeckTitle3"==r.viewComName){let e=this.findClosestValue(r.baseData.width,t);r.baseData.width=e>300?e:300,r.baseData=this.adjustHeightAndTop(r.baseData,this.titleHeqadeHeight)}}this.removeErroneousComponents()}containsFractionStructure(e){return/\b\d+\/\d+\b/.test(e)}removeErroneousComponents(){let e=this.getAnDeckTitle3(),t=[];for(let r=0;r<e.length;r++){const n=e[r];let i=n.tmpData.option.textNormal.text;if(this.containsFractionStructure(i))for(let r=0;r<e.length;r++){const i=e[r];n.cid!=i.cid&&this.areComponentsIntersecting(n,i)&&t.push(n.cid)}}this.list=this.list.filter((e=>!t.includes(e.cid)))}upgradeGroupComponent(){try{let e=this.getAnDeckTitle3(),t=this.list.filter((e=>"AnDeckTitle3"!=e.viewComName&&"AnDeckHeader3"!=e.viewComName&&"AnTextNormal"!=e.viewComName)),r=[],n=[];for(let i=0;i<e.length;i++){const o=e[i];let a=this.findNearestComponentForPoint(t,o,r);if(a&&a.cid&&r.push(a.cid),a){o.baseData.left=a.baseData.left;let t=this.upgradeComponentHeight(o,e,n);t&&t>=30&&(a.baseData=Object.assign({},a.baseData,{top:o.baseData.top+o.baseData.height+this.clearance}))}}}catch(e){console.error("配置优化(ConfigOptimizer):",e)}}upgradeComponentHeight(e,t,r=[]){const n=e;let i=this.findNearestTitleForPoint(_$1.cloneDeep(t),n);return i?i.baseData.top-n.baseData.top-this.titleHeqadeHeight:1080-n.baseData.top-this.titleHeqadeHeight}getData(){return this.originData.list=this.list,this.originData.plant=this.plant,this.originData}}const Ce=new class{randomNum(e,t){return Math.floor(Math.random()*(t-e+1))+e}generateRandomIntArray(e,t,r,n){const i=[];for(let n=0;n<e;n++){const e=this.randomNum(t,r);i.push(e)}return n&&"asc"===n?i.sort(((e,t)=>e-t)):n&&"desc"===n?i.sort(((e,t)=>t-e)):i}randomString(e,t){const r=this.randomNum(e,t);let n="";for(let e=0;e<r;e++){const e=Math.floor(26*Math.random());n+="abcdefghijklmnopqrstuvwxyz".charAt(e)}return n}generateRandomNameArray(e,t,r){const n=[];for(let i=0;i<e;i++){const e=this.randomString(t,r);n.push(e)}return n}pick(e,t){const r=void 0!==t?e.filter((e=>e!==t)):e;return r[Math.floor(Math.random()*r.length)]}},Oe=()=>{const e=[],t=Ce.pick([!0,!1]);let r=Ce.randomNum(3,20);const n=Ce.pick([null,null,null,{}]);let i=Ce.pick(["asc","desc",void 0,void 0,void 0]);for(let o=0;o<Ce.randomNum(1,9);o++)e.push({data:Ce.generateRandomIntArray(r,0,300,i),type:"line",smooth:t,symbolSize:Ce.randomNum(1,10),lineStyle:{width:Ce.randomNum(1,4)},areaStyle:n});return{xAxis:{type:"category",show:!1,boundaryGap:!1,data:Ce.generateRandomNameArray(r,3,6)},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:e}},Ie=(e,t)=>{let r={type:e,show:!1};return"category"===e&&(r.data=Ce.generateRandomNameArray(t,3,6)),r},Te=()=>{const e=[],t=Ce.pick([!0,!1]);let r=Ce.randomNum(3,20);const n=Ce.pick([null,null,null,{}]);let i=Ce.pick(["asc","desc",void 0,void 0,void 0]),o=Ce.randomNum(1,9),a=Ce.pick([!0,!1]);for(let s=0;s<o;s++){let o={data:Ce.generateRandomIntArray(r,0,300,i),type:"bar",smooth:t,stack:a,areaStyle:n};e.push(o)}let s=Ce.pick(["value","category"]),l=Ce.pick(["value","category"],s);return{xAxis:Ie(s,r),grid:{left:0,top:0,bottom:0,right:0},yAxis:Ie(l,r),series:e}},Ve=()=>{const e=[];let t=Ce.randomNum(3,20);Ce.pick([null,null,null,{}]);let r=Ce.pick(["asc","desc",void 0,void 0,void 0]),n=Ce.pick([1,2]),i=[Ce.pick(["10%","20%","30%","40%","50%","60%","70%","80%"]),Ce.pick(["90%","100%"])];return e.push({data:Ce.generateRandomIntArray(t,3,20,r),type:"pie",radius:1==n?"100%":i,roseType:1==n?Ce.pick(["area",null,null]):null,padAngle:1==n?0:Ce.randomNum(1,5),startAngle:1==n?Ce.pick([0,180]):0,endAngle:360,label:{show:!1},itemStyle:{borderRadius:3}}),{grid:{left:0,top:0,bottom:0,right:0},series:e}},Fe=()=>{const e=[];Ce.pick([!0,!1]),Ce.randomNum(3,20),Ce.pick([null,null,null,{}]),Ce.pick(["asc","desc",void 0,void 0,void 0]);for(let t=0;t<Ce.randomNum(1,20);t++){let t=Ce.randomNum(3,Ce.randomNum(3,20)),r=[];for(let e=0;e<t;e++){let e=[];for(let t=0;t<2;t++)e.push(Ce.randomNum(1,30));r.push(e)}e.push({type:"scatter",symbolSize:Ce.randomNum(3,30),data:r})}return{xAxis:{show:!1},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:e}},Ee=()=>{const e=[],t=Ce.pick(["polygon","circle"]);let r=Ce.randomNum(1e4,99999),n=Ce.randomNum(3,10),i=[];for(let e=0;e<n;e++)i.push({name:Ce.randomString(4,8),max:r});for(let t=0;t<Ce.randomNum(2,10);t++)e.push({value:Ce.generateRandomIntArray(n,1e4,r),name:Ce.randomString(4,8)});return{radar:{shape:t,indicator:i,axisName:{show:!1},radius:"100%"},grid:{left:0,top:0,bottom:0,right:0},series:[{type:"radar",symbol:"none",lineStyle:{width:1},data:e}]}},Pe=()=>{const e=[];for(let t=0;t<Ce.randomNum(4,15);t++)e.push({value:Ce.randomNum(1,100),name:Ce.randomString(4,8)});return{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"funnel",left:"0%",top:0,bottom:0,width:"100%",min:0,minSize:"0%",maxSize:"100%",label:{show:!1,position:"inside"},sort:Ce.pick(["descending","ascending"]),gap:2,lineStyle:{width:1},data:e}]}};let je=Ce.randomNum(5,20);const $e={width:je};Ce.pick([!0,!1])&&($e.color=[[.3,"#67e0e3"],[.7,"#37a2da"],[1,"#fd666d"]]);class Re{constructor(){this.names=["line","bar","pie","scatter","radar","funnel","gauge"]}static getInstance(){return Re.instance||(Re.instance=new Re),Re.instance}createLine(){switch(Ce.pick(this.names)){case"line":return{type:"line",typeNum:1,option:Oe()};case"bar":return{type:"bar",typeNum:2,option:Te()};case"pie":return{type:"pie",typeNum:3,option:Ve()};case"scatter":return{type:"scatter",typeNum:4,option:Fe()};case"radar":return{type:"radar",typeNum:5,option:Ee()};case"funnel":return{type:"funnel",typeNum:6,option:Pe()};case"gauge":return{type:"gauge",typeNum:7,option:{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"gauge",radius:"100%",detail:{formatter:"{value}"},progress:{show:Ce.pick([!0,!1]),width:je},axisLine:{lineStyle:$e},data:[{value:Ce.randomNum(1,100),name:"SCORE"}]}]}}}}}Re.instance=null;const Me=Re.getInstance(),Ue=new class{constructor(){this.directions=["row","row"],this.direction="column",this.splitNumbers=24,this.margin=[0,0]}baseLayout(e){const t=(null==e?void 0:e.maRrows)?null==e?void 0:e.maRrows:this.splitNumbers,r=(null==e?void 0:e.colNum)?null==e?void 0:e.colNum:this.splitNumbers,n=e.wrapWidth/r,i=e.wrapHeight/t;let o=V(this.directions);o&&(this.direction=o);let a=[];if("row"===this.direction){let e=V([3,4]);a=this.simulateRandomSegments(24,4,12,e)}else{let e=V([2,3]);a=this.simulateRandomSegments(24,4,6,e)}let s=[],l=[];if("row"===this.direction){for(let e=0;e<a.length;e++)if(0==e)s.push({x:0,y:0,w:a[e],h:24,i:e,wStep:n,hStep:i});else{let t=s[e-1].x;s.push({x:a[e-1]+t,y:0,w:a[e],h:24,i:e,wStep:n,hStep:i})}let e=V([2,3]),t=this.simulateRandomSegments(24,6,12,e);for(let e=0;e<s.length;e++){const r=s[e];for(let o=0;o<t.length;o++){const a=t[o];l.push({x:r.x,y:a,w:r.w,h:a,i:10*e+o,wStep:n,hStep:i})}}}else{for(let e=0;e<a.length;e++)if(0==e)s.push({x:0,y:0,w:24,h:a[e],i:e,wStep:n,hStep:i});else{let t=s[e-1].y;s.push({x:0,y:a[e-1]+t,w:24,h:a[e],i:e,wStep:n,hStep:i})}for(let e=0;e<s.length;e++){const t=s[e];let r=V([1,2,3,4]),o=this.simulateRandomSegments(24,5,12,r),a=[];for(let r=0;r<o.length;r++){const s=o[r];if(0==r)a.push({x:0,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i}),l.push({x:0,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i});else{let c=a[r-1].x;a.push({x:o[r-1]+c,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i}),l.push({x:o[r-1]+c,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i})}}}}return{layouts:l.map((t=>{let{option:r,typeNum:n}=Me.createLine(),i=t.x*t.wStep+t.w*t.wStep/2,o=t.y*t.hStep+t.h*t.hStep/2,a=t.w*t.wStep,s=t.h*t.hStep;if(3==n||5==n||7==n){let e=Math.min(a,s);a=e,s=e}let l=e.wrapWidth,c=e.wrapHeight;return t.chartsOption=r,t.typeNum=n,t.txt=n+" "+i/l+" "+o/c+" "+a/l+" "+s/c,console.log(t.txt),t})),option:{colNum:r,margin:(null==e?void 0:e.margin)?null==e?void 0:e.margin:this.margin,isDraggable:!!(null==e?void 0:e.isDraggable)&&(null==e?void 0:e.isDraggable),isResizable:!!(null==e?void 0:e.isResizable)&&(null==e?void 0:e.isResizable),verticalCompact:!(null==e?void 0:e.verticalCompact)||(null==e?void 0:e.verticalCompact),useCssTransforms:!(null==e?void 0:e.useCssTransforms)||(null==e?void 0:e.useCssTransforms),rowHeight:e.wrapHeight/t,maRrows:t}}}simulateRandomSegments(e,t,r,n){const i=[];let o=e,a=n;for(;a>0;)if(1===a)i.push(o),a--;else{const e=Math.min(r,o-t*(a-1)),n=Math.floor(Math.random()*(e-t+1))+t;i.push(n),o-=n,a--}return i}simulateRandomSegments2(e,t,r,n){const i=[];let o=e,a=n;for(;a>0;)if(1==a){const t=e-i.reduce(((e,t)=>e+t),0);i.push(t),a--}else{let e=Math.floor(Math.random()*r),n=Math.max(t,e),s=o-t*a;const l=Math.min(n,s);i.push(l),o-=l,a--}return i}},qe=src.pool(),Le=e=>{try{return JSON.parse(e)}catch(t){return e}},He=new class{constructor(){this.requested=new Set,this.db=new Dexie$1("go-db"),this.init()}init(){return s(this,void 0,void 0,(function*(){this.db.version(1).stores({store:"key, value"})}))}pushCaseIdToRequested(e){this.requested.add(e)}add(e,t){return s(this,void 0,void 0,(function*(){try{(yield this.isExist(e))||(t.caseDetailData&&(t.caseDetailData="string"==typeof t.caseDetailData?Le(t.caseDetailData):t.caseDetailData),this.pushCaseIdToRequested(e),yield this.db.table("store").add({key:e,value:t}))}catch(e){console.error(e)}}))}bulkPut(e){return s(this,void 0,void 0,(function*(){let t=yield Promise.all(e.map((e=>s(this,void 0,void 0,(function*(){const{caseId:t,id:r}=e,n=`${t}_${r}`;if(yield this.isExist(n))return null;if(e.caseDetailData){const t=yield qe.exec(Le,[e.caseDetailData]);e.caseDetailData=t,qe.terminate()}return e})))));t=t.filter((e=>null!==e));const r=t.map((e=>{const{caseId:t,id:r}=e,n=`${t}_${r}`;return this.pushCaseIdToRequested(n),{key:n,value:e}}));this.db.table("store").bulkPut(r).then((()=>{})).catch((e=>console.error(e)))}))}get(e){return s(this,void 0,void 0,(function*(){if(!(yield this.isExist(e)))return null;const t=yield this.db.table("store").where("key").equals(e).first();return t?t.value:null}))}getAllData(){return s(this,void 0,void 0,(function*(){return yield this.db.table("store").toArray()}))}update(e,t){return s(this,void 0,void 0,(function*(){if(yield this.isExist(e)){const r=yield this.get(e),n=yield qe.exec(Le,[t]);qe.terminate(),yield this.db.table("store").update(e,{value:Object.assign(Object.assign({},r),{caseDetailData:n})})}else console.error("update indexdb error")}))}delete(e){this.requested.delete(e),this.db.table("store").delete(e)}isExist(e){return s(this,void 0,void 0,(function*(){return(yield this.db.table("store").where("key").equals(e).count())>0}))}reset(){this.requested.clear(),this.db.table("store").clear()}clear(){return s(this,void 0,void 0,(function*(){yield this.db.table("store").clear()}))}isExistStore(){return s(this,void 0,void 0,(function*(){try{return yield this.db.open(),!0}catch(e){return!1}}))}},Be=function(e){return s(this,void 0,void 0,(function*(){try{let{fontUrl:t,fontName:r}=e;const n="__custom_font__";let i=document.getElementById(n);if(!i){i=document.createElement("style"),i.id=n;const e=document.head||document.getElementsByTagName("head")[0];yield e.appendChild(i)}i.innerText+=`@font-face{font-family:'${r}';src:url(${t});}`}catch(e){console.warn(e)}}))},ze=(e,t="jspaths",r)=>s(void 0,void 0,void 0,(function*(){const n="csspaths"===t?"link":"script",i=document.createElement(n);"jspaths"===t?i.defer=!0:i.rel="stylesheet",i.className=t,i.src=e,(r||document.head||document.getElementsByTagName("head")[0]).appendChild(i),yield new Promise(((e,t)=>{i.addEventListener("load",e),i.addEventListener("error",e)}))})),Ge=(e,t="jspaths")=>s(void 0,void 0,void 0,(function*(){const r="fonts"===t?Be:ze;yield Promise.all(e.map((e=>r(e))))}));function Je(e){!function(e,t){e.depends?optionTheme_3(e):_e(e,!1)}(e)}function _e(e,t=!0){let{theme:r,option:n,optionDes:i}=e;n&&i&&r&&Object.keys(i).forEach((o=>{"conditionSeries"!==i[o].type&&"tabs"!==i[o].type||!n[o]?i[o].theme?n.hasOwnProperty(o)&&function({theme:e,option:t,optionDes:r},n,i){let o;if("color"!=r[n].type||!i&&t[n]){if("bgcolor"==r[n].type&&(i||!t[n]||!t[n].style)){t[n]||(t[n]={});let{key:i,points:a,degree:s,type:l,opacity:c}=r[n].theme;if(a){s||(s=90),l||(l="linear");let r=`${l}-gradient(${s}deg`,i=100/(a.length-1),u=[];a.forEach(((t,n)=>{o=We(e,t),r+=`,${Xe(o,t.opacity)} ${i*n}%`;let{red:a,green:s,blue:l,alpha:h}=Ke(o,c);u.push({red:a,green:s,blue:l,alpha:h,left:i*n})})),r+=")",t[n].style=r,t[n].degree=s,t[n].flag=a.length?3:2,t[n].points=u,t[n].type=l}else i&&(o=We(e,r[n].theme),t[n]=Object.assign(Object.assign({},Ke(o,c)),{style:Xe(o,c)}))}}else{let{opacity:i}=r[n].theme;o=We(e,r[n].theme),t[n]=Xe(o,i)}}(e,o,t):i[o].hasOwnProperty("type")&&"slot"!=i[o].type&&"textStyle"!=i[o].type&&"sheet"!=i[o].type||i[o].constructor!=Object||_e({option:n[o],optionDes:i[o],theme:r},t):function(e,t,r,n,i,o){let a=t.form,s=e;if(Array.isArray(a))for(let e=0;e<a.length;e++){let t,r=a[e];t=o?s[e].form:s[e],_e({option:t,optionDes:r,theme:n},i)}else{let e=s.length;for(let t=0;t<e;t++){let e;e=o?s[t].form:s[t],_e({option:e,optionDes:a,theme:n},i)}}}(n[o],i[o],0,r,t,"conditionSeries"===i[o].type)}))}function We(e,t){return e[t.key]?e[t.key]||e.color:t.key.indexOf(".")>-1?[e,...t.key.split(".")].reduce(((t,r)=>"object"==typeof t&&r in t?t[r]:(Qe(`属性${r}不存在,获取主题颜色错误,将使用默认主题色`),e.color))):(Qe(`属性${t.key}不存在,获取主题颜色错误,将使用默认主题色`),e.color)}function Xe(e,t){let{red:r,green:n,blue:i,alpha:o}=Ke(e,t);return`rgba(${r},${n},${i},${o})`}function Ke(e,t){return-1!=e.indexOf("#")&&(e=e.substr(1)),null==t&&(t=1),{red:parseInt("0x"+e.slice(0,2)),green:parseInt("0x"+e.slice(2,4)),blue:parseInt("0x"+e.slice(4,6)),alpha:t}}function Qe(e){console.warn(e)}class Ye{constructor(e){this.processedIds=new Set,this.validateAccessResolve=null,e?(e.caseId&&(this.caseId=e.caseId),e.pageId&&(this.pageId=e.pageId),e.mode&&(this.mode=e.mode),e.environment&&(this.environment=e.environment),e.xhr&&(this.xhr=e.xhr),e.staticComponentData&&(this.staticComponentData=e.staticComponentData),e.theme&&(this.theme=e.theme)):console.log("初始化错误!"),this.defaultTheme={name:"科技蓝",color:"#006aee",background:"#00000033",pageBackground:"#051836",text:"#F0F0F0",groups:["#006aee","#00eae9","#00a9ec","#00ec80","#edc700","#9913ee"]}}checkHardware(){return s(this,void 0,void 0,(function*(){return yield new Promise(((e,t)=>{e("Hardware is not available")}))}))}checkSecurity(e){return s(this,void 0,void 0,(function*(){return yield new Promise(((t,r)=>{"preview"==this.environment?t(0):this.getShareForRelease(e).then((e=>{2e4==e.code&&e.data?(e.data,e.data.loginLimitSwitch?t(1):e.data.hasAuth?t(2):t(3)):t(4)}))}))}))}validateAccess(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{this.validateAccessResolve=r,t&&t(e)}))}))}initBefore(){return new Promise(((e,t)=>{let r=u("secretFree");r?sessionStorage.setItem("secret-free",r):sessionStorage.setItem("secret-free",null),console.log("运行免登录设置完成!"),e(!0)}))}fetchCaseId(e,t){return s(this,void 0,void 0,(function*(){try{const r=yield this.getKey(e,t);return 2e4===(null==r?void 0:r.code)&&(null==r?void 0:r.data)?r.data:e}catch(t){return console.error("Error fetching caseId:",t),e}}))}getDataForrelease(){return new Promise(((e,t)=>{e("data")}))}onProjectLoaded(e){}authenticate(){return s(this,void 0,void 0,(function*(){this.environment}))}getShareForRelease(e){return this.xhr.get(`/go/v1/go-share/v1/${e}/config`)}findById(e,t="",r=0,n=""){return"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${e}?pwd=${t}&mode=${r}&token=${n}`):this.xhr.get(`/go/v1/go-cases/v1/${e}?mode=${r}&token=${n}`)}getKey(e,t=0){return this.xhr.get(`/go/v1/go-cases/v1/key/${e}?caseMode=${t}`)}getPageData(e,t){return s(this,void 0,void 0,(function*(){const r=yield He.get(e+"_"+t);return r?{data:r}:"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${e}/pages/${t}`):this.xhr.get(`/go/v1/go-cases/v1/${e}/pages/${t}`)}))}getPageId(e,t){if(null==t?void 0:t.length){if(t.find((t=>t.id==e)))return e;let r=t.find((t=>t.caseDetailPath==e||t.caseDetailName==e));return r?r.id:e}return e}fetchProjectForId(e,t="",r=0,n=""){return s(this,void 0,void 0,(function*(){return yield this.findById(e,t,r,n)}))}updataPageData(e,t){var r;return s(this,void 0,void 0,(function*(){let n=yield this.getPageDataForID(e,t);(null==n?void 0:n.data)?null===(r=null==this?void 0:this.lifecycleHooks)||void 0===r||r.onPageDataReady(n.data.caseDetailData):console.error("请求数据发生错误!")}))}getPageDataForID(e,t,r){return s(this,void 0,void 0,(function*(){const n=this.getPageId(t,this.projectInfo.details);if(this.processedIds.has(n)){console.log(`ID ${n} has already been processed.`);const t=yield He.get(e+"_"+n);if(t)return{data:t}}const i=this.getPageData(e,n);this.processedIds.add(n),r&&r.length&&r.map((t=>s(this,void 0,void 0,(function*(){try{if(this.processedIds.has(t))return void console.log(`ID ${n} has already been processed.`);const r=yield this.getPageData(e,t);He.add(e+"_"+t,r.data),this.processedIds.add(t)}catch(e){console.error(`Error processing ID ${t}: ${e}`)}}))));const o=yield i;return He.add(e+"_"+n,o.data),yield i}))}fetchPageDataForId(e,t="",r=0,n=""){return s(this,void 0,void 0,(function*(){return yield this.findById(e,t,r,n)}))}setTheme(){console.log("设置主题")}setBackground(){console.log("设置背景信息")}updateVariables(){console.log("更新变量信息")}beforeRender(e){}renderComponents(){return s(this,void 0,void 0,(function*(){}))}setGlobalThemeVars(e){document.body.style.cssText=`\n --theme-background: ${e.background};\n --theme-color: ${e.color};\n --theme-pageBackground: ${e.pageBackground};\n --theme-text: ${e.text};\n ${e.groups.map(((e,t)=>`--theme-groups-${t}: ${e};`)).join("\n")}\n `}listenForRenderCompletion(){}showAnimation(){console.log("所有组件渲染完成,显示动画。")}setComTheme(e,t){var r,n;let i=null===(r=this.staticComponentData[t.viewComName])||void 0===r?void 0:r.optionDes,o=null===(n=this.staticComponentData[t.viewComName])||void 0===n?void 0:n.theme;return Je({theme:e,option:t.tmpData.option,optionDes:i,depends:o}),t}getComData(e,t,r,n){return s(this,void 0,void 0,(function*(){return new Promise(((i,o)=>{if(e.tmpData&&e.tmpData.source){this.setComTheme(n,e);try{ne(e,!0,t,r).then((t=>{t&&(e.source=t)})),i(1)}catch(e){i(e)}}else i("")}))}))}pageInit(e){var t;return s(this,void 0,void 0,(function*(){try{let r=null==e?void 0:e.caseDetailData,n=this.defaultTheme;if((null==r?void 0:r.theme)&&(n=r.theme),this.setGlobalThemeVars(n),r.resource){let e=(null===(t=null===window||void 0===window?void 0:window.anovuiConfig)||void 0===t?void 0:t.fonts)||[],n=_$1.concat(r.resource.fonts,e),i=_$1.cloneDeep(r.resource);i.fonts=n,yield(({jspaths:e=[],csspaths:t=[],fonts:r=[]})=>s(void 0,void 0,void 0,(function*(){const n=_$1.uniqBy(r,"fontName");yield Promise.all([Ge(e,"jspaths"),Ge(t,"csspaths"),Ge(n,"fonts")])})))(i)}fe.clearVars(),fe.addVariables(r.globalVars);let i=fe.getAllVariables();return y(r.list,(e=>s(this,void 0,void 0,(function*(){yield this.getComData(e,i,r.globalSource,n)})))),r}catch(t){return console.warn("页面初始化发生错误:",t),(null==e?void 0:e.data)?e.data:e}}))}validate(e,t,r){return s(this,void 0,void 0,(function*(){return new Promise(((n,i)=>{const o=(e,r)=>s(this,void 0,void 0,(function*(){let i=yield this.validateAccess(e,r),a=(null==i?void 0:i.pwd)?i.pwd:"",s=(null==i?void 0:i.mode)?i.mode:0,l=(null==i?void 0:i.token)?i.token:"",c=yield this.fetchProjectForId(t,a,s,l);2e4==(null==c?void 0:c.code)&&(null==c?void 0:c.data)?(this.projectInfo=c.data,console.log("验证成功!"),this.lifecycleHooks.message("验证成功!"),n(!0)):(this.lifecycleHooks.validateError(c),this.lifecycleHooks.message(c.msg,"warning"),o(e,r))}));o(e,r)}))}))}init(e){var t;return s(this,void 0,void 0,(function*(){try{this.lifecycleHooks=e,yield this.checkHardware();let r=yield this.fetchCaseId(this.caseId,this.mode),n=yield this.checkSecurity(r),i=e.onValidateAccess||(()=>{});(yield this.validate(n,r,i))&&e.onCaseReady(this.projectInfo);let o=(null===(t=this.projectInfo)||void 0===t?void 0:t.details).map((e=>e.id)),a=this.getPageId(this.pageId,this.projectInfo.details);console.log(a,this.pageId,"this.pageId");let s=yield this.getPageDataForID(r,a||o[0],o);const l=yield this.pageInit(s.data);return e.onPageDataReady(l),{currentData:this.projectInfo,currentPageData:l}}catch(e){console.error("加载页面时出错:",e)}}))}}var index$3=Object.freeze({__proto__:null,ConfigOptimizer:Se,GlobalVariables:me,Http:B,Log:H,PageLoader:Ye,agentData:_,applyDiff:De,delFetchStatus:C,diffObjects:we,displayGenerator:Ue,editItem:ae,emitEvent:be,fetchDataByGlobal:oe,fetchDataByType:ie,filterData:re,findItemDeep:k,findItemDeep2:N,getData:J,getDataForApi:W,getDataForDataSet:K,getDataForSource:Y,getDataForStatic:Z,getDataForZb:X,getDataForZbCQ:Q,getSessionData:f,getStandardData:h,getStringVars:b,getUrlParams:u,getVarDefaultVal:ve,globalVars:fe,hasVar:D,isJSON:p,recursion:y,replaceVariable:de,safeEval:x,safeEvalForCode:A,setFetchStatus:S,setSessionData:m,updataGlobalDataSourceForVar:ue,updateComData:ne,updateGlobalDataSource:he}),getInteractive=function(e,t,r,n,i){var o;try{var a={},s=[],l=[],c=[],u=_$1.cloneDeep(e);return(null===(o=null===window||void 0===window?void 0:window.go)||void 0===o?void 0:o.dev)&&recursion(e,(function(e){var t,r,n;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length)for(var i=0,o=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var l=0,c=s;l<c.length;l++){var u=c[l],h=u.value;(null==h?void 0:h.length)&&(u.value=u.value.map((function(e){return{cid:e.cid,viewComName:e.viewComName,name:e.name,visible:e.visible}})))}}}})),recursion(u,(function(e){var t,r;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length){var n=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:n,element:e,actions:s,events:l,eventsComs:c,filter:i})}})),fe.addVariables(s),s=fe.getAllVariables(),recursion(u,(function(e){var t,r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.source;getShareVariableTree(r,s,e,a)})),{shareVariableTree:a,globalVars:fe.getAllVariables(),globalEvents:l.filter((function(e){return e})),eventsComs:c}}catch(e){return console.error("error",e),{}}},getInteractive2=function(e,t,r,n,i){var o;try{var a={},s=[],l=[],c=[],u=_$1.cloneDeep(e);return(null===(o=null===window||void 0===window?void 0:window.go)||void 0===o?void 0:o.dev)&&recursion(e,(function(e){var t,r,n;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length)for(var i=0,o=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var l=0,c=s;l<c.length;l++){var u=c[l],h=u.value;(null==h?void 0:h.length)&&(u.value=u.value.map((function(e){return{cid:e.cid,viewComName:e.viewComName,name:e.name,visible:e.visible}})))}}}})),recursion(u,(function(e){var t,r;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length){var n=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:n,element:e,actions:s,events:l,eventsComs:c})}})),t&&t.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),t,!0)),r&&r.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),r,!0)),n&&n.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),n,!0)),recursion(u,(function(e){var t,r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.source;getShareVariableTree(r,s,e,a)})),s.filter((function(e){if(e.fork){var t=s.find((function(t){return t.mapField==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(t.mapField)}));(i?i==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(i):!!t)&&(Array.isArray(e.forkValue)?e.originalValue=e.forkValue.map((function(e){var t=s.find((function(t){return t.mapField==e}));if(t)return t.value})):e.originalValue=t.value)}})),{shareVariableTree:a,globalVars:s.filter((function(e){return i?(i==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(i))&&(e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue):(e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue),e})),globalEvents:l.filter((function(e){return e})),eventsComs:c}}catch(e){return console.error("error",e),{}}},checkVar=function(e,t){var r,n,i,o=!1,a=e.type,s=e.converse,l=e[a];if((null==s?void 0:s.use)&&(null===(r=null==s?void 0:s.data)||void 0===r?void 0:r.length))for(var c=0,u=s.data;c<u.length;c++){if((null==(v=u[c])?void 0:v.use)&&v.dependVars.includes(t)){o=!0;break}}if(o)return o;var h="",d="",f="";"api"==a&&(h=l.url,(null===(n=l.headers)||void 0===n?void 0:n.use)&&(d=l.headers.value),f=l.params),"datasource"==a&&(h=l.inputSql),"indicator"==a&&((null===(i=l.headers)||void 0===i?void 0:i.use)&&(d=l.headers.value),f=l.params);for(var p=/({{[\w]*}})|((@)[\w]*)/gm,m=0,g=[h,d,f];m<g.length;m++){var v,y=(v=g[m]).match(p);if((null==y?void 0:y.length)&&y.find((function(e){return e=="{{".concat(t,"}}")||e=="@".concat(t)}))){o=!0;break}}return o},executeFilter=function(e){return e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue,e},getShareTree=function(e,t){try{var r={},n=[],i=[];return recursion(e,(function(e){var o,a,s,l=null===(o=null==e?void 0:e.tmpData)||void 0===o?void 0:o.source;if(getShareVariableTree(l,t,e,r),null===(s=null===(a=null==e?void 0:e.tmpData)||void 0===a?void 0:a.actions)||void 0===s?void 0:s.length){var c=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:c,element:e,actions:n,events:i})}})),r}catch(e){return console.error(e),{}}},hasVar=function(e,t,r){var n,i,o,a,s=t[null==t?void 0:t.type],l=null==t?void 0:t.converse,c=!1;if(l&&l.use&&l.data.length)for(var u=0,h=l.data;u<h.length;u++){var d=h[u];if((null==d?void 0:d.dependVars)&&(null===(n=null==d?void 0:d.dependVars)||void 0===n?void 0:n.length)&&(null==d?void 0:d.dependVars.includes(e)))return c=!0}return(null==s?void 0:s.inputSql)&&(c=getStringVars(null==s?void 0:s.inputSql,r)),(null==s?void 0:s.url)&&(c=getStringVars(s.url,r)),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&(c=getStringVars(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,r)),(null==s?void 0:s.params)&&(c=getStringVars(null==s?void 0:s.params,r)),c},getShareVariableTree=function(e,t,r,n){var i,o,a;if(e){var s=e[null==e?void 0:e.type],l=null==e?void 0:e.converse;l&&l.use&&l.data.length&&l.data.map((function(e){var t;(null==e?void 0:e.dependVars)&&(null===(t=null==e?void 0:e.dependVars)||void 0===t?void 0:t.length)&&e.dependVars.map((function(e){setShareVariableTreeData(n,e,r.cid)}))})),(null==s?void 0:s.inputSql)&&getStringVars(null==s?void 0:s.inputSql,t,r,n),(null==s?void 0:s.url)&&getStringVars(s.url,t,r,n),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&getStringVars(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,t,r,n),(null==s?void 0:s.params)&&getStringVars(null==s?void 0:s.params,t,r,n)}},getStringVars=function(e,t,r,n){"string"!=typeof e&&(e=JSON.stringify(e));var i=e.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){var o=i.map((function(e){return e.replace(/{{|}}|@/gm,"")}));if(r)for(var a=function(e){var i=o[e];if(!i||!t||t.findIndex((function(e){return e.mapField===i}))<0)return"continue";r&&n&&setShareVariableTreeData(n,i,r.cid)},s=0;s<o.length;s++)a(s);else{var l=function(e){var i=o[e];return!i||!t||t.findIndex((function(e){return e.mapField===i}))<0?"continue":(r&&n&&setShareVariableTreeData(n,i,r.cid),{value:!0})};for(s=0;s<o.length;s++){var c=l(s);if("object"==typeof c)return c.value}}}return!1},setShareVariableTreeData=function(e,t,r){if(e[t]&&_$1.isArray(e[t])){e[t].push(r);var n=e[t];e[t]=_$1.uniq(n)}else e[t]=[],e[t].push(r)},isJSON=function(e){if("string"==typeof e)try{var t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1};function getStandardData(e,t){return void 0===t&&(t=!1),t?isJSON(e)?e:JSON.stringify(e):isJSON(e)?JSON.parse(e):e}var rightMenuMutaitons={delListItem:function(e,t){var r=_$1.cloneDeep(e.list);"string"==typeof t?findItemDeep$1(r,t,!0):t.forEach((function(e){findItemDeep$1(r,e,!0)})),e.list=r,e.globalVars=getInteractive(e.list,e.globalConstant,e.sysConst).globalVars},editCloneCache:function(e,t){var r=_$1.cloneDeep(e.cloneCache);r.length&&r.map((function(e){e.baseData=Object.assign({},e.baseData,t)})),e.cloneCache=r},cloneItem:function(e){if(e.selectd.length>0){e.cloneCache=[];for(var t=function(t){var r=findItemDeep$1(e.list,e.selectd[t]);if("boolean"!=typeof r){var n=_$1.cloneDeep(r);if(n.pid="",(null==n?void 0:n.stateChildren)||(null==n?void 0:n.children))((null==n?void 0:n.stateChildren)?null==n?void 0:n.stateChildren:null==n?void 0:n.children).forEach((function(e){var t,r,i,o,a=e.cid;if(e.cid=genID(),e.pid=n.cid,(null==n?void 0:n.stateChildren)&&(null===(r=null===(t=null==n?void 0:n.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.children)){var s=null===(o=null===(i=null==n?void 0:n.tmpData)||void 0===i?void 0:i.option)||void 0===o?void 0:o.children.find((function(e){return e.cid==a}));s&&(s.cid=e.cid)}}));e.cloneCache.push(n),window.localStorage.setItem("cloneCache",JSON.stringify(e.cloneCache))}},r=0;r<e.selectd.length;r++)t(r)}},shearItem:function(e,t){if(e.selectd.length>0){e.cloneCache=[];for(var r=0;r<e.selectd.length;r++){var n=findItemDeep$1(e.list,e.selectd[r],!0);if("boolean"!=typeof n){var i=_$1.cloneDeep(n);e.cloneCache.push(i)}}e.selectd=[]}},pasteItem:function(e){var t,r;try{var n=(null===(r=_$1.cloneDeep(e.cloneCache))||void 0===r?void 0:r.length)?_$1.cloneDeep(e.cloneCache):JSON.parse(window.localStorage.getItem("cloneCache"));if(n.length>0){var i=[],o={};recursion(n,(function(e){var t=genID();if(o[e.cid]=t,e.cid=t,e&&e.children)for(var r=0,n=e.children;r<n.length;r++){n[r].pid=e.cid}else if(e.stateChildren)for(var a=0,s=e.stateChildren;a<s.length;a++){s[a].pid=e.cid}if("dynamicComponent"==e.componentType){var l=void 0;e.dynamicChildren instanceof Map?l=e.dynamicChildren.get(e.activeDynamic):e.dynamicChildren instanceof Array&&(l=e.dynamicChildren.find((function(t){return t[0]==e.activeDynamic}))),l.length>1&&(Array.isArray(l[1])?l[1].forEach((function(t){t.pid=e.cid})):l.forEach((function(t){t.pid=e.cid}))),1==l.length&&l.forEach((function(t){t.pid=e.cid}))}i.push(e.cid)})),e.selectd.length>0?selectdArea(e.selectd,e.list):getPosition(n),n.forEach((function(e){var t,r,n,i;if(e.baseData.top=e.baseData.top+20,e.baseData.left=e.baseData.left+20,e&&e.hasOwnProperty("stateChildren")&&(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.children))for(var o=function(t){t.pid=e.cid;var r=null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.option)||void 0===i?void 0:i.children.find((function(e){return e.disName==t.name}));r&&(r.cid=t.cid)},a=0,s=e.stateChildren;a<s.length;a++){o(s[a])}}));try{var a=Object.keys(o),s=JSON.stringify(n);(null==a?void 0:a.length)&&a.forEach((function(e){var t=o[e];-1!==s.indexOf(e)&&(s=s.replaceAll(null==e?void 0:e.toString(),null==t?void 0:t.toString()))})),n=JSON.parse(s)}catch(e){}(t=e.list).unshift.apply(t,_$1.cloneDeep(n)),e.selectd=i}}catch(e){console.warn(e)}},updataShow:function(e,t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=!r.isShow;updataAttribute(r,"isShow",n,"")}},changeShow:function(e,t){var r=t.cid,n=t.flag,i=findItemDeep$1(e.list,r);i&&updataAttribute(i,"isShow",n,"")},comToggle:function(e,t){var r=findItemDeep$1(e.list,t);r&&comToggle(r)},updataLock:function(e,t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=!r.isLock;updataAttribute(r,"isLock",n,"")}},breakUp:function(e,t){var r,n;try{if(!t)throw"Please pass in the component CID correctly!";var i=findParentDeep(e.list,t),o=findItemDeep$1(e.list,t),a=o.baseData;if(isNaN(a.left)||isNaN(a.top))throw new Error("top or left is NAN");var s=breakUp(o,e.list);if(s.map((function(e){return e.pid=""})),i){var l=i.children.findIndex((function(e){return e.cid==t}));i.children.splice(l,1),(r=i.children).push.apply(r,s.reverse())}else{l=e.list.findIndex((function(e){return e.cid==t}));e.list.splice(l,1),(n=e.list).push.apply(n,s.reverse())}}catch(e){console.error(e)}},editGroup:function(e,t){var r,n=t.groupId;t.status;try{if(!n)throw"Please pass in the component CID correctly!";var i=e.list.findIndex((function(e){return e.cid===n})),o=e.list[i],a=breakUp(o);a.map((function(e){return e.pid=""})),e.list.splice(i,1),(r=e.list).push.apply(r,a)}catch(e){console.error(e)}},combination:function(e){_$1.cloneDeep(e.list);var t,r,n=[],i=[],o=genID(),a=findItemDeep$1(e.list,e.selectd[0]);a.pid?console.info("Sorry, only level 2 is supported group"):a.children&&1===e.selectd.length?console.info("Sorry, only level 2 is supported group"):(e.selectd.forEach((function(t){var r=e.list.findIndex((function(e){return e.cid===t}));if(r>-1){n.push(r);var a=e.list.splice(r,1)[0];a.pid=o,i.push(a)}})),t=n.sort((function(e,t){return e-t}))[0],r=1===i.length?_$1.cloneDeep(i[0].baseData):e.currentArea,Object.assign(r,{angle:0,opacity:100,rotate:0,rotateY:0}),setPositionForGroup(r,i),e.list.splice(t,0,{cid:o,pid:"",isShow:!0,isLock:!1,editer:!1,baseData:r,z:0,toggle:!0,name:"群组",type:"folder",origin:"anov-ui",tmpData:{actions:null,option:null,source:globalSourceTemp},children:i}),setIndex(e.list),e.selectd=[o])},moveUp:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>=1?arraySwap(e.list,r-1,r):arraySwapDeep(e.list,"up",t)}catch(e){console.error(e)}},moveDown:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>-1&&r<=e.list.length-2?arraySwap(e.list,r+1,r):arraySwapDeep(e.list,"down",t)}catch(e){console.error(e)}},moveTop:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>-1&&0!==r?arraySwap(e.list,0,r):arraySwapDeep(e.list,"top",t)}catch(e){console.error(e)}},moveBottom:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t})),n=e.list.length-1;r>-1&&r!==n?arraySwap(e.list,n,r):arraySwapDeep(e.list,"bottom",t)}catch(e){console.error(e)}}};function setComActions(e){var t=[],r=[];recursion(_$1.cloneDeep(e),(function(e){var n,i;if(null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions)||void 0===i?void 0:i.length){var o=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:o,element:e,actions:t,events:r})}}));var n=r.filter((function(e){return e}));return{actions:t,events:n}}var eventMutations={addGlobalSource:function(e,t){var r=t.name,n=t.value,i=genID();e.globalSource.push({key:i,name:r,value:n}),he({key:i,name:r,value:n},e.globalVars,e.globalSource,e.list,(function(e){}))},editGlobalSource:function(e,t){var r=this,n=t.key,i=t.value,o=e.globalSource.find((function(e){return e.key==n}));o&&(o.name=t.name,o.value=i,he(o,e.globalVars,e.globalSource,e.list,(function(e,t){r.commit("GoCom/updataSourceForComponent",{cid:e.cid,data:t})})))},delGlobalSource:function(e,t){try{var r=e.globalSource.findIndex((function(e){return e.key===t}));-1!==r&&e.globalSource.splice(r,1)}catch(e){console.error("删除错误",e)}},setSyncFlag:function(e,t){e.syncFlag=t},goUpShareVar:function(e,t){e.shareVariable[t.key]=__assign$1({},t)},addGoRunVar:function(e,t){try{var r=getInteractive(e.list,e.globalConstant,e.sysConst);e.globalVars=r.globalVars,e.eventsComs=r.eventsComs}catch(e){console.warn(e)}},copyGoVar:function(e,t){try{for(var r=t.mapField,n=(r.toString().trim(),e.globalConstant.filter((function(e){return e.mapField.includes(r)}))),i=1,o=0;o<n.length;o++)i++;var a="".concat(r," (").concat(i,")"),s=e.globalConstant.find((function(e){return e.mapField==r}));if(r&&s){var l=_$1.cloneDeep(s);l.mapField=a,e.globalConstant.push(l);var c=getInteractive(e.list,e.globalConstant,e.sysConst);e.globalVars=c.globalVars,e.eventsComs=c.eventsComs}}catch(e){console.warn(e)}},goDelShareVar:function(e,t){delete e.shareVariable[t]},signal:function(e,t){},goSynchroDataAll:function(e,t){e.list=_$1.cloneDeep(t)},goSynchroDataForOption:function(e,t){if(e){var r=t.cid,n=t.value,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&i&&updataAttributeForOption(i,n)}this.commit("GoCom/execute")},goSynchroData:function(e,t){if(e){var r=t.cid,n=t.attr,i=t.value,o=t.attrModel,a=findItemDeep$1(e.list,r);if("boolean"!=typeof a){if(a&&updataAttribute(a,n,i,o),"actions"===n.toLowerCase()){var s=e.list,l=_$1.uniqWith(_$1.concat(setComActions(s).actions,setComActions(e.caseList).actions),_$1.isEqual),c=_$1.uniqWith(_$1.concat(setComActions(s).events,setComActions(e.caseList).events),_$1.isEqual);fe.addVariables(l),e.globalVars=fe.getAllVariables(),e.globalEvents=c,e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalVars=l),e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalEvents=c)}if("source"===n){if(!a.tmpData.source)return!1;var u=a.tmpData.source,h=u.type;if("api"===h){var d=u[h].url.match(/{{[\w]*}}|(@)[\w]*/gm);if(d)for(var f=d.map((function(e){return e.replace(/{{|}}|@/gm,"")})),p=function(t){var r=f[t];if(!r||!e.globalVars||e.globalVars.findIndex((function(e){return e.mapField===r}))<0)return"continue";if(e.shareVariableTree||(e.shareVariableTree={}),e.shareVariableTree[r]&&_$1.isArray(e.shareVariableTree[r])){e.shareVariableTree[r].push(a.cid);var n=e.shareVariableTree[r];e.shareVariableTree[r]=_$1.uniq(n)}else e.shareVariableTree[r]=[],e.shareVariableTree[r].push(a.cid)},m=0;m<f.length;m++)p(m)}}}}this.commit("GoCom/execute")},goUpdataSysVars:function(e,t){var r={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},n=e.sysConst,i=Object.keys(r);n.map((function(e){if(e.originalValue=e.value,(null==e?void 0:e.name)&&(null==i?void 0:i.includes(e.name))){var n=r[e.name];e.value=t[n],e.originalValue=t[n]}return e})),fe.addVariables(n)},resetGlobalData:function(e){e.globalVars=e.sysConst,e.globalConstant=[],e.globalSource=[]},updateGlobalRelatedVars:function(e,t){var r=t.run,n=t.gvData;return r.length&&r.forEach((function(e){var t=n.filter((function(t){return t.mapField==e.mapField||t.fork&&t.forkValue==e.mapField}));if(t.length)for(var r=0,i=t;r<i.length;r++){var o=i[r],a=e.value;o.mapField==e.mapField?o.value=a:o.fork&&e.mapField==o.forkValue?(o.converter&&o.converterCode,o.originalValue=a):n.push(e)}})),n}},comTreeMutations={updataList:function(e,t){var r=t.cid,n=produceWithImmer(t.list,(function(e){var t=findItemDeep$1(e,r),n=t.pid,i=getAncestorsNodes(e,r),o=function(e){for(var t=0;t<e.length;t++){var r=e[t];upDataGroup(r,r.baseData,null,!0)}},a=function(e){return e.reduce((function(e,t){return{left:e.left+t.baseData.left,top:e.top+t.baseData.top}}),{left:0,top:0})},s=function(e,t){void 0===t&&(t=e);for(var r=0;r<e.length;r++){var n=e[r];if(n.children&&Array.isArray(n.children))return 0===n.children.length?(t.splice(r,1),!0):(s(n.children,n.children)&&0===n.children.length&&t.splice(r,1),!0)}};if(i.length>0)if(t.pid=i[0].cid,n){var l=__spreadArray$1([findItemDeep$1(e,n)],getAncestorsNodes(e,n),!0),c=a(l),u=a(i);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,c)),t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,u,1)),o(l),o(i)}else{u=a(i);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,u,1)),o(i)}n&&0==i.length&&(t.pid="",function(t,r){var n=getAncestorsNodes(e,r),i=findItemDeep$1(e,r);if(0===n.length)t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,i.baseData));else{n=__spreadArray$1([i],n,!0);var s=a(n);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,s))}o(__spreadArray$1([i],n,!0))}(t,n)),s(e),setIndex(e)}));e.list=n},updataListForContrast:function(e,t){var r=t.cid,n=t.list,i=findItemDeep$1(n,r);findParentDeep(n,r);var o=findParentDeep(e.list,r);if(!i.pid){i.pid=o.cid;var a=_$1.cloneDeep(i.baseData),s=transformPosition(i.baseData,o.baseData,1);Object.assign(i.baseData,s),upDataGroup(o,a)}setIndex(e.list)},updateTree:function(e){for(var t=e.list,r=0;r<t.length;r++){var n=t[r];if(n.pid)(a=findItemDeep$1(t,n.pid))&&Object.assign(n.baseData,transformPosition(n.baseData,a.baseData));if(n.children)for(var i=0;i<n.children.length;i++){var o=n.children[i];if(o.pid!=n.cid){var a=findItemDeep$1(t,o.pid);if(_$1.cloneDeep(o.baseData),a){Object.assign(o.baseData,transformPosition(o.baseData,a.baseData));var s=transformPosition(o.baseData,n.baseData,1);Object.assign(o.baseData,s),upDataGroup(n,n.baseData)}o.pid=n.cid}}}setIndex(t)}},ERR_OK=200,ERR_OK2=2e4,TIMEOUT=3e4,STATUS="status",xhr=function(e,t){void 0===e&&(e="");var r=axios.create({baseURL:e,timeout:TIMEOUT,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return r.interceptors.request.use((function(e){return sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(e.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(e.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(e.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===e.method?(e.headers["Content-Type"]="application/json;",e):"get"===e.method?e:"put"===e.method?(e.headers["Content-Type"]="application/json; charset=UTF-8",e):"delete"===e.method?e:void 0}),(function(e){return Promise.reject(e)})),r.interceptors.response.use((function(e){return e[STATUS]===ERR_OK||e.data.code,t&&t(e),e.data}),(function(e){return t&&t(null==e?void 0:e.response),Promise.reject(e.response)})),r},Http=function(e,t){return xhr(e,t)},filterData=re,parseSource=function(e,t,r,n,i,o,a,s){void 0===n&&(n=!0);console.log(t,r,n,i,"callback"),ne(t,n,r,[],(function(e){i(e),("AnContainer"===(null==t?void 0:t.viewComName)&&n||"AnGridLayout"===(null==t?void 0:t.viewComName)&&n)&&UpdataForContainer(t)}),s)},updateComData=function(e,t,r,n,i,o,a){return void 0===r&&(r=!0),__awaiter(void 0,void 0,void 0,(function(){var o;return __generator(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,ne(e,r,t,i,(function(e){n&&n(e)}),a)];case 1:return[2,s.sent()];case 2:return o=s.sent(),n&&n(o),console.log("error:11"+o),[3,3];case 3:return[2]}}))}))},autoUpdateComData=function(e,t,r){var n,i,o,a,s,l=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.source,c=null===(o=null===(i=l[null==l?void 0:l.type])||void 0===i?void 0:i.autoUpdate)||void 0===o?void 0:o.open,u=null===(s=null===(a=l[null==l?void 0:l.type])||void 0===a?void 0:a.autoUpdate)||void 0===s?void 0:s.time;c&&_$1.isNumber(u)&&u>0&&setInterval((function(){updateComData(e,t,!0,(function(t){r({cid:e.cid,data:t})}))}),1e3*u)},refreshData=function(e,t,r,n,i,o){void 0===o&&(o=!0),e&&ne(e,o,t,[],(function(t){r({cid:e.clientWidth,data:t})}))},index$2=Object.freeze({__proto__:null,Http:Http,autoUpdateComData:autoUpdateComData,axios:axios,filterData:filterData,getDataForEvaluator:getDataForEvaluator,parseSource:parseSource,refreshData:refreshData,updateComData:updateComData}),loadFontResource=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,i,o;return __generator(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),t=e.fontUrl,r=e.fontName,n="__custom_font__",(i=document.getElementById(n))?[3,2]:((i=document.createElement("style")).id=n,[4,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)]);case 1:a.sent(),a.label=2;case 2:return i.innerText+="@font-face{font-family:'".concat(r,"';src:url(").concat(t,");}"),[3,4];case 3:return o=a.sent(),console.warn(o),[3,4];case 4:return[2]}}))}))},loadScript=function(e,t,r){return void 0===t&&(t="jspaths"),__awaiter(void 0,void 0,void 0,(function(){var n,i;return __generator(this,(function(o){switch(o.label){case 0:return n="csspaths"===t?"link":"script",i=document.createElement(n),"jspaths"===t?i.defer=!0:i.rel="stylesheet",i.className=t,i.src=e,(r||document.head||document.getElementsByTagName("head")[0]).appendChild(i),[4,new Promise((function(e,t){i.addEventListener("load",e),i.addEventListener("error",e)}))];case 1:return o.sent(),[2]}}))}))},addTag=function(e,t){return void 0===t&&(t="jspaths"),__awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return r="fonts"===t?loadFontResource:loadScript,[4,Promise.all(e.map((function(e){return r(e)})))];case 1:return n.sent(),[2]}}))}))},loadFont=function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return e.fonts&&e.fonts.length?[4,addTag(e.fonts,"fonts")]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},loadTag=function(e){var t=e.jspaths,r=void 0===t?[]:t,n=e.csspaths,i=void 0===n?[]:n,o=e.fonts,a=void 0===o?[]:o;return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=_$1.uniqBy(a,"fontName"),[4,Promise.all([addTag(r,"jspaths"),addTag(i,"csspaths"),addTag(e,"fonts")])];case 1:return t.sent(),[2]}}))}))},loadFontTag=function(e){var t=e.fonts,r=void 0===t?[]:t;return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=_$1.uniqBy(r,"fontName"),[4,Promise.all([addTag(e,"fonts")])];case 1:return t.sent(),[2]}}))}))},removeTag=function(){removeFont(),Array.from(document.getElementsByTagName("script")).filter((function(e){return"jspaths"==e.className})).forEach((function(e){removeScript(e.src)})),Array.from(document.getElementsByTagName("link")).filter((function(e){return"csspaths"==e.className})).forEach((function(e){removeCss(e.href)}))};function removeScript(e){for(var t,r=Array.from(document.getElementsByTagName("script")),n=0;n<r.length;n++)r[n]&&r[n].src&&-1!=r[n].src.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}function removeCss(e){for(var t,r=Array.from(document.getElementsByTagName("link")),n=0;n<r.length;n++)r[n].href,r[n]&&r[n].href&&-1!=r[n].href.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}function removeFont(){var e=document.getElementById("__custom_font__");(null==e?void 0:e.parentNode)&&e.parentNode.removeChild(e)}var toolMutations={reset:function(e){e.selectd=[],e.list=[],e.plant=null,e.tw=null,e.watermark=null,e.endnotes=null,e.globalConstant=[]},setFonts:function(e,t){e.resource.fonts.push({fontName:t.name,fontUrl:t.src}),loadFont(e.resource)},setCaseInfo:function(e,t){e.caseInfo=t},setPageId:function(e,t){e.pageId=t},pagePush:function(e,t){try{var r=t.type,n=t.value,i=t.option,o=["name","path","id"];if(!o.includes(r))throw new Error("页面跳转错误!".concat(r," 不是一个正确的参数 请填以下参数 ").concat(o.join(",")));if(!n)throw new Error("页面跳转错误!".concat(r," 不是一个正确的参数 请填正确的页面路径或者页面名称"));e.toPage=i?{type:r,value:n,option:i}:{type:r,value:n}}catch(e){console.warn(e)}},updatComs:function(e,t){var r=this,n=findItemDeep$1(e.list,t);if("boolean"!=typeof n){(null==n?void 0:n.children)&&(null==n||n.children),updateComData(n,e.globalVars,!0,(function(e){r.commit("GoCom/updataSourceForComponent",{cid:n.cid,data:e})}),e.globalSource)}},updatComsForVar:function(e,t){var r=e.globalVars.map((function(e){var r,n;if((null===(r=null==e?void 0:e.forkValue)||void 0===r?void 0:r.length)&&(null===(n=null==e?void 0:e.forkValue)||void 0===n?void 0:n.includes(t))||e.forkValue==t)return e.mapField})).filter((function(e){return e})),n=[t];(null==r?void 0:r.length)&&(n=_$1.uniq(__spreadArray$1([t],r,!0)));for(var i=[],o=0,a=n;o<a.length;o++){var s=a[o];e.shareVariableTree[s]&&i.push.apply(i,e.shareVariableTree[s])}if(null==i?void 0:i.length)for(var l=0,c=i;l<c.length;l++){var u=c[l];this.commit("GoCom/updatComs",u)}},addConstant:function(e,t){var r=_$1.find(e.constant,{name:t.name});r?Object.assign(r,t):e.constant.push(t)},editConstant:function(e,t){var r=_$1.find(e.constant,{name:t.name});r&&Object.assign(r,t)},delConstant:function(e,t){_$1.remove(e.constant,(function(e){return e.name==t}))},setResource:function(e,t){var r=t.type,n=t.value;e.resource[r]=n,removeTag(),loadTag(e.resource)},updataResource:function(e){removeTag(),loadTag(e.resource)},resetResource:function(e){e.resource={jspaths:[],csspaths:[],otherpaths:[]}},setData:function(e,t){e.selectd=t.selectd},setList:function(e,t){e.list=t,setIndex(e.list)},saveDynamicChildren:function(e,t){var r=t.cid,n=t.data,i=t.name,o=e.pages[e.pageIndex].list,a=findItemDeep$1(o,r);a&&(a.activeDynamic=i,a.dynamicChildren instanceof Array&&(a.dynamicChildren=new Map(a.dynamicChildren)),a.dynamicChildren.set(i,n))},setTheme:function(e,t){e.theme=t},setPlant:function(e,t){var r=t.attr,n=t.value;e.plant||(e.plant={name:"",theme:null,baseData:{width:1920,height:1080,left:0,top:0},option:null,optionDes:null}),e.plant[r]=n},setPlantHeight:function(e,t){e.plant&&(e.plant.baseData.height=e.plant.baseData.height+t)},reversal:function(e,t){e.undos=[],e.undoRedoPointer=-1;var r=_$1.cloneDeep(t.globalVars);delete t.globalVars,e=Object.assign(e,t),fe.addVariables(r),e.globalVars=fe.getAllVariables(),setIndex(e.list)},setComTmp:function(e,t){var r=e.list.find((function(e){return e.cid===t[0]}));r.com=t[1],r.tmp=t[2]},setLoading:function(e,t){var r=t.cid,n=t.flag,i=e.list.find((function(e){return e.cid===r}));i&&(i.loading=n)},setMultiple:function(e,t){e.multiple=t},setCaseList:function(e,t){e.caseList=t},updataComponentForList:function(e,t){var r=t.cid,n=t.data,i=e.list,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataComponentForCaseList:function(e,t){var r=t.cid,n=t.data,i=e.caseList,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataComponent:function(e,t){var r=t.cid,n=t.data,i=e.pages&&e.pages[0]&&e.pages[0].list&&e.pages[0].list.length?e.pages[0].list:e.list,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataArea:function(e,t){e.currentArea.left+=t.deltaX,e.currentArea.top+=t.deltaY},updataSource:function(e,t){var r=t.cid,n=t.data,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&("indicatorCQ"===i.tmpData.source.type?i.tmpData.source.indicator.data=n:(console.log("更新数据:"+i.cid),i.tmpData.source[i.tmpData.source.type].data=n))},updataSourceForComponent:function(e,t){var r=t.cid,n=t.data;if(e.list.length){var i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.source=_$1.cloneDeep(n))}},updataAnimationForComponent:function(e,t){var r=t.cid,n=t.data;if(e.list.length){var i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.tw=n)}},updataWatermark:function(e,t){e.watermark=t},updataEndnotes:function(e,t){e.endnotes=t},updataAnimation:function(e,t){e.tw=t},setContext:function(e,t){var r=t.cid,n=t.data,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.example=n)},setContextList:function(e,t){var r=t.cid,n=t.data;e.contextList[r]=n},setPosition:function(e,t){setPositionForWorld(e.list.find((function(e){return e.cid===t[0]})),t[1])},setSelect:function(e,t){e.cache=[],e.selectd=t instanceof Array?t:[t],e.selectd.length>1&&e.selectd.forEach((function(t){e.cache.push(e.list.find((function(e){return e.cid===t&&"Other.Plant.Normal"!==e.type})))}))},setActive:function(e,t){var r=_$1.cloneDeep(t),n=r.id,i=r.multiple,o=r.origin,a=r.ctr,s=_$1.cloneDeep(e.selectd);if(i){var l=s.includes(n);if(s.length>=1){var c=s.every((function(r){return isPeer(e.list,r,t.id)}));if(!c)return void console.info("sorry Only sibling elements can be selected!")}l?s.splice(s.findIndex((function(e){return e===n})),1):s.push(n),e.selectd=s}else e.selectd=[n];e.selectd.forEach((function(t){var r=findItemDeep$1(e.list,t);if(r.pid){var n=findItemDeep$1(e.list,r.pid);n&&(n.toggle=!0)}a||(r.toggle=!0)})),e.selectdChangeOrigin=o||""},setCache:function(e){e.cache=[],e.selectd.length>1&&e.selectd.forEach((function(t){e.cache.push(e.list.find((function(e){return e.cid===t})))}))},clearActive:function(e){e.selectd=[]},setMultipleActive:function(e,t){e.selectd=t},syncMenuInfo:function(e){RecursiveList(e.menuList,(function(t){var r=10*t.lv+t.index;e.list.filter((function(e){return e.cid===t.id}))[0].z=1e4-r}))},addComs:function(e,t){var r=t.com,n=t.isMobile;"MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[]),r.lines={h:[],v:[]},"AnGridLayout"==r.viewComName&&r.dynamicChildren.set("状态1",null==r?void 0:r.AnGridChildren)),n?e.list.push(r):e.list.unshift(r),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},addComsForParent:function(e,t){var r=t.com,n=t.isMobile,i=t.PID;if("MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[])),i){var o=findItemDeep$1(e.list,i);n?(o.children=[],o.children.push(r)):o.children.unshift(r)}else n?e.list.splice(0,1,r):e.list.unshift(r);e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},addMyComs:function(e,t){var r;try{var n=t.data,i=t.shareVariableTree,o=t.globalVars,a=t.globalEvents;e.globalVars=_$1.uniq(_$1.concat(_$1.cloneDeep(e.globalVars),o)),e.globalEvents=_$1.uniq(_$1.concat(_$1.cloneDeep(e.globalEvents),a));var s=Object.keys(i),l=Object.keys(e.shareVariableTree),c=_$1.difference(s,l);c.length?c.forEach((function(t){e.shareVariableTree[t]=_$1.concat(_$1.cloneDeep(e.shareVariableTree[t]),i[t])})):e.shareVariableTree=Object.assign(_$1.cloneDeep(e.shareVariableTree),i),n instanceof Array?(resetID(n),(r=e.list).unshift.apply(r,n)):(resetID([n]),e.list.unshift(n)),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")}catch(e){}},addStateChildren:function(e,t){var r=findItemDeep$1(e.list,t.pid);r&&r.stateChildren.push(t)},addDynamicChildren:function(e,t){var r=findItemDeep$1(e.list,t.pid);r&&r.dynamicChildren.push(t)},arraySwap:function(e,t){var r;try{if(!t||2!=t.length)throw new Error("参数错误,方法接受两个组件的CID组成的数组!");var n=_$1.cloneDeep(e.list),i=findItemDeep$1(n,t[0]),o=findItemDeep$1(n,t[1]),a=findItemDeep$1(n,i.pid),s={},l=0,c=0;if(o)if("selectContainer"==o.componentType){var u=findItemDeep$1(n,t[1]);a?(l=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[l],a.children=a.children.filter((function(e){return e.cid!==s.cid}))):(s=findItemDeep$1(n,t[0]),n=n.filter((function(e){return e.cid!==s.cid}))),s.cid=genID(),s.pid=u.cid,u.children.push(s)}else if(i.pid||o.pid)if(a)if(l=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[l],i.pid!==o.pid){u=findItemDeep$1(n,o.pid);c=_$1.findIndex(u.children,(function(e){return e.cid==t[1]}));h=u.children[c];s.cid=genID(),s.pid=u.cid,h.cid=genID(),h.pid=a.cid,a.children.splice(l,1,h),u.children.splice(c,1,s)}else c=_$1.findIndex(a.children,(function(e){return e.cid==t[1]})),(r=a.children).splice.apply(r,__spreadArray$1([c,1],a.children.splice(l,1,a.children[c]),!1));else{var u=findItemDeep$1(n,o.pid);l=_$1.findIndex(n,(function(e){return e.cid==t[0]})),c=_$1.findIndex(u.children,(function(e){return e.cid==t[1]})),s=findItemDeep$1(n,i.cid);var h=u.children[c];s.cid=genID(),s.pid=u.cid,h.cid=genID(),h.pid=null,n.splice(l,1,h),u.children.splice(c,1,s)}else arraySwapForId(e.list,t[0],t[1]);else l=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[l],a.children.splice(l,1),s.cid=genID(),s.pid=null,n.push(s);e.list=n,setIndex(e.list)}catch(e){console.warn("组件位置交换发生错误",e)}},changeDynamicState:function(e,t){var r=findItemDeep$1(e.list,t.cid);r&&"dynamicComponent"==r.componentType&&(r.dynamicChildren instanceof Array&&r.dynamicChildren.find((function(e){return e[0]==t.activeName}))||r.dynamicChildren instanceof Map&&r.dynamicChildren.has(t.activeName)?r.activeDynamic=t.activeName:console.error(t.activeName+"不是一个正确的状态"))},addAlternateData:function(e,t){e.alternateData[t.pid]||(e.alternateData[t.pid]=[]),e.alternateData[t.pid].push(t)},setOptionForCom:function(e,t){var r;try{var n=t.cid,i=t.key,o=t.value,a=findItemDeep$1(e.list,n);if(!a)return;if("string"!=typeof i)return void console.error("key:[".concat(i,"]格式错误"));var s=null===(r=null==a?void 0:a.tmpData)||void 0===r?void 0:r.option,l=i.split(".");s&&(null==l?void 0:l.length)&&l.forEach((function(e,t){s.hasOwnProperty(e)&&(t===l.length-1?s[e]=o:s=s[e])}))}catch(e){console.warn("同步属性发生错误:"+e)}},mergeConfig:function(e,t){t.length>0&&t.forEach((function(t){e.list.unshift(t)})),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},updataName:function(e,t){var r=findItemDeep$1(e.list,t.cid);r&&(r.name=t.name)},setDynamicActive:function(e,t){t.cid;var r=t.name,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.activeDynamic=r)},updataScroll:function(e,t){t.cid;var r=t.data,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.srcollInfo={use:!!(null==r?void 0:r.use)&&(null==r?void 0:r.use),data:(null==r?void 0:r.data)?null==r?void 0:r.data:null})},updataDySetting:function(e,t){t.cid;var r=t.data,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.dyOption=r)},setCurrentEdited:function(e,t){if(t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=breakUp(r);r.children=n}e.currentEditerCid=t}else e.currentEditerCid=""},setDynamicLine:function(e,t){var r=_$1.cloneDeep(e.list),n=findItemDeep$1(r,t.cid);r.length&&"boolean"!=typeof n&&(n.lines=Object.assign({},n.lines,t.lines)),e.list=r}},findArray=function(e,t){try{var r=e.map((function(e){var r=findItemDeep$1(t,e);if("object"==typeof r)return r;throw"Please check whether the input and output parameters are correct!"}));if(_$1.every(r,Object))return r;throw"Please check whether the input and output parameters are correct!"}catch(e){return console.error(e),[]}},alignLeft=function(e,t){1===e.length&&(e[0].baseData.left=0);var r=_$1.sortBy(e,(function(e){return e.baseData.left})),n=r[0].baseData.left;e.map((function(e){return e.baseData.left=n}))},alignRight=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width-e[0].baseData.width}var n=_$1.sortBy(e,(function(e){return e.baseData.left})),i=1*n[n.length-1].baseData.left+1*n[n.length-1].baseData.width;e.map((function(e){return e.baseData.left=i-1*e.baseData.width}))},horizontally=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width/2-e[0].baseData.width/2}var n=_$1.sortBy(e,(function(e){return e.baseData.left})),i=_$1.sortBy(e,(function(e){return 1*e.baseData.left+1*e.baseData.width})),o=(1*n[0].baseData.left+(1*i[i.length-1].baseData.left+1*i[i.length-1].baseData.width))/2;e.map((function(e){return e.baseData.left=o-e.baseData.width/2}))},alignTop=function(e,t){1===e.length&&(e[0].baseData.top=0);var r=_$1.sortBy(e,(function(e){return e.baseData.top})),n=1*r[0].baseData.top;e.map((function(e){return e.baseData.top=n}))},alignBottom=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height-e[0].baseData.height}var n=_$1.sortBy(e,(function(e){return 1*e.baseData.top})),i=1*n[n.length-1].baseData.top+1*n[n.length-1].baseData.height;e.map((function(e){return e.baseData.top=i-1*e.baseData.height}))},verticalCenter=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height/2-e[0].baseData.height/2}var n=_$1.sortBy(e,(function(e){return e.baseData.top})),i=_$1.sortBy(e,(function(e){return 1*e.baseData.top+1*e.baseData.height})),o=(1*n[0].baseData.top+(1*i[i.length-1].baseData.top+1*i[i.length-1].baseData.height))/2;e.map((function(e){return e.baseData.top=o-e.baseData.height/2}))},topDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top})),r=(t[t.length-1].baseData.top-t[0].baseData.top)/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.top=1*t[0].baseData.top+r*n)}))},bottomDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top+e.baseData.height})),r=(t[t.length-1].baseData.top+t[t.length-1].baseData.height-(t[0].baseData.top+t[0].baseData.height))/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.top=1*t[0].baseData.top+1*t[0].baseData.height-1*e.baseData.height+r*n)}))},xCenterDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left+e.baseData.width/2})),r=1*t[t.length-1].baseData.left+t[t.length-1].baseData.width/2,n=1*t[0].baseData.left+t[0].baseData.width/2,i=(r-n)/(t.length-1);t.map((function(e,r){r>0&&r<t.length-1&&(e.baseData.left=n-e.baseData.width/2+i*r)}))},leftDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left})),r=(t[t.length-1].baseData.left-t[0].baseData.left)/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.left=t[0].baseData.left+r*n)}))},rightDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left+e.baseData.width})),r=(t[t.length-1].baseData.left+t[t.length-1].baseData.width-(t[0].baseData.left+t[0].baseData.width))/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.left=t[0].baseData.left+t[0].baseData.width-e.baseData.width+r*n)}))},yCenterDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top+e.baseData.height/2})),r=1*t[t.length-1].baseData.top+t[t.length-1].baseData.height/2,n=1*t[0].baseData.top+t[0].baseData.height/2,i=(r-n)/(t.length-1);t.map((function(e,r){r>0&&r<t.length-1&&(e.baseData.top=n-e.baseData.height/2+i*r)}))},layoutMutations={layout:function(e,t){var r=findArray(e.selectd,e.list);switch(t){case"alignLeft":alignLeft(r);break;case"alignRight":alignRight(r,e);break;case"horizontally":horizontally(r,e);break;case"alignTop":alignTop(r);break;case"alignBottom":alignBottom(r,e);break;case"verticalCenter":verticalCenter(r,e);break;case"topDistribution":topDistribution(r);break;case"bottomDistribution":bottomDistribution(r);break;case"xCenterDistribution":xCenterDistribution(r);break;case"leftDistribution":leftDistribution(r);break;case"rightDistribution":rightDistribution(r);break;case"yCenterDistribution":yCenterDistribution(r)}}},pages={setPageData:function(e,t){e.pages[0]=t},parasePages:function(e,t){t instanceof Array&&(e.pages=t.map((function(e,t){return e.name||(e.name="页面"+(t+1)),e.path||(e.path="page"+(t+1)),e})))},addPage:function(e,t){var r=e.pages.length+1;t.name="页面"+r,t.path="page"+r,e.pages.push(t),e.pageIndex=e.pages.length-1,e.resource={jspaths:[],csspaths:[],otherpaths:[]},e.globalVars=e.sysConst},setCurrentPageIndex:function(e,t){var r=e.globalEvents,n=e.globalVars,i=e.list,o=e.name,a=e.theme,s=e.plant,l=e.shareVariableTree,c=e.resource;e.pages[e.pageIndex]={globalEvents:r,globalVars:n,list:i,name:o,theme:a,plant:s,shareVariableTree:l,resource:c},e.pageIndex=t},setPageDataForIndex:function(e,t){var r=t.index,n=t.data;e.pages[r]=n},setPageName:function(e,t){e.name=t,e.pages[e.pageIndex].name=t},saveCurrentPageData:function(e){var t=e.globalEvents,r=e.globalVars,n=void 0===r?[]:r,i=e.list,o=e.name,a=e.theme,s=e.plant,l=e.shareVariableTree,c=e.resource;e.pages[e.pageIndex]={globalEvents:t,globalVars:n,list:i,name:o,theme:a,plant:s,shareVariableTree:l,resource:c}},getCurrentPageData:function(e){var t=e.globalEvents,r=e.globalVars,n=e.list,i=e.name,o=e.theme,a=e.plant,s=e.shareVariableTree,l=e.resource;e.pages[e.pageIndex]={globalEvents:t,globalVars:r,list:n,name:i,theme:o,plant:a,shareVariableTree:s,resource:l}}},containerMutaitons={segmentationContainer:function(e,t){var r=_$1.cloneDeep(e.list),n=t.containerData,i=t.direction,o=[];if("del"==i)if(n.pid){var a=findItemDeep$1(r,n.pid),s=a.children.length;if(a)if(s<=2)(o=a.children.filter((function(e){return e.cid!==n.cid&&e.children.length}))).length?(a.direction=o[0].direction,a.children=o[0].children.map((function(e){return e.pid=a.pid||a.cid,e}))):a.children=[];else{var l=a.children.find((function(e){return e.cid===n.cid})),c=a.children.findIndex((function(e){return e.cid===n.cid}));a.children=a.children.filter((function(e){return e.cid!==n.cid}));var u=a.children[c>=a.children.length-1?a.children.length-1:c],h="col"==a.direction?"height":"width";u.baseData[h]=(parseFloat(u.baseData[h])+parseFloat(l.baseData[h])).toFixed(2)+"%"}}else r.length&&(r=r.filter((function(e){return e.cid!==n.cid})));else{var d=findItemDeep$1(r,n.cid);if(d){d.direction=i,1===d.children.length&&(o=d.children,d.children=[]);for(var f=(s=d.children.length)>=2?1:2,p=(h=s>=2?(100/(s+1)).toFixed(2)+"%":"50%",0);p<f;p++)d.children.push({isLock:!1,isShow:!0,baseData:{width:"col"==i?"100%":h,height:"col"==i?h:"100%",angle:0,penetrate:0,opacity:100},direction:i,componentType:"selectContainer",iconClass:"__vue_devtool_undefined__",isAssembly:"__vue_devtool_undefined__",source:[],comData:{actions:[],option:{grid:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],bgColor:{alpha:1,blue:0,green:0,red:0,flag:1,style:"transparent"},imgOpt:"",bgScaleOpt:3,borderRadius:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],margins:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}]}},tmpData:{},dynamic:0,filePath:"/anov-prod/mgt/go/assembly/162-bgImage.png",origin:"anov-go",name:"容器组件",path:"/index.js",viewComName:"selectContainer",optionComName:"",dataComName:"",eventComName:"",assemblyDeveloper:"",devEmail:"",version:null,devDept:"",toggle:!0,cid:genID(),pid:d.cid,nestIndex:0,children:[],isTop:!1,isCol:"col"==i,isRow:"col"!=i,isDragged:!1,grandParentId:n.pid});o.length&&(o[0].cid=genID(),o[0].pid=d.children[0].cid,d.children[0].children=o)}}e.list=r,0==r.length&&(e.selectd=[])}},shareCom={goEditShareCom:function(e,t){var r=t.name,n=t.mapping;e.shareComs||(e.shareComs=new Map),e.shareComs.set(r,n)},delShareCom:function(e,t){var r=t.key;e.shareComs&&e.shareComs.has(r)&&e.shareComs.delete(r)}},globalVars={mutation:{addGoVar:function(e,t){try{fe.addVariable(t,(function(){e.globalVars=fe.getAllVariables()}))}catch(e){console.warn(e)}},delGoVar:function(e,t){try{var r=t.mapField;console.log(r,"mapFieldmapField"),fe.delVariable(r,(function(){e.globalVars=fe.getAllVariables()}))}catch(e){console.warn(e)}},editGoVar:function(e,t){var r=this;try{fe.editVariable(t,(function(n){e.globalVars=fe.getAllVariables(),ue(e.globalSource,t.mapField,e.globalVars,e.list,(function(e){r.commit("GoCom/updatComs",e.cid)})),(null==t?void 0:t.delayUpdate)||r.commit("GoCom/updatComsForVar",t.mapField)}))}catch(e){console.warn(e)}},goEditVar:function(e,t){var r=t.key,n=t.value,i=e.globalVars.find((function(e){return e.mapField==r}));i&&(i.originalValue=n,i.update=!0,this.commit("GoCom/editGoVar",i))},goUpdataSysVars:function(e,t){var r={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},n=e.sysConst,i=Object.keys(r);n.map((function(e){if(e.originalValue=e.value,(null==e?void 0:e.name)&&(null==i?void 0:i.includes(e.name))){var n=r[e.name];e.value=t[n],e.originalValue=t[n]}return e})),fe.addVariables(n)},updateGlobalVars:function(e,t){e.globalVars=t},updataVariables:function(e){e.globalVars=fe.getAllVariables()}},actions:{updateGlobalVarsAction:function(e){(0,e.commit)("updateGlobalVars",fe.getAllVariables())},goEditVar:function(e,t){(0,e.commit)("editGoVar",{mapField:t.key,originalValue:t.value})}}},mutations=__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1({},UndoRedo),baseDataMutaitons),rightMenuMutaitons),eventMutations),comTreeMutations),toolMutations),layoutMutations),pages),containerMutaitons),shareCom),globalVars.mutation),actions=__assign$1({updataList:function(e,t){var r=e.commit;t&&r("updataList",t),r("updateTree")},updataBaseData:function(e,t){var r=e.commit;t&&r("updataBaseData",t)},setActive:function(e,t){var r=e.commit;t&&r("setActive",t)},setSyncFlag:function(e,t){var r=e.commit;t&&r("setSyncFlag",t)},execute:function(e,t){var r=e.commit;t&&r("execute",t)},updataAnimationForComponent:function(e,t){var r=e.commit;t&&r("updataAnimationForComponent",t)},updataAnimation:function(e,t){(0,e.commit)("updataAnimation",t)},setOptionForCom:function(e,t){(0,e.commit)("setOptionForCom",t)},updatComs:function(e,t){var r=e.commit;setTimeout((function(){r("updatComs",t)}))},updatComsForVar:function(e,t){var r=e.dispatch,n=e.state,i=n.globalVars.map((function(e){var r,n;if((null===(r=null==e?void 0:e.forkValue)||void 0===r?void 0:r.length)&&(null===(n=null==e?void 0:e.forkValue)||void 0===n?void 0:n.includes(t))||e.forkValue==t)return e.mapField})).filter((function(e){return e})),o=[t];(null==i?void 0:i.length)&&(o=_$1.uniq(__spreadArray$1([t],i,!0)));for(var a=[],s=0,l=o;s<l.length;s++){var c=l[s];n.shareVariableTree[c]&&a.push.apply(a,n.shareVariableTree[c])}if(null==a?void 0:a.length)for(var u=0,h=a;u<h.length;u++){r("updatComs",h[u])}},goEditShareCom:function(e,t){var r=e.commit;e.state,r("goEditShareCom",t)},delShareCom:function(e,t){var r=e.commit;e.state,r("delShareCom",t)},updataSource:function(e,t){var r=e.commit;e.state,r("updataSource",t)}},globalVars.actions),getters={getCurrentPage:function(e){return e.pages.length?e.pages[e.pageIndex]:[]},globalSourceTree:function(e){if(e.list.length&&e.globalSource.length){var t=[];return recursion(_$1.cloneDeep(e.list),(function(e){var r,n,i;if("globalData"==(null===(n=null===(r=null==e?void 0:e.tmpData)||void 0===r?void 0:r.source)||void 0===n?void 0:n.type)){var o=null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.source.globalData;t.push({name:e.name,cid:e.cid,sourceId:o.id,viewComName:e.viewComName})}})),t}return[]}},store={namespaced:!0,state:state,mutations:mutations,actions:actions,getters:getters},VueServer=function(){function e(){}return e.setAppStore=function(t){e.store=t},e.prototype.getState=function(){return e.store.state[e.storeModule]},e.prototype.mapState=function(t){return mapState(e.storeModule,t)},e.prototype.mapGetters=function(t){return mapGetters(e.storeModule,t)},e.prototype.mapMutations=function(t){return mapMutations(e.storeModule,t)},e.prototype.callState=function(t){return e.store.state[e.storeModule][t]},e.prototype.callGetter=function(t,r){return e.store.getters[e.storeModule+"/"+t]},e.prototype.callMutation=function(t,r,n){n?e.store.commit(e.storeModule+"/"+t,r,!0):e.store.commit(e.storeModule+"/"+t,r)},e.prototype.callAction=function(t,r){e.store.dispatch(e.storeModule+"/"+t,r)},e.storeModule="GoCom",e}(),mapState=normalizeNamespace((function(e,t){var r;return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;r[n]=function(){var t=this.$store.state,r=this.$store.getters;if(e){var n=getModuleByNamespace(this.$store,"mapState",e);if(!n)return;t=n.context.state,r=n.context.getters}return"function"==typeof i?i.call(this,t,r):t[i]},r[n].VuexServer=!0})),r})),mapMutations=normalizeNamespace((function(e,t){var r;return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;r[n]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this.$store.commit;if(e){var o=getModuleByNamespace(this.$store,"mapMutations",e);if(!o)return;n=o.context.commit}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}})),r})),mapGetters=normalizeNamespace((function(e,t){var r={};return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;i=e+i,r[n]=function(){if(!e||getModuleByNamespace(this.$store,"mapGetters",e)){if("production"===process.env.NODE_ENV||i in this.$store.getters)return this.$store.getters[i];console.error("[VuexServer] unknown getter: ".concat(i))}},r[n].VuexServer=!0})),r}));function normalizeMap(e){return Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}}))}function normalizeNamespace(e){return function(t,r){return"string"!=typeof t?(r=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,r)}}function getModuleByNamespace(e,t,r){var n=e._modulesNamespaceMap[r];return"production"===process.env.NODE_ENV||n||console.error("[VuexServer] module namespace not found in ".concat(t,"(): ").concat(r)),n}var GoComponent=function(){function e(e){var t=this;if(this.isLock=!1,this.isShow=!0,this.baseData={left:0,top:0,width:300,height:200,angle:0,opacity:100,rotate:0,rotateY:0},this.componentType="BaseComponent",this.cid=genID(),e){Object.keys(e).forEach((function(r){t[r]=e[r]}));["AnEchartsMap","AnMaptalks","AnEchartsMap1","AnArcgisMapBase","AnAMap1","AnCesium","AnThreeMap3DChina","AnThreeMapForCesium","AnThreeMap","AnGisMap","AnMineMap","MineMapMarkerLayer","MineMapClusterLayer","AnChina3D","AncsAnovGis"].includes(e.viewComName)&&(this.componentType="MultiStateComponent"),"AnDynamic"!==e.viewComName&&"AmDynamic"!==e.viewComName&&"AnContainer"!==e.viewComName&&"AnGridLayout"!==e.viewComName||(this.componentType="dynamicComponent")}}return e.prototype.setIndex=function(e){this.z=e},e}(),Load=function(){function e(e){this.vueServer=e,this.loadScript=loadScript}return e.setStore=function(e){this.store=e},e.prototype.loadComponents=function(e){var t=e&&e.list?e.list:[];recursion(t,(function(e){e.viewComName&&(e&&e.path&&e.path,e.origin,e.viewComName?e.viewComName:e.rawData.viewComName)})),e&&this.vueServer.callMutation("reversal",_$1.cloneDeep(e))},e.prototype.addStore=function(e){this.vueServer.callMutation("setActive",{id:e}),this.vueServer.callMutation("addComs",this)},e.prototype._addPlantStore=function(){this.vueServer.callMutation("setPlant",this)},e.prototype._loadComTmp=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,i=this;return __generator(this,(function(o){switch(o.label){case 0:if(window[t])return[3,5];r=function(t){var r;return __generator(this,(function(n){switch(n.label){case 0:return r=e[t],[4,new Promise((function(e){e(i._load(r))}))];case 1:return n.sent(),[2]}}))},n=0,o.label=1;case 1:return n<e.length?[5,r(n)]:[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:window[t]=t,o.label=5;case 5:return[2]}}))}))},e.prototype._load=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){return[2,new Promise((function(r){r(t.loadScript(e))}))]}))}))},e}(),IndexedDB=function(){function e(e){var t=e.dbName,r=e.tables,n=e.version,i=void 0===n?1:n,o=__rest(e,["dbName","tables","version"]);this.dbName=t,this.tables=r,this.version=i,this.openDB(__assign$1({dbName:t,tables:r,version:i},o))}return e.deleteDB=function(e){var t;null===(t=window.indexedDB)||void 0===t||t.deleteDatabase(e)},e.prototype.deleteItem=function(e,t,r){var n=this.storage.transaction(e,"readwrite").objectStore(e).delete(t);return n.onsuccess=function(e){"function"==typeof r&&r(e)},n},e.prototype.getItem=function(e,t,r){var n=this.storage.transaction(e,"readwrite").objectStore(e),i=null;return(i=t?n.get(t):n.getAll()).onsuccess=function(e){var t;"function"==typeof r&&r(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.result)},i.onerror=function(e){console.error(e),r(e)},i},e.prototype.setItem=function(e,t,r,n){var i=this.storage.transaction(e,"readwrite").objectStore(e).put(r,t);return i.onsuccess=function(e){"function"==typeof n&&n(e)},i.onerror=function(e){"function"==typeof n&&n(e)},i},e.prototype.get=function(e,t){return this.getItem(this.tables[0],e,t)},e.prototype.set=function(e,t,r){return this.setItem(this.tables[0],e,t,r)},e.prototype.delete=function(e,t){return this.deleteItem(this.tables[0],e,t)},e.prototype.clear=function(e,t){var r=this.storage.transaction(this.dbName,"readwrite").objectStore(e).clear();return r.onsuccess=function(e){"function"==typeof t&&t(e)},r},e.prototype.getDB=function(){return this.storage},e.prototype.closeDB=function(){this.storage.close()},e.prototype.openDB=function(e){var t=this,r=e.dbName,n=e.tables,i=e.version,o=e.callback,a=window.indexedDB;if(a)if((null==n?void 0:n.length)<1)console.error("表名不能为空");else{var s=a.open(r,i);s.onerror=function(e){var t,r;console.error("打开数据库失败: ".concat(null===(r=null===(t=e.currentTarget)||void 0===t?void 0:t.error)||void 0===r?void 0:r.message)),"function"==typeof o&&o(e)},s.onsuccess=function(e){var r;t.storage=null===(r=e.target)||void 0===r?void 0:r.result,"function"==typeof o&&o(e)},s.onupgradeneeded=function(e){var r;t.storage=null===(r=e.target)||void 0===r?void 0:r.result,n.forEach((function(r){t.storage.objectStoreNames.contains(r)||(t.storage.createObjectStore(r),"function"==typeof o&&o(e))}))}}else console.error("你的浏览器不支持indexedDB")},e}(),Go=function(){function e(){this.VueServer=new VueServer}return e.getInstance=function(){return this.instance||(this.db=new IndexedDB({dbName:"AnovGo",tables:["logs"]}),this.instance=new e),this.instance},e.prototype.getAppStore=function(){return e.store},e.setAppStore=function(t){e.store=t,VueServer.setAppStore(t),Load.setStore(t)},e.prototype.add=function(e,t,r){t.MultiState?this.VueServer.callMutation("addStateChildren",t):(this.VueServer.callMutation("addComs",{com:t,isMobile:r}),this.VueServer.callMutation("setActive",{id:e}))},e.prototype.addForParent=function(e,t,r,n){this.VueServer.callMutation("addComsForParent",{com:t,PID:r,isMobile:n}),this.VueServer.callMutation("setActive",{id:e})},e.prototype.render=function(e,t){var r=new GoComponent(e);t?this.add(r.cid,r,!0):this.add(r.cid,r)},e.prototype.renderForParent=function(e,t,r){var n=new GoComponent(e);void 0!==r?this.addForParent(n.cid,n,t,r):this.addForParent(n.cid,n,t)},e.prototype.reversal=function(e){new Load(new VueServer).loadComponents(e)},e.prototype.emitEvent=function(e,t){var r=this,n=this.VueServer.callState("globalEvents"),i=this.VueServer.callState("globalVars"),o=this.VueServer.callState("shareVariableTree"),a=this.VueServer.callState("globalSource");this.VueServer.callState("globalConstant");var s=this.VueServer.callState("list");be(n,i,o,s,e,(function(e){r.VueServer.callMutation("changeShow",e)}),(function(e){r.VueServer.callMutation("updataSourceForComponent",e)}),t,a)},e}(),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__publicField=(e,t,r)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,r),r),__async=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{s(r.next(e))}catch(e){i(e)}},a=e=>{try{s(r.throw(e))}catch(e){i(e)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,a);s((r=r.apply(e,t)).next())})),defaultOptions={gapX:100,gapY:100,offsetLeft:0,offsetTop:0,width:120,height:64,opacity:.15,rotate:-22,fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"300",fontColor:"#000",fontFamily:"sans-serif",textAlign:"center",textBaseline:"alphabetic",monitor:!0,zIndex:9999,mode:"interval",pack:!0,blindFontSize:16,blindOpacity:.005},attributeNameTag="data-watermark-tag",observeOptions={childList:!0,subtree:!0,attributeFilter:["style","class",attributeNameTag]};function getMutationObserver(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function getDataSetKey(e){return e.split("-").slice(1).reduce(((e,t,r)=>0===r?t:`${e}${t[0].toUpperCase()+t.slice(1)}`))}var getStyleStr=e=>{let t="";return Object.keys(e).forEach((r=>{const n=r.replace(/([A-Z])/g,"-$1").toLowerCase();t+=`${n}:${e[r]};`})),t},encrypt=e=>window.btoa(decodeURI(encodeURIComponent(e))),getRandomId=(e="")=>`${encrypt(e)}-${(new Date).getTime()}-${Math.floor(Math.random()*Math.pow(10,8))}`,getContainer=(e,t,r={},n)=>{let i;if("string"==typeof e){if(i=document.getElementById(e),!i)throw new Error(`水印挂载节点未找到,请检查#${e}是否存在`)}else i=null!=e?e:document.body;i.setAttribute(attributeNameTag,t);const o=__spreadValues({position:"relative"},r);return n||delete o.position,i.setAttribute("style",getStyleStr(o)),i},getContent=e=>{const t=document.createElement("div");return t.setAttribute("style",getStyleStr({pointerEvents:"none"})),t.setAttribute(attributeNameTag,e),t};function getDrawPattern(e){const{text:t,gapX:r,gapY:n,offsetTop:i,offsetLeft:o,width:a,height:s,rotate:l,opacity:c,fontSize:u,fontStyle:h,fontVariant:d,fontWeight:f,fontFamily:p,fontColor:m,textAlign:g,textBaseline:v,image:y,blindText:_,blindFontSize:b,blindOpacity:w}=e;return new Promise(((e,D)=>{const x=document.createElement("canvas"),S=x.getContext("2d"),k=1*(Number(r)+Number(a)),T=1*(Number(n)+Number(s)),P=Number(o)||Number(r)/2,E=Number(i)||Number(n)/2;if(x.setAttribute("width",`${k}px`),x.setAttribute("height",`${T}px`),S){const r=1*a,n=1*s;if(S.translate(1*P,1*E),S.rotate(Math.PI/180*Number(l)),_&&(S.globalAlpha=w,S.font=`${b}px normal`,S.fillText(_,0,0)),S.globalAlpha=c,y){const t=new Image;return t.crossOrigin="anonymous",t.referrerPolicy="no-referrer",t.src=y,void(t.onload=()=>{S.drawImage(t,0,0,r,n),e({url:S.canvas.toDataURL(),width:k,height:T})})}const i=Array.isArray(t)?t:[t],o=i.map((e=>S.measureText(e).width)),h=Math.max(...o),d=1*Number(u);S.textAlign=g,S.textBaseline=v,S.fillStyle=m,S.font=C(`${d}px`),h>a&&(S.font=C(d/2+"px"));const f=d+5;let p=(n-(u*i.length+5*(i.length-1)))/2;p=p<0?0:p;for(let e=0;e<i.length;e++)S.fillText(i[e]||"",r/2,p+f*e);e({url:S.canvas.toDataURL(),width:k,height:T})}function C(e){return`${h} ${d} ${f} ${e} ${p}`}return D()}))}var MutationObserver=getMutationObserver(),Watermark=class{constructor(e={}){__publicField(this,"options"),__publicField(this,"container"),__publicField(this,"watermarkContent"),__publicField(this,"watermarkDom"),__publicField(this,"style"),__publicField(this,"watermarkTag"),__publicField(this,"shadowRoot"),__publicField(this,"mutationObserver"),__publicField(this,"_isAgainRender",(e=>{if("attributes"===e.type){if(e.attributeName===attributeNameTag)return!0;if(this.watermarkTag===this._getNodeRandomId(e.target))return!0}return!(!e.removedNodes.length||this.watermarkTag!==this._getNodeRandomId(e.removedNodes[0]))})),__publicField(this,"_getNodeRandomId",(e=>{var t;return null==(t=null==e?void 0:e.dataset)?void 0:t[getDataSetKey(attributeNameTag)]})),__publicField(this,"_destroyMutationObserver",(()=>{this.mutationObserver&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.mutationObserver=null)})),__publicField(this,"_getWatermarkDom",(e=>__async(this,null,(function*(){this.watermarkDom||(this.watermarkDom=document.createElement("div")),"number"==typeof e&&e&&(this.style.height=`${e}px`);const t=yield getDrawPattern(this.options);if(null==t?void 0:t.url){const e=t.url;"repeat"===this.options.mode?this.style.backgroundImage=`url(${e})`:(this.style.backgroundImage=`url(${e}), url(${e})`,this.style.backgroundRepeat="repeat, repeat",this.style.backgroundPosition=`${t.width/2}px ${t.height/2}px, 0 0`),this.options.container||(this.style.position="fixed",this.style.height=void 0),this.watermarkDom.setAttribute("style",getStyleStr(this.style))}return this.watermarkDom.setAttribute(attributeNameTag,this.watermarkTag),this.watermarkDom})))),__publicField(this,"_getWatermarkHeight",(()=>{if(!this.container)return 0;let e=0;const{scrollHeight:t=0,clientHeight:r=0}=this.options.container?this.container.parentNode:this.container;return t>r&&(e=Math.max(t,r)),e})),this.options=Object.assign({},defaultOptions,e),this.style={position:"absolute",left:0,top:0,right:0,bottom:0,pointerEvents:"none",overflow:"hidden",backgroundColor:"transparent",backgroundRepeat:"repeat"},this.style.zIndex=this.options.zIndex,this.watermarkTag=getRandomId("watermark"),this.mutationObserver=null,this._render()}update(e={}){this.options=__spreadValues(__spreadValues({},this.options),e),this.style.zIndex=this.options.zIndex,this._render()}show(){this.watermarkDom&&(this.style.display="block",this.watermarkDom.setAttribute("style",getStyleStr(this.style)))}hide(){this.watermarkDom&&(this.style.display="none",this.watermarkDom.setAttribute("style",getStyleStr(this.style)))}destroy(){this.shadowRoot=void 0,this.watermarkContent&&(this.watermarkContent.remove(),this.watermarkContent=void 0),this.watermarkDom&&(this.watermarkDom.remove(),this.watermarkDom=void 0),this._destroyMutationObserver()}_render(){return __async(this,null,(function*(){this._destroyMutationObserver(),this.container=getContainer(this.options.container,this.watermarkTag,this.options.containerStyle,this.options.pack),this.watermarkContent||(this.watermarkContent=getContent(this.watermarkTag),this.container.append(this.watermarkContent));const e=this._getWatermarkHeight();if(this.watermarkDom=yield this._getWatermarkDom(e),this.watermarkContent){const e=this.watermarkContent.childNodes||[];for(let t=0;t<e.length;t++)this.watermarkContent.removeChild(e[t])}"function"==typeof this.watermarkContent.attachShadow?this.shadowRoot||(this.shadowRoot=this.watermarkContent.attachShadow({mode:"open"})):this.shadowRoot=this.watermarkContent,this.shadowRoot.append(this.watermarkDom),MutationObserver&&this.options.monitor&&(this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{if(this._isAgainRender(e))return this.destroy(),void this._render()}))})),this.mutationObserver.observe(this.container,observeOptions),this.shadowRoot&&this.mutationObserver.observe(this.shadowRoot,observeOptions))}))}},FileSaver_min=createCommonjsModule((function(e,t){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){s(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,t,a){var s=o.URL||o.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):n(l.href)?r(e,t,a):i(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,a){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),o);else if(n(e))r(e,o,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var s="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&l||a)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var h=o.URL||o.webkitURL,d=h.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout((function(){h.revokeObjectURL(d)}),4e4)}});o.saveAs=s.saveAs=s,e.exports=s}()})),getComOptions=function(e){var t=_$1.cloneDeep(e),r=_$1.omit(t,["comData","source"]);return __assign$1({},r)},generateComponentList=function(e){if(0===e.length)return[];var t=function(e){for(var r,n=0;n<e.length;n++)e[n].tmpData&&(e[n]=Object.assign({},getComOptions(e[n]))),e[n]&&e[n].children&&(null===(r=e[n])||void 0===r?void 0:r.children.length)?t(e[n].children):e[n]&&e[n].dynamicChildren&&Array.from(e[n].dynamicChildren).forEach((function(e,r){t(e[1])}))};return t(e),e},generateCaseDataJson=function(e){var t=_$1.cloneDeep(e)?_$1.cloneDeep(e):{};"string"==typeof e&&(t=JSON.parse(e));var r=[];if(t instanceof Array)t.forEach((function(e,t){var n=JSON.parse(e.caseDetailData)?JSON.parse(e.caseDetailData):{},i=e.caseDetailPath,o=e.caseDetailName,a=n.theme,s=void 0===a?null:a,l=n.globalVars,c=void 0===l?null:l,u=n.shareVariableTree,h=void 0===u?null:u,d=n.plant,f=void 0===d?null:d,p=n.list,m=void 0===p?[]:p,g=n.path,v=void 0===g?"":g;n.name;var y=n.resource,_=void 0===y?{jspaths:[],csspaths:[],otherpaths:[]}:y,b=n.watermark,w=void 0===b?null:b,D=n.tw,x=void 0===D?null:D,S=n.globalSource,k=void 0===S?[]:S,T=n.globalEvents,P=void 0===T?[]:T,E=n.globalConstant,C=void 0===E?[]:E;r.push({path:v||i,theme:s,name:o,resource:_,tw:x,watermark:w,globalSource:k,globalVars:c,globalEvents:P,globalConstant:C,shareVariableTree:h,plant:f,list:generateComponentList(m)})}));else{var n=t.theme,i=void 0===n?null:n,o=t.globalVars,a=void 0===o?null:o,s=t.shareVariableTree,l=void 0===s?null:s,c=t.plant,u=void 0===c?null:c,h=t.list,d=void 0===h?[]:h,f=t.resource,p=void 0===f?{jspaths:[],csspaths:[],otherpaths:[]}:f,m=t.watermark,g=void 0===m?null:m,v=t.tw,y=void 0===v?null:v,_=t.globalSource,b=void 0===_?[]:_,w=t.globalEvents,D=void 0===w?[]:w,x=t.globalConstant,S=void 0===x?[]:x;r.push({resource:p,tw:y,watermark:g,globalSource:b,theme:i,globalVars:a,globalEvents:D,shareVariableTree:l,globalConstant:S,plant:u,list:generateComponentList(d)})}return r},generatePageData=function(e){var t={},r=t.theme,n=void 0===r?null:r,i=t.globalVars,o=void 0===i?null:i,a=t.shareVariableTree,s=void 0===a?null:a,l=t.plant,c=void 0===l?null:l,u=t.list,h=void 0===u?[]:u,d=t.undos,f=void 0===d?[]:d,p=t.undoRedoPointer,m=void 0===p?-1:p,g=t.globalEvents,v=void 0===g?[]:g;return e&&(n=e.theme,c=e.plant),{theme:n,globalVars:o,globalEvents:v,shareVariableTree:s,plant:c,undos:f,undoRedoPointer:m,list:generateComponentList(h)}},exportJson=function(e){var t=e.caseName,r=void 0===t?"case-name":t,n=e.caseImg,i=void 0===n?"":n,o=e.caseRemark,a=void 0===o?"":o,s=e.details,l=e.caseClientType,c=void 0===l?"":l,u=e.id,h={caseClientType:c,caseName:r,caseImg:i,caseRemark:a,caseId:void 0===u?"":u,createTime:moment().format("YYYY-MM-DD , h:mm:ss"),caseData:generateCaseDataJson(s)},d=new Blob([JSON.stringify(h)],{type:"json"});FileSaver_min.saveAs(d,r+".json")},generateJson=function(e){var t=e.caseName,r=void 0===t?"":t,n=e.caseData;return e.plangInfoForPsd,{caseName:r,createTime:moment().format("YYYY-MM-DD , h:mm:ss"),caseData:generateCaseDataJson(n)}};function elementError(e,t){throw new Error("".concat(e,":Expected HTMLElement, got ").concat(t))}var SizeAdaption=function(){function e(e){this.option=e,this.option.isResize&&window.addEventListener("resize",this.resize.bind(this))}return Object.defineProperty(e,"defaultOption",{get:function(){return e._defaultOption},set:function(t){e._defaultOption=t},enumerable:!1,configurable:!0}),e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.removeResize=function(){window.removeEventListener("resize",this.resize.bind(this))},e.prototype.resize=function(){var e=this.option,t=e.isEqualScale,r=e.wrapSelector,n=e.viewSelector,i=e.designWidth,o=e.designHeight,a=e.horizontal,s=e.vertical,l=document.querySelector(r);l||elementError("wrap",l);var c=l.clientWidth,u=l.clientHeight,h=document.querySelector(n);h||elementError("view",h),h.style.position="absolute",h.style.width=i+"px",h.style.height=o+"px";var d,f,p,m,g=Math.min(c/i,u/o);if(t){switch(h.style.transform="scale(".concat(g,")"),a){case"center":d=(c-i)/2+"px";break;case"left":d=(g-1)/2*i+"px";break;case"right":p=(g-1)/2*i+"px"}switch(s){case"center":f=(u-o)/2+"px";break;case"top":f=(g-1)/2*o+"px";break;case"bottom":m=(g-1)/2*o+"px"}}else h.style.transform="scale('".concat(c/i,", ").concat(u/o,"')"),d=(c-i)/2+"px",f=(u-o)/2+"px";f?h.style.top=f:m&&(h.style.bottom=m),d?h.style.left=d:p&&(h.style.right=p)},e._defaultOption={isEqualScale:!0,designWidth:1920,designHeight:1080,wrapSelector:"body",viewSelector:"#app",horizontal:"center",vertical:"center",isResize:!0},e}(),Scale=function(){function e(e){this.wrap=null,this.target=null,this.type=0,this.minRatio=1,this.outSize={w:0,h:0},this.inSize={w:0,h:0};var t=e.wrap,r=e.target,n=e.type,i=e.size,o=e.callback;this.size=i,this.type=n,this.initOptions(t,r,i),this.initSize(i),this.layout(),this.scale(o),window.addEventListener("resize",this.reset.bind(this,o))}return e.prototype.reset=function(e){this.initSize(this.size),this.layout(),e?this.scale(e):this.scale()},e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.removeResize=function(){window.removeEventListener("resize",this.reset.bind(this,void 0))},e.prototype.getDom=function(e){if(_$1.isElement(e))return e;var t=document.querySelector(e);return _$1.isElement(t)?t:null},e.prototype.initOptions=function(e,t,r){this.wrap=this.getDom(e),this.target=this.getDom(t),this.target.style.width=r.w+"px",this.target.style.height=r.h+"px",this.verificationDom()},e.prototype.initSize=function(e){this.outSize.w=this.wrap.clientWidth,this.outSize.h=this.wrap.clientHeight,this.inSize=e},e.prototype.verificationDom=function(){null!=this.wrap&&null!=this.target&&this.isChildOf(this.wrap,this.target)||console.warn("Please pass in the DOM element correctly!")},e.prototype.layout=function(){if(0==this.type||3==this.type){var e=(this.outSize.w-this.inSize.w)/2,t=(this.outSize.h-this.inSize.h)/2;this.target.style.top=t+"px",this.target.style.left=e+"px"}else this.wrap.style.display="flex",this.wrap.style["align-items"]="center",this.wrap.style["justify-content"]="center",this.target.style.position="static",1==this.type?(this.wrap.style["overflow-y"]="auto",this.wrap.style["overflow-x"]="hidden"):2==this.type&&(this.wrap.style["overflow-y"]="hidden",this.wrap.style["overflow-x"]="auto")},e.prototype.isChildOf=function(e,t){var r;if(e&&t)for(r=e.parentNode;r;){if(t===r)return!0;r=r.parentNode}return!1},e.prototype.scale=function(e){var t=1,r=1;switch(this.type){case 0:t=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h),r=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h);break;case 1:r=t=this.outSize.w/this.inSize.w;break;case 2:t=r=this.outSize.h/this.inSize.h;break;case 3:t=this.outSize.w/this.inSize.w,r=this.outSize.h/this.inSize.h}e&&e([t,r]),this.target.style.transform="scale(".concat(t,",").concat(r,")")},e.prototype.resize=function(){},e}(),domToImage=createCommonjsModule((function(e){!function(t){var r=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var r=e(t).toLowerCase();return(n="application/font-woff",i="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[r]||"";var n,i},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var r=window.atob(e.toDataURL().split(",")[1]),n=r.length,i=new Uint8Array(n),o=0;o<n;o++)i[o]=r.charCodeAt(o);t(new Blob([i],{type:"image/png"}))}))}(e)},resolveUrl:function(e,t){var r=document.implementation.createHTMLDocument(),n=r.createElement("base");r.head.appendChild(n);var i=r.createElement("a");return r.body.appendChild(i),n.href=t,i.href=e,i.href},getAndEncode:function(e){var t=3e4;s.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());return new Promise((function(r){var n,i=new XMLHttpRequest;if(i.onreadystatechange=a,i.ontimeout=l,i.responseType="blob",i.timeout=t,i.open("GET",e,!0),i.send(),s.impl.options.imagePlaceholder){var o=s.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(n=o[1])}function a(){if(4===i.readyState)if(200===i.status){var t=new FileReader;t.onloadend=function(){var e=t.result.split(/,/)[1];r(e)},t.readAsDataURL(i.response)}else n?r(n):c("cannot fetch resource: "+e+", status: "+i.status)}function l(){n?r(n):c("timeout of "+t+"ms occured while fetching resource: "+e)}function c(e){console.error(e),r("")}}))},uid:function(){var e=0;return function(){return"u"+t()+e++;function t(){return("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)}}}(),delay:function(e){return function(t){return new Promise((function(r){setTimeout((function(){r(t)}),e)}))}},asArray:function(e){for(var t=[],r=e.length,n=0;n<r;n++)t.push(e[n]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise((function(t,r){var n=new Image;n.onload=function(){t(n)},n.onerror=r,n.src=e}))},width:function(e){var r=t(e,"border-left-width"),n=t(e,"border-right-width");return e.scrollWidth+r+n},height:function(e){var r=t(e,"border-top-width"),n=t(e,"border-bottom-width");return e.scrollHeight+r+n}};function e(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function t(e,t){var r=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(r.replace("px",""))}}(),n=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,r,o){return a()?Promise.resolve(e):Promise.resolve(e).then(n).then((function(t){var n=Promise.resolve(e);return t.forEach((function(e){n=n.then((function(t){return i(t,e,r,o)}))})),n}));function a(){return!t(e)}},shouldProcess:t,impl:{readUrls:n,inline:i}};function t(t){return-1!==t.search(e)}function n(t){for(var n,i=[];null!==(n=e.exec(t));)i.push(n[1]);return i.filter((function(e){return!r.isDataUrl(e)}))}function i(e,t,n,i){return Promise.resolve(t).then((function(e){return n?r.resolveUrl(e,n):e})).then(i||r.getAndEncode).then((function(e){return r.dataAsUrl(e,r.mimeType(t))})).then((function(n){return e.replace(function(e){return new RegExp("(url\\(['\"]?)("+r.escape(e)+")(['\"]?\\))","g")}(t),"$1"+n+"$3")}))}}(),i=function(){return{resolveAll:function(){return e().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:e}};function e(){return Promise.resolve(r.asArray(document.styleSheets)).then((function(e){var t=[];return e.forEach((function(e){try{r.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return n.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return n.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function t(i){return i instanceof Element?o(i).then((function(){return i instanceof HTMLImageElement?e(i).inline():Promise.all(r.asArray(i.childNodes).map((function(e){return t(e)})))})):Promise.resolve(i);function o(e){var t=e.style.getPropertyValue("background");return t?n.inlineAll(t).then((function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))})).then((function(){return e})):Promise.resolve(e)}},impl:{newImage:e}};function e(e){return{inline:function(t){return r.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||r.getAndEncode).then((function(t){return r.dataAsUrl(t,r.mimeType(e.src))})).then((function(t){return new Promise((function(r,n){e.onload=r,e.onerror=n,e.src=t}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},s={toSvg:l,toPng:function(e,t){return c(e,t||{}).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return c(e,t=t||{}).then((function(e){return e.toDataURL("image/jpeg",t.quality||1)}))},toBlob:function(e,t){return c(e,t||{}).then(r.canvasToBlob)},toPixelData:function(e,t){return c(e,t||{}).then((function(t){return t.getContext("2d").getImageData(0,0,r.width(e),r.height(e)).data}))},impl:{fontFaces:i,images:o,util:r,inliner:n,options:{}}};function l(e,t){return function(e){void 0===e.imagePlaceholder?s.impl.options.imagePlaceholder=a.imagePlaceholder:s.impl.options.imagePlaceholder=e.imagePlaceholder;void 0===e.cacheBust?s.impl.options.cacheBust=a.cacheBust:s.impl.options.cacheBust=e.cacheBust}(t=t||{}),Promise.resolve(e).then((function(e){return u(e,t.filter,!0)})).then(h).then((function(e){t.bgcolor&&(e.style.backgroundColor=t.bgcolor);t.width&&(e.style.width=t.width+"px");t.height&&(e.style.height=t.height+"px");t.style&&Object.keys(t.style).forEach((function(r){e.style[r]=t.style[r]}));return e})).then((function(n){return function(e,t,n){return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(r.escapeXhtml).then((function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"})).then((function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+n+'">'+e+"</svg>"})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(n,t.width||r.width(e),t.height||r.height(e))}))}function c(e,t){return l(e,t).then(r.makeImage).then(r.delay(100)).then((function(n){var i=function(e){var n=document.createElement("canvas");if(n.width=t.width||r.width(e),n.height=t.height||r.height(e),t.bgcolor){var i=n.getContext("2d");i.fillStyle=t.bgcolor,i.fillRect(0,0,n.width,n.height)}return n}(e);return i.getContext("2d").drawImage(n,0,0),i}))}function u(e,t,n){return n||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?r.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(n){return function(e,t,n){var i=e.childNodes;return 0===i.length?Promise.resolve(t):o(t,r.asArray(i),n).then((function(){return t}));function o(e,t,r){var n=Promise.resolve();return t.forEach((function(t){n=n.then((function(){return u(t,r)})).then((function(t){t&&e.appendChild(t)}))})),n}}(e,n,t)})).then((function(t){return function(e,t){var n=t;return n instanceof Element?Promise.resolve().then(i).then(o).then(a).then(s).then(l).then((function(){return n})):n;function i(){if(n instanceof HTMLVideoElement){var t=window.getComputedStyle(e),r=document.createElement("canvas");r.width=parseInt(t.width,10),r.height=parseInt(t.height,10);var i=Math.max(e.videoWidth/r.width,e.videoHeight/r.height),o=e.videoWidth/i,a=e.videoHeight/i,s=r.width/2-o/2,l=r.height/2-a/2;r.getContext("2d").drawImage(e,s,l,o,a);var c=n=document.createElement("img");try{c.src=r.toDataURL()}catch(e){c.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="}}}function o(){function t(e,t){function n(e,t){r.asArray(e).forEach((function(r){t.setProperty(r,e.getPropertyValue(r),e.getPropertyPriority(r))}))}e.cssText?t.cssText=e.cssText:n(e,t)}t(window.getComputedStyle(e),n.style)}function a(){function t(t){var i=window.getComputedStyle(e,t),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var a=r.uid();n.className=n.className+" "+a;var s=document.createElement("style");s.appendChild(l(a,t,i)),n.appendChild(s)}function l(e,t,n){var i="."+e+":"+t,o=n.cssText?a(n):s(n);return document.createTextNode(i+"{"+o+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function s(e){return r.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){t(e)}))}function s(){e instanceof HTMLTextAreaElement&&(n.innerHTML=e.value),e instanceof HTMLInputElement&&n.setAttribute("value",e.value)}function l(){n instanceof SVGElement&&(n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n instanceof SVGRectElement&&["width","height"].forEach((function(e){var t=n.getAttribute(e);t&&n.style.setProperty(e,t)})))}}(e,t)})):Promise.resolve()}function h(e){return o.inlineAll(e).then((function(){return e}))}e.exports=s}()})),isURL=function(e){if(!e)return!1;return 1==new RegExp(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/).test(e)},ArrayBufferToBase64=function(e){for(var t="",r=new Uint8Array(e),n=r.byteLength,i=0;i<n;i++)t+=String.fromCharCode(r[i]);return"data:image/jpeg;base64,".concat(window.btoa(t))},dataURLtoFile=function(e,t){void 0===t&&(t="screenshot.jpeg");try{for(var r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]),o=i.length,a=new Uint8Array(o);o--;)a[o]=i.charCodeAt(o);return new File([a],t,{type:n})}catch(e){console.error("dataURLtoFile:数据转换错误 : "+e)}},transformData=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,11,,12]),"File"!=t||"string"!=typeof e?[3,2]:[4,dataURLtoFile(e)];case 1:case 3:case 5:case 7:return[2,n.sent()];case 2:return"File"!=t||"[object ArrayBuffer]"!=e.toString()?[3,4]:[4,new File([e],"screenshot.jpeg")];case 4:return"Base64"!=t||"string"!=typeof e?[3,6]:[4,e];case 6:return"Base64"!=t||"[object ArrayBuffer]"!=e.toString()?[3,8]:[4,ArrayBufferToBase64(e)];case 8:return[4,new Error("transformData: 转换发生错误")];case 9:throw n.sent();case 10:return[3,12];case 11:return r=n.sent(),console.log(r),[3,12];case 12:return[2]}}))}))},fetch=function(e,t,r,n){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,axios({url:e,method:"GET",responseType:"arraybuffer",params:{url:t,dom:r,quality:n}})];case 1:return[2,i.sent()];case 2:return i.sent(),console.warn("请求截图服务器发生错误,请检查地址及参数是否正确!",{url:e,path:t,dom:r,quality:n}),[2,null];case 3:return[2]}}))}))},domToImg=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r,n;return __generator(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!(r=document.querySelector(e)))throw new Error("domToImg:"+e+" dom未被找到!");return[4,domToImage.toJpeg(r,{style:{transform:"scale(1)",position:"static"},quality:t})];case 1:return[2,i.sent()];case 2:return n=i.sent(),console.warn(n),[3,3];case 3:return[2]}}))}))},screenshot=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,n,i,o,a,s,l;return __generator(this,(function(c){switch(c.label){case 0:return c.trys.push([0,11,,12]),t=e.dom,r=e.servePath,n=e.targetPath,i=e.quality,o=e.type,a=void 0,isURL(r)&&isURL(n)?[4,fetch(r,n,t,i||.5)]:[3,5];case 1:return(s=c.sent())&&200==s.status&&s.data?(a=s.data,[3,4]):[3,2];case 2:return console.warn("截取错误,请检查网络或服务地址配置是否正确,已转换为dom-to-img."),[4,domToImg(t,i||.5)];case 3:a=c.sent(),c.label=4;case 4:return[3,7];case 5:return console.warn("地址错误,请检查传入的地址是否争取,已转换为dom-to-img."),[4,domToImg(t,i||.5)];case 6:a=c.sent(),c.label=7;case 7:return a?[4,transformData(a,o)]:[3,9];case 8:return[2,c.sent()];case 9:return[2,null];case 10:return[3,12];case 11:return l=c.sent(),console.error("截图发生错误:"+l),[2,null];case 12:return[2]}}))}))},toHex=function(e){return"".concat(e>15?"":0).concat(e.toString(16))},toHexString=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=void 0===i?1:i;return"#".concat(toHex(t)).concat(toHex(r)).concat(toHex(n)).concat(1===o?"":toHex(Math.floor(255*o)))},toRgbString=function(e){var t=e.r,r=e.g,n=e.b;return"rgb(".concat(t,",").concat(r,",").concat(n,")")},toRgbaString=function(e,t){void 0===t&&(t=1e4);var r=e.r,n=e.g,i=e.b,o=e.a,a=void 0===o?1:o;return"rgba(".concat(r,",").concat(n,",").concat(i,",").concat(Math.floor(a*t)/t,")")},parseHexColor=function(e){var t=e.slice(1),r=1;3===t.length&&(t="".concat(t[0]).concat(t[0]).concat(t[1]).concat(t[1]).concat(t[2]).concat(t[2])),8===t.length&&(r=parseInt(t.slice(6),16)/255,t=t.slice(0,6));var n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:255&n,a:r}},parseRgbaColor=function(e){var t=e.match(/(\d(\.\d+)?)+/g)||[],r=t.map((function(e){return parseInt(e,10)}));return{r:r[0],g:r[1],b:r[2],a:parseFloat(t[3])}},parseColorString=function(e){if(e.startsWith("#"))return parseHexColor(e);if(e.startsWith("rgb"))return parseRgbaColor(e);if("transparent"===e)return parseHexColor("#00000000");throw new Error("color string error: ".concat(e))},getColorInfo=function(e){var t=parseColorString(e);return{hex:toHexString(t),rgba:toRgbaString(t),rgb:toRgbString(t),rgbaObj:t}},hexToRgba=function(e){var t=parseColorString(e);return toRgbaString(t)},rgbaToHex=function(e){var t=parseColorString(e);return toHexString(t)},errCode=new Map([["E1001","系统未知错误"],["E1002","vue逻辑错误"],["E1003","JavaScript错误"],["E1004","静态资源加载错误"],["E1005","请求错误"],["E1006","Promise错误"]]),watchError=function(e,t){e.config.errorHandler=function(e){console.error("监测到E1002错误"),console.error(e.filename),errorHandler("E1002",e.name+":"+e.message,t)},window.addEventListener("error",(function(e){e.message?(console.error("监测到E1003错误"),errorHandler("E1003",e.message,e.filename,t)):(console.error("监测到E1004错误"),errorHandler("E1004",e.target.currentSrc,e.filename,t))}),!0)},errorHandler=function(e,t,r,n){void 0===n&&(n="null"),saveLog({code:e,type:errCode.get("".concat(e)),msg:t,router:r.currentRoute.value.fullPath,file:n,createTime:(new Date).toLocaleString()})},saveLog=function(e){var t=localStorage.getItem("ERROR");if(t){var r=JSON.parse(t);sortArray(r),r.length>50?(r[0]=e,sortArray(r)):r.push(e),localStorage.setItem("ERROR",JSON.stringify(r))}else localStorage.setItem("ERROR",JSON.stringify([e]))},sortArray=function(e){e.sort((function(e,t){return e.createTime>t.createTime?1:-1}))},index$1=Object.freeze({__proto__:null,RecursiveList:RecursiveList,Scale:Scale,SizeAdaption:SizeAdaption,UpdataForContainer:UpdataForContainer,Watermark:Watermark,arraySwap:arraySwap,arraySwapDeep:arraySwapDeep,arraySwapForId:arraySwapForId,breakUp:breakUp,checkBaseData:checkBaseData,checkVar:checkVar,comToggle:comToggle,decrypAES:decrypAES,decrypt:decrypt,encrypt:encrypt$1,errorHandler:errorHandler,executeFilter:executeFilter,exportJson:exportJson,findItem:findItem,findItemDeep:findItemDeep$1,findItemIndexDeep:findItemIndexDeep,findParentDeep:findParentDeep,genCopyName:genCopyName,genID:genID,generateCaseDataJson:generateCaseDataJson,generateComponentList:generateComponentList,generateJson:generateJson,generatePageData:generatePageData,getAncestorsNodes:getAncestorsNodes,getColorInfo:getColorInfo,getDataForEvaluator:getDataForEvaluator,getInteractive:getInteractive,getInteractive2:getInteractive2,getLength:getLength,getPosition:getPosition,getSessionData:getSessionData,getShareTree:getShareTree,getStandardData:getStandardData,getUrlParams:getUrlParams,globalSourceTemp:globalSourceTemp,hasVar:hasVar,hexToRgba:hexToRgba,isJSON:isJSON,isPeer:isPeer,loadFont:loadFont,loadFontResource:loadFontResource,loadFontTag:loadFontTag,loadScript:loadScript,loadTag:loadTag,parseColorString:parseColorString,parseHexColor:parseHexColor,parseRgbaColor:parseRgbaColor,recursion:recursion,removeTag:removeTag,resetID:resetID,resetPositionForGroup:resetPositionForGroup,resizeListPosition:resizeListPosition,resizePosition:resizePosition,resziePositionForGroup:resziePositionForGroup,rgbaToHex:rgbaToHex,safeConvertToNumber:safeConvertToNumber,safeEval:safeEval,screenshot:screenshot,selectdArea:selectdArea,setActions:setActions,setAttr:setAttr,setIndex:setIndex,setPorp:setPorp,setPositionForGroup:setPositionForGroup,setPositionForWorld:setPositionForWorld,setSessionData:setSessionData,toHex:toHex,toHexString:toHexString,toRgbString:toRgbString,toRgbaString:toRgbaString,transformPosition:transformPosition,upDataGroup:upDataGroup,upDataGroupChildren:upDataGroupChildren,updataAttribute:updataAttribute,updataAttributeForOption:updataAttributeForOption,updataSizeDeep:updataSizeDeep,validateAndFixObject:validateAndFixObject,watchError:watchError});function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}
|
|
45
45
|
/*!
|
|
46
46
|
* GSAP 3.12.5
|
|
47
47
|
* https://gsap.com
|
|
@@ -50,7 +50,7 @@ function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,
|
|
|
50
50
|
* Subject to the terms at https://gsap.com/standard-license or for
|
|
51
51
|
* Club GSAP members, the agreement issued with that membership.
|
|
52
52
|
* @author: Jack Doyle, jack@greensock.com
|
|
53
|
-
*/var _config={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_defaults={duration:.5,overwrite:!1,delay:0},_suppressOverwrites,_reverting$1,_context,_bigNum$1=1e8,_tinyNum=1/_bigNum$1,_2PI=2*Math.PI,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString=function(e){return"string"==typeof e},_isFunction=function(e){return"function"==typeof e},_isNumber=function(e){return"number"==typeof e},_isUndefined=function(e){return void 0===e},_isObject=function(e){return"object"==typeof e},_isNotFalse=function(e){return!1!==e},_windowExists$1=function(){return"undefined"!=typeof window},_isFuncOrString=function(e){return _isFunction(e)||_isString(e)},_isTypedArray="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win$1,_coreInitted,_doc$1,_globals={},_installScope={},_coreReady,_install=function(e){return(_installScope=_merge(e,_globals))&&gsap},_missingPlugin=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},_warn=function(e,t){return!t&&console.warn(e)},_addGlobal=function(e,t){return e&&(_globals[e]=t)&&_installScope&&(_installScope[e]=t)||_globals},_emptyFunc=function(){return 0},_startAtRevertConfig={suppressEvents:!0,isStart:!0,kill:!1},_revertConfigNoKill={suppressEvents:!0,kill:!1},_revertConfig={suppressEvents:!0},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames="",_harness=function(e){var t,r,n=e[0];if(_isObject(n)||_isFunction(n)||(e=[e]),!(t=(n._gsap||{}).harness)){for(r=_harnessPlugins.length;r--&&!_harnessPlugins[r].targetTest(n););t=_harnessPlugins[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new GSCache(e[r],t)))||e.splice(r,1);return e},_getCache=function(e){return e._gsap||_harness(toArray(e))[0]._gsap},_getProperty=function(e,t,r){return(r=e[t])&&_isFunction(r)?e[t]():_isUndefined(r)&&e.getAttribute&&e.getAttribute(t)||r},_forEachName=function(e,t){return(e=e.split(",")).forEach(t)||e},_round=function(e){return Math.round(1e5*e)/1e5||0},_roundPrecise=function(e){return Math.round(1e7*e)/1e7||0},_parseRelative=function(e,t){var r=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),"+"===r?e+n:"-"===r?e-n:"*"===r?e*n:e/n},_arrayContainsAny=function(e,t){for(var r=t.length,n=0;e.indexOf(t[n])<0&&++n<r;);return n<r},_lazyRender=function(){var e,t,r=_lazyTweens.length,n=_lazyTweens.slice(0);for(_lazyLookup={},_lazyTweens.length=0,e=0;e<r;e++)(t=n[e])&&t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0)._lazy=0)},_lazySafeRender=function(e,t,r,n){_lazyTweens.length&&!_reverting$1&&_lazyRender(),e.render(t,r,n||_reverting$1&&t<0&&(e._initted||e._startAt)),_lazyTweens.length&&!_reverting$1&&_lazyRender()},_numericIfPossible=function(e){var t=parseFloat(e);return(t||0===t)&&(e+"").match(_delimitedValueExp).length<2?t:_isString(e)?e.trim():e},_passThrough=function(e){return e},_setDefaults=function(e,t){for(var r in t)r in e||(e[r]=t[r]);return e},_setKeyframeDefaults=function(e){return function(t,r){for(var n in r)n in t||"duration"===n&&e||"ease"===n||(t[n]=r[n])}},_merge=function(e,t){for(var r in t)e[r]=t[r];return e},_mergeDeep=function e(t,r){for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(t[n]=_isObject(r[n])?e(t[n]||(t[n]={}),r[n]):r[n]);return t},_copyExcluding=function(e,t){var r,n={};for(r in e)r in t||(n[r]=e[r]);return n},_inheritDefaults=function(e){var t=e.parent||_globalTimeline,r=e.keyframes?_setKeyframeDefaults(_isArray(e.keyframes)):_setDefaults;if(_isNotFalse(e.inherit))for(;t;)r(e,t.vars.defaults),t=t.parent||t._dp;return e},_arraysMatch=function(e,t){for(var r=e.length,n=r===t.length;n&&r--&&e[r]===t[r];);return r<0},_addLinkedListItem=function(e,t,r,n,i){void 0===r&&(r="_first"),void 0===n&&(n="_last");var o,a=e[n];if(i)for(o=t[i];a&&a[i]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[r],e[r]=t),t._next?t._next._prev=t:e[n]=t,t._prev=a,t.parent=t._dp=e,t},_removeLinkedListItem=function(e,t,r,n){void 0===r&&(r="_first"),void 0===n&&(n="_last");var i=t._prev,o=t._next;i?i._next=o:e[r]===t&&(e[r]=o),o?o._prev=i:e[n]===t&&(e[n]=i),t._next=t._prev=t.parent=null},_removeFromParent=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},_uncache=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},_recacheAncestors=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},_rewindStartAt=function(e,t,r,n){return e._startAt&&(_reverting$1?e._startAt.revert(_revertConfigNoKill):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},_hasNoPausedAncestors=function e(t){return!t||t._ts&&e(t.parent)},_elapsedCycleDuration=function(e){return e._repeat?_animationCycle(e._tTime,e=e.duration()+e._rDelay)*e:0},_animationCycle=function(e,t){var r=Math.floor(e/=t);return e&&r===e?r-1:r},_parentToChildTotalTime=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},_setEnd=function(e){return e._end=_roundPrecise(e._start+(e._tDur/Math.abs(e._ts||e._rts||_tinyNum)||0))},_alignPlayhead=function(e,t){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=_roundPrecise(r._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),_setEnd(e),r._dirty||_uncache(r,e)),e},_postAddChecks=function(e,t){var r;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(r=_parentToChildTotalTime(e.rawTime(),t),(!t._dur||_clamp(0,t.totalDuration(),r)-t._tTime>_tinyNum)&&t.render(r,!0)),_uncache(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-_tinyNum}},_addToTimeline=function(e,t,r,n){return t.parent&&_removeFromParent(t),t._start=_roundPrecise((_isNumber(r)?r:r||e!==_globalTimeline?_parsePosition(e,r,t):e._time)+t._delay),t._end=_roundPrecise(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),_addLinkedListItem(e,t,"_first","_last",e._sort?"_start":0),_isFromOrFromStart(t)||(e._recent=t),n||_postAddChecks(e,t),e._ts<0&&_alignPlayhead(e,e._tTime),e},_scrollTrigger=function(e,t){return(_globals.ScrollTrigger||_missingPlugin("scrollTrigger",t))&&_globals.ScrollTrigger.create(t,e)},_attemptInitTween=function(e,t,r,n,i){return _initTween(e,t,i),e._initted?!r&&e._pt&&!_reverting$1&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&_lastRenderedFrame!==_ticker.frame?(_lazyTweens.push(e),e._lazy=[i,n],1):void 0:1},_parentPlayheadIsBeforeStart=function e(t){var r=t.parent;return r&&r._ts&&r._initted&&!r._lock&&(r.rawTime()<0||e(r))},_isFromOrFromStart=function(e){var t=e.data;return"isFromStart"===t||"isStart"===t},_renderZeroDurationTween=function(e,t,r,n){var i,o,a,s=e.ratio,c=t<0||!t&&(!e._start&&_parentPlayheadIsBeforeStart(e)&&(e._initted||!_isFromOrFromStart(e))||(e._ts<0||e._dp._ts<0)&&!_isFromOrFromStart(e))?0:1,u=e._rDelay,l=0;if(u&&e._repeat&&(l=_clamp(0,e._tDur,t),o=_animationCycle(l,u),e._yoyo&&1&o&&(c=1-c),o!==_animationCycle(e._tTime,u)&&(s=1-c,e.vars.repeatRefresh&&e._initted&&e.invalidate())),c!==s||_reverting$1||n||e._zTime===_tinyNum||!t&&e._zTime){if(!e._initted&&_attemptInitTween(e,t,n,r,l))return;for(a=e._zTime,e._zTime=t||(r?_tinyNum:0),r||(r=t&&!a),e.ratio=c,e._from&&(c=1-c),e._time=0,e._tTime=l,i=e._pt;i;)i.r(c,i.d),i=i._next;t<0&&_rewindStartAt(e,t,r,!0),e._onUpdate&&!r&&_callback(e,"onUpdate"),l&&e._repeat&&!r&&e.parent&&_callback(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===c&&(c&&_removeFromParent(e,1),r||_reverting$1||(_callback(e,c?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},_findNextPauseTween=function(e,t,r){var n;if(r>t)for(n=e._first;n&&n._start<=r;){if("isPause"===n.data&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=r;){if("isPause"===n.data&&n._start<t)return n;n=n._prev}},_setDuration=function(e,t,r,n){var i=e._repeat,o=_roundPrecise(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=i?i<0?1e10:_roundPrecise(o*(i+1)+e._rDelay*i):o,a>0&&!n&&_alignPlayhead(e,e._tTime=e._tDur*a),e.parent&&_setEnd(e),r||_uncache(e.parent,e),e},_onUpdateTotalDuration=function(e){return e instanceof Timeline?_uncache(e):_setDuration(e,e._dur)},_zeroPosition={_start:0,endTime:_emptyFunc,totalDuration:_emptyFunc},_parsePosition=function e(t,r,n){var i,o,a,s=t.labels,c=t._recent||_zeroPosition,u=t.duration()>=_bigNum$1?c.endTime(!1):t._dur;return _isString(r)&&(isNaN(r)||r in s)?(o=r.charAt(0),a="%"===r.substr(-1),i=r.indexOf("="),"<"===o||">"===o?(i>=0&&(r=r.replace(/=/,"")),("<"===o?c._start:c.endTime(c._repeat>=0))+(parseFloat(r.substr(1))||0)*(a?(i<0?c:n).totalDuration()/100:1)):i<0?(r in s||(s[r]=u),s[r]):(o=parseFloat(r.charAt(i-1)+r.substr(i+1)),a&&n&&(o=o/100*(_isArray(n)?n[0]:n).totalDuration()),i>1?e(t,r.substr(0,i-1),n)+o:u+o)):null==r?u:+r},_createTweenType=function(e,t,r){var n,i,o=_isNumber(t[1]),a=(o?2:1)+(e<2?0:1),s=t[a];if(o&&(s.duration=t[1]),s.parent=r,e){for(n=s,i=r;i&&!("immediateRender"in n);)n=i.vars.defaults||{},i=_isNotFalse(i.vars.inherit)&&i.parent;s.immediateRender=_isNotFalse(n.immediateRender),e<2?s.runBackwards=1:s.startAt=t[a-1]}return new Tween(t[0],s,t[a+1])},_conditionalReturn=function(e,t){return e||0===e?t(e):t},_clamp=function(e,t,r){return r<e?e:r>t?t:r},getUnit=function(e,t){return _isString(e)&&(t=_unitExp.exec(e))?t[1]:""},clamp=function(e,t,r){return _conditionalReturn(r,(function(r){return _clamp(e,t,r)}))},_slice=[].slice,_isArrayLike=function(e,t){return e&&_isObject(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&_isObject(e[0]))&&!e.nodeType&&e!==_win$1},_flatten=function(e,t,r){return void 0===r&&(r=[]),e.forEach((function(e){var n;return _isString(e)&&!t||_isArrayLike(e,1)?(n=r).push.apply(n,toArray(e)):r.push(e)}))||r},toArray=function(e,t,r){return _context&&!t&&_context.selector?_context.selector(e):!_isString(e)||r||!_coreInitted&&_wake()?_isArray(e)?_flatten(e,r):_isArrayLike(e)?_slice.call(e,0):e?[e]:[]:_slice.call((t||_doc$1).querySelectorAll(e),0)},selector=function(e){return e=toArray(e)[0]||_warn("Invalid scope")||{},function(t){var r=e.current||e.nativeElement||e;return toArray(t,r.querySelectorAll?r:r===e?_warn("Invalid scope")||_doc$1.createElement("div"):e)}},shuffle=function(e){return e.sort((function(){return.5-Math.random()}))},distribute=function(e){if(_isFunction(e))return e;var t=_isObject(e)?e:{each:e},r=_parseEase(t.ease),n=t.from||0,i=parseFloat(t.base)||0,o={},a=n>0&&n<1,s=isNaN(n)||a,c=t.axis,u=n,l=n;return _isString(n)?u=l={center:.5,edges:.5,end:1}[n]||0:!a&&s&&(u=n[0],l=n[1]),function(e,a,d){var h,f,p,m,g,v,y,_,b,w=(d||t).length,D=o[w];if(!D){if(!(b="auto"===t.grid?0:(t.grid||[1,_bigNum$1])[1])){for(y=-_bigNum$1;y<(y=d[b++].getBoundingClientRect().left)&&b<w;);b<w&&b--}for(D=o[w]=[],h=s?Math.min(b,w)*u-.5:n%b,f=b===_bigNum$1?0:s?w*l/b-.5:n/b|0,y=0,_=_bigNum$1,v=0;v<w;v++)p=v%b-h,m=f-(v/b|0),D[v]=g=c?Math.abs("y"===c?m:p):_sqrt(p*p+m*m),g>y&&(y=g),g<_&&(_=g);"random"===n&&shuffle(D),D.max=y-_,D.min=_,D.v=w=(parseFloat(t.amount)||parseFloat(t.each)*(b>w?w-1:c?"y"===c?w/b:b:Math.max(b,w/b))||0)*("edges"===n?-1:1),D.b=w<0?i-w:i,D.u=getUnit(t.amount||t.each)||0,r=r&&w<0?_invertEase(r):r}return w=(D[e]-D.min)/D.max||0,_roundPrecise(D.b+(r?r(w):w)*D.v)+D.u}},_roundModifier=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var n=_roundPrecise(Math.round(parseFloat(r)/e)*e*t);return(n-n%1)/t+(_isNumber(r)?0:getUnit(r))}},snap=function(e,t){var r,n,i=_isArray(e);return!i&&_isObject(e)&&(r=i=e.radius||_bigNum$1,e.values?(e=toArray(e.values),(n=!_isNumber(e[0]))&&(r*=r)):e=_roundModifier(e.increment)),_conditionalReturn(t,i?_isFunction(e)?function(t){return n=e(t),Math.abs(n-t)<=r?n:t}:function(t){for(var i,o,a=parseFloat(n?t.x:t),s=parseFloat(n?t.y:0),c=_bigNum$1,u=0,l=e.length;l--;)(i=n?(i=e[l].x-a)*i+(o=e[l].y-s)*o:Math.abs(e[l]-a))<c&&(c=i,u=l);return u=!r||c<=r?e[u]:t,n||u===t||_isNumber(t)?u:u+getUnit(t)}:_roundModifier(e))},random=function(e,t,r,n){return _conditionalReturn(_isArray(e)?!t:!0===r?!!(r=0):!n,(function(){return _isArray(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(t-e+.99*r))/r)*r*n)/n}))},pipe=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduce((function(e,t){return t(e)}),e)}},unitize=function(e,t){return function(r){return e(parseFloat(r))+(t||getUnit(r))}},normalize=function(e,t,r){return mapRange(e,t,0,1,r)},_wrapArray=function(e,t,r){return _conditionalReturn(r,(function(r){return e[~~t(r)]}))},wrap=function e(t,r,n){var i=r-t;return _isArray(t)?_wrapArray(t,e(0,t.length),r):_conditionalReturn(n,(function(e){return(i+(e-t)%i)%i+t}))},wrapYoyo=function e(t,r,n){var i=r-t,o=2*i;return _isArray(t)?_wrapArray(t,e(0,t.length-1),r):_conditionalReturn(n,(function(e){return t+((e=(o+(e-t)%o)%o||0)>i?o-e:e)}))},_replaceRandom=function(e){for(var t,r,n,i,o=0,a="";~(t=e.indexOf("random(",o));)n=e.indexOf(")",t),i="["===e.charAt(t+7),r=e.substr(t+7,n-t-7).match(i?_delimitedValueExp:_strictNumExp),a+=e.substr(o,t-o)+random(i?r:+r[0],i?0:+r[1],+r[2]||1e-5),o=n+1;return a+e.substr(o,e.length-o)},mapRange=function(e,t,r,n,i){var o=t-e,a=n-r;return _conditionalReturn(i,(function(t){return r+((t-e)/o*a||0)}))},interpolate=function e(t,r,n,i){var o=isNaN(t+r)?0:function(e){return(1-e)*t+e*r};if(!o){var a,s,c,u,l,d=_isString(t),h={};if(!0===n&&(i=1)&&(n=null),d)t={p:t},r={p:r};else if(_isArray(t)&&!_isArray(r)){for(c=[],u=t.length,l=u-2,s=1;s<u;s++)c.push(e(t[s-1],t[s]));u--,o=function(e){e*=u;var t=Math.min(l,~~e);return c[t](e-t)},n=r}else i||(t=_merge(_isArray(t)?[]:{},t));if(!c){for(a in r)_addPropTween.call(h,t,a,"get",r[a]);o=function(e){return _renderPropTweens(e,h)||(d?t.p:t)}}}return _conditionalReturn(n,o)},_getLabelInDirection=function(e,t,r){var n,i,o,a=e.labels,s=_bigNum$1;for(n in a)(i=a[n]-t)<0==!!r&&i&&s>(i=Math.abs(i))&&(o=n,s=i);return o},_callback=function(e,t,r){var n,i,o,a=e.vars,s=a[t],c=_context,u=e._ctx;if(s)return n=a[t+"Params"],i=a.callbackScope||e,r&&_lazyTweens.length&&_lazyRender(),u&&(_context=u),o=n?s.apply(i,n):s.call(i),_context=c,o},_interrupt=function(e){return _removeFromParent(e),e.scrollTrigger&&e.scrollTrigger.kill(!!_reverting$1),e.progress()<1&&_callback(e,"onInterrupt"),e},_quickTween,_registerPluginQueue=[],_createPlugin=function(e){if(e)if(e=!e.name&&e.default||e,_windowExists$1()||e.headless){var t=e.name,r=_isFunction(e),n=t&&!r&&e.init?function(){this._props=[]}:e,i={init:_emptyFunc,render:_renderPropTweens,add:_addPropTween,kill:_killPropTweensOf,modifier:_addPluginModifier,rawVars:0},o={targetTest:0,get:0,getSetter:_getSetter,aliases:{},register:0};if(_wake(),e!==n){if(_plugins[t])return;_setDefaults(n,_setDefaults(_copyExcluding(e,i),o)),_merge(n.prototype,_merge(i,_copyExcluding(e,o))),_plugins[n.prop=t]=n,e.targetTest&&(_harnessPlugins.push(n),_reservedProps[t]=1),t=("css"===t?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}_addGlobal(t,n),e.register&&e.register(gsap,n,PropTween)}else _registerPluginQueue.push(e)},_255=255,_colorLookup={aqua:[0,_255,_255],lime:[0,_255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_255],navy:[0,0,128],white:[_255,_255,_255],olive:[128,128,0],yellow:[_255,_255,0],orange:[_255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_255,0,0],pink:[_255,192,203],cyan:[0,_255,_255],transparent:[_255,_255,_255,0]},_hue=function(e,t,r){return(6*(e+=e<0?1:e>1?-1:0)<1?t+(r-t)*e*6:e<.5?r:3*e<2?t+(r-t)*(2/3-e)*6:t)*_255+.5|0},splitColor=function(e,t,r){var n,i,o,a,s,c,u,l,d,h,f=e?_isNumber(e)?[e>>16,e>>8&_255,e&_255]:0:_colorLookup.black;if(!f){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),_colorLookup[e])f=_colorLookup[e];else if("#"===e.charAt(0)){if(e.length<6&&(n=e.charAt(1),i=e.charAt(2),o=e.charAt(3),e="#"+n+n+i+i+o+o+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(f=parseInt(e.substr(1,6),16))>>16,f>>8&_255,f&_255,parseInt(e.substr(7),16)/255];f=[(e=parseInt(e.substr(1),16))>>16,e>>8&_255,e&_255]}else if("hsl"===e.substr(0,3))if(f=h=e.match(_strictNumExp),t){if(~e.indexOf("="))return f=e.match(_numExp),r&&f.length<4&&(f[3]=1),f}else a=+f[0]%360/360,s=+f[1]/100,n=2*(c=+f[2]/100)-(i=c<=.5?c*(s+1):c+s-c*s),f.length>3&&(f[3]*=1),f[0]=_hue(a+1/3,n,i),f[1]=_hue(a,n,i),f[2]=_hue(a-1/3,n,i);else f=e.match(_strictNumExp)||_colorLookup.transparent;f=f.map(Number)}return t&&!h&&(n=f[0]/_255,i=f[1]/_255,o=f[2]/_255,c=((u=Math.max(n,i,o))+(l=Math.min(n,i,o)))/2,u===l?a=s=0:(d=u-l,s=c>.5?d/(2-u-l):d/(u+l),a=u===n?(i-o)/d+(i<o?6:0):u===i?(o-n)/d+2:(n-i)/d+4,a*=60),f[0]=~~(a+.5),f[1]=~~(100*s+.5),f[2]=~~(100*c+.5)),r&&f.length<4&&(f[3]=1),f},_colorOrderData=function(e){var t=[],r=[],n=-1;return e.split(_colorExp).forEach((function(e){var i=e.match(_numWithUnitExp)||[];t.push.apply(t,i),r.push(n+=i.length+1)})),t.c=r,t},_formatColors=function(e,t,r){var n,i,o,a,s="",c=(e+s).match(_colorExp),u=t?"hsla(":"rgba(",l=0;if(!c)return e;if(c=c.map((function(e){return(e=splitColor(e,t,1))&&u+(t?e[0]+","+e[1]+"%,"+e[2]+"%,"+e[3]:e.join(","))+")"})),r&&(o=_colorOrderData(e),(n=r.c).join(s)!==o.c.join(s)))for(a=(i=e.replace(_colorExp,"1").split(_numWithUnitExp)).length-1;l<a;l++)s+=i[l]+(~n.indexOf(l)?c.shift()||u+"0,0,0,0)":(o.length?o:c.length?c:r).shift());if(!i)for(a=(i=e.split(_colorExp)).length-1;l<a;l++)s+=i[l]+c[l];return s+i[a]},_colorExp=function(){var e,t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(e in _colorLookup)t+="|"+e+"\\b";return new RegExp(t+")","gi")}(),_hslExp=/hsl[a]?\(/,_colorStringFilter=function(e){var t,r=e.join(" ");if(_colorExp.lastIndex=0,_colorExp.test(r))return t=_hslExp.test(r),e[1]=_formatColors(e[1],t),e[0]=_formatColors(e[0],t,_colorOrderData(e[1])),!0},_tickerActive,_ticker=function(){var e,t,r,n,i,o,a=Date.now,s=500,c=33,u=a(),l=u,d=1e3/240,h=d,f=[],p=function r(p){var m,g,v,y,_=a()-l,b=!0===p;if((_>s||_<0)&&(u+=_-c),((m=(v=(l+=_)-u)-h)>0||b)&&(y=++n.frame,i=v-1e3*n.time,n.time=v/=1e3,h+=m+(m>=d?4:d-m),g=1),b||(e=t(r)),g)for(o=0;o<f.length;o++)f[o](v,i,y,p)};return n={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(e){return i/(1e3/(e||60))},wake:function(){_coreReady&&(!_coreInitted&&_windowExists$1()&&(_win$1=_coreInitted=window,_doc$1=_win$1.document||{},_globals.gsap=gsap,(_win$1.gsapVersions||(_win$1.gsapVersions=[])).push(gsap.version),_install(_installScope||_win$1.GreenSockGlobals||!_win$1.gsap&&_win$1||{}),_registerPluginQueue.forEach(_createPlugin)),r="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,e&&n.sleep(),t=r||function(e){return setTimeout(e,h-1e3*n.time+1|0)},_tickerActive=1,p(2))},sleep:function(){(r?cancelAnimationFrame:clearTimeout)(e),_tickerActive=0,t=_emptyFunc},lagSmoothing:function(e,t){s=e||1/0,c=Math.min(t||33,s)},fps:function(e){d=1e3/(e||240),h=1e3*n.time+d},add:function(e,t,r){var i=t?function(t,r,o,a){e(t,r,o,a),n.remove(i)}:e;return n.remove(e),f[r?"unshift":"push"](i),_wake(),i},remove:function(e,t){~(t=f.indexOf(e))&&f.splice(t,1)&&o>=t&&o--},_listeners:f},n}(),_wake=function(){return!_tickerActive&&_ticker.wake()},_easeMap={},_customEaseExp=/^[\d.\-M][\d.\-,\s]/,_quotesExp=/["']/g,_parseObjectInString=function(e){for(var t,r,n,i={},o=e.substr(1,e.length-3).split(":"),a=o[0],s=1,c=o.length;s<c;s++)r=o[s],t=s!==c-1?r.lastIndexOf(","):r.length,n=r.substr(0,t),i[a]=isNaN(n)?n.replace(_quotesExp,"").trim():+n,a=r.substr(t+1).trim();return i},_valueInParentheses=function(e){var t=e.indexOf("(")+1,r=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<r?e.indexOf(")",r+1):r)},_configEaseFromString=function(e){var t=(e+"").split("("),r=_easeMap[t[0]];return r&&t.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[_parseObjectInString(t[1])]:_valueInParentheses(e).split(",").map(_numericIfPossible)):_easeMap._CE&&_customEaseExp.test(e)?_easeMap._CE("",e):r},_invertEase=function(e){return function(t){return 1-e(1-t)}},_propagateYoyoEase=function e(t,r){for(var n,i=t._first;i;)i instanceof Timeline?e(i,r):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===r||(i.timeline?e(i.timeline,r):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=r)),i=i._next},_parseEase=function(e,t){return e&&(_isFunction(e)?e:_easeMap[e]||_configEaseFromString(e))||t},_insertEase=function(e,t,r,n){void 0===r&&(r=function(e){return 1-t(1-e)}),void 0===n&&(n=function(e){return e<.5?t(2*e)/2:1-t(2*(1-e))/2});var i,o={easeIn:t,easeOut:r,easeInOut:n};return _forEachName(e,(function(e){for(var t in _easeMap[e]=_globals[e]=o,_easeMap[i=e.toLowerCase()]=r,o)_easeMap[i+("easeIn"===t?".in":"easeOut"===t?".out":".inOut")]=_easeMap[e+"."+t]=o[t]})),o},_easeInOutFromOut=function(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}},_configElastic=function e(t,r,n){var i=r>=1?r:1,o=(n||(t?.3:.45))/(r<1?r:1),a=o/_2PI*(Math.asin(1/i)||0),s=function(e){return 1===e?1:i*Math.pow(2,-10*e)*_sin((e-a)*o)+1},c="out"===t?s:"in"===t?function(e){return 1-s(1-e)}:_easeInOutFromOut(s);return o=_2PI/o,c.config=function(r,n){return e(t,r,n)},c},_configBack=function e(t,r){void 0===r&&(r=1.70158);var n=function(e){return e?--e*e*((r+1)*e+r)+1:0},i="out"===t?n:"in"===t?function(e){return 1-n(1-e)}:_easeInOutFromOut(n);return i.config=function(r){return e(t,r)},i};_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong",(function(e,t){var r=t<5?t+1:t;_insertEase(e+",Power"+(r-1),t?function(e){return Math.pow(e,r)}:function(e){return e},(function(e){return 1-Math.pow(1-e,r)}),(function(e){return e<.5?Math.pow(2*e,r)/2:1-Math.pow(2*(1-e),r)/2}))})),_easeMap.Linear.easeNone=_easeMap.none=_easeMap.Linear.easeIn,_insertEase("Elastic",_configElastic("in"),_configElastic("out"),_configElastic()),function(e,t){var r=1/t,n=2*r,i=2.5*r,o=function(o){return o<r?e*o*o:o<n?e*Math.pow(o-1.5/t,2)+.75:o<i?e*(o-=2.25/t)*o+.9375:e*Math.pow(o-2.625/t,2)+.984375};_insertEase("Bounce",(function(e){return 1-o(1-e)}),o)}(7.5625,2.75),_insertEase("Expo",(function(e){return e?Math.pow(2,10*(e-1)):0})),_insertEase("Circ",(function(e){return-(_sqrt(1-e*e)-1)})),_insertEase("Sine",(function(e){return 1===e?1:1-_cos(e*_HALF_PI)})),_insertEase("Back",_configBack("in"),_configBack("out"),_configBack()),_easeMap.SteppedEase=_easeMap.steps=_globals.SteppedEase={config:function(e,t){void 0===e&&(e=1);var r=1/e,n=e+(t?0:1),i=t?1:0,o=1-_tinyNum;return function(e){return((n*_clamp(0,o,e)|0)+i)*r}}},_defaults.ease=_easeMap["quad.out"],_forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(e){return _callbackNames+=e+","+e+"Params,"}));var GSCache=function(e,t){this.id=_gsID++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:_getProperty,this.set=t?t.getSetter:_getSetter},Animation=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,_setDuration(this,+e.duration,1,1),this.data=e.data,_context&&(this._ctx=_context,_context.data.push(this)),_tickerActive||_ticker.wake()}var t=e.prototype;return t.delay=function(e){return e||0===e?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,_setDuration(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(_wake(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(_alignPlayhead(this,e),!r._dp||r.parent||_postAddChecks(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&_addToTimeline(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===_tinyNum||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),_lazySafeRender(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+_elapsedCycleDuration(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?e:1-e)+_elapsedCycleDuration(this),t):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(e,t){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*r,t):this._repeat?_animationCycle(this._tTime,r)+1:1},t.timeScale=function(e,t){if(!arguments.length)return this._rts===-_tinyNum?0:this._rts;if(this._rts===e)return this;var r=this.parent&&this._ts?_parentToChildTotalTime(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-_tinyNum?0:this._rts,this.totalTime(_clamp(-Math.abs(this._delay),this._tDur,r),!1!==t),_setEnd(this),_recacheAncestors(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(_wake(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==_tinyNum&&(this._tTime-=_tinyNum)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=e;var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&_addToTimeline(t,this,e-this._delay),this}return this._start},t.endTime=function(e){return this._start+(_isNotFalse(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?_parentToChildTotalTime(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){void 0===e&&(e=_revertConfig);var t=_reverting$1;return _reverting$1=e,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),"nested"!==this.data&&!1!==e.kill&&this.kill(),_reverting$1=t,this},t.globalTime=function(e){for(var t=this,r=arguments.length?e:t.rawTime();t;)r=t._start+r/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):r},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,_onUpdateTotalDuration(this)):-2===this._repeat?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,_onUpdateTotalDuration(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(_parsePosition(this,e),_isNotFalse(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,_isNotFalse(t))},t.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-_tinyNum:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-_tinyNum,this},t.isActive=function(){var e,t=this.parent||this._dp,r=this._start;return!(t&&!(this._ts&&this._initted&&t.isActive()&&(e=t.rawTime(!0))>=r&&e<this.endTime(!0)-_tinyNum))},t.eventCallback=function(e,t,r){var n=this.vars;return arguments.length>1?(t?(n[e]=t,r&&(n[e+"Params"]=r),"onUpdate"===e&&(this._onUpdate=t)):delete n[e],this):n[e]},t.then=function(e){var t=this;return new Promise((function(r){var n=_isFunction(e)?e:_passThrough,i=function(){var e=t.then;t.then=null,_isFunction(n)&&(n=n(t))&&(n.then||n===t)&&(t.then=e),r(n),t.then=e};t._initted&&1===t.totalProgress()&&t._ts>=0||!t._tTime&&t._ts<0?i():t._prom=i}))},t.kill=function(){_interrupt(this)},e}();_setDefaults(Animation.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-_tinyNum,_prom:0,_ps:!1,_rts:1});var Timeline=function(e){function t(t,r){var n;return void 0===t&&(t={}),(n=e.call(this,t)||this).labels={},n.smoothChildTiming=!!t.smoothChildTiming,n.autoRemoveChildren=!!t.autoRemoveChildren,n._sort=_isNotFalse(t.sortChildren),_globalTimeline&&_addToTimeline(t.parent||_globalTimeline,_assertThisInitialized(n),r),t.reversed&&n.reverse(),t.paused&&n.paused(!0),t.scrollTrigger&&_scrollTrigger(_assertThisInitialized(n),t.scrollTrigger),n}_inheritsLoose(t,e);var r=t.prototype;return r.to=function(e,t,r){return _createTweenType(0,arguments,this),this},r.from=function(e,t,r){return _createTweenType(1,arguments,this),this},r.fromTo=function(e,t,r,n){return _createTweenType(2,arguments,this),this},r.set=function(e,t,r){return t.duration=0,t.parent=this,_inheritDefaults(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Tween(e,t,_parsePosition(this,r),1),this},r.call=function(e,t,r){return _addToTimeline(this,Tween.delayedCall(0,e,t),r)},r.staggerTo=function(e,t,r,n,i,o,a){return r.duration=t,r.stagger=r.stagger||n,r.onComplete=o,r.onCompleteParams=a,r.parent=this,new Tween(e,r,_parsePosition(this,i)),this},r.staggerFrom=function(e,t,r,n,i,o,a){return r.runBackwards=1,_inheritDefaults(r).immediateRender=_isNotFalse(r.immediateRender),this.staggerTo(e,t,r,n,i,o,a)},r.staggerFromTo=function(e,t,r,n,i,o,a,s){return n.startAt=r,_inheritDefaults(n).immediateRender=_isNotFalse(n.immediateRender),this.staggerTo(e,t,n,i,o,a,s)},r.render=function(e,t,r){var n,i,o,a,s,c,u,l,d,h,f,p,m=this._time,g=this._dirty?this.totalDuration():this._tDur,v=this._dur,y=e<=0?0:_roundPrecise(e),_=this._zTime<0!=e<0&&(this._initted||!v);if(this!==_globalTimeline&&y>g&&e>=0&&(y=g),y!==this._tTime||r||_){if(m!==this._time&&v&&(y+=this._time-m,e+=this._time-m),n=y,d=this._start,c=!(l=this._ts),_&&(v||(m=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(f=this._yoyo,s=v+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(100*s+e,t,r);if(n=_roundPrecise(y%s),y===g?(a=this._repeat,n=v):((a=~~(y/s))&&a===y/s&&(n=v,a--),n>v&&(n=v)),h=_animationCycle(this._tTime,s),!m&&this._tTime&&h!==a&&this._tTime-h*s-this._dur<=0&&(h=a),f&&1&a&&(n=v-n,p=1),a!==h&&!this._lock){var b=f&&1&h,w=b===(f&&1&a);if(a<h&&(b=!b),m=b?0:y%v?v:y,this._lock=1,this.render(m||(p?0:_roundPrecise(a*s)),t,!v)._lock=0,this._tTime=y,!t&&this.parent&&_callback(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1),m&&m!==this._time||c!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(v=this._dur,g=this._tDur,w&&(this._lock=2,m=b?v:-1e-4,this.render(m,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!c)return this;_propagateYoyoEase(this,p)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(u=_findNextPauseTween(this,_roundPrecise(m),_roundPrecise(n)))&&(y-=n-(n=u._start)),this._tTime=y,this._time=n,this._act=!l,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,m=0),!m&&n&&!t&&!a&&(_callback(this,"onStart"),this._tTime!==y))return this;if(n>=m&&e>=0)for(i=this._first;i;){if(o=i._next,(i._act||n>=i._start)&&i._ts&&u!==i){if(i.parent!==this)return this.render(e,t,r);if(i.render(i._ts>0?(n-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(n-i._start)*i._ts,t,r),n!==this._time||!this._ts&&!c){u=0,o&&(y+=this._zTime=-_tinyNum);break}}i=o}else{i=this._last;for(var D=e<0?e:n;i;){if(o=i._prev,(i._act||D<=i._end)&&i._ts&&u!==i){if(i.parent!==this)return this.render(e,t,r);if(i.render(i._ts>0?(D-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(D-i._start)*i._ts,t,r||_reverting$1&&(i._initted||i._startAt)),n!==this._time||!this._ts&&!c){u=0,o&&(y+=this._zTime=D?-_tinyNum:_tinyNum);break}}i=o}}if(u&&!t&&(this.pause(),u.render(n>=m?0:-_tinyNum)._zTime=n>=m?1:-1,this._ts))return this._start=d,_setEnd(this),this.render(e,t,r);this._onUpdate&&!t&&_callback(this,"onUpdate",!0),(y===g&&this._tTime>=this.totalDuration()||!y&&m)&&(d!==this._start&&Math.abs(l)===Math.abs(this._ts)||this._lock||((e||!v)&&(y===g&&this._ts>0||!y&&this._ts<0)&&_removeFromParent(this,1),t||e<0&&!m||!y&&!m&&g||(_callback(this,y===g&&e>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(y<g&&this.timeScale()>0)&&this._prom())))}return this},r.add=function(e,t){var r=this;if(_isNumber(t)||(t=_parsePosition(this,t,e)),!(e instanceof Animation)){if(_isArray(e))return e.forEach((function(e){return r.add(e,t)})),this;if(_isString(e))return this.addLabel(e,t);if(!_isFunction(e))return this;e=Tween.delayedCall(0,e)}return this!==e?_addToTimeline(this,e,t):this},r.getChildren=function(e,t,r,n){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===n&&(n=-_bigNum$1);for(var i=[],o=this._first;o;)o._start>=n&&(o instanceof Tween?t&&i.push(o):(r&&i.push(o),e&&i.push.apply(i,o.getChildren(!0,t,r)))),o=o._next;return i},r.getById=function(e){for(var t=this.getChildren(1,1,1),r=t.length;r--;)if(t[r].vars.id===e)return t[r]},r.remove=function(e){return _isString(e)?this.removeLabel(e):_isFunction(e)?this.killTweensOf(e):(_removeLinkedListItem(this,e),e===this._recent&&(this._recent=this._last),_uncache(this))},r.totalTime=function(t,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_roundPrecise(_ticker.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,r),this._forcing=0,this):this._tTime},r.addLabel=function(e,t){return this.labels[e]=_parsePosition(this,t),this},r.removeLabel=function(e){return delete this.labels[e],this},r.addPause=function(e,t,r){var n=Tween.delayedCall(0,t||_emptyFunc,r);return n.data="isPause",this._hasPause=1,_addToTimeline(this,n,_parsePosition(this,e))},r.removePause=function(e){var t=this._first;for(e=_parsePosition(this,e);t;)t._start===e&&"isPause"===t.data&&_removeFromParent(t),t=t._next},r.killTweensOf=function(e,t,r){for(var n=this.getTweensOf(e,r),i=n.length;i--;)_overwritingTween!==n[i]&&n[i].kill(e,t);return this},r.getTweensOf=function(e,t){for(var r,n=[],i=toArray(e),o=this._first,a=_isNumber(t);o;)o instanceof Tween?_arrayContainsAny(o._targets,i)&&(a?(!_overwritingTween||o._initted&&o._ts)&&o.globalTime(0)<=t&&o.globalTime(o.totalDuration())>t:!t||o.isActive())&&n.push(o):(r=o.getTweensOf(i,t)).length&&n.push.apply(n,r),o=o._next;return n},r.tweenTo=function(e,t){t=t||{};var r,n=this,i=_parsePosition(n,e),o=t,a=o.startAt,s=o.onStart,c=o.onStartParams,u=o.immediateRender,l=Tween.to(n,_setDefaults({ease:t.ease||"none",lazy:!1,immediateRender:!1,time:i,overwrite:"auto",duration:t.duration||Math.abs((i-(a&&"time"in a?a.time:n._time))/n.timeScale())||_tinyNum,onStart:function(){if(n.pause(),!r){var e=t.duration||Math.abs((i-(a&&"time"in a?a.time:n._time))/n.timeScale());l._dur!==e&&_setDuration(l,e,0,1).render(l._time,!0,!0),r=1}s&&s.apply(l,c||[])}},t));return u?l.render(0):l},r.tweenFromTo=function(e,t,r){return this.tweenTo(t,_setDefaults({startAt:{time:_parsePosition(this,e)}},r))},r.recent=function(){return this._recent},r.nextLabel=function(e){return void 0===e&&(e=this._time),_getLabelInDirection(this,_parsePosition(this,e))},r.previousLabel=function(e){return void 0===e&&(e=this._time),_getLabelInDirection(this,_parsePosition(this,e),1)},r.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+_tinyNum)},r.shiftChildren=function(e,t,r){void 0===r&&(r=0);for(var n,i=this._first,o=this.labels;i;)i._start>=r&&(i._start+=e,i._end+=e),i=i._next;if(t)for(n in o)o[n]>=r&&(o[n]+=e);return _uncache(this)},r.invalidate=function(t){var r=this._first;for(this._lock=0;r;)r.invalidate(t),r=r._next;return e.prototype.invalidate.call(this,t)},r.clear=function(e){void 0===e&&(e=!0);for(var t,r=this._first;r;)t=r._next,this.remove(r),r=t;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),_uncache(this)},r.totalDuration=function(e){var t,r,n,i=0,o=this,a=o._last,s=_bigNum$1;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-e:e));if(o._dirty){for(n=o.parent;a;)t=a._prev,a._dirty&&a.totalDuration(),(r=a._start)>s&&o._sort&&a._ts&&!o._lock?(o._lock=1,_addToTimeline(o,a,r-a._delay,1)._lock=0):s=r,r<0&&a._ts&&(i-=r,(!n&&!o._dp||n&&n.smoothChildTiming)&&(o._start+=r/o._ts,o._time-=r,o._tTime-=r),o.shiftChildren(-r,!1,-Infinity),s=0),a._end>i&&a._ts&&(i=a._end),a=t;_setDuration(o,o===_globalTimeline&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(e){if(_globalTimeline._ts&&(_lazySafeRender(_globalTimeline,_parentToChildTotalTime(e,_globalTimeline)),_lastRenderedFrame=_ticker.frame),_ticker.frame>=_nextGCFrame){_nextGCFrame+=_config.autoSleep||120;var t=_globalTimeline._first;if((!t||!t._ts)&&_config.autoSleep&&_ticker._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||_ticker.sleep()}}},t}(Animation);_setDefaults(Timeline.prototype,{_lock:0,_hasPause:0,_forcing:0});var _addComplexStringPropTween=function(e,t,r,n,i,o,a){var s,c,u,l,d,h,f,p,m=new PropTween(this._pt,e,t,0,1,_renderComplexString,null,i),g=0,v=0;for(m.b=r,m.e=n,r+="",(f=~(n+="").indexOf("random("))&&(n=_replaceRandom(n)),o&&(o(p=[r,n],e,t),r=p[0],n=p[1]),c=r.match(_complexStringNumExp)||[];s=_complexStringNumExp.exec(n);)l=s[0],d=n.substring(g,s.index),u?u=(u+1)%5:"rgba("===d.substr(-5)&&(u=1),l!==c[v++]&&(h=parseFloat(c[v-1])||0,m._pt={_next:m._pt,p:d||1===v?d:",",s:h,c:"="===l.charAt(1)?_parseRelative(h,l)-h:parseFloat(l)-h,m:u&&u<4?Math.round:0},g=_complexStringNumExp.lastIndex);return m.c=g<n.length?n.substring(g,n.length):"",m.fp=a,(_relExp.test(n)||f)&&(m.e=0),this._pt=m,m},_addPropTween=function(e,t,r,n,i,o,a,s,c,u){_isFunction(n)&&(n=n(i||0,e,o));var l,d=e[t],h="get"!==r?r:_isFunction(d)?c?e[t.indexOf("set")||!_isFunction(e["get"+t.substr(3)])?t:"get"+t.substr(3)](c):e[t]():d,f=_isFunction(d)?c?_setterFuncWithParam:_setterFunc:_setterPlain;if(_isString(n)&&(~n.indexOf("random(")&&(n=_replaceRandom(n)),"="===n.charAt(1)&&((l=_parseRelative(h,n)+(getUnit(h)||0))||0===l)&&(n=l)),!u||h!==n||_forceAllPropTweens)return isNaN(h*n)||""===n?(!d&&!(t in e)&&_missingPlugin(t,n),_addComplexStringPropTween.call(this,e,t,h,n,f,s||_config.stringFilter,c)):(l=new PropTween(this._pt,e,t,+h||0,n-(h||0),"boolean"==typeof d?_renderBoolean:_renderPlain,0,f),c&&(l.fp=c),a&&l.modifier(a,this,e),this._pt=l)},_processVars=function(e,t,r,n,i){if(_isFunction(e)&&(e=_parseFuncOrString(e,i,t,r,n)),!_isObject(e)||e.style&&e.nodeType||_isArray(e)||_isTypedArray(e))return _isString(e)?_parseFuncOrString(e,i,t,r,n):e;var o,a={};for(o in e)a[o]=_parseFuncOrString(e[o],i,t,r,n);return a},_checkPlugin=function(e,t,r,n,i,o){var a,s,c,u;if(_plugins[e]&&!1!==(a=new _plugins[e]).init(i,a.rawVars?t[e]:_processVars(t[e],n,i,o,r),r,n,o)&&(r._pt=s=new PropTween(r._pt,i,e,0,1,a.render,a,0,a.priority),r!==_quickTween))for(c=r._ptLookup[r._targets.indexOf(i)],u=a._props.length;u--;)c[a._props[u]]=s;return a},_overwritingTween,_forceAllPropTweens,_initTween=function e(t,r,n){var i,o,a,s,c,u,l,d,h,f,p,m,g,v=t.vars,y=v.ease,_=v.startAt,b=v.immediateRender,w=v.lazy,D=v.onUpdate,S=v.runBackwards,x=v.yoyoEase,T=v.keyframes,k=v.autoRevert,P=t._dur,E=t._startAt,A=t._targets,C=t.parent,O=C&&"nested"===C.data?C.vars.targets:A,R="auto"===t._overwrite&&!_suppressOverwrites,M=t.timeline;if(M&&(!T||!y)&&(y="none"),t._ease=_parseEase(y,_defaults.ease),t._yEase=x?_invertEase(_parseEase(!0===x?y:x,_defaults.ease)):0,x&&t._yoyo&&!t._repeat&&(x=t._yEase,t._yEase=t._ease,t._ease=x),t._from=!M&&!!v.runBackwards,!M||T&&!v.stagger){if(m=(d=A[0]?_getCache(A[0]).harness:0)&&v[d.prop],i=_copyExcluding(v,_reservedProps),E&&(E._zTime<0&&E.progress(1),r<0&&S&&b&&!k?E.render(-1,!0):E.revert(S&&P?_revertConfigNoKill:_startAtRevertConfig),E._lazy=0),_){if(_removeFromParent(t._startAt=Tween.set(A,_setDefaults({data:"isStart",overwrite:!1,parent:C,immediateRender:!0,lazy:!E&&_isNotFalse(w),startAt:null,delay:0,onUpdate:D&&function(){return _callback(t,"onUpdate")},stagger:0},_))),t._startAt._dp=0,t._startAt._sat=t,r<0&&(_reverting$1||!b&&!k)&&t._startAt.revert(_revertConfigNoKill),b&&P&&r<=0&&n<=0)return void(r&&(t._zTime=r))}else if(S&&P&&!E)if(r&&(b=!1),a=_setDefaults({overwrite:!1,data:"isFromStart",lazy:b&&!E&&_isNotFalse(w),immediateRender:b,stagger:0,parent:C},i),m&&(a[d.prop]=m),_removeFromParent(t._startAt=Tween.set(A,a)),t._startAt._dp=0,t._startAt._sat=t,r<0&&(_reverting$1?t._startAt.revert(_revertConfigNoKill):t._startAt.render(-1,!0)),t._zTime=r,b){if(!r)return}else e(t._startAt,_tinyNum,_tinyNum);for(t._pt=t._ptCache=0,w=P&&_isNotFalse(w)||w&&!P,o=0;o<A.length;o++){if(l=(c=A[o])._gsap||_harness(A)[o]._gsap,t._ptLookup[o]=f={},_lazyLookup[l.id]&&_lazyTweens.length&&_lazyRender(),p=O===A?o:O.indexOf(c),d&&!1!==(h=new d).init(c,m||i,t,p,O)&&(t._pt=s=new PropTween(t._pt,c,h.name,0,1,h.render,h,0,h.priority),h._props.forEach((function(e){f[e]=s})),h.priority&&(u=1)),!d||m)for(a in i)_plugins[a]&&(h=_checkPlugin(a,i,t,p,c,O))?h.priority&&(u=1):f[a]=s=_addPropTween.call(t,c,a,"get",i[a],p,O,0,v.stringFilter);t._op&&t._op[o]&&t.kill(c,t._op[o]),R&&t._pt&&(_overwritingTween=t,_globalTimeline.killTweensOf(c,f,t.globalTime(r)),g=!t.parent,_overwritingTween=0),t._pt&&w&&(_lazyLookup[l.id]=1)}u&&_sortPropTweensByPriority(t),t._onInit&&t._onInit(t)}t._onUpdate=D,t._initted=(!t._op||t._pt)&&!g,T&&r<=0&&M.render(_bigNum$1,!0,!0)},_updatePropTweens=function(e,t,r,n,i,o,a,s){var c,u,l,d,h=(e._pt&&e._ptCache||(e._ptCache={}))[t];if(!h)for(h=e._ptCache[t]=[],l=e._ptLookup,d=e._targets.length;d--;){if((c=l[d][t])&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==t&&c.fp!==t;)c=c._next;if(!c)return _forceAllPropTweens=1,e.vars[t]="+=0",_initTween(e,a),_forceAllPropTweens=0,s?_warn(t+" not eligible for reset"):1;h.push(c)}for(d=h.length;d--;)(c=(u=h[d])._pt||u).s=!n&&0!==n||i?c.s+(n||0)+o*c.c:n,c.c=r-c.s,u.e&&(u.e=_round(r)+getUnit(u.e)),u.b&&(u.b=c.s+getUnit(u.b))},_addAliasesToVars=function(e,t){var r,n,i,o,a=e[0]?_getCache(e[0]).harness:0,s=a&&a.aliases;if(!s)return t;for(n in r=_merge({},t),s)if(n in r)for(i=(o=s[n].split(",")).length;i--;)r[o[i]]=r[n];return r},_parseKeyframe=function(e,t,r,n){var i,o,a=t.ease||n||"power1.inOut";if(_isArray(t))o=r[e]||(r[e]=[]),t.forEach((function(e,r){return o.push({t:r/(t.length-1)*100,v:e,e:a})}));else for(i in t)o=r[i]||(r[i]=[]),"ease"===i||o.push({t:parseFloat(e),v:t[i],e:a})},_parseFuncOrString=function(e,t,r,n,i){return _isFunction(e)?e.call(t,r,n,i):_isString(e)&&~e.indexOf("random(")?_replaceRandom(e):e},_staggerTweenProps=_callbackNames+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",_staggerPropsToSkip={};_forEachName(_staggerTweenProps+",id,stagger,delay,duration,paused,scrollTrigger",(function(e){return _staggerPropsToSkip[e]=1}));var Tween=function(e){function t(t,r,n,i){var o;"number"==typeof r&&(n.duration=r,r=n,n=null);var a,s,c,u,l,d,h,f,p=(o=e.call(this,i?r:_inheritDefaults(r))||this).vars,m=p.duration,g=p.delay,v=p.immediateRender,y=p.stagger,_=p.overwrite,b=p.keyframes,w=p.defaults,D=p.scrollTrigger,S=p.yoyoEase,x=r.parent||_globalTimeline,T=(_isArray(t)||_isTypedArray(t)?_isNumber(t[0]):"length"in r)?[t]:toArray(t);if(o._targets=T.length?_harness(T):_warn("GSAP target "+t+" not found. https://gsap.com",!_config.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=_,b||y||_isFuncOrString(m)||_isFuncOrString(g)){if(r=o.vars,(a=o.timeline=new Timeline({data:"nested",defaults:w||{},targets:x&&"nested"===x.data?x.vars.targets:T})).kill(),a.parent=a._dp=_assertThisInitialized(o),a._start=0,y||_isFuncOrString(m)||_isFuncOrString(g)){if(u=T.length,h=y&&distribute(y),_isObject(y))for(l in y)~_staggerTweenProps.indexOf(l)&&(f||(f={}),f[l]=y[l]);for(s=0;s<u;s++)(c=_copyExcluding(r,_staggerPropsToSkip)).stagger=0,S&&(c.yoyoEase=S),f&&_merge(c,f),d=T[s],c.duration=+_parseFuncOrString(m,_assertThisInitialized(o),s,d,T),c.delay=(+_parseFuncOrString(g,_assertThisInitialized(o),s,d,T)||0)-o._delay,!y&&1===u&&c.delay&&(o._delay=g=c.delay,o._start+=g,c.delay=0),a.to(d,c,h?h(s,d,T):0),a._ease=_easeMap.none;a.duration()?m=g=0:o.timeline=0}else if(b){_inheritDefaults(_setDefaults(a.vars.defaults,{ease:"none"})),a._ease=_parseEase(b.ease||r.ease||"none");var k,P,E,A=0;if(_isArray(b))b.forEach((function(e){return a.to(T,e,">")})),a.duration();else{for(l in c={},b)"ease"===l||"easeEach"===l||_parseKeyframe(l,b[l],c,b.easeEach);for(l in c)for(k=c[l].sort((function(e,t){return e.t-t.t})),A=0,s=0;s<k.length;s++)(E={ease:(P=k[s]).e,duration:(P.t-(s?k[s-1].t:0))/100*m})[l]=P.v,a.to(T,E,A),A+=E.duration;a.duration()<m&&a.to({},{duration:m-a.duration()})}}m||o.duration(m=a.duration())}else o.timeline=0;return!0!==_||_suppressOverwrites||(_overwritingTween=_assertThisInitialized(o),_globalTimeline.killTweensOf(T),_overwritingTween=0),_addToTimeline(x,_assertThisInitialized(o),n),r.reversed&&o.reverse(),r.paused&&o.paused(!0),(v||!m&&!b&&o._start===_roundPrecise(x._time)&&_isNotFalse(v)&&_hasNoPausedAncestors(_assertThisInitialized(o))&&"nested"!==x.data)&&(o._tTime=-_tinyNum,o.render(Math.max(0,-g)||0)),D&&_scrollTrigger(_assertThisInitialized(o),D),o}_inheritsLoose(t,e);var r=t.prototype;return r.render=function(e,t,r){var n,i,o,a,s,c,u,l,d,h=this._time,f=this._tDur,p=this._dur,m=e<0,g=e>f-_tinyNum&&!m?f:e<_tinyNum?0:e;if(p){if(g!==this._tTime||!e||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==m){if(n=g,l=this.timeline,this._repeat){if(a=p+this._rDelay,this._repeat<-1&&m)return this.totalTime(100*a+e,t,r);if(n=_roundPrecise(g%a),g===f?(o=this._repeat,n=p):((o=~~(g/a))&&o===_roundPrecise(g/a)&&(n=p,o--),n>p&&(n=p)),(c=this._yoyo&&1&o)&&(d=this._yEase,n=p-n),s=_animationCycle(this._tTime,a),n===h&&!r&&this._initted&&o===s)return this._tTime=g,this;o!==s&&(l&&this._yEase&&_propagateYoyoEase(l,c),this.vars.repeatRefresh&&!c&&!this._lock&&this._time!==a&&this._initted&&(this._lock=r=1,this.render(_roundPrecise(a*o),!0).invalidate()._lock=0))}if(!this._initted){if(_attemptInitTween(this,m?e:n,r,t,g))return this._tTime=0,this;if(!(h===this._time||r&&this.vars.repeatRefresh&&o!==s))return this;if(p!==this._dur)return this.render(e,t,r)}if(this._tTime=g,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=u=(d||this._ease)(n/p),this._from&&(this.ratio=u=1-u),n&&!h&&!t&&!o&&(_callback(this,"onStart"),this._tTime!==g))return this;for(i=this._pt;i;)i.r(u,i.d),i=i._next;l&&l.render(e<0?e:l._dur*l._ease(n/this._dur),t,r)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(m&&_rewindStartAt(this,e,t,r),_callback(this,"onUpdate")),this._repeat&&o!==s&&this.vars.onRepeat&&!t&&this.parent&&_callback(this,"onRepeat"),g!==this._tDur&&g||this._tTime!==g||(m&&!this._onUpdate&&_rewindStartAt(this,e,!0,!0),(e||!p)&&(g===this._tDur&&this._ts>0||!g&&this._ts<0)&&_removeFromParent(this,1),t||m&&!h||!(g||h||c)||(_callback(this,g===f?"onComplete":"onReverseComplete",!0),this._prom&&!(g<f&&this.timeScale()>0)&&this._prom()))}}else _renderZeroDurationTween(this,e,t,r);return this},r.targets=function(){return this._targets},r.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},r.resetTo=function(e,t,r,n,i){_tickerActive||_ticker.wake(),this._ts||this.play();var o,a=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||_initTween(this,a),o=this._ease(a/this._dur),_updatePropTweens(this,e,t,r,n,o,a,i)?this.resetTo(e,t,r,n,1):(_alignPlayhead(this,0),this.parent||_addLinkedListItem(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},r.kill=function(e,t){if(void 0===t&&(t="all"),!(e||t&&"all"!==t))return this._lazy=this._pt=0,this.parent?_interrupt(this):this;if(this.timeline){var r=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,_overwritingTween&&!0!==_overwritingTween.vars.overwrite)._first||_interrupt(this),this.parent&&r!==this.timeline.totalDuration()&&_setDuration(this,this._dur*this.timeline._tDur/r,0,1),this}var n,i,o,a,s,c,u,l=this._targets,d=e?toArray(e):l,h=this._ptLookup,f=this._pt;if((!t||"all"===t)&&_arraysMatch(l,d))return"all"===t&&(this._pt=0),_interrupt(this);for(n=this._op=this._op||[],"all"!==t&&(_isString(t)&&(s={},_forEachName(t,(function(e){return s[e]=1})),t=s),t=_addAliasesToVars(l,t)),u=l.length;u--;)if(~d.indexOf(l[u]))for(s in i=h[u],"all"===t?(n[u]=t,a=i,o={}):(o=n[u]=n[u]||{},a=t),a)(c=i&&i[s])&&("kill"in c.d&&!0!==c.d.kill(s)||_removeLinkedListItem(this,c,"_pt"),delete i[s]),"all"!==o&&(o[s]=1);return this._initted&&!this._pt&&f&&_interrupt(this),this},t.to=function(e,r){return new t(e,r,arguments[2])},t.from=function(e,t){return _createTweenType(1,arguments)},t.delayedCall=function(e,r,n,i){return new t(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:r,onReverseComplete:r,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:i})},t.fromTo=function(e,t,r){return _createTweenType(2,arguments)},t.set=function(e,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new t(e,r)},t.killTweensOf=function(e,t,r){return _globalTimeline.killTweensOf(e,t,r)},t}(Animation);_setDefaults(Tween.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),_forEachName("staggerTo,staggerFrom,staggerFromTo",(function(e){Tween[e]=function(){var t=new Timeline,r=_slice.call(arguments,0);return r.splice("staggerFromTo"===e?5:4,0,0),t[e].apply(t,r)}}));var _setterPlain=function(e,t,r){return e[t]=r},_setterFunc=function(e,t,r){return e[t](r)},_setterFuncWithParam=function(e,t,r,n){return e[t](n.fp,r)},_setterAttribute=function(e,t,r){return e.setAttribute(t,r)},_getSetter=function(e,t){return _isFunction(e[t])?_setterFunc:_isUndefined(e[t])&&e.setAttribute?_setterAttribute:_setterPlain},_renderPlain=function(e,t){return t.set(t.t,t.p,Math.round(1e6*(t.s+t.c*e))/1e6,t)},_renderBoolean=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},_renderComplexString=function(e,t){var r=t._pt,n="";if(!e&&t.b)n=t.b;else if(1===e&&t.e)n=t.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*e):Math.round(1e4*(r.s+r.c*e))/1e4)+n,r=r._next;n+=t.c}t.set(t.t,t.p,n,t)},_renderPropTweens=function(e,t){for(var r=t._pt;r;)r.r(e,r.d),r=r._next},_addPluginModifier=function(e,t,r,n){for(var i,o=this._pt;o;)i=o._next,o.p===n&&o.modifier(e,t,r),o=i},_killPropTweensOf=function(e){for(var t,r,n=this._pt;n;)r=n._next,n.p===e&&!n.op||n.op===e?_removeLinkedListItem(this,n,"_pt"):n.dep||(t=1),n=r;return!t},_setterWithModifier=function(e,t,r,n){n.mSet(e,t,n.m.call(n.tween,r,n.mt),n)},_sortPropTweensByPriority=function(e){for(var t,r,n,i,o=e._pt;o;){for(t=o._next,r=n;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:i)?o._prev._next=o:n=o,(o._next=r)?r._prev=o:i=o,o=t}e._pt=n},PropTween=function(){function e(e,t,r,n,i,o,a,s,c){this.t=t,this.s=n,this.c=i,this.p=r,this.r=o||_renderPlain,this.d=a||this,this.set=s||_setterPlain,this.pr=c||0,this._next=e,e&&(e._prev=this)}return e.prototype.modifier=function(e,t,r){this.mSet=this.mSet||this.set,this.set=_setterWithModifier,this.m=e,this.mt=r,this.tween=t},e}();_forEachName(_callbackNames+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(e){return _reservedProps[e]=1})),_globals.TweenMax=_globals.TweenLite=Tween,_globals.TimelineLite=_globals.TimelineMax=Timeline,_globalTimeline=new Timeline({sortChildren:!1,defaults:_defaults,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),_config.stringFilter=_colorStringFilter;var _media=[],_listeners={},_emptyArray=[],_lastMediaTime=0,_contextID=0,_dispatch=function(e){return(_listeners[e]||_emptyArray).map((function(e){return e()}))},_onMediaChange=function(){var e=Date.now(),t=[];e-_lastMediaTime>2&&(_dispatch("matchMediaInit"),_media.forEach((function(e){var r,n,i,o,a=e.queries,s=e.conditions;for(n in a)(r=_win$1.matchMedia(a[n]).matches)&&(i=1),r!==s[n]&&(s[n]=r,o=1);o&&(e.revert(),i&&t.push(e))})),_dispatch("matchMediaRevert"),t.forEach((function(e){return e.onMatch(e,(function(t){return e.add(null,t)}))})),_lastMediaTime=e,_dispatch("matchMedia"))},Context=function(){function e(e,t){this.selector=t&&selector(t),this.data=[],this._r=[],this.isReverted=!1,this.id=_contextID++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,r){_isFunction(e)&&(r=t,t=e,e=_isFunction);var n=this,i=function(){var e,i=_context,o=n.selector;return i&&i!==n&&i.data.push(n),r&&(n.selector=selector(r)),_context=n,e=t.apply(n,arguments),_isFunction(e)&&n._r.push(e),_context=i,n.selector=o,n.isReverted=!1,e};return n.last=i,e===_isFunction?i(n,(function(e){return n.add(null,e)})):e?n[e]=i:i},t.ignore=function(e){var t=_context;_context=null,e(this),_context=t},t.getTweens=function(){var t=[];return this.data.forEach((function(r){return r instanceof e?t.push.apply(t,r.getTweens()):r instanceof Tween&&!(r.parent&&"nested"===r.parent.data)&&t.push(r)})),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var r=this;if(e?function(){for(var t,n=r.getTweens(),i=r.data.length;i--;)"isFlip"===(t=r.data[i]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach((function(e){return n.splice(n.indexOf(e),1)})));for(n.map((function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}})).sort((function(e,t){return t.g-e.g||-1/0})).forEach((function(t){return t.t.revert(e)})),i=r.data.length;i--;)(t=r.data[i])instanceof Timeline?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):!(t instanceof Tween)&&t.revert&&t.revert(e);r._r.forEach((function(t){return t(e,r)})),r.isReverted=!0}():this.data.forEach((function(e){return e.kill&&e.kill()})),this.clear(),t)for(var n=_media.length;n--;)_media[n].id===this.id&&_media.splice(n,1)},t.revert=function(e){this.kill(e||{})},e}(),MatchMedia=function(){function e(e){this.contexts=[],this.scope=e,_context&&_context.data.push(this)}var t=e.prototype;return t.add=function(e,t,r){_isObject(e)||(e={matches:e});var n,i,o,a=new Context(0,r||this.scope),s=a.conditions={};for(i in _context&&!a.selector&&(a.selector=_context.selector),this.contexts.push(a),t=a.add("onMatch",t),a.queries=e,e)"all"===i?o=1:(n=_win$1.matchMedia(e[i]))&&(_media.indexOf(a)<0&&_media.push(a),(s[i]=n.matches)&&(o=1),n.addListener?n.addListener(_onMediaChange):n.addEventListener("change",_onMediaChange));return o&&t(a,(function(e){return a.add(null,e)})),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach((function(t){return t.kill(e,!0)}))},e}(),_gsap={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach((function(e){return _createPlugin(e)}))},timeline:function(e){return new Timeline(e)},getTweensOf:function(e,t){return _globalTimeline.getTweensOf(e,t)},getProperty:function(e,t,r,n){_isString(e)&&(e=toArray(e)[0]);var i=_getCache(e||{}).get,o=r?_passThrough:_numericIfPossible;return"native"===r&&(r=""),e?t?o((_plugins[t]&&_plugins[t].get||i)(e,t,r,n)):function(t,r,n){return o((_plugins[t]&&_plugins[t].get||i)(e,t,r,n))}:e},quickSetter:function(e,t,r){if((e=toArray(e)).length>1){var n=e.map((function(e){return gsap.quickSetter(e,t,r)})),i=n.length;return function(e){for(var t=i;t--;)n[t](e)}}e=e[0]||{};var o=_plugins[t],a=_getCache(e),s=a.harness&&(a.harness.aliases||{})[t]||t,c=o?function(t){var n=new o;_quickTween._pt=0,n.init(e,r?t+r:t,_quickTween,0,[e]),n.render(1,n),_quickTween._pt&&_renderPropTweens(1,_quickTween)}:a.set(e,s);return o?c:function(t){return c(e,s,r?t+r:t,a,1)}},quickTo:function(e,t,r){var n,i=gsap.to(e,_merge(((n={})[t]="+=0.1",n.paused=!0,n),r||{})),o=function(e,r,n){return i.resetTo(t,e,r,n)};return o.tween=i,o},isTweening:function(e){return _globalTimeline.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=_parseEase(e.ease,_defaults.ease)),_mergeDeep(_defaults,e||{})},config:function(e){return _mergeDeep(_config,e||{})},registerEffect:function(e){var t=e.name,r=e.effect,n=e.plugins,i=e.defaults,o=e.extendTimeline;(n||"").split(",").forEach((function(e){return e&&!_plugins[e]&&!_globals[e]&&_warn(t+" effect requires "+e+" plugin.")})),_effects[t]=function(e,t,n){return r(toArray(e),_setDefaults(t||{},i),n)},o&&(Timeline.prototype[t]=function(e,r,n){return this.add(_effects[t](e,_isObject(r)?r:(n=r)&&{},this),n)})},registerEase:function(e,t){_easeMap[e]=_parseEase(t)},parseEase:function(e,t){return arguments.length?_parseEase(e,t):_easeMap},getById:function(e){return _globalTimeline.getById(e)},exportRoot:function(e,t){void 0===e&&(e={});var r,n,i=new Timeline(e);for(i.smoothChildTiming=_isNotFalse(e.smoothChildTiming),_globalTimeline.remove(i),i._dp=0,i._time=i._tTime=_globalTimeline._time,r=_globalTimeline._first;r;)n=r._next,!t&&!r._dur&&r instanceof Tween&&r.vars.onComplete===r._targets[0]||_addToTimeline(i,r,r._start-r._delay),r=n;return _addToTimeline(_globalTimeline,i,0),i},context:function(e,t){return e?new Context(e,t):_context},matchMedia:function(e){return new MatchMedia(e)},matchMediaRefresh:function(){return _media.forEach((function(e){var t,r,n=e.conditions;for(r in n)n[r]&&(n[r]=!1,t=1);t&&e.revert()}))||_onMediaChange()},addEventListener:function(e,t){var r=_listeners[e]||(_listeners[e]=[]);~r.indexOf(t)||r.push(t)},removeEventListener:function(e,t){var r=_listeners[e],n=r&&r.indexOf(t);n>=0&&r.splice(n,1)},utils:{wrap:wrap,wrapYoyo:wrapYoyo,distribute:distribute,random:random,snap:snap,normalize:normalize,getUnit:getUnit,clamp:clamp,splitColor:splitColor,toArray:toArray,selector:selector,mapRange:mapRange,pipe:pipe,unitize:unitize,interpolate:interpolate,shuffle:shuffle},install:_install,effects:_effects,ticker:_ticker,updateRoot:Timeline.updateRoot,plugins:_plugins,globalTimeline:_globalTimeline,core:{PropTween:PropTween,globals:_addGlobal,Tween:Tween,Timeline:Timeline,Animation:Animation,getCache:_getCache,_removeLinkedListItem:_removeLinkedListItem,reverting:function(){return _reverting$1},context:function(e){return e&&_context&&(_context.data.push(e),e._ctx=_context),_context},suppressOverwrites:function(e){return _suppressOverwrites=e}}};_forEachName("to,from,fromTo,delayedCall,set,killTweensOf",(function(e){return _gsap[e]=Tween[e]})),_ticker.add(Timeline.updateRoot),_quickTween=_gsap.to({},{duration:0});var _getPluginPropTween=function(e,t){for(var r=e._pt;r&&r.p!==t&&r.op!==t&&r.fp!==t;)r=r._next;return r},_addModifiers=function(e,t){var r,n,i,o=e._targets;for(r in t)for(n=o.length;n--;)(i=e._ptLookup[n][r])&&(i=i.d)&&(i._pt&&(i=_getPluginPropTween(i,r)),i&&i.modifier&&i.modifier(t[r],e,o[n],r))},_buildModifierPlugin=function(e,t){return{name:e,rawVars:1,init:function(e,r,n){n._onInit=function(e){var n,i;if(_isString(r)&&(n={},_forEachName(r,(function(e){return n[e]=1})),r=n),t){for(i in n={},r)n[i]=t(r[i]);r=n}_addModifiers(e,r)}}}},gsap=_gsap.registerPlugin({name:"attr",init:function(e,t,r,n,i){var o,a,s;for(o in this.tween=r,t)s=e.getAttribute(o)||"",(a=this.add(e,"setAttribute",(s||0)+"",t[o],n,i,0,0,o)).op=o,a.b=s,this._props.push(o)},render:function(e,t){for(var r=t._pt;r;)_reverting$1?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",init:function(e,t){for(var r=t.length;r--;)this.add(e,r,e[r]||0,t[r],0,0,0,0,0,1)}},_buildModifierPlugin("roundProps",_roundModifier),_buildModifierPlugin("modifiers"),_buildModifierPlugin("snap",snap))||_gsap;Tween.version=Timeline.version=gsap.version="3.12.5",_coreReady=1,_windowExists$1()&&_wake(),_easeMap.Power0,_easeMap.Power1,_easeMap.Power2,_easeMap.Power3,_easeMap.Power4,_easeMap.Linear,_easeMap.Quad,_easeMap.Cubic,_easeMap.Quart,_easeMap.Quint,_easeMap.Strong,_easeMap.Elastic,_easeMap.Back,_easeMap.SteppedEase,_easeMap.Bounce,_easeMap.Sine,_easeMap.Expo,_easeMap.Circ;
|
|
53
|
+
*/var _config={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_defaults={duration:.5,overwrite:!1,delay:0},_suppressOverwrites,_reverting$1,_context,_bigNum$1=1e8,_tinyNum=1/_bigNum$1,_2PI=2*Math.PI,_HALF_PI=_2PI/4,_gsID=0,_sqrt=Math.sqrt,_cos=Math.cos,_sin=Math.sin,_isString=function(e){return"string"==typeof e},_isFunction=function(e){return"function"==typeof e},_isNumber=function(e){return"number"==typeof e},_isUndefined=function(e){return void 0===e},_isObject=function(e){return"object"==typeof e},_isNotFalse=function(e){return!1!==e},_windowExists$1=function(){return"undefined"!=typeof window},_isFuncOrString=function(e){return _isFunction(e)||_isString(e)},_isTypedArray="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},_isArray=Array.isArray,_strictNumExp=/(?:-?\.?\d|\.)+/gi,_numExp=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,_numWithUnitExp=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,_complexStringNumExp=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,_relExp=/[+-]=-?[.\d]+/,_delimitedValueExp=/[^,'"\[\]\s]+/gi,_unitExp=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,_globalTimeline,_win$1,_coreInitted,_doc$1,_globals={},_installScope={},_coreReady,_install=function(e){return(_installScope=_merge(e,_globals))&&gsap},_missingPlugin=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},_warn=function(e,t){return!t&&console.warn(e)},_addGlobal=function(e,t){return e&&(_globals[e]=t)&&_installScope&&(_installScope[e]=t)||_globals},_emptyFunc=function(){return 0},_startAtRevertConfig={suppressEvents:!0,isStart:!0,kill:!1},_revertConfigNoKill={suppressEvents:!0,kill:!1},_revertConfig={suppressEvents:!0},_reservedProps={},_lazyTweens=[],_lazyLookup={},_lastRenderedFrame,_plugins={},_effects={},_nextGCFrame=30,_harnessPlugins=[],_callbackNames="",_harness=function(e){var t,r,n=e[0];if(_isObject(n)||_isFunction(n)||(e=[e]),!(t=(n._gsap||{}).harness)){for(r=_harnessPlugins.length;r--&&!_harnessPlugins[r].targetTest(n););t=_harnessPlugins[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new GSCache(e[r],t)))||e.splice(r,1);return e},_getCache=function(e){return e._gsap||_harness(toArray(e))[0]._gsap},_getProperty=function(e,t,r){return(r=e[t])&&_isFunction(r)?e[t]():_isUndefined(r)&&e.getAttribute&&e.getAttribute(t)||r},_forEachName=function(e,t){return(e=e.split(",")).forEach(t)||e},_round=function(e){return Math.round(1e5*e)/1e5||0},_roundPrecise=function(e){return Math.round(1e7*e)/1e7||0},_parseRelative=function(e,t){var r=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),"+"===r?e+n:"-"===r?e-n:"*"===r?e*n:e/n},_arrayContainsAny=function(e,t){for(var r=t.length,n=0;e.indexOf(t[n])<0&&++n<r;);return n<r},_lazyRender=function(){var e,t,r=_lazyTweens.length,n=_lazyTweens.slice(0);for(_lazyLookup={},_lazyTweens.length=0,e=0;e<r;e++)(t=n[e])&&t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0)._lazy=0)},_lazySafeRender=function(e,t,r,n){_lazyTweens.length&&!_reverting$1&&_lazyRender(),e.render(t,r,n||_reverting$1&&t<0&&(e._initted||e._startAt)),_lazyTweens.length&&!_reverting$1&&_lazyRender()},_numericIfPossible=function(e){var t=parseFloat(e);return(t||0===t)&&(e+"").match(_delimitedValueExp).length<2?t:_isString(e)?e.trim():e},_passThrough=function(e){return e},_setDefaults=function(e,t){for(var r in t)r in e||(e[r]=t[r]);return e},_setKeyframeDefaults=function(e){return function(t,r){for(var n in r)n in t||"duration"===n&&e||"ease"===n||(t[n]=r[n])}},_merge=function(e,t){for(var r in t)e[r]=t[r];return e},_mergeDeep=function e(t,r){for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(t[n]=_isObject(r[n])?e(t[n]||(t[n]={}),r[n]):r[n]);return t},_copyExcluding=function(e,t){var r,n={};for(r in e)r in t||(n[r]=e[r]);return n},_inheritDefaults=function(e){var t=e.parent||_globalTimeline,r=e.keyframes?_setKeyframeDefaults(_isArray(e.keyframes)):_setDefaults;if(_isNotFalse(e.inherit))for(;t;)r(e,t.vars.defaults),t=t.parent||t._dp;return e},_arraysMatch=function(e,t){for(var r=e.length,n=r===t.length;n&&r--&&e[r]===t[r];);return r<0},_addLinkedListItem=function(e,t,r,n,i){void 0===r&&(r="_first"),void 0===n&&(n="_last");var o,a=e[n];if(i)for(o=t[i];a&&a[i]>o;)a=a._prev;return a?(t._next=a._next,a._next=t):(t._next=e[r],e[r]=t),t._next?t._next._prev=t:e[n]=t,t._prev=a,t.parent=t._dp=e,t},_removeLinkedListItem=function(e,t,r,n){void 0===r&&(r="_first"),void 0===n&&(n="_last");var i=t._prev,o=t._next;i?i._next=o:e[r]===t&&(e[r]=o),o?o._prev=i:e[n]===t&&(e[n]=i),t._next=t._prev=t.parent=null},_removeFromParent=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},_uncache=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},_recacheAncestors=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},_rewindStartAt=function(e,t,r,n){return e._startAt&&(_reverting$1?e._startAt.revert(_revertConfigNoKill):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},_hasNoPausedAncestors=function e(t){return!t||t._ts&&e(t.parent)},_elapsedCycleDuration=function(e){return e._repeat?_animationCycle(e._tTime,e=e.duration()+e._rDelay)*e:0},_animationCycle=function(e,t){var r=Math.floor(e/=t);return e&&r===e?r-1:r},_parentToChildTotalTime=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},_setEnd=function(e){return e._end=_roundPrecise(e._start+(e._tDur/Math.abs(e._ts||e._rts||_tinyNum)||0))},_alignPlayhead=function(e,t){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=_roundPrecise(r._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),_setEnd(e),r._dirty||_uncache(r,e)),e},_postAddChecks=function(e,t){var r;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(r=_parentToChildTotalTime(e.rawTime(),t),(!t._dur||_clamp(0,t.totalDuration(),r)-t._tTime>_tinyNum)&&t.render(r,!0)),_uncache(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-_tinyNum}},_addToTimeline=function(e,t,r,n){return t.parent&&_removeFromParent(t),t._start=_roundPrecise((_isNumber(r)?r:r||e!==_globalTimeline?_parsePosition(e,r,t):e._time)+t._delay),t._end=_roundPrecise(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),_addLinkedListItem(e,t,"_first","_last",e._sort?"_start":0),_isFromOrFromStart(t)||(e._recent=t),n||_postAddChecks(e,t),e._ts<0&&_alignPlayhead(e,e._tTime),e},_scrollTrigger=function(e,t){return(_globals.ScrollTrigger||_missingPlugin("scrollTrigger",t))&&_globals.ScrollTrigger.create(t,e)},_attemptInitTween=function(e,t,r,n,i){return _initTween(e,t,i),e._initted?!r&&e._pt&&!_reverting$1&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&_lastRenderedFrame!==_ticker.frame?(_lazyTweens.push(e),e._lazy=[i,n],1):void 0:1},_parentPlayheadIsBeforeStart=function e(t){var r=t.parent;return r&&r._ts&&r._initted&&!r._lock&&(r.rawTime()<0||e(r))},_isFromOrFromStart=function(e){var t=e.data;return"isFromStart"===t||"isStart"===t},_renderZeroDurationTween=function(e,t,r,n){var i,o,a,s=e.ratio,l=t<0||!t&&(!e._start&&_parentPlayheadIsBeforeStart(e)&&(e._initted||!_isFromOrFromStart(e))||(e._ts<0||e._dp._ts<0)&&!_isFromOrFromStart(e))?0:1,c=e._rDelay,u=0;if(c&&e._repeat&&(u=_clamp(0,e._tDur,t),o=_animationCycle(u,c),e._yoyo&&1&o&&(l=1-l),o!==_animationCycle(e._tTime,c)&&(s=1-l,e.vars.repeatRefresh&&e._initted&&e.invalidate())),l!==s||_reverting$1||n||e._zTime===_tinyNum||!t&&e._zTime){if(!e._initted&&_attemptInitTween(e,t,n,r,u))return;for(a=e._zTime,e._zTime=t||(r?_tinyNum:0),r||(r=t&&!a),e.ratio=l,e._from&&(l=1-l),e._time=0,e._tTime=u,i=e._pt;i;)i.r(l,i.d),i=i._next;t<0&&_rewindStartAt(e,t,r,!0),e._onUpdate&&!r&&_callback(e,"onUpdate"),u&&e._repeat&&!r&&e.parent&&_callback(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===l&&(l&&_removeFromParent(e,1),r||_reverting$1||(_callback(e,l?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},_findNextPauseTween=function(e,t,r){var n;if(r>t)for(n=e._first;n&&n._start<=r;){if("isPause"===n.data&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=r;){if("isPause"===n.data&&n._start<t)return n;n=n._prev}},_setDuration=function(e,t,r,n){var i=e._repeat,o=_roundPrecise(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=i?i<0?1e10:_roundPrecise(o*(i+1)+e._rDelay*i):o,a>0&&!n&&_alignPlayhead(e,e._tTime=e._tDur*a),e.parent&&_setEnd(e),r||_uncache(e.parent,e),e},_onUpdateTotalDuration=function(e){return e instanceof Timeline?_uncache(e):_setDuration(e,e._dur)},_zeroPosition={_start:0,endTime:_emptyFunc,totalDuration:_emptyFunc},_parsePosition=function e(t,r,n){var i,o,a,s=t.labels,l=t._recent||_zeroPosition,c=t.duration()>=_bigNum$1?l.endTime(!1):t._dur;return _isString(r)&&(isNaN(r)||r in s)?(o=r.charAt(0),a="%"===r.substr(-1),i=r.indexOf("="),"<"===o||">"===o?(i>=0&&(r=r.replace(/=/,"")),("<"===o?l._start:l.endTime(l._repeat>=0))+(parseFloat(r.substr(1))||0)*(a?(i<0?l:n).totalDuration()/100:1)):i<0?(r in s||(s[r]=c),s[r]):(o=parseFloat(r.charAt(i-1)+r.substr(i+1)),a&&n&&(o=o/100*(_isArray(n)?n[0]:n).totalDuration()),i>1?e(t,r.substr(0,i-1),n)+o:c+o)):null==r?c:+r},_createTweenType=function(e,t,r){var n,i,o=_isNumber(t[1]),a=(o?2:1)+(e<2?0:1),s=t[a];if(o&&(s.duration=t[1]),s.parent=r,e){for(n=s,i=r;i&&!("immediateRender"in n);)n=i.vars.defaults||{},i=_isNotFalse(i.vars.inherit)&&i.parent;s.immediateRender=_isNotFalse(n.immediateRender),e<2?s.runBackwards=1:s.startAt=t[a-1]}return new Tween(t[0],s,t[a+1])},_conditionalReturn=function(e,t){return e||0===e?t(e):t},_clamp=function(e,t,r){return r<e?e:r>t?t:r},getUnit=function(e,t){return _isString(e)&&(t=_unitExp.exec(e))?t[1]:""},clamp=function(e,t,r){return _conditionalReturn(r,(function(r){return _clamp(e,t,r)}))},_slice=[].slice,_isArrayLike=function(e,t){return e&&_isObject(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&_isObject(e[0]))&&!e.nodeType&&e!==_win$1},_flatten=function(e,t,r){return void 0===r&&(r=[]),e.forEach((function(e){var n;return _isString(e)&&!t||_isArrayLike(e,1)?(n=r).push.apply(n,toArray(e)):r.push(e)}))||r},toArray=function(e,t,r){return _context&&!t&&_context.selector?_context.selector(e):!_isString(e)||r||!_coreInitted&&_wake()?_isArray(e)?_flatten(e,r):_isArrayLike(e)?_slice.call(e,0):e?[e]:[]:_slice.call((t||_doc$1).querySelectorAll(e),0)},selector=function(e){return e=toArray(e)[0]||_warn("Invalid scope")||{},function(t){var r=e.current||e.nativeElement||e;return toArray(t,r.querySelectorAll?r:r===e?_warn("Invalid scope")||_doc$1.createElement("div"):e)}},shuffle=function(e){return e.sort((function(){return.5-Math.random()}))},distribute=function(e){if(_isFunction(e))return e;var t=_isObject(e)?e:{each:e},r=_parseEase(t.ease),n=t.from||0,i=parseFloat(t.base)||0,o={},a=n>0&&n<1,s=isNaN(n)||a,l=t.axis,c=n,u=n;return _isString(n)?c=u={center:.5,edges:.5,end:1}[n]||0:!a&&s&&(c=n[0],u=n[1]),function(e,a,h){var d,f,p,m,g,v,y,_,b,w=(h||t).length,D=o[w];if(!D){if(!(b="auto"===t.grid?0:(t.grid||[1,_bigNum$1])[1])){for(y=-_bigNum$1;y<(y=h[b++].getBoundingClientRect().left)&&b<w;);b<w&&b--}for(D=o[w]=[],d=s?Math.min(b,w)*c-.5:n%b,f=b===_bigNum$1?0:s?w*u/b-.5:n/b|0,y=0,_=_bigNum$1,v=0;v<w;v++)p=v%b-d,m=f-(v/b|0),D[v]=g=l?Math.abs("y"===l?m:p):_sqrt(p*p+m*m),g>y&&(y=g),g<_&&(_=g);"random"===n&&shuffle(D),D.max=y-_,D.min=_,D.v=w=(parseFloat(t.amount)||parseFloat(t.each)*(b>w?w-1:l?"y"===l?w/b:b:Math.max(b,w/b))||0)*("edges"===n?-1:1),D.b=w<0?i-w:i,D.u=getUnit(t.amount||t.each)||0,r=r&&w<0?_invertEase(r):r}return w=(D[e]-D.min)/D.max||0,_roundPrecise(D.b+(r?r(w):w)*D.v)+D.u}},_roundModifier=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var n=_roundPrecise(Math.round(parseFloat(r)/e)*e*t);return(n-n%1)/t+(_isNumber(r)?0:getUnit(r))}},snap=function(e,t){var r,n,i=_isArray(e);return!i&&_isObject(e)&&(r=i=e.radius||_bigNum$1,e.values?(e=toArray(e.values),(n=!_isNumber(e[0]))&&(r*=r)):e=_roundModifier(e.increment)),_conditionalReturn(t,i?_isFunction(e)?function(t){return n=e(t),Math.abs(n-t)<=r?n:t}:function(t){for(var i,o,a=parseFloat(n?t.x:t),s=parseFloat(n?t.y:0),l=_bigNum$1,c=0,u=e.length;u--;)(i=n?(i=e[u].x-a)*i+(o=e[u].y-s)*o:Math.abs(e[u]-a))<l&&(l=i,c=u);return c=!r||l<=r?e[c]:t,n||c===t||_isNumber(t)?c:c+getUnit(t)}:_roundModifier(e))},random=function(e,t,r,n){return _conditionalReturn(_isArray(e)?!t:!0===r?!!(r=0):!n,(function(){return _isArray(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(n=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(t-e+.99*r))/r)*r*n)/n}))},pipe=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduce((function(e,t){return t(e)}),e)}},unitize=function(e,t){return function(r){return e(parseFloat(r))+(t||getUnit(r))}},normalize=function(e,t,r){return mapRange(e,t,0,1,r)},_wrapArray=function(e,t,r){return _conditionalReturn(r,(function(r){return e[~~t(r)]}))},wrap=function e(t,r,n){var i=r-t;return _isArray(t)?_wrapArray(t,e(0,t.length),r):_conditionalReturn(n,(function(e){return(i+(e-t)%i)%i+t}))},wrapYoyo=function e(t,r,n){var i=r-t,o=2*i;return _isArray(t)?_wrapArray(t,e(0,t.length-1),r):_conditionalReturn(n,(function(e){return t+((e=(o+(e-t)%o)%o||0)>i?o-e:e)}))},_replaceRandom=function(e){for(var t,r,n,i,o=0,a="";~(t=e.indexOf("random(",o));)n=e.indexOf(")",t),i="["===e.charAt(t+7),r=e.substr(t+7,n-t-7).match(i?_delimitedValueExp:_strictNumExp),a+=e.substr(o,t-o)+random(i?r:+r[0],i?0:+r[1],+r[2]||1e-5),o=n+1;return a+e.substr(o,e.length-o)},mapRange=function(e,t,r,n,i){var o=t-e,a=n-r;return _conditionalReturn(i,(function(t){return r+((t-e)/o*a||0)}))},interpolate=function e(t,r,n,i){var o=isNaN(t+r)?0:function(e){return(1-e)*t+e*r};if(!o){var a,s,l,c,u,h=_isString(t),d={};if(!0===n&&(i=1)&&(n=null),h)t={p:t},r={p:r};else if(_isArray(t)&&!_isArray(r)){for(l=[],c=t.length,u=c-2,s=1;s<c;s++)l.push(e(t[s-1],t[s]));c--,o=function(e){e*=c;var t=Math.min(u,~~e);return l[t](e-t)},n=r}else i||(t=_merge(_isArray(t)?[]:{},t));if(!l){for(a in r)_addPropTween.call(d,t,a,"get",r[a]);o=function(e){return _renderPropTweens(e,d)||(h?t.p:t)}}}return _conditionalReturn(n,o)},_getLabelInDirection=function(e,t,r){var n,i,o,a=e.labels,s=_bigNum$1;for(n in a)(i=a[n]-t)<0==!!r&&i&&s>(i=Math.abs(i))&&(o=n,s=i);return o},_callback=function(e,t,r){var n,i,o,a=e.vars,s=a[t],l=_context,c=e._ctx;if(s)return n=a[t+"Params"],i=a.callbackScope||e,r&&_lazyTweens.length&&_lazyRender(),c&&(_context=c),o=n?s.apply(i,n):s.call(i),_context=l,o},_interrupt=function(e){return _removeFromParent(e),e.scrollTrigger&&e.scrollTrigger.kill(!!_reverting$1),e.progress()<1&&_callback(e,"onInterrupt"),e},_quickTween,_registerPluginQueue=[],_createPlugin=function(e){if(e)if(e=!e.name&&e.default||e,_windowExists$1()||e.headless){var t=e.name,r=_isFunction(e),n=t&&!r&&e.init?function(){this._props=[]}:e,i={init:_emptyFunc,render:_renderPropTweens,add:_addPropTween,kill:_killPropTweensOf,modifier:_addPluginModifier,rawVars:0},o={targetTest:0,get:0,getSetter:_getSetter,aliases:{},register:0};if(_wake(),e!==n){if(_plugins[t])return;_setDefaults(n,_setDefaults(_copyExcluding(e,i),o)),_merge(n.prototype,_merge(i,_copyExcluding(e,o))),_plugins[n.prop=t]=n,e.targetTest&&(_harnessPlugins.push(n),_reservedProps[t]=1),t=("css"===t?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}_addGlobal(t,n),e.register&&e.register(gsap,n,PropTween)}else _registerPluginQueue.push(e)},_255=255,_colorLookup={aqua:[0,_255,_255],lime:[0,_255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,_255],navy:[0,0,128],white:[_255,_255,_255],olive:[128,128,0],yellow:[_255,_255,0],orange:[_255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[_255,0,0],pink:[_255,192,203],cyan:[0,_255,_255],transparent:[_255,_255,_255,0]},_hue=function(e,t,r){return(6*(e+=e<0?1:e>1?-1:0)<1?t+(r-t)*e*6:e<.5?r:3*e<2?t+(r-t)*(2/3-e)*6:t)*_255+.5|0},splitColor=function(e,t,r){var n,i,o,a,s,l,c,u,h,d,f=e?_isNumber(e)?[e>>16,e>>8&_255,e&_255]:0:_colorLookup.black;if(!f){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),_colorLookup[e])f=_colorLookup[e];else if("#"===e.charAt(0)){if(e.length<6&&(n=e.charAt(1),i=e.charAt(2),o=e.charAt(3),e="#"+n+n+i+i+o+o+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(f=parseInt(e.substr(1,6),16))>>16,f>>8&_255,f&_255,parseInt(e.substr(7),16)/255];f=[(e=parseInt(e.substr(1),16))>>16,e>>8&_255,e&_255]}else if("hsl"===e.substr(0,3))if(f=d=e.match(_strictNumExp),t){if(~e.indexOf("="))return f=e.match(_numExp),r&&f.length<4&&(f[3]=1),f}else a=+f[0]%360/360,s=+f[1]/100,n=2*(l=+f[2]/100)-(i=l<=.5?l*(s+1):l+s-l*s),f.length>3&&(f[3]*=1),f[0]=_hue(a+1/3,n,i),f[1]=_hue(a,n,i),f[2]=_hue(a-1/3,n,i);else f=e.match(_strictNumExp)||_colorLookup.transparent;f=f.map(Number)}return t&&!d&&(n=f[0]/_255,i=f[1]/_255,o=f[2]/_255,l=((c=Math.max(n,i,o))+(u=Math.min(n,i,o)))/2,c===u?a=s=0:(h=c-u,s=l>.5?h/(2-c-u):h/(c+u),a=c===n?(i-o)/h+(i<o?6:0):c===i?(o-n)/h+2:(n-i)/h+4,a*=60),f[0]=~~(a+.5),f[1]=~~(100*s+.5),f[2]=~~(100*l+.5)),r&&f.length<4&&(f[3]=1),f},_colorOrderData=function(e){var t=[],r=[],n=-1;return e.split(_colorExp).forEach((function(e){var i=e.match(_numWithUnitExp)||[];t.push.apply(t,i),r.push(n+=i.length+1)})),t.c=r,t},_formatColors=function(e,t,r){var n,i,o,a,s="",l=(e+s).match(_colorExp),c=t?"hsla(":"rgba(",u=0;if(!l)return e;if(l=l.map((function(e){return(e=splitColor(e,t,1))&&c+(t?e[0]+","+e[1]+"%,"+e[2]+"%,"+e[3]:e.join(","))+")"})),r&&(o=_colorOrderData(e),(n=r.c).join(s)!==o.c.join(s)))for(a=(i=e.replace(_colorExp,"1").split(_numWithUnitExp)).length-1;u<a;u++)s+=i[u]+(~n.indexOf(u)?l.shift()||c+"0,0,0,0)":(o.length?o:l.length?l:r).shift());if(!i)for(a=(i=e.split(_colorExp)).length-1;u<a;u++)s+=i[u]+l[u];return s+i[a]},_colorExp=function(){var e,t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(e in _colorLookup)t+="|"+e+"\\b";return new RegExp(t+")","gi")}(),_hslExp=/hsl[a]?\(/,_colorStringFilter=function(e){var t,r=e.join(" ");if(_colorExp.lastIndex=0,_colorExp.test(r))return t=_hslExp.test(r),e[1]=_formatColors(e[1],t),e[0]=_formatColors(e[0],t,_colorOrderData(e[1])),!0},_tickerActive,_ticker=function(){var e,t,r,n,i,o,a=Date.now,s=500,l=33,c=a(),u=c,h=1e3/240,d=h,f=[],p=function r(p){var m,g,v,y,_=a()-u,b=!0===p;if((_>s||_<0)&&(c+=_-l),((m=(v=(u+=_)-c)-d)>0||b)&&(y=++n.frame,i=v-1e3*n.time,n.time=v/=1e3,d+=m+(m>=h?4:h-m),g=1),b||(e=t(r)),g)for(o=0;o<f.length;o++)f[o](v,i,y,p)};return n={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(e){return i/(1e3/(e||60))},wake:function(){_coreReady&&(!_coreInitted&&_windowExists$1()&&(_win$1=_coreInitted=window,_doc$1=_win$1.document||{},_globals.gsap=gsap,(_win$1.gsapVersions||(_win$1.gsapVersions=[])).push(gsap.version),_install(_installScope||_win$1.GreenSockGlobals||!_win$1.gsap&&_win$1||{}),_registerPluginQueue.forEach(_createPlugin)),r="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame,e&&n.sleep(),t=r||function(e){return setTimeout(e,d-1e3*n.time+1|0)},_tickerActive=1,p(2))},sleep:function(){(r?cancelAnimationFrame:clearTimeout)(e),_tickerActive=0,t=_emptyFunc},lagSmoothing:function(e,t){s=e||1/0,l=Math.min(t||33,s)},fps:function(e){h=1e3/(e||240),d=1e3*n.time+h},add:function(e,t,r){var i=t?function(t,r,o,a){e(t,r,o,a),n.remove(i)}:e;return n.remove(e),f[r?"unshift":"push"](i),_wake(),i},remove:function(e,t){~(t=f.indexOf(e))&&f.splice(t,1)&&o>=t&&o--},_listeners:f},n}(),_wake=function(){return!_tickerActive&&_ticker.wake()},_easeMap={},_customEaseExp=/^[\d.\-M][\d.\-,\s]/,_quotesExp=/["']/g,_parseObjectInString=function(e){for(var t,r,n,i={},o=e.substr(1,e.length-3).split(":"),a=o[0],s=1,l=o.length;s<l;s++)r=o[s],t=s!==l-1?r.lastIndexOf(","):r.length,n=r.substr(0,t),i[a]=isNaN(n)?n.replace(_quotesExp,"").trim():+n,a=r.substr(t+1).trim();return i},_valueInParentheses=function(e){var t=e.indexOf("(")+1,r=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<r?e.indexOf(")",r+1):r)},_configEaseFromString=function(e){var t=(e+"").split("("),r=_easeMap[t[0]];return r&&t.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[_parseObjectInString(t[1])]:_valueInParentheses(e).split(",").map(_numericIfPossible)):_easeMap._CE&&_customEaseExp.test(e)?_easeMap._CE("",e):r},_invertEase=function(e){return function(t){return 1-e(1-t)}},_propagateYoyoEase=function e(t,r){for(var n,i=t._first;i;)i instanceof Timeline?e(i,r):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===r||(i.timeline?e(i.timeline,r):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=r)),i=i._next},_parseEase=function(e,t){return e&&(_isFunction(e)?e:_easeMap[e]||_configEaseFromString(e))||t},_insertEase=function(e,t,r,n){void 0===r&&(r=function(e){return 1-t(1-e)}),void 0===n&&(n=function(e){return e<.5?t(2*e)/2:1-t(2*(1-e))/2});var i,o={easeIn:t,easeOut:r,easeInOut:n};return _forEachName(e,(function(e){for(var t in _easeMap[e]=_globals[e]=o,_easeMap[i=e.toLowerCase()]=r,o)_easeMap[i+("easeIn"===t?".in":"easeOut"===t?".out":".inOut")]=_easeMap[e+"."+t]=o[t]})),o},_easeInOutFromOut=function(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}},_configElastic=function e(t,r,n){var i=r>=1?r:1,o=(n||(t?.3:.45))/(r<1?r:1),a=o/_2PI*(Math.asin(1/i)||0),s=function(e){return 1===e?1:i*Math.pow(2,-10*e)*_sin((e-a)*o)+1},l="out"===t?s:"in"===t?function(e){return 1-s(1-e)}:_easeInOutFromOut(s);return o=_2PI/o,l.config=function(r,n){return e(t,r,n)},l},_configBack=function e(t,r){void 0===r&&(r=1.70158);var n=function(e){return e?--e*e*((r+1)*e+r)+1:0},i="out"===t?n:"in"===t?function(e){return 1-n(1-e)}:_easeInOutFromOut(n);return i.config=function(r){return e(t,r)},i};_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong",(function(e,t){var r=t<5?t+1:t;_insertEase(e+",Power"+(r-1),t?function(e){return Math.pow(e,r)}:function(e){return e},(function(e){return 1-Math.pow(1-e,r)}),(function(e){return e<.5?Math.pow(2*e,r)/2:1-Math.pow(2*(1-e),r)/2}))})),_easeMap.Linear.easeNone=_easeMap.none=_easeMap.Linear.easeIn,_insertEase("Elastic",_configElastic("in"),_configElastic("out"),_configElastic()),function(e,t){var r=1/t,n=2*r,i=2.5*r,o=function(o){return o<r?e*o*o:o<n?e*Math.pow(o-1.5/t,2)+.75:o<i?e*(o-=2.25/t)*o+.9375:e*Math.pow(o-2.625/t,2)+.984375};_insertEase("Bounce",(function(e){return 1-o(1-e)}),o)}(7.5625,2.75),_insertEase("Expo",(function(e){return e?Math.pow(2,10*(e-1)):0})),_insertEase("Circ",(function(e){return-(_sqrt(1-e*e)-1)})),_insertEase("Sine",(function(e){return 1===e?1:1-_cos(e*_HALF_PI)})),_insertEase("Back",_configBack("in"),_configBack("out"),_configBack()),_easeMap.SteppedEase=_easeMap.steps=_globals.SteppedEase={config:function(e,t){void 0===e&&(e=1);var r=1/e,n=e+(t?0:1),i=t?1:0,o=1-_tinyNum;return function(e){return((n*_clamp(0,o,e)|0)+i)*r}}},_defaults.ease=_easeMap["quad.out"],_forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(e){return _callbackNames+=e+","+e+"Params,"}));var GSCache=function(e,t){this.id=_gsID++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:_getProperty,this.set=t?t.getSetter:_getSetter},Animation=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,_setDuration(this,+e.duration,1,1),this.data=e.data,_context&&(this._ctx=_context,_context.data.push(this)),_tickerActive||_ticker.wake()}var t=e.prototype;return t.delay=function(e){return e||0===e?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,_setDuration(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(_wake(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(_alignPlayhead(this,e),!r._dp||r.parent||_postAddChecks(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&_addToTimeline(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===_tinyNum||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),_lazySafeRender(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+_elapsedCycleDuration(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?e:1-e)+_elapsedCycleDuration(this),t):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(e,t){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*r,t):this._repeat?_animationCycle(this._tTime,r)+1:1},t.timeScale=function(e,t){if(!arguments.length)return this._rts===-_tinyNum?0:this._rts;if(this._rts===e)return this;var r=this.parent&&this._ts?_parentToChildTotalTime(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||e===-_tinyNum?0:this._rts,this.totalTime(_clamp(-Math.abs(this._delay),this._tDur,r),!1!==t),_setEnd(this),_recacheAncestors(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(_wake(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==_tinyNum&&(this._tTime-=_tinyNum)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=e;var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&_addToTimeline(t,this,e-this._delay),this}return this._start},t.endTime=function(e){return this._start+(_isNotFalse(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?_parentToChildTotalTime(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){void 0===e&&(e=_revertConfig);var t=_reverting$1;return _reverting$1=e,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),"nested"!==this.data&&!1!==e.kill&&this.kill(),_reverting$1=t,this},t.globalTime=function(e){for(var t=this,r=arguments.length?e:t.rawTime();t;)r=t._start+r/(Math.abs(t._ts)||1),t=t._dp;return!this.parent&&this._sat?this._sat.globalTime(e):r},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,_onUpdateTotalDuration(this)):-2===this._repeat?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,_onUpdateTotalDuration(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(_parsePosition(this,e),_isNotFalse(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,_isNotFalse(t))},t.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-_tinyNum:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-_tinyNum,this},t.isActive=function(){var e,t=this.parent||this._dp,r=this._start;return!(t&&!(this._ts&&this._initted&&t.isActive()&&(e=t.rawTime(!0))>=r&&e<this.endTime(!0)-_tinyNum))},t.eventCallback=function(e,t,r){var n=this.vars;return arguments.length>1?(t?(n[e]=t,r&&(n[e+"Params"]=r),"onUpdate"===e&&(this._onUpdate=t)):delete n[e],this):n[e]},t.then=function(e){var t=this;return new Promise((function(r){var n=_isFunction(e)?e:_passThrough,i=function(){var e=t.then;t.then=null,_isFunction(n)&&(n=n(t))&&(n.then||n===t)&&(t.then=e),r(n),t.then=e};t._initted&&1===t.totalProgress()&&t._ts>=0||!t._tTime&&t._ts<0?i():t._prom=i}))},t.kill=function(){_interrupt(this)},e}();_setDefaults(Animation.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-_tinyNum,_prom:0,_ps:!1,_rts:1});var Timeline=function(e){function t(t,r){var n;return void 0===t&&(t={}),(n=e.call(this,t)||this).labels={},n.smoothChildTiming=!!t.smoothChildTiming,n.autoRemoveChildren=!!t.autoRemoveChildren,n._sort=_isNotFalse(t.sortChildren),_globalTimeline&&_addToTimeline(t.parent||_globalTimeline,_assertThisInitialized(n),r),t.reversed&&n.reverse(),t.paused&&n.paused(!0),t.scrollTrigger&&_scrollTrigger(_assertThisInitialized(n),t.scrollTrigger),n}_inheritsLoose(t,e);var r=t.prototype;return r.to=function(e,t,r){return _createTweenType(0,arguments,this),this},r.from=function(e,t,r){return _createTweenType(1,arguments,this),this},r.fromTo=function(e,t,r,n){return _createTweenType(2,arguments,this),this},r.set=function(e,t,r){return t.duration=0,t.parent=this,_inheritDefaults(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Tween(e,t,_parsePosition(this,r),1),this},r.call=function(e,t,r){return _addToTimeline(this,Tween.delayedCall(0,e,t),r)},r.staggerTo=function(e,t,r,n,i,o,a){return r.duration=t,r.stagger=r.stagger||n,r.onComplete=o,r.onCompleteParams=a,r.parent=this,new Tween(e,r,_parsePosition(this,i)),this},r.staggerFrom=function(e,t,r,n,i,o,a){return r.runBackwards=1,_inheritDefaults(r).immediateRender=_isNotFalse(r.immediateRender),this.staggerTo(e,t,r,n,i,o,a)},r.staggerFromTo=function(e,t,r,n,i,o,a,s){return n.startAt=r,_inheritDefaults(n).immediateRender=_isNotFalse(n.immediateRender),this.staggerTo(e,t,n,i,o,a,s)},r.render=function(e,t,r){var n,i,o,a,s,l,c,u,h,d,f,p,m=this._time,g=this._dirty?this.totalDuration():this._tDur,v=this._dur,y=e<=0?0:_roundPrecise(e),_=this._zTime<0!=e<0&&(this._initted||!v);if(this!==_globalTimeline&&y>g&&e>=0&&(y=g),y!==this._tTime||r||_){if(m!==this._time&&v&&(y+=this._time-m,e+=this._time-m),n=y,h=this._start,l=!(u=this._ts),_&&(v||(m=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(f=this._yoyo,s=v+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(100*s+e,t,r);if(n=_roundPrecise(y%s),y===g?(a=this._repeat,n=v):((a=~~(y/s))&&a===y/s&&(n=v,a--),n>v&&(n=v)),d=_animationCycle(this._tTime,s),!m&&this._tTime&&d!==a&&this._tTime-d*s-this._dur<=0&&(d=a),f&&1&a&&(n=v-n,p=1),a!==d&&!this._lock){var b=f&&1&d,w=b===(f&&1&a);if(a<d&&(b=!b),m=b?0:y%v?v:y,this._lock=1,this.render(m||(p?0:_roundPrecise(a*s)),t,!v)._lock=0,this._tTime=y,!t&&this.parent&&_callback(this,"onRepeat"),this.vars.repeatRefresh&&!p&&(this.invalidate()._lock=1),m&&m!==this._time||l!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(v=this._dur,g=this._tDur,w&&(this._lock=2,m=b?v:-1e-4,this.render(m,!0),this.vars.repeatRefresh&&!p&&this.invalidate()),this._lock=0,!this._ts&&!l)return this;_propagateYoyoEase(this,p)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(c=_findNextPauseTween(this,_roundPrecise(m),_roundPrecise(n)))&&(y-=n-(n=c._start)),this._tTime=y,this._time=n,this._act=!u,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,m=0),!m&&n&&!t&&!a&&(_callback(this,"onStart"),this._tTime!==y))return this;if(n>=m&&e>=0)for(i=this._first;i;){if(o=i._next,(i._act||n>=i._start)&&i._ts&&c!==i){if(i.parent!==this)return this.render(e,t,r);if(i.render(i._ts>0?(n-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(n-i._start)*i._ts,t,r),n!==this._time||!this._ts&&!l){c=0,o&&(y+=this._zTime=-_tinyNum);break}}i=o}else{i=this._last;for(var D=e<0?e:n;i;){if(o=i._prev,(i._act||D<=i._end)&&i._ts&&c!==i){if(i.parent!==this)return this.render(e,t,r);if(i.render(i._ts>0?(D-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(D-i._start)*i._ts,t,r||_reverting$1&&(i._initted||i._startAt)),n!==this._time||!this._ts&&!l){c=0,o&&(y+=this._zTime=D?-_tinyNum:_tinyNum);break}}i=o}}if(c&&!t&&(this.pause(),c.render(n>=m?0:-_tinyNum)._zTime=n>=m?1:-1,this._ts))return this._start=h,_setEnd(this),this.render(e,t,r);this._onUpdate&&!t&&_callback(this,"onUpdate",!0),(y===g&&this._tTime>=this.totalDuration()||!y&&m)&&(h!==this._start&&Math.abs(u)===Math.abs(this._ts)||this._lock||((e||!v)&&(y===g&&this._ts>0||!y&&this._ts<0)&&_removeFromParent(this,1),t||e<0&&!m||!y&&!m&&g||(_callback(this,y===g&&e>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(y<g&&this.timeScale()>0)&&this._prom())))}return this},r.add=function(e,t){var r=this;if(_isNumber(t)||(t=_parsePosition(this,t,e)),!(e instanceof Animation)){if(_isArray(e))return e.forEach((function(e){return r.add(e,t)})),this;if(_isString(e))return this.addLabel(e,t);if(!_isFunction(e))return this;e=Tween.delayedCall(0,e)}return this!==e?_addToTimeline(this,e,t):this},r.getChildren=function(e,t,r,n){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===n&&(n=-_bigNum$1);for(var i=[],o=this._first;o;)o._start>=n&&(o instanceof Tween?t&&i.push(o):(r&&i.push(o),e&&i.push.apply(i,o.getChildren(!0,t,r)))),o=o._next;return i},r.getById=function(e){for(var t=this.getChildren(1,1,1),r=t.length;r--;)if(t[r].vars.id===e)return t[r]},r.remove=function(e){return _isString(e)?this.removeLabel(e):_isFunction(e)?this.killTweensOf(e):(_removeLinkedListItem(this,e),e===this._recent&&(this._recent=this._last),_uncache(this))},r.totalTime=function(t,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=_roundPrecise(_ticker.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,r),this._forcing=0,this):this._tTime},r.addLabel=function(e,t){return this.labels[e]=_parsePosition(this,t),this},r.removeLabel=function(e){return delete this.labels[e],this},r.addPause=function(e,t,r){var n=Tween.delayedCall(0,t||_emptyFunc,r);return n.data="isPause",this._hasPause=1,_addToTimeline(this,n,_parsePosition(this,e))},r.removePause=function(e){var t=this._first;for(e=_parsePosition(this,e);t;)t._start===e&&"isPause"===t.data&&_removeFromParent(t),t=t._next},r.killTweensOf=function(e,t,r){for(var n=this.getTweensOf(e,r),i=n.length;i--;)_overwritingTween!==n[i]&&n[i].kill(e,t);return this},r.getTweensOf=function(e,t){for(var r,n=[],i=toArray(e),o=this._first,a=_isNumber(t);o;)o instanceof Tween?_arrayContainsAny(o._targets,i)&&(a?(!_overwritingTween||o._initted&&o._ts)&&o.globalTime(0)<=t&&o.globalTime(o.totalDuration())>t:!t||o.isActive())&&n.push(o):(r=o.getTweensOf(i,t)).length&&n.push.apply(n,r),o=o._next;return n},r.tweenTo=function(e,t){t=t||{};var r,n=this,i=_parsePosition(n,e),o=t,a=o.startAt,s=o.onStart,l=o.onStartParams,c=o.immediateRender,u=Tween.to(n,_setDefaults({ease:t.ease||"none",lazy:!1,immediateRender:!1,time:i,overwrite:"auto",duration:t.duration||Math.abs((i-(a&&"time"in a?a.time:n._time))/n.timeScale())||_tinyNum,onStart:function(){if(n.pause(),!r){var e=t.duration||Math.abs((i-(a&&"time"in a?a.time:n._time))/n.timeScale());u._dur!==e&&_setDuration(u,e,0,1).render(u._time,!0,!0),r=1}s&&s.apply(u,l||[])}},t));return c?u.render(0):u},r.tweenFromTo=function(e,t,r){return this.tweenTo(t,_setDefaults({startAt:{time:_parsePosition(this,e)}},r))},r.recent=function(){return this._recent},r.nextLabel=function(e){return void 0===e&&(e=this._time),_getLabelInDirection(this,_parsePosition(this,e))},r.previousLabel=function(e){return void 0===e&&(e=this._time),_getLabelInDirection(this,_parsePosition(this,e),1)},r.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+_tinyNum)},r.shiftChildren=function(e,t,r){void 0===r&&(r=0);for(var n,i=this._first,o=this.labels;i;)i._start>=r&&(i._start+=e,i._end+=e),i=i._next;if(t)for(n in o)o[n]>=r&&(o[n]+=e);return _uncache(this)},r.invalidate=function(t){var r=this._first;for(this._lock=0;r;)r.invalidate(t),r=r._next;return e.prototype.invalidate.call(this,t)},r.clear=function(e){void 0===e&&(e=!0);for(var t,r=this._first;r;)t=r._next,this.remove(r),r=t;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),_uncache(this)},r.totalDuration=function(e){var t,r,n,i=0,o=this,a=o._last,s=_bigNum$1;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-e:e));if(o._dirty){for(n=o.parent;a;)t=a._prev,a._dirty&&a.totalDuration(),(r=a._start)>s&&o._sort&&a._ts&&!o._lock?(o._lock=1,_addToTimeline(o,a,r-a._delay,1)._lock=0):s=r,r<0&&a._ts&&(i-=r,(!n&&!o._dp||n&&n.smoothChildTiming)&&(o._start+=r/o._ts,o._time-=r,o._tTime-=r),o.shiftChildren(-r,!1,-Infinity),s=0),a._end>i&&a._ts&&(i=a._end),a=t;_setDuration(o,o===_globalTimeline&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(e){if(_globalTimeline._ts&&(_lazySafeRender(_globalTimeline,_parentToChildTotalTime(e,_globalTimeline)),_lastRenderedFrame=_ticker.frame),_ticker.frame>=_nextGCFrame){_nextGCFrame+=_config.autoSleep||120;var t=_globalTimeline._first;if((!t||!t._ts)&&_config.autoSleep&&_ticker._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||_ticker.sleep()}}},t}(Animation);_setDefaults(Timeline.prototype,{_lock:0,_hasPause:0,_forcing:0});var _addComplexStringPropTween=function(e,t,r,n,i,o,a){var s,l,c,u,h,d,f,p,m=new PropTween(this._pt,e,t,0,1,_renderComplexString,null,i),g=0,v=0;for(m.b=r,m.e=n,r+="",(f=~(n+="").indexOf("random("))&&(n=_replaceRandom(n)),o&&(o(p=[r,n],e,t),r=p[0],n=p[1]),l=r.match(_complexStringNumExp)||[];s=_complexStringNumExp.exec(n);)u=s[0],h=n.substring(g,s.index),c?c=(c+1)%5:"rgba("===h.substr(-5)&&(c=1),u!==l[v++]&&(d=parseFloat(l[v-1])||0,m._pt={_next:m._pt,p:h||1===v?h:",",s:d,c:"="===u.charAt(1)?_parseRelative(d,u)-d:parseFloat(u)-d,m:c&&c<4?Math.round:0},g=_complexStringNumExp.lastIndex);return m.c=g<n.length?n.substring(g,n.length):"",m.fp=a,(_relExp.test(n)||f)&&(m.e=0),this._pt=m,m},_addPropTween=function(e,t,r,n,i,o,a,s,l,c){_isFunction(n)&&(n=n(i||0,e,o));var u,h=e[t],d="get"!==r?r:_isFunction(h)?l?e[t.indexOf("set")||!_isFunction(e["get"+t.substr(3)])?t:"get"+t.substr(3)](l):e[t]():h,f=_isFunction(h)?l?_setterFuncWithParam:_setterFunc:_setterPlain;if(_isString(n)&&(~n.indexOf("random(")&&(n=_replaceRandom(n)),"="===n.charAt(1)&&((u=_parseRelative(d,n)+(getUnit(d)||0))||0===u)&&(n=u)),!c||d!==n||_forceAllPropTweens)return isNaN(d*n)||""===n?(!h&&!(t in e)&&_missingPlugin(t,n),_addComplexStringPropTween.call(this,e,t,d,n,f,s||_config.stringFilter,l)):(u=new PropTween(this._pt,e,t,+d||0,n-(d||0),"boolean"==typeof h?_renderBoolean:_renderPlain,0,f),l&&(u.fp=l),a&&u.modifier(a,this,e),this._pt=u)},_processVars=function(e,t,r,n,i){if(_isFunction(e)&&(e=_parseFuncOrString(e,i,t,r,n)),!_isObject(e)||e.style&&e.nodeType||_isArray(e)||_isTypedArray(e))return _isString(e)?_parseFuncOrString(e,i,t,r,n):e;var o,a={};for(o in e)a[o]=_parseFuncOrString(e[o],i,t,r,n);return a},_checkPlugin=function(e,t,r,n,i,o){var a,s,l,c;if(_plugins[e]&&!1!==(a=new _plugins[e]).init(i,a.rawVars?t[e]:_processVars(t[e],n,i,o,r),r,n,o)&&(r._pt=s=new PropTween(r._pt,i,e,0,1,a.render,a,0,a.priority),r!==_quickTween))for(l=r._ptLookup[r._targets.indexOf(i)],c=a._props.length;c--;)l[a._props[c]]=s;return a},_overwritingTween,_forceAllPropTweens,_initTween=function e(t,r,n){var i,o,a,s,l,c,u,h,d,f,p,m,g,v=t.vars,y=v.ease,_=v.startAt,b=v.immediateRender,w=v.lazy,D=v.onUpdate,x=v.runBackwards,S=v.yoyoEase,k=v.keyframes,T=v.autoRevert,P=t._dur,E=t._startAt,C=t._targets,A=t.parent,O=A&&"nested"===A.data?A.vars.targets:C,M="auto"===t._overwrite&&!_suppressOverwrites,R=t.timeline;if(R&&(!k||!y)&&(y="none"),t._ease=_parseEase(y,_defaults.ease),t._yEase=S?_invertEase(_parseEase(!0===S?y:S,_defaults.ease)):0,S&&t._yoyo&&!t._repeat&&(S=t._yEase,t._yEase=t._ease,t._ease=S),t._from=!R&&!!v.runBackwards,!R||k&&!v.stagger){if(m=(h=C[0]?_getCache(C[0]).harness:0)&&v[h.prop],i=_copyExcluding(v,_reservedProps),E&&(E._zTime<0&&E.progress(1),r<0&&x&&b&&!T?E.render(-1,!0):E.revert(x&&P?_revertConfigNoKill:_startAtRevertConfig),E._lazy=0),_){if(_removeFromParent(t._startAt=Tween.set(C,_setDefaults({data:"isStart",overwrite:!1,parent:A,immediateRender:!0,lazy:!E&&_isNotFalse(w),startAt:null,delay:0,onUpdate:D&&function(){return _callback(t,"onUpdate")},stagger:0},_))),t._startAt._dp=0,t._startAt._sat=t,r<0&&(_reverting$1||!b&&!T)&&t._startAt.revert(_revertConfigNoKill),b&&P&&r<=0&&n<=0)return void(r&&(t._zTime=r))}else if(x&&P&&!E)if(r&&(b=!1),a=_setDefaults({overwrite:!1,data:"isFromStart",lazy:b&&!E&&_isNotFalse(w),immediateRender:b,stagger:0,parent:A},i),m&&(a[h.prop]=m),_removeFromParent(t._startAt=Tween.set(C,a)),t._startAt._dp=0,t._startAt._sat=t,r<0&&(_reverting$1?t._startAt.revert(_revertConfigNoKill):t._startAt.render(-1,!0)),t._zTime=r,b){if(!r)return}else e(t._startAt,_tinyNum,_tinyNum);for(t._pt=t._ptCache=0,w=P&&_isNotFalse(w)||w&&!P,o=0;o<C.length;o++){if(u=(l=C[o])._gsap||_harness(C)[o]._gsap,t._ptLookup[o]=f={},_lazyLookup[u.id]&&_lazyTweens.length&&_lazyRender(),p=O===C?o:O.indexOf(l),h&&!1!==(d=new h).init(l,m||i,t,p,O)&&(t._pt=s=new PropTween(t._pt,l,d.name,0,1,d.render,d,0,d.priority),d._props.forEach((function(e){f[e]=s})),d.priority&&(c=1)),!h||m)for(a in i)_plugins[a]&&(d=_checkPlugin(a,i,t,p,l,O))?d.priority&&(c=1):f[a]=s=_addPropTween.call(t,l,a,"get",i[a],p,O,0,v.stringFilter);t._op&&t._op[o]&&t.kill(l,t._op[o]),M&&t._pt&&(_overwritingTween=t,_globalTimeline.killTweensOf(l,f,t.globalTime(r)),g=!t.parent,_overwritingTween=0),t._pt&&w&&(_lazyLookup[u.id]=1)}c&&_sortPropTweensByPriority(t),t._onInit&&t._onInit(t)}t._onUpdate=D,t._initted=(!t._op||t._pt)&&!g,k&&r<=0&&R.render(_bigNum$1,!0,!0)},_updatePropTweens=function(e,t,r,n,i,o,a,s){var l,c,u,h,d=(e._pt&&e._ptCache||(e._ptCache={}))[t];if(!d)for(d=e._ptCache[t]=[],u=e._ptLookup,h=e._targets.length;h--;){if((l=u[h][t])&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==t&&l.fp!==t;)l=l._next;if(!l)return _forceAllPropTweens=1,e.vars[t]="+=0",_initTween(e,a),_forceAllPropTweens=0,s?_warn(t+" not eligible for reset"):1;d.push(l)}for(h=d.length;h--;)(l=(c=d[h])._pt||c).s=!n&&0!==n||i?l.s+(n||0)+o*l.c:n,l.c=r-l.s,c.e&&(c.e=_round(r)+getUnit(c.e)),c.b&&(c.b=l.s+getUnit(c.b))},_addAliasesToVars=function(e,t){var r,n,i,o,a=e[0]?_getCache(e[0]).harness:0,s=a&&a.aliases;if(!s)return t;for(n in r=_merge({},t),s)if(n in r)for(i=(o=s[n].split(",")).length;i--;)r[o[i]]=r[n];return r},_parseKeyframe=function(e,t,r,n){var i,o,a=t.ease||n||"power1.inOut";if(_isArray(t))o=r[e]||(r[e]=[]),t.forEach((function(e,r){return o.push({t:r/(t.length-1)*100,v:e,e:a})}));else for(i in t)o=r[i]||(r[i]=[]),"ease"===i||o.push({t:parseFloat(e),v:t[i],e:a})},_parseFuncOrString=function(e,t,r,n,i){return _isFunction(e)?e.call(t,r,n,i):_isString(e)&&~e.indexOf("random(")?_replaceRandom(e):e},_staggerTweenProps=_callbackNames+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",_staggerPropsToSkip={};_forEachName(_staggerTweenProps+",id,stagger,delay,duration,paused,scrollTrigger",(function(e){return _staggerPropsToSkip[e]=1}));var Tween=function(e){function t(t,r,n,i){var o;"number"==typeof r&&(n.duration=r,r=n,n=null);var a,s,l,c,u,h,d,f,p=(o=e.call(this,i?r:_inheritDefaults(r))||this).vars,m=p.duration,g=p.delay,v=p.immediateRender,y=p.stagger,_=p.overwrite,b=p.keyframes,w=p.defaults,D=p.scrollTrigger,x=p.yoyoEase,S=r.parent||_globalTimeline,k=(_isArray(t)||_isTypedArray(t)?_isNumber(t[0]):"length"in r)?[t]:toArray(t);if(o._targets=k.length?_harness(k):_warn("GSAP target "+t+" not found. https://gsap.com",!_config.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=_,b||y||_isFuncOrString(m)||_isFuncOrString(g)){if(r=o.vars,(a=o.timeline=new Timeline({data:"nested",defaults:w||{},targets:S&&"nested"===S.data?S.vars.targets:k})).kill(),a.parent=a._dp=_assertThisInitialized(o),a._start=0,y||_isFuncOrString(m)||_isFuncOrString(g)){if(c=k.length,d=y&&distribute(y),_isObject(y))for(u in y)~_staggerTweenProps.indexOf(u)&&(f||(f={}),f[u]=y[u]);for(s=0;s<c;s++)(l=_copyExcluding(r,_staggerPropsToSkip)).stagger=0,x&&(l.yoyoEase=x),f&&_merge(l,f),h=k[s],l.duration=+_parseFuncOrString(m,_assertThisInitialized(o),s,h,k),l.delay=(+_parseFuncOrString(g,_assertThisInitialized(o),s,h,k)||0)-o._delay,!y&&1===c&&l.delay&&(o._delay=g=l.delay,o._start+=g,l.delay=0),a.to(h,l,d?d(s,h,k):0),a._ease=_easeMap.none;a.duration()?m=g=0:o.timeline=0}else if(b){_inheritDefaults(_setDefaults(a.vars.defaults,{ease:"none"})),a._ease=_parseEase(b.ease||r.ease||"none");var T,P,E,C=0;if(_isArray(b))b.forEach((function(e){return a.to(k,e,">")})),a.duration();else{for(u in l={},b)"ease"===u||"easeEach"===u||_parseKeyframe(u,b[u],l,b.easeEach);for(u in l)for(T=l[u].sort((function(e,t){return e.t-t.t})),C=0,s=0;s<T.length;s++)(E={ease:(P=T[s]).e,duration:(P.t-(s?T[s-1].t:0))/100*m})[u]=P.v,a.to(k,E,C),C+=E.duration;a.duration()<m&&a.to({},{duration:m-a.duration()})}}m||o.duration(m=a.duration())}else o.timeline=0;return!0!==_||_suppressOverwrites||(_overwritingTween=_assertThisInitialized(o),_globalTimeline.killTweensOf(k),_overwritingTween=0),_addToTimeline(S,_assertThisInitialized(o),n),r.reversed&&o.reverse(),r.paused&&o.paused(!0),(v||!m&&!b&&o._start===_roundPrecise(S._time)&&_isNotFalse(v)&&_hasNoPausedAncestors(_assertThisInitialized(o))&&"nested"!==S.data)&&(o._tTime=-_tinyNum,o.render(Math.max(0,-g)||0)),D&&_scrollTrigger(_assertThisInitialized(o),D),o}_inheritsLoose(t,e);var r=t.prototype;return r.render=function(e,t,r){var n,i,o,a,s,l,c,u,h,d=this._time,f=this._tDur,p=this._dur,m=e<0,g=e>f-_tinyNum&&!m?f:e<_tinyNum?0:e;if(p){if(g!==this._tTime||!e||r||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==m){if(n=g,u=this.timeline,this._repeat){if(a=p+this._rDelay,this._repeat<-1&&m)return this.totalTime(100*a+e,t,r);if(n=_roundPrecise(g%a),g===f?(o=this._repeat,n=p):((o=~~(g/a))&&o===_roundPrecise(g/a)&&(n=p,o--),n>p&&(n=p)),(l=this._yoyo&&1&o)&&(h=this._yEase,n=p-n),s=_animationCycle(this._tTime,a),n===d&&!r&&this._initted&&o===s)return this._tTime=g,this;o!==s&&(u&&this._yEase&&_propagateYoyoEase(u,l),this.vars.repeatRefresh&&!l&&!this._lock&&this._time!==a&&this._initted&&(this._lock=r=1,this.render(_roundPrecise(a*o),!0).invalidate()._lock=0))}if(!this._initted){if(_attemptInitTween(this,m?e:n,r,t,g))return this._tTime=0,this;if(!(d===this._time||r&&this.vars.repeatRefresh&&o!==s))return this;if(p!==this._dur)return this.render(e,t,r)}if(this._tTime=g,this._time=n,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=c=(h||this._ease)(n/p),this._from&&(this.ratio=c=1-c),n&&!d&&!t&&!o&&(_callback(this,"onStart"),this._tTime!==g))return this;for(i=this._pt;i;)i.r(c,i.d),i=i._next;u&&u.render(e<0?e:u._dur*u._ease(n/this._dur),t,r)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(m&&_rewindStartAt(this,e,t,r),_callback(this,"onUpdate")),this._repeat&&o!==s&&this.vars.onRepeat&&!t&&this.parent&&_callback(this,"onRepeat"),g!==this._tDur&&g||this._tTime!==g||(m&&!this._onUpdate&&_rewindStartAt(this,e,!0,!0),(e||!p)&&(g===this._tDur&&this._ts>0||!g&&this._ts<0)&&_removeFromParent(this,1),t||m&&!d||!(g||d||l)||(_callback(this,g===f?"onComplete":"onReverseComplete",!0),this._prom&&!(g<f&&this.timeScale()>0)&&this._prom()))}}else _renderZeroDurationTween(this,e,t,r);return this},r.targets=function(){return this._targets},r.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},r.resetTo=function(e,t,r,n,i){_tickerActive||_ticker.wake(),this._ts||this.play();var o,a=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||_initTween(this,a),o=this._ease(a/this._dur),_updatePropTweens(this,e,t,r,n,o,a,i)?this.resetTo(e,t,r,n,1):(_alignPlayhead(this,0),this.parent||_addLinkedListItem(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},r.kill=function(e,t){if(void 0===t&&(t="all"),!(e||t&&"all"!==t))return this._lazy=this._pt=0,this.parent?_interrupt(this):this;if(this.timeline){var r=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,_overwritingTween&&!0!==_overwritingTween.vars.overwrite)._first||_interrupt(this),this.parent&&r!==this.timeline.totalDuration()&&_setDuration(this,this._dur*this.timeline._tDur/r,0,1),this}var n,i,o,a,s,l,c,u=this._targets,h=e?toArray(e):u,d=this._ptLookup,f=this._pt;if((!t||"all"===t)&&_arraysMatch(u,h))return"all"===t&&(this._pt=0),_interrupt(this);for(n=this._op=this._op||[],"all"!==t&&(_isString(t)&&(s={},_forEachName(t,(function(e){return s[e]=1})),t=s),t=_addAliasesToVars(u,t)),c=u.length;c--;)if(~h.indexOf(u[c]))for(s in i=d[c],"all"===t?(n[c]=t,a=i,o={}):(o=n[c]=n[c]||{},a=t),a)(l=i&&i[s])&&("kill"in l.d&&!0!==l.d.kill(s)||_removeLinkedListItem(this,l,"_pt"),delete i[s]),"all"!==o&&(o[s]=1);return this._initted&&!this._pt&&f&&_interrupt(this),this},t.to=function(e,r){return new t(e,r,arguments[2])},t.from=function(e,t){return _createTweenType(1,arguments)},t.delayedCall=function(e,r,n,i){return new t(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:r,onReverseComplete:r,onCompleteParams:n,onReverseCompleteParams:n,callbackScope:i})},t.fromTo=function(e,t,r){return _createTweenType(2,arguments)},t.set=function(e,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new t(e,r)},t.killTweensOf=function(e,t,r){return _globalTimeline.killTweensOf(e,t,r)},t}(Animation);_setDefaults(Tween.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),_forEachName("staggerTo,staggerFrom,staggerFromTo",(function(e){Tween[e]=function(){var t=new Timeline,r=_slice.call(arguments,0);return r.splice("staggerFromTo"===e?5:4,0,0),t[e].apply(t,r)}}));var _setterPlain=function(e,t,r){return e[t]=r},_setterFunc=function(e,t,r){return e[t](r)},_setterFuncWithParam=function(e,t,r,n){return e[t](n.fp,r)},_setterAttribute=function(e,t,r){return e.setAttribute(t,r)},_getSetter=function(e,t){return _isFunction(e[t])?_setterFunc:_isUndefined(e[t])&&e.setAttribute?_setterAttribute:_setterPlain},_renderPlain=function(e,t){return t.set(t.t,t.p,Math.round(1e6*(t.s+t.c*e))/1e6,t)},_renderBoolean=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},_renderComplexString=function(e,t){var r=t._pt,n="";if(!e&&t.b)n=t.b;else if(1===e&&t.e)n=t.e;else{for(;r;)n=r.p+(r.m?r.m(r.s+r.c*e):Math.round(1e4*(r.s+r.c*e))/1e4)+n,r=r._next;n+=t.c}t.set(t.t,t.p,n,t)},_renderPropTweens=function(e,t){for(var r=t._pt;r;)r.r(e,r.d),r=r._next},_addPluginModifier=function(e,t,r,n){for(var i,o=this._pt;o;)i=o._next,o.p===n&&o.modifier(e,t,r),o=i},_killPropTweensOf=function(e){for(var t,r,n=this._pt;n;)r=n._next,n.p===e&&!n.op||n.op===e?_removeLinkedListItem(this,n,"_pt"):n.dep||(t=1),n=r;return!t},_setterWithModifier=function(e,t,r,n){n.mSet(e,t,n.m.call(n.tween,r,n.mt),n)},_sortPropTweensByPriority=function(e){for(var t,r,n,i,o=e._pt;o;){for(t=o._next,r=n;r&&r.pr>o.pr;)r=r._next;(o._prev=r?r._prev:i)?o._prev._next=o:n=o,(o._next=r)?r._prev=o:i=o,o=t}e._pt=n},PropTween=function(){function e(e,t,r,n,i,o,a,s,l){this.t=t,this.s=n,this.c=i,this.p=r,this.r=o||_renderPlain,this.d=a||this,this.set=s||_setterPlain,this.pr=l||0,this._next=e,e&&(e._prev=this)}return e.prototype.modifier=function(e,t,r){this.mSet=this.mSet||this.set,this.set=_setterWithModifier,this.m=e,this.mt=r,this.tween=t},e}();_forEachName(_callbackNames+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(e){return _reservedProps[e]=1})),_globals.TweenMax=_globals.TweenLite=Tween,_globals.TimelineLite=_globals.TimelineMax=Timeline,_globalTimeline=new Timeline({sortChildren:!1,defaults:_defaults,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),_config.stringFilter=_colorStringFilter;var _media=[],_listeners={},_emptyArray=[],_lastMediaTime=0,_contextID=0,_dispatch=function(e){return(_listeners[e]||_emptyArray).map((function(e){return e()}))},_onMediaChange=function(){var e=Date.now(),t=[];e-_lastMediaTime>2&&(_dispatch("matchMediaInit"),_media.forEach((function(e){var r,n,i,o,a=e.queries,s=e.conditions;for(n in a)(r=_win$1.matchMedia(a[n]).matches)&&(i=1),r!==s[n]&&(s[n]=r,o=1);o&&(e.revert(),i&&t.push(e))})),_dispatch("matchMediaRevert"),t.forEach((function(e){return e.onMatch(e,(function(t){return e.add(null,t)}))})),_lastMediaTime=e,_dispatch("matchMedia"))},Context=function(){function e(e,t){this.selector=t&&selector(t),this.data=[],this._r=[],this.isReverted=!1,this.id=_contextID++,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,r){_isFunction(e)&&(r=t,t=e,e=_isFunction);var n=this,i=function(){var e,i=_context,o=n.selector;return i&&i!==n&&i.data.push(n),r&&(n.selector=selector(r)),_context=n,e=t.apply(n,arguments),_isFunction(e)&&n._r.push(e),_context=i,n.selector=o,n.isReverted=!1,e};return n.last=i,e===_isFunction?i(n,(function(e){return n.add(null,e)})):e?n[e]=i:i},t.ignore=function(e){var t=_context;_context=null,e(this),_context=t},t.getTweens=function(){var t=[];return this.data.forEach((function(r){return r instanceof e?t.push.apply(t,r.getTweens()):r instanceof Tween&&!(r.parent&&"nested"===r.parent.data)&&t.push(r)})),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var r=this;if(e?function(){for(var t,n=r.getTweens(),i=r.data.length;i--;)"isFlip"===(t=r.data[i]).data&&(t.revert(),t.getChildren(!0,!0,!1).forEach((function(e){return n.splice(n.indexOf(e),1)})));for(n.map((function(e){return{g:e._dur||e._delay||e._sat&&!e._sat.vars.immediateRender?e.globalTime(0):-1/0,t:e}})).sort((function(e,t){return t.g-e.g||-1/0})).forEach((function(t){return t.t.revert(e)})),i=r.data.length;i--;)(t=r.data[i])instanceof Timeline?"nested"!==t.data&&(t.scrollTrigger&&t.scrollTrigger.revert(),t.kill()):!(t instanceof Tween)&&t.revert&&t.revert(e);r._r.forEach((function(t){return t(e,r)})),r.isReverted=!0}():this.data.forEach((function(e){return e.kill&&e.kill()})),this.clear(),t)for(var n=_media.length;n--;)_media[n].id===this.id&&_media.splice(n,1)},t.revert=function(e){this.kill(e||{})},e}(),MatchMedia=function(){function e(e){this.contexts=[],this.scope=e,_context&&_context.data.push(this)}var t=e.prototype;return t.add=function(e,t,r){_isObject(e)||(e={matches:e});var n,i,o,a=new Context(0,r||this.scope),s=a.conditions={};for(i in _context&&!a.selector&&(a.selector=_context.selector),this.contexts.push(a),t=a.add("onMatch",t),a.queries=e,e)"all"===i?o=1:(n=_win$1.matchMedia(e[i]))&&(_media.indexOf(a)<0&&_media.push(a),(s[i]=n.matches)&&(o=1),n.addListener?n.addListener(_onMediaChange):n.addEventListener("change",_onMediaChange));return o&&t(a,(function(e){return a.add(null,e)})),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach((function(t){return t.kill(e,!0)}))},e}(),_gsap={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t.forEach((function(e){return _createPlugin(e)}))},timeline:function(e){return new Timeline(e)},getTweensOf:function(e,t){return _globalTimeline.getTweensOf(e,t)},getProperty:function(e,t,r,n){_isString(e)&&(e=toArray(e)[0]);var i=_getCache(e||{}).get,o=r?_passThrough:_numericIfPossible;return"native"===r&&(r=""),e?t?o((_plugins[t]&&_plugins[t].get||i)(e,t,r,n)):function(t,r,n){return o((_plugins[t]&&_plugins[t].get||i)(e,t,r,n))}:e},quickSetter:function(e,t,r){if((e=toArray(e)).length>1){var n=e.map((function(e){return gsap.quickSetter(e,t,r)})),i=n.length;return function(e){for(var t=i;t--;)n[t](e)}}e=e[0]||{};var o=_plugins[t],a=_getCache(e),s=a.harness&&(a.harness.aliases||{})[t]||t,l=o?function(t){var n=new o;_quickTween._pt=0,n.init(e,r?t+r:t,_quickTween,0,[e]),n.render(1,n),_quickTween._pt&&_renderPropTweens(1,_quickTween)}:a.set(e,s);return o?l:function(t){return l(e,s,r?t+r:t,a,1)}},quickTo:function(e,t,r){var n,i=gsap.to(e,_merge(((n={})[t]="+=0.1",n.paused=!0,n),r||{})),o=function(e,r,n){return i.resetTo(t,e,r,n)};return o.tween=i,o},isTweening:function(e){return _globalTimeline.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=_parseEase(e.ease,_defaults.ease)),_mergeDeep(_defaults,e||{})},config:function(e){return _mergeDeep(_config,e||{})},registerEffect:function(e){var t=e.name,r=e.effect,n=e.plugins,i=e.defaults,o=e.extendTimeline;(n||"").split(",").forEach((function(e){return e&&!_plugins[e]&&!_globals[e]&&_warn(t+" effect requires "+e+" plugin.")})),_effects[t]=function(e,t,n){return r(toArray(e),_setDefaults(t||{},i),n)},o&&(Timeline.prototype[t]=function(e,r,n){return this.add(_effects[t](e,_isObject(r)?r:(n=r)&&{},this),n)})},registerEase:function(e,t){_easeMap[e]=_parseEase(t)},parseEase:function(e,t){return arguments.length?_parseEase(e,t):_easeMap},getById:function(e){return _globalTimeline.getById(e)},exportRoot:function(e,t){void 0===e&&(e={});var r,n,i=new Timeline(e);for(i.smoothChildTiming=_isNotFalse(e.smoothChildTiming),_globalTimeline.remove(i),i._dp=0,i._time=i._tTime=_globalTimeline._time,r=_globalTimeline._first;r;)n=r._next,!t&&!r._dur&&r instanceof Tween&&r.vars.onComplete===r._targets[0]||_addToTimeline(i,r,r._start-r._delay),r=n;return _addToTimeline(_globalTimeline,i,0),i},context:function(e,t){return e?new Context(e,t):_context},matchMedia:function(e){return new MatchMedia(e)},matchMediaRefresh:function(){return _media.forEach((function(e){var t,r,n=e.conditions;for(r in n)n[r]&&(n[r]=!1,t=1);t&&e.revert()}))||_onMediaChange()},addEventListener:function(e,t){var r=_listeners[e]||(_listeners[e]=[]);~r.indexOf(t)||r.push(t)},removeEventListener:function(e,t){var r=_listeners[e],n=r&&r.indexOf(t);n>=0&&r.splice(n,1)},utils:{wrap:wrap,wrapYoyo:wrapYoyo,distribute:distribute,random:random,snap:snap,normalize:normalize,getUnit:getUnit,clamp:clamp,splitColor:splitColor,toArray:toArray,selector:selector,mapRange:mapRange,pipe:pipe,unitize:unitize,interpolate:interpolate,shuffle:shuffle},install:_install,effects:_effects,ticker:_ticker,updateRoot:Timeline.updateRoot,plugins:_plugins,globalTimeline:_globalTimeline,core:{PropTween:PropTween,globals:_addGlobal,Tween:Tween,Timeline:Timeline,Animation:Animation,getCache:_getCache,_removeLinkedListItem:_removeLinkedListItem,reverting:function(){return _reverting$1},context:function(e){return e&&_context&&(_context.data.push(e),e._ctx=_context),_context},suppressOverwrites:function(e){return _suppressOverwrites=e}}};_forEachName("to,from,fromTo,delayedCall,set,killTweensOf",(function(e){return _gsap[e]=Tween[e]})),_ticker.add(Timeline.updateRoot),_quickTween=_gsap.to({},{duration:0});var _getPluginPropTween=function(e,t){for(var r=e._pt;r&&r.p!==t&&r.op!==t&&r.fp!==t;)r=r._next;return r},_addModifiers=function(e,t){var r,n,i,o=e._targets;for(r in t)for(n=o.length;n--;)(i=e._ptLookup[n][r])&&(i=i.d)&&(i._pt&&(i=_getPluginPropTween(i,r)),i&&i.modifier&&i.modifier(t[r],e,o[n],r))},_buildModifierPlugin=function(e,t){return{name:e,rawVars:1,init:function(e,r,n){n._onInit=function(e){var n,i;if(_isString(r)&&(n={},_forEachName(r,(function(e){return n[e]=1})),r=n),t){for(i in n={},r)n[i]=t(r[i]);r=n}_addModifiers(e,r)}}}},gsap=_gsap.registerPlugin({name:"attr",init:function(e,t,r,n,i){var o,a,s;for(o in this.tween=r,t)s=e.getAttribute(o)||"",(a=this.add(e,"setAttribute",(s||0)+"",t[o],n,i,0,0,o)).op=o,a.b=s,this._props.push(o)},render:function(e,t){for(var r=t._pt;r;)_reverting$1?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",init:function(e,t){for(var r=t.length;r--;)this.add(e,r,e[r]||0,t[r],0,0,0,0,0,1)}},_buildModifierPlugin("roundProps",_roundModifier),_buildModifierPlugin("modifiers"),_buildModifierPlugin("snap",snap))||_gsap;Tween.version=Timeline.version=gsap.version="3.12.5",_coreReady=1,_windowExists$1()&&_wake(),_easeMap.Power0,_easeMap.Power1,_easeMap.Power2,_easeMap.Power3,_easeMap.Power4,_easeMap.Linear,_easeMap.Quad,_easeMap.Cubic,_easeMap.Quart,_easeMap.Quint,_easeMap.Strong,_easeMap.Elastic,_easeMap.Back,_easeMap.SteppedEase,_easeMap.Bounce,_easeMap.Sine,_easeMap.Expo,_easeMap.Circ;
|
|
54
54
|
/*!
|
|
55
55
|
* CSSPlugin 3.12.5
|
|
56
56
|
* https://gsap.com
|
|
@@ -60,5 +60,5 @@ function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,
|
|
|
60
60
|
* Club GSAP members, the agreement issued with that membership.
|
|
61
61
|
* @author: Jack Doyle, jack@greensock.com
|
|
62
62
|
*/
|
|
63
|
-
var _win,_doc,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists=function(){return"undefined"!=typeof window},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_renderPropWithEnd=function(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_renderCSSPropWithBeginning=function(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)},_renderRoundedCSSProp=function(e,t){var r=t.s+t.c*e;t.set(t.t,t.p,~~(r+(r<0?-.5:.5))+t.u,t)},_renderNonTweeningValue=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},_renderNonTweeningValueOnlyAtEnd=function(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)},_setterCSSStyle=function(e,t,r){return e.style[t]=r},_setterCSSProp=function(e,t,r){return e.style.setProperty(t,r)},_setterTransform=function(e,t,r){return e._gsap[t]=r},_setterScale=function(e,t,r){return e._gsap.scaleX=e._gsap.scaleY=r},_setterScaleWithRender=function(e,t,r,n,i){var o=e._gsap;o.scaleX=o.scaleY=r,o.renderTransform(i,o)},_setterTransformWithRender=function(e,t,r,n,i){var o=e._gsap;o[t]=r,o.renderTransform(i,o)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function e(t,r){var n=this,i=this.target,o=i.style,a=i._gsap;if(t in _transformProps&&o){if(this.tfm=this.tfm||{},"transform"===t)return _propertyAliases.transform.split(",").forEach((function(t){return e.call(n,t,r)}));if(~(t=_propertyAliases[t]||t).indexOf(",")?t.split(",").forEach((function(e){return n.tfm[e]=_get(i,e)})):this.tfm[t]=a.x?a[t]:_get(i,t),t===_transformOriginProp&&(this.tfm.zOrigin=a.zOrigin),this.props.indexOf(_transformProp)>=0)return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,r,"")),t=_transformProp}(o||r)&&this.props.push(t,r,o[t])},_removeIndependentTransforms=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},_revertStyle=function(){var e,t,r=this.props,n=this.target,i=n.style,o=n._gsap;for(e=0;e<r.length;e+=3)r[e+1]?n[r[e]]=r[e+2]:r[e+2]?i[r[e]]=r[e+2]:i.removeProperty("--"===r[e].substr(0,2)?r[e]:r[e].replace(_capsExp,"-$1").toLowerCase());if(this.tfm){for(t in this.tfm)o[t]=this.tfm[t];o.svg&&(o.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(e=_reverting())&&e.isStart||i[_transformProp]||(_removeIndependentTransforms(i),o.zOrigin&&i[_transformOriginProp]&&(i[_transformOriginProp]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},_getStyleSaver=function(e,t){var r={target:e,props:[],revert:_revertStyle,save:_saveStyle};return e._gsap||gsap.core.getCache(e),t&&t.split(",").forEach((function(e){return r.save(e)})),r},_supports3D,_createElement=function(e,t){var r=_doc.createElementNS?_doc.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):_doc.createElement(e);return r&&r.style?r:_doc.createElement(e)},_getComputedProperty=function e(t,r,n){var i=getComputedStyle(t);return i[r]||i.getPropertyValue(r.replace(_capsExp,"-$1").toLowerCase())||i.getPropertyValue(r)||!n&&e(t,_checkPropPrefix(r)||r,1)||""},_prefixes="O,Moz,ms,Ms,Webkit".split(","),_checkPropPrefix=function(e,t,r){var n=(t||_tempDiv).style,i=5;if(e in n&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(_prefixes[i]+e in n););return i<0?null:(3===i?"ms":i>=0?_prefixes[i]:"")+e},_initCore=function(){_windowExists()&&window.document&&(_win=window,_doc=_win.document,_docElement=_doc.documentElement,_tempDiv=_createElement("div")||{style:{}},_createElement("div"),_transformProp=_checkPropPrefix(_transformProp),_transformOriginProp=_transformProp+"Origin",_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_supports3D=!!_checkPropPrefix("perspective"),_reverting=gsap.core.reverting,_pluginInitted=1)},_getBBoxHack=function e(t){var r,n=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,a=this.style.cssText;if(_docElement.appendChild(n),n.appendChild(this),this.style.display="block",t)try{r=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=e}catch(e){}else this._gsapBBox&&(r=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),_docElement.removeChild(n),this.style.cssText=a,r},_getAttributeFallbacks=function(e,t){for(var r=t.length;r--;)if(e.hasAttribute(t[r]))return e.getAttribute(t[r])},_getBBox=function(e){var t;try{t=e.getBBox()}catch(r){t=_getBBoxHack.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===_getBBoxHack||(t=_getBBoxHack.call(e,!0)),!t||t.width||t.x||t.y?t:{x:+_getAttributeFallbacks(e,["x","cx","x1"])||0,y:+_getAttributeFallbacks(e,["y","cy","y1"])||0,width:0,height:0}},_isSVG=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!_getBBox(e))},_removeProperty=function(e,t){if(t){var r,n=e.style;t in _transformProps&&t!==_transformOriginProp&&(t=_transformProp),n.removeProperty?("ms"!==(r=t.substr(0,2))&&"webkit"!==t.substr(0,6)||(t="-"+t),n.removeProperty("--"===r?t:t.replace(_capsExp,"-$1").toLowerCase())):n.removeAttribute(t)}},_addNonTweeningPT=function(e,t,r,n,i,o){var a=new PropTween(e._pt,t,r,0,1,o?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return e._pt=a,a.b=n,a.e=i,e._props.push(r),a},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function e(t,r,n,i){var o,a,s,c,u=parseFloat(n)||0,l=(n+"").trim().substr((u+"").length)||"px",d=_tempDiv.style,h=_horizontalExp.test(r),f="svg"===t.tagName.toLowerCase(),p=(f?"client":"offset")+(h?"Width":"Height"),m=100,g="px"===i,v="%"===i;if(i===l||!u||_nonConvertibleUnits[i]||_nonConvertibleUnits[l])return u;if("px"!==l&&!g&&(u=e(t,r,n,"px")),c=t.getCTM&&_isSVG(t),(v||"%"===l)&&(_transformProps[r]||~r.indexOf("adius")))return o=c?t.getBBox()[h?"width":"height"]:t[p],_round(v?u/o*m:u/100*o);if(d[h?"width":"height"]=m+(g?l:i),a=~r.indexOf("adius")||"em"===i&&t.appendChild&&!f?t:t.parentNode,c&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==_doc&&a.appendChild||(a=_doc.body),(s=a._gsap)&&v&&s.width&&h&&s.time===_ticker.time&&!s.uncache)return _round(u/s.width*m);if(!v||"height"!==r&&"width"!==r)(v||"%"===l)&&!_nonStandardLayouts[_getComputedProperty(a,"display")]&&(d.position=_getComputedProperty(t,"position")),a===t&&(d.position="static"),a.appendChild(_tempDiv),o=_tempDiv[p],a.removeChild(_tempDiv),d.position="absolute";else{var y=t.style[r];t.style[r]=m+i,o=t[p],y?t.style[r]=y:_removeProperty(t,r)}return h&&v&&((s=_getCache(a)).time=_ticker.time,s.width=a[p]),_round(g?o*u/m:o&&u?m/o*u:0)},_get=function(e,t,r,n){var i;return _pluginInitted||_initCore(),t in _propertyAliases&&"transform"!==t&&~(t=_propertyAliases[t]).indexOf(",")&&(t=t.split(",")[0]),_transformProps[t]&&"transform"!==t?(i=_parseTransform(e,n),i="transformOrigin"!==t?i[t]:i.svg?i.origin:_firstTwoOnly(_getComputedProperty(e,_transformOriginProp))+" "+i.zOrigin+"px"):(!(i=e.style[t])||"auto"===i||n||~(i+"").indexOf("calc("))&&(i=_specialProps[t]&&_specialProps[t](e,t,r)||_getComputedProperty(e,t)||_getProperty(e,t)||("opacity"===t?1:0)),r&&!~(i+"").trim().indexOf(" ")?_convertToUnit(e,t,i,r)+r:i},_tweenComplexCSSString=function(e,t,r,n){if(!r||"none"===r){var i=_checkPropPrefix(t,e,1),o=i&&_getComputedProperty(e,i,1);o&&o!==r?(t=i,r=o):"borderColor"===t&&(r=_getComputedProperty(e,"borderTopColor"))}var a,s,c,u,l,d,h,f,p,m,g,v=new PropTween(this._pt,e.style,t,0,1,_renderComplexString),y=0,_=0;if(v.b=r,v.e=n,r+="","auto"===(n+="")&&(d=e.style[t],e.style[t]=n,n=_getComputedProperty(e,t)||n,d?e.style[t]=d:_removeProperty(e,t)),_colorStringFilter(a=[r,n]),n=a[1],c=(r=a[0]).match(_numWithUnitExp)||[],(n.match(_numWithUnitExp)||[]).length){for(;s=_numWithUnitExp.exec(n);)h=s[0],p=n.substring(y,s.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),h!==(d=c[_++]||"")&&(u=parseFloat(d)||0,g=d.substr((u+"").length),"="===h.charAt(1)&&(h=_parseRelative(u,h)+g),f=parseFloat(h),m=h.substr((f+"").length),y=_numWithUnitExp.lastIndex-m.length,m||(m=m||_config.units[t]||g,y===n.length&&(n+=m,v.e+=m)),g!==m&&(u=_convertToUnit(e,t,d,m)||0),v._pt={_next:v._pt,p:p||1===_?p:",",s:u,c:f-u,m:l&&l<4||"zIndex"===t?Math.round:0});v.c=y<n.length?n.substring(y,n.length):""}else v.r="display"===t&&"none"===n?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue;return _relExp.test(n)&&(v.e=0),this._pt=v,v},_keywordToPercent={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_convertKeywordsToPercentages=function(e){var t=e.split(" "),r=t[0],n=t[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==n&&"right"!==n||(e=r,r=n,n=e),t[0]=_keywordToPercent[r]||r,t[1]=_keywordToPercent[n]||n,t.join(" ")},_renderClearProps=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var r,n,i,o=t.t,a=o.style,s=t.u,c=o._gsap;if("all"===s||!0===s)a.cssText="",n=1;else for(i=(s=s.split(",")).length;--i>-1;)r=s[i],_transformProps[r]&&(n=1,r="transformOrigin"===r?_transformOriginProp:_transformProp),_removeProperty(o,r);n&&(_removeProperty(o,_transformProp),c&&(c.svg&&o.removeAttribute("transform"),_parseTransform(o,1),c.uncache=1,_removeIndependentTransforms(a)))}},_specialProps={clearProps:function(e,t,r,n,i){if("isFromStart"!==i.data){var o=e._pt=new PropTween(e._pt,t,r,0,0,_renderClearProps);return o.u=n,o.pr=-10,o.tween=i,e._props.push(r),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},_getComputedTransformMatrixAsArray=function(e){var t=_getComputedProperty(e,_transformProp);return _isNullTransform(t)?_identity2DMatrix:t.substr(7).match(_numExp).map(_round)},_getMatrix=function(e,t){var r,n,i,o,a=e._gsap||_getCache(e),s=e.style,c=_getComputedTransformMatrixAsArray(e);return a.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(c=[(i=e.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?_identity2DMatrix:c:(c!==_identity2DMatrix||e.offsetParent||e===_docElement||a.svg||(i=s.display,s.display="block",(r=e.parentNode)&&e.offsetParent||(o=1,n=e.nextElementSibling,_docElement.appendChild(e)),c=_getComputedTransformMatrixAsArray(e),i?s.display=i:_removeProperty(e,"display"),o&&(n?r.insertBefore(e,n):r?r.appendChild(e):_docElement.removeChild(e))),t&&c.length>6?[c[0],c[1],c[4],c[5],c[12],c[13]]:c)},_applySVGOrigin=function(e,t,r,n,i,o){var a,s,c,u=e._gsap,l=i||_getMatrix(e,!0),d=u.xOrigin||0,h=u.yOrigin||0,f=u.xOffset||0,p=u.yOffset||0,m=l[0],g=l[1],v=l[2],y=l[3],_=l[4],b=l[5],w=t.split(" "),D=parseFloat(w[0])||0,S=parseFloat(w[1])||0;r?l!==_identity2DMatrix&&(s=m*y-g*v)&&(c=D*(-g/s)+S*(m/s)-(m*b-g*_)/s,D=D*(y/s)+S*(-v/s)+(v*b-y*_)/s,S=c):(D=(a=_getBBox(e)).x+(~w[0].indexOf("%")?D/100*a.width:D),S=a.y+(~(w[1]||w[0]).indexOf("%")?S/100*a.height:S)),n||!1!==n&&u.smooth?(_=D-d,b=S-h,u.xOffset=f+(_*m+b*v)-_,u.yOffset=p+(_*g+b*y)-b):u.xOffset=u.yOffset=0,u.xOrigin=D,u.yOrigin=S,u.smooth=!!n,u.origin=t,u.originIsAbsolute=!!r,e.style[_transformOriginProp]="0px 0px",o&&(_addNonTweeningPT(o,u,"xOrigin",d,D),_addNonTweeningPT(o,u,"yOrigin",h,S),_addNonTweeningPT(o,u,"xOffset",f,u.xOffset),_addNonTweeningPT(o,u,"yOffset",p,u.yOffset)),e.setAttribute("data-svg-origin",D+" "+S)},_parseTransform=function(e,t){var r=e._gsap||new GSCache(e);if("x"in r&&!t&&!r.uncache)return r;var n,i,o,a,s,c,u,l,d,h,f,p,m,g,v,y,_,b,w,D,S,x,T,k,P,E,A,C,O,R,M,I,N=e.style,B=r.scaleX<0,F="px",j="deg",V=getComputedStyle(e),$=_getComputedProperty(e,_transformOriginProp)||"0";return n=i=o=c=u=l=d=h=f=0,a=s=1,r.svg=!(!e.getCTM||!_isSVG(e)),V.translate&&("none"===V.translate&&"none"===V.scale&&"none"===V.rotate||(N[_transformProp]=("none"!==V.translate?"translate3d("+(V.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==V.rotate?"rotate("+V.rotate+") ":"")+("none"!==V.scale?"scale("+V.scale.split(" ").join(",")+") ":"")+("none"!==V[_transformProp]?V[_transformProp]:"")),N.scale=N.rotate=N.translate="none"),g=_getMatrix(e,r.svg),r.svg&&(r.uncache?(P=e.getBBox(),$=r.xOrigin-P.x+"px "+(r.yOrigin-P.y)+"px",k=""):k=!t&&e.getAttribute("data-svg-origin"),_applySVGOrigin(e,k||$,!!k||r.originIsAbsolute,!1!==r.smooth,g)),p=r.xOrigin||0,m=r.yOrigin||0,g!==_identity2DMatrix&&(b=g[0],w=g[1],D=g[2],S=g[3],n=x=g[4],i=T=g[5],6===g.length?(a=Math.sqrt(b*b+w*w),s=Math.sqrt(S*S+D*D),c=b||w?_atan2(w,b)*_RAD2DEG:0,(d=D||S?_atan2(D,S)*_RAD2DEG+c:0)&&(s*=Math.abs(Math.cos(d*_DEG2RAD))),r.svg&&(n-=p-(p*b+m*D),i-=m-(p*w+m*S))):(I=g[6],R=g[7],A=g[8],C=g[9],O=g[10],M=g[11],n=g[12],i=g[13],o=g[14],u=(v=_atan2(I,O))*_RAD2DEG,v&&(k=x*(y=Math.cos(-v))+A*(_=Math.sin(-v)),P=T*y+C*_,E=I*y+O*_,A=x*-_+A*y,C=T*-_+C*y,O=I*-_+O*y,M=R*-_+M*y,x=k,T=P,I=E),l=(v=_atan2(-D,O))*_RAD2DEG,v&&(y=Math.cos(-v),M=S*(_=Math.sin(-v))+M*y,b=k=b*y-A*_,w=P=w*y-C*_,D=E=D*y-O*_),c=(v=_atan2(w,b))*_RAD2DEG,v&&(k=b*(y=Math.cos(v))+w*(_=Math.sin(v)),P=x*y+T*_,w=w*y-b*_,T=T*y-x*_,b=k,x=P),u&&Math.abs(u)+Math.abs(c)>359.9&&(u=c=0,l=180-l),a=_round(Math.sqrt(b*b+w*w+D*D)),s=_round(Math.sqrt(T*T+I*I)),v=_atan2(x,T),d=Math.abs(v)>2e-4?v*_RAD2DEG:0,f=M?1/(M<0?-M:M):0),r.svg&&(k=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(e,_transformProp)),k&&e.setAttribute("transform",k))),Math.abs(d)>90&&Math.abs(d)<270&&(B?(a*=-1,d+=c<=0?180:-180,c+=c<=0?180:-180):(s*=-1,d+=d<=0?180:-180)),t=t||r.uncache,r.x=n-((r.xPercent=n&&(!t&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-n)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+F,r.y=i-((r.yPercent=i&&(!t&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-i)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+F,r.z=o+F,r.scaleX=_round(a),r.scaleY=_round(s),r.rotation=_round(c)+j,r.rotationX=_round(u)+j,r.rotationY=_round(l)+j,r.skewX=d+j,r.skewY=h+j,r.transformPerspective=f+F,(r.zOrigin=parseFloat($.split(" ")[2])||!t&&r.zOrigin||0)&&(N[_transformOriginProp]=_firstTwoOnly($)),r.xOffset=r.yOffset=0,r.force3D=_config.force3D,r.renderTransform=r.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,r.uncache=0,r},_firstTwoOnly=function(e){return(e=e.split(" "))[0]+" "+e[1]},_addPxTranslate=function(e,t,r){var n=getUnit(t);return _round(parseFloat(t)+parseFloat(_convertToUnit(e,"x",r+"px",n)))+n},_renderNon3DTransforms=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,_renderCSSTransforms(e,t)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function(e,t){var r=t||this,n=r.xPercent,i=r.yPercent,o=r.x,a=r.y,s=r.z,c=r.rotation,u=r.rotationY,l=r.rotationX,d=r.skewX,h=r.skewY,f=r.scaleX,p=r.scaleY,m=r.transformPerspective,g=r.force3D,v=r.target,y=r.zOrigin,_="",b="auto"===g&&e&&1!==e||!0===g;if(y&&(l!==_zeroDeg||u!==_zeroDeg)){var w,D=parseFloat(u)*_DEG2RAD,S=Math.sin(D),x=Math.cos(D);D=parseFloat(l)*_DEG2RAD,w=Math.cos(D),o=_addPxTranslate(v,o,S*w*-y),a=_addPxTranslate(v,a,-Math.sin(D)*-y),s=_addPxTranslate(v,s,x*w*-y+y)}m!==_zeroPx&&(_+="perspective("+m+_endParenthesis),(n||i)&&(_+="translate("+n+"%, "+i+"%) "),(b||o!==_zeroPx||a!==_zeroPx||s!==_zeroPx)&&(_+=s!==_zeroPx||b?"translate3d("+o+", "+a+", "+s+") ":"translate("+o+", "+a+_endParenthesis),c!==_zeroDeg&&(_+="rotate("+c+_endParenthesis),u!==_zeroDeg&&(_+="rotateY("+u+_endParenthesis),l!==_zeroDeg&&(_+="rotateX("+l+_endParenthesis),d===_zeroDeg&&h===_zeroDeg||(_+="skew("+d+", "+h+_endParenthesis),1===f&&1===p||(_+="scale("+f+", "+p+_endParenthesis),v.style[_transformProp]=_||"translate(0, 0)"},_renderSVGTransforms=function(e,t){var r,n,i,o,a,s=t||this,c=s.xPercent,u=s.yPercent,l=s.x,d=s.y,h=s.rotation,f=s.skewX,p=s.skewY,m=s.scaleX,g=s.scaleY,v=s.target,y=s.xOrigin,_=s.yOrigin,b=s.xOffset,w=s.yOffset,D=s.forceCSS,S=parseFloat(l),x=parseFloat(d);h=parseFloat(h),f=parseFloat(f),(p=parseFloat(p))&&(f+=p=parseFloat(p),h+=p),h||f?(h*=_DEG2RAD,f*=_DEG2RAD,r=Math.cos(h)*m,n=Math.sin(h)*m,i=Math.sin(h-f)*-g,o=Math.cos(h-f)*g,f&&(p*=_DEG2RAD,a=Math.tan(f-p),i*=a=Math.sqrt(1+a*a),o*=a,p&&(a=Math.tan(p),r*=a=Math.sqrt(1+a*a),n*=a)),r=_round(r),n=_round(n),i=_round(i),o=_round(o)):(r=m,o=g,n=i=0),(S&&!~(l+"").indexOf("px")||x&&!~(d+"").indexOf("px"))&&(S=_convertToUnit(v,"x",l,"px"),x=_convertToUnit(v,"y",d,"px")),(y||_||b||w)&&(S=_round(S+y-(y*r+_*i)+b),x=_round(x+_-(y*n+_*o)+w)),(c||u)&&(a=v.getBBox(),S=_round(S+c/100*a.width),x=_round(x+u/100*a.height)),a="matrix("+r+","+n+","+i+","+o+","+S+","+x+")",v.setAttribute("transform",a),D&&(v.style[_transformProp]=a)},_addRotationalPropTween=function(e,t,r,n,i){var o,a,s=360,c=_isString(i),u=parseFloat(i)*(c&&~i.indexOf("rad")?_RAD2DEG:1)-n,l=n+u+"deg";return c&&("short"===(o=i.split("_")[1])&&(u%=s)!==u%180&&(u+=u<0?s:-360),"cw"===o&&u<0?u=(u+s*_bigNum)%s-~~(u/s)*s:"ccw"===o&&u>0&&(u=(u-s*_bigNum)%s-~~(u/s)*s)),e._pt=a=new PropTween(e._pt,t,r,n,u,_renderPropWithEnd),a.e=l,a.u="deg",e._props.push(r),a},_assign=function(e,t){for(var r in t)e[r]=t[r];return e},_addRawTransformPTs=function(e,t,r){var n,i,o,a,s,c,u,l=_assign({},r._gsap),d=r.style;for(i in l.svg?(o=r.getAttribute("transform"),r.setAttribute("transform",""),d[_transformProp]=t,n=_parseTransform(r,1),_removeProperty(r,_transformProp),r.setAttribute("transform",o)):(o=getComputedStyle(r)[_transformProp],d[_transformProp]=t,n=_parseTransform(r,1),d[_transformProp]=o),_transformProps)(o=l[i])!==(a=n[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(s=getUnit(o)!==(u=getUnit(a))?_convertToUnit(r,i,o,u):parseFloat(o),c=parseFloat(a),e._pt=new PropTween(e._pt,n,i,s,c-s,_renderCSSProp),e._pt.u=u||0,e._props.push(i));_assign(n,l)};_forEachName("padding,margin,Width,Radius",(function(e,t){var r="Top",n="Right",i="Bottom",o="Left",a=(t<3?[r,n,i,o]:[r+o,r+n,i+n,i+o]).map((function(r){return t<2?e+r:"border"+r+e}));_specialProps[t>1?"border"+e:e]=function(e,t,r,n,i){var o,s;if(arguments.length<4)return o=a.map((function(t){return _get(e,t,r)})),5===(s=o.join(" ")).split(o[0]).length?o[0]:s;o=(n+"").split(" "),s={},a.forEach((function(e,t){return s[e]=o[t]=o[t]||o[(t-1)/2|0]})),e.init(t,s,i)}}));var CSSPlugin={name:"css",register:_initCore,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,r,n,i){var o,a,s,c,u,l,d,h,f,p,m,g,v,y,_,b,w=this._props,D=e.style,S=r.vars.startAt;for(d in _pluginInitted||_initCore(),this.styles=this.styles||_getStyleSaver(e),b=this.styles.props,this.tween=r,t)if("autoRound"!==d&&(a=t[d],!_plugins[d]||!_checkPlugin(d,t,r,n,e,i)))if(u=typeof a,l=_specialProps[d],"function"===u&&(u=typeof(a=a.call(r,n,e,i))),"string"===u&&~a.indexOf("random(")&&(a=_replaceRandom(a)),l)l(this,e,d,a,r)&&(_=1);else if("--"===d.substr(0,2))o=(getComputedStyle(e).getPropertyValue(d)+"").trim(),a+="",_colorExp.lastIndex=0,_colorExp.test(o)||(h=getUnit(o),f=getUnit(a)),f?h!==f&&(o=_convertToUnit(e,d,o,f)+f):h&&(a+=h),this.add(D,"setProperty",o,a,n,i,0,0,d),w.push(d),b.push(d,0,D[d]);else if("undefined"!==u){if(S&&d in S?(o="function"==typeof S[d]?S[d].call(r,n,e,i):S[d],_isString(o)&&~o.indexOf("random(")&&(o=_replaceRandom(o)),getUnit(o+"")||"auto"===o||(o+=_config.units[d]||getUnit(_get(e,d))||""),"="===(o+"").charAt(1)&&(o=_get(e,d))):o=_get(e,d),c=parseFloat(o),(p="string"===u&&"="===a.charAt(1)&&a.substr(0,2))&&(a=a.substr(2)),s=parseFloat(a),d in _propertyAliases&&("autoAlpha"===d&&(1===c&&"hidden"===_get(e,"visibility")&&s&&(c=0),b.push("visibility",0,D.visibility),_addNonTweeningPT(this,D,"visibility",c?"inherit":"hidden",s?"inherit":"hidden",!s)),"scale"!==d&&"transform"!==d&&~(d=_propertyAliases[d]).indexOf(",")&&(d=d.split(",")[0])),m=d in _transformProps)if(this.styles.save(d),g||((v=e._gsap).renderTransform&&!t.parseTransform||_parseTransform(e,t.parseTransform),y=!1!==t.smoothOrigin&&v.smooth,(g=this._pt=new PropTween(this._pt,D,_transformProp,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===d)this._pt=new PropTween(this._pt,v,"scaleY",v.scaleY,(p?_parseRelative(v.scaleY,p+s):s)-v.scaleY||0,_renderCSSProp),this._pt.u=0,w.push("scaleY",d),d+="X";else{if("transformOrigin"===d){b.push(_transformOriginProp,0,D[_transformOriginProp]),a=_convertKeywordsToPercentages(a),v.svg?_applySVGOrigin(e,a,0,y,0,this):((f=parseFloat(a.split(" ")[2])||0)!==v.zOrigin&&_addNonTweeningPT(this,v,"zOrigin",v.zOrigin,f),_addNonTweeningPT(this,D,d,_firstTwoOnly(o),_firstTwoOnly(a)));continue}if("svgOrigin"===d){_applySVGOrigin(e,a,1,y,0,this);continue}if(d in _rotationalProperties){_addRotationalPropTween(this,v,d,c,p?_parseRelative(c,p+a):a);continue}if("smoothOrigin"===d){_addNonTweeningPT(this,v,"smooth",v.smooth,a);continue}if("force3D"===d){v[d]=a;continue}if("transform"===d){_addRawTransformPTs(this,a,e);continue}}else d in D||(d=_checkPropPrefix(d)||d);if(m||(s||0===s)&&(c||0===c)&&!_complexExp.test(a)&&d in D)s||(s=0),(h=(o+"").substr((c+"").length))!==(f=getUnit(a)||(d in _config.units?_config.units[d]:h))&&(c=_convertToUnit(e,d,o,f)),this._pt=new PropTween(this._pt,m?v:D,d,c,(p?_parseRelative(c,p+s):s)-c,m||"px"!==f&&"zIndex"!==d||!1===t.autoRound?_renderCSSProp:_renderRoundedCSSProp),this._pt.u=f||0,h!==f&&"%"!==f&&(this._pt.b=o,this._pt.r=_renderCSSPropWithBeginning);else if(d in D)_tweenComplexCSSString.call(this,e,d,o,p?p+a:a);else if(d in e)this.add(e,d,o||e[d],p?p+a:a,n,i);else if("parseTransform"!==d){_missingPlugin(d,a);continue}m||(d in D?b.push(d,0,D[d]):b.push(d,1,o||e[d])),w.push(d)}_&&_sortPropTweensByPriority(this)},render:function(e,t){if(t.tween._time||!_reverting())for(var r=t._pt;r;)r.r(e,r.d),r=r._next;else t.styles.revert()},get:_get,aliases:_propertyAliases,getSetter:function(e,t,r){var n=_propertyAliases[t];return n&&n.indexOf(",")<0&&(t=n),t in _transformProps&&t!==_transformOriginProp&&(e._gsap.x||_get(e,"x"))?r&&_recentSetterPlugin===r?"scale"===t?_setterScale:_setterTransform:(_recentSetterPlugin=r||{})&&("scale"===t?_setterScaleWithRender:_setterTransformWithRender):e.style&&!_isUndefined(e.style[t])?_setterCSSStyle:~t.indexOf("-")?_setterCSSProp:_getSetter(e,t)},core:{_removeProperty:_removeProperty,_getMatrix:_getMatrix}},positionAndScale,rotation,all;gsap.utils.checkPrefix=_checkPropPrefix,gsap.core.getStyleSaver=_getStyleSaver,positionAndScale="x,y,z,scale,scaleX,scaleY,xPercent,yPercent",rotation="rotation,rotationX,rotationY,skewX,skewY",all=_forEachName(positionAndScale+","+rotation+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(e){_transformProps[e]=1})),_forEachName(rotation,(function(e){_config.units[e]="deg",_rotationalProperties[e]=1})),_propertyAliases[all[13]]=positionAndScale+","+rotation,_forEachName("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(e){var t=e.split(":");_propertyAliases[t[1]]=all[t[0]]})),_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(e){_config.units[e]="px"})),gsap.registerPlugin(CSSPlugin);var gsapWithCSS=gsap.registerPlugin(CSSPlugin)||gsap;gsapWithCSS.core.Tween;var GoAnimation=function(){function e(){this.startPoisiton={x:0,y:0},this.endPoisiton={x:1920,y:0},this.curtain={width:1920,height:1080},this.totalTime=5,this.timeLine=gsapWithCSS.timeline()}return e.getInstance=function(){return this.instance||(this.instance=new e),this.instance},e.prototype.init=function(e,t){var r;null===(r=this.timeLine)||void 0===r||r.clear();var n=t.curtain,i=t.totalTime,o=t.admissionMode;i&&(this.totalTime=i),this.setEndPoisiton(n);var a=this.filterData(e,o);this.goAnimationParams=t;for(var s=0;s<a.length;s++){var c=a[s];if(c instanceof Array)for(var u=0;u<c.length;u++){var l=this.totalTime/c.length,d=c[u],h=this._creatTl("#wrap"+d.cid);this._add(h,u*l)}else{l=this.totalTime/a.length,h=this._creatTl("#wrap"+c.cid);this._add(h,s*l)}}return this.timeLine},e.prototype.filterData=function(e,t){var r;if("left"==t)r=_$1.orderBy(e,["baseData.left"],["asc"]);else if("top"==t)r=_$1.orderBy(e,["baseData.top"],["asc"]);else if("topLeft"==t){var n=this.setSpacing(e,"left");r=_$1.orderBy(n,["spacing"],["asc"])}else if("topRight"==t){var i=this.setSpacing(e,"right");r=_$1.orderBy(i,["spacing"],["asc"])}else if("center"==t){var o=this.splitArrayForCenter(e,"left");r=[_$1.orderBy(o.true,["center.x"],["asc"]),_$1.orderBy(o.false,["center.x"],["desc"])]}else if("spaceBetween"==t){o=this.splitArrayForCenter(e,"left");r=[_$1.orderBy(o.true,["center.x"],["desc"]),_$1.orderBy(o.false,["center.x"],["asc"])]}else r=_$1.orderBy(e,["baseData.left"],["asc"]);return r},e.prototype.getSpacing=function(e,t){var r=e.x,n=e.y,i=t.x,o=t.y,a=Math.abs(r-i),s=Math.abs(n-o);return Math.sqrt(a*a+s*s)},e.prototype.creatPosition=function(e,t){var r=0,n=0;return e?("left"===t?(r=e.left,n=e.top):"right"===t&&(r=e.left+e.width,n=e.top),{x:r,y:n}):{x:r,y:n}},e.prototype.setEndPoisiton=function(e){if(e){var t=e.width,r=e.height;this.curtain=e,this.endPoisiton.x=t,this.endPoisiton.y=r}},e.prototype.setSpacing=function(e,t){var r,n=this;return"left"===t?r=this.startPoisiton:"right"===t&&(r=this.endPoisiton),e.forEach((function(e){var i=e.baseData;if(i){var o=n.creatPosition(i,t),a=n.getSpacing(o,r);e.spacing=a}})),e},e.prototype.setCenter=function(e){return e.forEach((function(e){if(e.baseData){var t=e.baseData.left+e.baseData.width/2,r=e.baseData.top+e.baseData.height/2;e.center={x:t,y:r}}})),e},e.prototype.splitArrayForCenter=function(e,t){var r,n=this,i=this.setCenter(e);return"left"!=t&&"right"!=t||(r=_$1.groupBy(i,(function(e){return e.center.x>=n.curtain.width/2}))),"top"!=t&&"bottom"!=t||(r=_$1.groupBy(i,(function(e){return e.center.y>=n.curtain.height/2}))),r},e.prototype._add=function(e,t){this.timeLine.add(e,t)},e.prototype._creatTl=function(e){var t=gsapWithCSS.timeline();return t.add(this._creatTw(e)),t},e.prototype._creatTw=function(e){var t=this.goAnimationParams.params,r=t.delay,n=t.duration,i=t.repeat,o=t.type,a=t.value;return a&&a.length&&a.forEach((function(e){e.delay=r||0,e.repeat=i||0})),gsapWithCSS[o](e,n,a[0],a[1])},e.prototype.in=function(){},e.prototype.out=function(){},e}(),index=GoAnimation.getInstance(),findItemDeep=function(e,t,r){var n=!1,i=function(e){for(var o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(function(e){return e.cid==t}));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){for(var a=Array.from(e[o].dynamicChildren),s=0;s<a.length;s++)if(a[s]instanceof Array){var c=a[s][1];i(c)}}else if(e[o].dynamicChildren instanceof Array)for(a=e[o].dynamicChildren,s=0;s<a.length;s++)if(a[s]instanceof Array){c=a[s][1];i(c)}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1};function mitt(e,t){return e=e||new Map,__assign$1(__assign$1({},t),{EventType:e,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);if(n){var i=n.slice().map((function(e){return e(r)}));if(i&&1==i.length)return i[0]}(n=e.get("*"))&&n.slice().map((function(e){e(t,r)}))}})}var RuntimeServer=function(){function e(e){this.root=null,this.vuex=Go.getInstance().VueServer,this.eventType=new Map,(null==e?void 0:e.root)&&(this.root=e.root);var t={setGlobalVar:this.setGlobalVar.bind(this),showComponent:this._showComponent.bind(this),hideComponent:this._hideComponent.bind(this),pageChange:this.pageChange.bind(this),changeDynamicState:this.changeDynamicState.bind(this)};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.eventType.set(r,[t[r]])}return e.prototype.findComponentDownward=function(e,t){var r=e.$children;if(r.length)for(var n=0,i=r;n<i.length;n++){var o=i[n];o.$options&&o.$options.propsData&&o.$options.propsData.cid&&(t[o.$options.propsData.cid]=o),o.$children&&o.$children.length&&this.findComponentDownward(o,t)}return t},e.prototype.getAllComponents=function(){var e={};return this.findComponentDownward(this.root,e),e},e.prototype.getComponentByCid=function(e){try{var t=this.getAllComponents()[e];if(!t)throw new Error("The instance was not found");return t}catch(e){console.warn(e)}},e.prototype.getElementByCid=function(e){try{if(!e)throw new Error("Please input the parameters correctly");var t=this.getComponentByCid(e);if(!t)throw new Error("The element was not found");return t.$el}catch(e){console.warn(e)}},e.prototype.setGlobalVar=function(e){try{var t=e.key,r=e.value;if(!(e&&t&&r))throw new Error("An error occurred. Please check whether the incoming parameters are correct! The correct format of data is an object containing key and value");this.setVars(e)}catch(e){console.warn(e)}},e.prototype._showComponent=function(e){try{if(!e)throw new Error("Please input the parameters correctly");this.changeVis({cid:e,flag:!0})}catch(e){console.warn(e)}},e.prototype._hideComponent=function(e){try{if(!e)throw new Error("Please input the parameters correctly");this.changeVis({cid:e,flag:!1})}catch(e){console.warn(e)}},e.prototype.getList=function(e){return e&&"id"===e?this.vuex.callState("list").map((function(e){return e.cid})):this.vuex.callState("list")},e.prototype.getTheme=function(e){var t=this.vuex.callState("theme");return e&&e(t),t},e.prototype.getElement=function(e){var t=this.vuex.callState("list");return findItemDeep(t,e)},e.prototype.changeVis=function(e){return this.vuex.callMutation("changeShow",e)},e.prototype.comToggle=function(e){return this.vuex.callMutation("comToggle",e)},e.prototype.getPageInfo=function(e){var t=this.vuex.callState("caseInfo");return e&&e(t),(null==t?void 0:t.details)?t.details.map((function(e){return{name:e.caseDetailName,path:e.caseDetailPath,id:e.id}})):t},e.prototype.updateComp=function(e){return this.vuex.callMutation("updatComs",e)},e.prototype.changeDynamicState=function(e){return this.vuex.callMutation("changeDynamicState",e)},e.prototype.pageChange=function(e){return this.vuex.callMutation("setPageId",e)},e.prototype.pagePush=function(e,t,r){return void 0===r&&(r={}),this.vuex.callMutation("pagePush",{type:e,value:t,option:r})},e.prototype.activeState=function(e,t){return this.vuex.callMutation("setDynamicActive",{cid:e,name:t})},e.prototype.getVars=function(e){var t=ve.getAllVariables();return e&&e(t),t},e.prototype.setVars=function(e){var t=ve.getVariable(e.key);if(2!=(null==t?void 0:t.model))return this.vuex.callAction("goEditVar",e);console.warn("系统变量禁止修改!")},e}(),Run=function(e){function t(t){var r=e.call(this,t)||this,n=mitt(r.eventType);return r.$emit=n.emit,r.$on=n.on,r.$off=n.off,r}return __extends$2(t,e),Object.defineProperty(t.prototype,"Theme",{get:function(){return this.getTheme()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Components",{get:function(){return this.getAllComponents()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"GlobalVars",{get:function(){return this.getVars()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Pages",{get:function(){return this.getPageInfo()},enumerable:!1,configurable:!0}),t.prototype.getElementById=function(e){this.getElementByCid(e)},t.prototype.getComponentById=function(e){this.getComponentByCid(e)},t.prototype.getPage=function(){},t}(RuntimeServer),G=function(){function e(e){this.$action=new GoEvent(e),this.instance=new Run(e)}return e.prototype.getGlobalvars=function(){for(var e=ve.getAllVariables(),t=e.map((function(e){return e.mapField})),r={},n=function(t){var n=e.find((function(e){return e.mapField==t}));n&&(r[t]=n.value)},i=0,o=t;i<o.length;i++){n(o[i])}var a=this.instance;return new Proxy(r,{has:function(e,t){return!t&&t in e},get:function(e,t){if(t in e)return e[t];throw new ReferenceError('Prop name "'+t+'" does not exist.')},set:function(e,t,r){if(!e[t])return console.log("变量不存在/不能被修改"),!1;if(e[t]=r,!t||"string"!=typeof t)throw new Error("Invalid key");a.setGlobalVar({key:t,value:r})}})},Object.defineProperty(e.prototype,"globalvars",{get:function(){return this.getGlobalvars()},enumerable:!1,configurable:!0}),e}(),GoEvent=function(e){var t=this;this.setGlobalVars=function(e,r){if(!e||"string"!=typeof e)throw new Error("Invalid key");t.instance.setGlobalVar({key:e,value:r})},this.skipTo=function(e){var r=null==e?void 0:e.params;if(!e||0===Object.keys(e).length)throw new Error("事件跳转发生错误:参数:".concat(e," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));if(e.name)t.instance.pagePush("name",e.name,r);else if(e.path)t.instance.pagePush("path",e.path,r);else{if(!e.url)throw new Error("事件跳转发生错误:参数:".concat(e," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));window.open(e.url)}},this.toggle=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e)if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance.comToggle(i):console.warn("请传入正确的参数!")}else console.warn("请传入正确的参数!");else t.instance.comToggle(e);else console.warn("请传入正确的参数!")},this.show=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance._showComponent(i.toString()):console.warn("请传入正确的参数!")}}else t.instance._showComponent(e.toString());else console.warn("请传入正确的参数!")},this.hide=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance._hideComponent(i):console.warn("请传入正确的参数!")}}else t.instance._hideComponent(e);else console.warn("请传入正确的参数!")},this.activeState=function(e,r){t.instance.activeState(e,r)},this.updateComp=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance.updateComp(i):console.warn("请传入正确的参数!")}}else t.instance.updateComp(e);else console.warn("请传入正确的参数!")},this.instance=new Run(e)},run=function(e){return new G(e)},getDataForRelease=function(e,t){console.log("弃用")},createComponent=function(e,t){return t&&e?Go.getInstance().render(e,t):e?Go.getInstance().render(e):void 0},createComponentForParent=function(e,t,r){return void 0!==r&&e?Go.getInstance().renderForParent(e,t,r):e?Go.getInstance().renderForParent(e,t):void 0},emitEvent=function(e,t){return Go.getInstance().emitEvent(e,t||function(){})},log=function(){};exports.Go=Go,exports.GoAnimation=index,exports.Tool=index$1,exports.createComponent=createComponent,exports.createComponentForParent=createComponentForParent,exports.emitEvent=emitEvent,exports.fxhr=index$2,exports.getDataForRelease=getDataForRelease,exports.goUtils=index$3,exports.log=log,exports.refreshData=refreshData,exports.run=run,exports.store=store}));
|
|
63
|
+
var _win,_doc,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists=function(){return"undefined"!=typeof window},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_renderPropWithEnd=function(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_renderCSSPropWithBeginning=function(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)},_renderRoundedCSSProp=function(e,t){var r=t.s+t.c*e;t.set(t.t,t.p,~~(r+(r<0?-.5:.5))+t.u,t)},_renderNonTweeningValue=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},_renderNonTweeningValueOnlyAtEnd=function(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)},_setterCSSStyle=function(e,t,r){return e.style[t]=r},_setterCSSProp=function(e,t,r){return e.style.setProperty(t,r)},_setterTransform=function(e,t,r){return e._gsap[t]=r},_setterScale=function(e,t,r){return e._gsap.scaleX=e._gsap.scaleY=r},_setterScaleWithRender=function(e,t,r,n,i){var o=e._gsap;o.scaleX=o.scaleY=r,o.renderTransform(i,o)},_setterTransformWithRender=function(e,t,r,n,i){var o=e._gsap;o[t]=r,o.renderTransform(i,o)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function e(t,r){var n=this,i=this.target,o=i.style,a=i._gsap;if(t in _transformProps&&o){if(this.tfm=this.tfm||{},"transform"===t)return _propertyAliases.transform.split(",").forEach((function(t){return e.call(n,t,r)}));if(~(t=_propertyAliases[t]||t).indexOf(",")?t.split(",").forEach((function(e){return n.tfm[e]=_get(i,e)})):this.tfm[t]=a.x?a[t]:_get(i,t),t===_transformOriginProp&&(this.tfm.zOrigin=a.zOrigin),this.props.indexOf(_transformProp)>=0)return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,r,"")),t=_transformProp}(o||r)&&this.props.push(t,r,o[t])},_removeIndependentTransforms=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},_revertStyle=function(){var e,t,r=this.props,n=this.target,i=n.style,o=n._gsap;for(e=0;e<r.length;e+=3)r[e+1]?n[r[e]]=r[e+2]:r[e+2]?i[r[e]]=r[e+2]:i.removeProperty("--"===r[e].substr(0,2)?r[e]:r[e].replace(_capsExp,"-$1").toLowerCase());if(this.tfm){for(t in this.tfm)o[t]=this.tfm[t];o.svg&&(o.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(e=_reverting())&&e.isStart||i[_transformProp]||(_removeIndependentTransforms(i),o.zOrigin&&i[_transformOriginProp]&&(i[_transformOriginProp]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},_getStyleSaver=function(e,t){var r={target:e,props:[],revert:_revertStyle,save:_saveStyle};return e._gsap||gsap.core.getCache(e),t&&t.split(",").forEach((function(e){return r.save(e)})),r},_supports3D,_createElement=function(e,t){var r=_doc.createElementNS?_doc.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):_doc.createElement(e);return r&&r.style?r:_doc.createElement(e)},_getComputedProperty=function e(t,r,n){var i=getComputedStyle(t);return i[r]||i.getPropertyValue(r.replace(_capsExp,"-$1").toLowerCase())||i.getPropertyValue(r)||!n&&e(t,_checkPropPrefix(r)||r,1)||""},_prefixes="O,Moz,ms,Ms,Webkit".split(","),_checkPropPrefix=function(e,t,r){var n=(t||_tempDiv).style,i=5;if(e in n&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(_prefixes[i]+e in n););return i<0?null:(3===i?"ms":i>=0?_prefixes[i]:"")+e},_initCore=function(){_windowExists()&&window.document&&(_win=window,_doc=_win.document,_docElement=_doc.documentElement,_tempDiv=_createElement("div")||{style:{}},_createElement("div"),_transformProp=_checkPropPrefix(_transformProp),_transformOriginProp=_transformProp+"Origin",_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_supports3D=!!_checkPropPrefix("perspective"),_reverting=gsap.core.reverting,_pluginInitted=1)},_getBBoxHack=function e(t){var r,n=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,a=this.style.cssText;if(_docElement.appendChild(n),n.appendChild(this),this.style.display="block",t)try{r=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=e}catch(e){}else this._gsapBBox&&(r=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),_docElement.removeChild(n),this.style.cssText=a,r},_getAttributeFallbacks=function(e,t){for(var r=t.length;r--;)if(e.hasAttribute(t[r]))return e.getAttribute(t[r])},_getBBox=function(e){var t;try{t=e.getBBox()}catch(r){t=_getBBoxHack.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===_getBBoxHack||(t=_getBBoxHack.call(e,!0)),!t||t.width||t.x||t.y?t:{x:+_getAttributeFallbacks(e,["x","cx","x1"])||0,y:+_getAttributeFallbacks(e,["y","cy","y1"])||0,width:0,height:0}},_isSVG=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!_getBBox(e))},_removeProperty=function(e,t){if(t){var r,n=e.style;t in _transformProps&&t!==_transformOriginProp&&(t=_transformProp),n.removeProperty?("ms"!==(r=t.substr(0,2))&&"webkit"!==t.substr(0,6)||(t="-"+t),n.removeProperty("--"===r?t:t.replace(_capsExp,"-$1").toLowerCase())):n.removeAttribute(t)}},_addNonTweeningPT=function(e,t,r,n,i,o){var a=new PropTween(e._pt,t,r,0,1,o?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return e._pt=a,a.b=n,a.e=i,e._props.push(r),a},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function e(t,r,n,i){var o,a,s,l,c=parseFloat(n)||0,u=(n+"").trim().substr((c+"").length)||"px",h=_tempDiv.style,d=_horizontalExp.test(r),f="svg"===t.tagName.toLowerCase(),p=(f?"client":"offset")+(d?"Width":"Height"),m=100,g="px"===i,v="%"===i;if(i===u||!c||_nonConvertibleUnits[i]||_nonConvertibleUnits[u])return c;if("px"!==u&&!g&&(c=e(t,r,n,"px")),l=t.getCTM&&_isSVG(t),(v||"%"===u)&&(_transformProps[r]||~r.indexOf("adius")))return o=l?t.getBBox()[d?"width":"height"]:t[p],_round(v?c/o*m:c/100*o);if(h[d?"width":"height"]=m+(g?u:i),a=~r.indexOf("adius")||"em"===i&&t.appendChild&&!f?t:t.parentNode,l&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==_doc&&a.appendChild||(a=_doc.body),(s=a._gsap)&&v&&s.width&&d&&s.time===_ticker.time&&!s.uncache)return _round(c/s.width*m);if(!v||"height"!==r&&"width"!==r)(v||"%"===u)&&!_nonStandardLayouts[_getComputedProperty(a,"display")]&&(h.position=_getComputedProperty(t,"position")),a===t&&(h.position="static"),a.appendChild(_tempDiv),o=_tempDiv[p],a.removeChild(_tempDiv),h.position="absolute";else{var y=t.style[r];t.style[r]=m+i,o=t[p],y?t.style[r]=y:_removeProperty(t,r)}return d&&v&&((s=_getCache(a)).time=_ticker.time,s.width=a[p]),_round(g?o*c/m:o&&c?m/o*c:0)},_get=function(e,t,r,n){var i;return _pluginInitted||_initCore(),t in _propertyAliases&&"transform"!==t&&~(t=_propertyAliases[t]).indexOf(",")&&(t=t.split(",")[0]),_transformProps[t]&&"transform"!==t?(i=_parseTransform(e,n),i="transformOrigin"!==t?i[t]:i.svg?i.origin:_firstTwoOnly(_getComputedProperty(e,_transformOriginProp))+" "+i.zOrigin+"px"):(!(i=e.style[t])||"auto"===i||n||~(i+"").indexOf("calc("))&&(i=_specialProps[t]&&_specialProps[t](e,t,r)||_getComputedProperty(e,t)||_getProperty(e,t)||("opacity"===t?1:0)),r&&!~(i+"").trim().indexOf(" ")?_convertToUnit(e,t,i,r)+r:i},_tweenComplexCSSString=function(e,t,r,n){if(!r||"none"===r){var i=_checkPropPrefix(t,e,1),o=i&&_getComputedProperty(e,i,1);o&&o!==r?(t=i,r=o):"borderColor"===t&&(r=_getComputedProperty(e,"borderTopColor"))}var a,s,l,c,u,h,d,f,p,m,g,v=new PropTween(this._pt,e.style,t,0,1,_renderComplexString),y=0,_=0;if(v.b=r,v.e=n,r+="","auto"===(n+="")&&(h=e.style[t],e.style[t]=n,n=_getComputedProperty(e,t)||n,h?e.style[t]=h:_removeProperty(e,t)),_colorStringFilter(a=[r,n]),n=a[1],l=(r=a[0]).match(_numWithUnitExp)||[],(n.match(_numWithUnitExp)||[]).length){for(;s=_numWithUnitExp.exec(n);)d=s[0],p=n.substring(y,s.index),u?u=(u+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(u=1),d!==(h=l[_++]||"")&&(c=parseFloat(h)||0,g=h.substr((c+"").length),"="===d.charAt(1)&&(d=_parseRelative(c,d)+g),f=parseFloat(d),m=d.substr((f+"").length),y=_numWithUnitExp.lastIndex-m.length,m||(m=m||_config.units[t]||g,y===n.length&&(n+=m,v.e+=m)),g!==m&&(c=_convertToUnit(e,t,h,m)||0),v._pt={_next:v._pt,p:p||1===_?p:",",s:c,c:f-c,m:u&&u<4||"zIndex"===t?Math.round:0});v.c=y<n.length?n.substring(y,n.length):""}else v.r="display"===t&&"none"===n?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue;return _relExp.test(n)&&(v.e=0),this._pt=v,v},_keywordToPercent={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_convertKeywordsToPercentages=function(e){var t=e.split(" "),r=t[0],n=t[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==n&&"right"!==n||(e=r,r=n,n=e),t[0]=_keywordToPercent[r]||r,t[1]=_keywordToPercent[n]||n,t.join(" ")},_renderClearProps=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var r,n,i,o=t.t,a=o.style,s=t.u,l=o._gsap;if("all"===s||!0===s)a.cssText="",n=1;else for(i=(s=s.split(",")).length;--i>-1;)r=s[i],_transformProps[r]&&(n=1,r="transformOrigin"===r?_transformOriginProp:_transformProp),_removeProperty(o,r);n&&(_removeProperty(o,_transformProp),l&&(l.svg&&o.removeAttribute("transform"),_parseTransform(o,1),l.uncache=1,_removeIndependentTransforms(a)))}},_specialProps={clearProps:function(e,t,r,n,i){if("isFromStart"!==i.data){var o=e._pt=new PropTween(e._pt,t,r,0,0,_renderClearProps);return o.u=n,o.pr=-10,o.tween=i,e._props.push(r),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},_getComputedTransformMatrixAsArray=function(e){var t=_getComputedProperty(e,_transformProp);return _isNullTransform(t)?_identity2DMatrix:t.substr(7).match(_numExp).map(_round)},_getMatrix=function(e,t){var r,n,i,o,a=e._gsap||_getCache(e),s=e.style,l=_getComputedTransformMatrixAsArray(e);return a.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(l=[(i=e.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?_identity2DMatrix:l:(l!==_identity2DMatrix||e.offsetParent||e===_docElement||a.svg||(i=s.display,s.display="block",(r=e.parentNode)&&e.offsetParent||(o=1,n=e.nextElementSibling,_docElement.appendChild(e)),l=_getComputedTransformMatrixAsArray(e),i?s.display=i:_removeProperty(e,"display"),o&&(n?r.insertBefore(e,n):r?r.appendChild(e):_docElement.removeChild(e))),t&&l.length>6?[l[0],l[1],l[4],l[5],l[12],l[13]]:l)},_applySVGOrigin=function(e,t,r,n,i,o){var a,s,l,c=e._gsap,u=i||_getMatrix(e,!0),h=c.xOrigin||0,d=c.yOrigin||0,f=c.xOffset||0,p=c.yOffset||0,m=u[0],g=u[1],v=u[2],y=u[3],_=u[4],b=u[5],w=t.split(" "),D=parseFloat(w[0])||0,x=parseFloat(w[1])||0;r?u!==_identity2DMatrix&&(s=m*y-g*v)&&(l=D*(-g/s)+x*(m/s)-(m*b-g*_)/s,D=D*(y/s)+x*(-v/s)+(v*b-y*_)/s,x=l):(D=(a=_getBBox(e)).x+(~w[0].indexOf("%")?D/100*a.width:D),x=a.y+(~(w[1]||w[0]).indexOf("%")?x/100*a.height:x)),n||!1!==n&&c.smooth?(_=D-h,b=x-d,c.xOffset=f+(_*m+b*v)-_,c.yOffset=p+(_*g+b*y)-b):c.xOffset=c.yOffset=0,c.xOrigin=D,c.yOrigin=x,c.smooth=!!n,c.origin=t,c.originIsAbsolute=!!r,e.style[_transformOriginProp]="0px 0px",o&&(_addNonTweeningPT(o,c,"xOrigin",h,D),_addNonTweeningPT(o,c,"yOrigin",d,x),_addNonTweeningPT(o,c,"xOffset",f,c.xOffset),_addNonTweeningPT(o,c,"yOffset",p,c.yOffset)),e.setAttribute("data-svg-origin",D+" "+x)},_parseTransform=function(e,t){var r=e._gsap||new GSCache(e);if("x"in r&&!t&&!r.uncache)return r;var n,i,o,a,s,l,c,u,h,d,f,p,m,g,v,y,_,b,w,D,x,S,k,T,P,E,C,A,O,M,R,I,N=e.style,B=r.scaleX<0,F="px",j="deg",V=getComputedStyle(e),$=_getComputedProperty(e,_transformOriginProp)||"0";return n=i=o=l=c=u=h=d=f=0,a=s=1,r.svg=!(!e.getCTM||!_isSVG(e)),V.translate&&("none"===V.translate&&"none"===V.scale&&"none"===V.rotate||(N[_transformProp]=("none"!==V.translate?"translate3d("+(V.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==V.rotate?"rotate("+V.rotate+") ":"")+("none"!==V.scale?"scale("+V.scale.split(" ").join(",")+") ":"")+("none"!==V[_transformProp]?V[_transformProp]:"")),N.scale=N.rotate=N.translate="none"),g=_getMatrix(e,r.svg),r.svg&&(r.uncache?(P=e.getBBox(),$=r.xOrigin-P.x+"px "+(r.yOrigin-P.y)+"px",T=""):T=!t&&e.getAttribute("data-svg-origin"),_applySVGOrigin(e,T||$,!!T||r.originIsAbsolute,!1!==r.smooth,g)),p=r.xOrigin||0,m=r.yOrigin||0,g!==_identity2DMatrix&&(b=g[0],w=g[1],D=g[2],x=g[3],n=S=g[4],i=k=g[5],6===g.length?(a=Math.sqrt(b*b+w*w),s=Math.sqrt(x*x+D*D),l=b||w?_atan2(w,b)*_RAD2DEG:0,(h=D||x?_atan2(D,x)*_RAD2DEG+l:0)&&(s*=Math.abs(Math.cos(h*_DEG2RAD))),r.svg&&(n-=p-(p*b+m*D),i-=m-(p*w+m*x))):(I=g[6],M=g[7],C=g[8],A=g[9],O=g[10],R=g[11],n=g[12],i=g[13],o=g[14],c=(v=_atan2(I,O))*_RAD2DEG,v&&(T=S*(y=Math.cos(-v))+C*(_=Math.sin(-v)),P=k*y+A*_,E=I*y+O*_,C=S*-_+C*y,A=k*-_+A*y,O=I*-_+O*y,R=M*-_+R*y,S=T,k=P,I=E),u=(v=_atan2(-D,O))*_RAD2DEG,v&&(y=Math.cos(-v),R=x*(_=Math.sin(-v))+R*y,b=T=b*y-C*_,w=P=w*y-A*_,D=E=D*y-O*_),l=(v=_atan2(w,b))*_RAD2DEG,v&&(T=b*(y=Math.cos(v))+w*(_=Math.sin(v)),P=S*y+k*_,w=w*y-b*_,k=k*y-S*_,b=T,S=P),c&&Math.abs(c)+Math.abs(l)>359.9&&(c=l=0,u=180-u),a=_round(Math.sqrt(b*b+w*w+D*D)),s=_round(Math.sqrt(k*k+I*I)),v=_atan2(S,k),h=Math.abs(v)>2e-4?v*_RAD2DEG:0,f=R?1/(R<0?-R:R):0),r.svg&&(T=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(e,_transformProp)),T&&e.setAttribute("transform",T))),Math.abs(h)>90&&Math.abs(h)<270&&(B?(a*=-1,h+=l<=0?180:-180,l+=l<=0?180:-180):(s*=-1,h+=h<=0?180:-180)),t=t||r.uncache,r.x=n-((r.xPercent=n&&(!t&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-n)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+F,r.y=i-((r.yPercent=i&&(!t&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-i)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+F,r.z=o+F,r.scaleX=_round(a),r.scaleY=_round(s),r.rotation=_round(l)+j,r.rotationX=_round(c)+j,r.rotationY=_round(u)+j,r.skewX=h+j,r.skewY=d+j,r.transformPerspective=f+F,(r.zOrigin=parseFloat($.split(" ")[2])||!t&&r.zOrigin||0)&&(N[_transformOriginProp]=_firstTwoOnly($)),r.xOffset=r.yOffset=0,r.force3D=_config.force3D,r.renderTransform=r.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,r.uncache=0,r},_firstTwoOnly=function(e){return(e=e.split(" "))[0]+" "+e[1]},_addPxTranslate=function(e,t,r){var n=getUnit(t);return _round(parseFloat(t)+parseFloat(_convertToUnit(e,"x",r+"px",n)))+n},_renderNon3DTransforms=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,_renderCSSTransforms(e,t)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function(e,t){var r=t||this,n=r.xPercent,i=r.yPercent,o=r.x,a=r.y,s=r.z,l=r.rotation,c=r.rotationY,u=r.rotationX,h=r.skewX,d=r.skewY,f=r.scaleX,p=r.scaleY,m=r.transformPerspective,g=r.force3D,v=r.target,y=r.zOrigin,_="",b="auto"===g&&e&&1!==e||!0===g;if(y&&(u!==_zeroDeg||c!==_zeroDeg)){var w,D=parseFloat(c)*_DEG2RAD,x=Math.sin(D),S=Math.cos(D);D=parseFloat(u)*_DEG2RAD,w=Math.cos(D),o=_addPxTranslate(v,o,x*w*-y),a=_addPxTranslate(v,a,-Math.sin(D)*-y),s=_addPxTranslate(v,s,S*w*-y+y)}m!==_zeroPx&&(_+="perspective("+m+_endParenthesis),(n||i)&&(_+="translate("+n+"%, "+i+"%) "),(b||o!==_zeroPx||a!==_zeroPx||s!==_zeroPx)&&(_+=s!==_zeroPx||b?"translate3d("+o+", "+a+", "+s+") ":"translate("+o+", "+a+_endParenthesis),l!==_zeroDeg&&(_+="rotate("+l+_endParenthesis),c!==_zeroDeg&&(_+="rotateY("+c+_endParenthesis),u!==_zeroDeg&&(_+="rotateX("+u+_endParenthesis),h===_zeroDeg&&d===_zeroDeg||(_+="skew("+h+", "+d+_endParenthesis),1===f&&1===p||(_+="scale("+f+", "+p+_endParenthesis),v.style[_transformProp]=_||"translate(0, 0)"},_renderSVGTransforms=function(e,t){var r,n,i,o,a,s=t||this,l=s.xPercent,c=s.yPercent,u=s.x,h=s.y,d=s.rotation,f=s.skewX,p=s.skewY,m=s.scaleX,g=s.scaleY,v=s.target,y=s.xOrigin,_=s.yOrigin,b=s.xOffset,w=s.yOffset,D=s.forceCSS,x=parseFloat(u),S=parseFloat(h);d=parseFloat(d),f=parseFloat(f),(p=parseFloat(p))&&(f+=p=parseFloat(p),d+=p),d||f?(d*=_DEG2RAD,f*=_DEG2RAD,r=Math.cos(d)*m,n=Math.sin(d)*m,i=Math.sin(d-f)*-g,o=Math.cos(d-f)*g,f&&(p*=_DEG2RAD,a=Math.tan(f-p),i*=a=Math.sqrt(1+a*a),o*=a,p&&(a=Math.tan(p),r*=a=Math.sqrt(1+a*a),n*=a)),r=_round(r),n=_round(n),i=_round(i),o=_round(o)):(r=m,o=g,n=i=0),(x&&!~(u+"").indexOf("px")||S&&!~(h+"").indexOf("px"))&&(x=_convertToUnit(v,"x",u,"px"),S=_convertToUnit(v,"y",h,"px")),(y||_||b||w)&&(x=_round(x+y-(y*r+_*i)+b),S=_round(S+_-(y*n+_*o)+w)),(l||c)&&(a=v.getBBox(),x=_round(x+l/100*a.width),S=_round(S+c/100*a.height)),a="matrix("+r+","+n+","+i+","+o+","+x+","+S+")",v.setAttribute("transform",a),D&&(v.style[_transformProp]=a)},_addRotationalPropTween=function(e,t,r,n,i){var o,a,s=360,l=_isString(i),c=parseFloat(i)*(l&&~i.indexOf("rad")?_RAD2DEG:1)-n,u=n+c+"deg";return l&&("short"===(o=i.split("_")[1])&&(c%=s)!==c%180&&(c+=c<0?s:-360),"cw"===o&&c<0?c=(c+s*_bigNum)%s-~~(c/s)*s:"ccw"===o&&c>0&&(c=(c-s*_bigNum)%s-~~(c/s)*s)),e._pt=a=new PropTween(e._pt,t,r,n,c,_renderPropWithEnd),a.e=u,a.u="deg",e._props.push(r),a},_assign=function(e,t){for(var r in t)e[r]=t[r];return e},_addRawTransformPTs=function(e,t,r){var n,i,o,a,s,l,c,u=_assign({},r._gsap),h=r.style;for(i in u.svg?(o=r.getAttribute("transform"),r.setAttribute("transform",""),h[_transformProp]=t,n=_parseTransform(r,1),_removeProperty(r,_transformProp),r.setAttribute("transform",o)):(o=getComputedStyle(r)[_transformProp],h[_transformProp]=t,n=_parseTransform(r,1),h[_transformProp]=o),_transformProps)(o=u[i])!==(a=n[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(s=getUnit(o)!==(c=getUnit(a))?_convertToUnit(r,i,o,c):parseFloat(o),l=parseFloat(a),e._pt=new PropTween(e._pt,n,i,s,l-s,_renderCSSProp),e._pt.u=c||0,e._props.push(i));_assign(n,u)};_forEachName("padding,margin,Width,Radius",(function(e,t){var r="Top",n="Right",i="Bottom",o="Left",a=(t<3?[r,n,i,o]:[r+o,r+n,i+n,i+o]).map((function(r){return t<2?e+r:"border"+r+e}));_specialProps[t>1?"border"+e:e]=function(e,t,r,n,i){var o,s;if(arguments.length<4)return o=a.map((function(t){return _get(e,t,r)})),5===(s=o.join(" ")).split(o[0]).length?o[0]:s;o=(n+"").split(" "),s={},a.forEach((function(e,t){return s[e]=o[t]=o[t]||o[(t-1)/2|0]})),e.init(t,s,i)}}));var CSSPlugin={name:"css",register:_initCore,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,r,n,i){var o,a,s,l,c,u,h,d,f,p,m,g,v,y,_,b,w=this._props,D=e.style,x=r.vars.startAt;for(h in _pluginInitted||_initCore(),this.styles=this.styles||_getStyleSaver(e),b=this.styles.props,this.tween=r,t)if("autoRound"!==h&&(a=t[h],!_plugins[h]||!_checkPlugin(h,t,r,n,e,i)))if(c=typeof a,u=_specialProps[h],"function"===c&&(c=typeof(a=a.call(r,n,e,i))),"string"===c&&~a.indexOf("random(")&&(a=_replaceRandom(a)),u)u(this,e,h,a,r)&&(_=1);else if("--"===h.substr(0,2))o=(getComputedStyle(e).getPropertyValue(h)+"").trim(),a+="",_colorExp.lastIndex=0,_colorExp.test(o)||(d=getUnit(o),f=getUnit(a)),f?d!==f&&(o=_convertToUnit(e,h,o,f)+f):d&&(a+=d),this.add(D,"setProperty",o,a,n,i,0,0,h),w.push(h),b.push(h,0,D[h]);else if("undefined"!==c){if(x&&h in x?(o="function"==typeof x[h]?x[h].call(r,n,e,i):x[h],_isString(o)&&~o.indexOf("random(")&&(o=_replaceRandom(o)),getUnit(o+"")||"auto"===o||(o+=_config.units[h]||getUnit(_get(e,h))||""),"="===(o+"").charAt(1)&&(o=_get(e,h))):o=_get(e,h),l=parseFloat(o),(p="string"===c&&"="===a.charAt(1)&&a.substr(0,2))&&(a=a.substr(2)),s=parseFloat(a),h in _propertyAliases&&("autoAlpha"===h&&(1===l&&"hidden"===_get(e,"visibility")&&s&&(l=0),b.push("visibility",0,D.visibility),_addNonTweeningPT(this,D,"visibility",l?"inherit":"hidden",s?"inherit":"hidden",!s)),"scale"!==h&&"transform"!==h&&~(h=_propertyAliases[h]).indexOf(",")&&(h=h.split(",")[0])),m=h in _transformProps)if(this.styles.save(h),g||((v=e._gsap).renderTransform&&!t.parseTransform||_parseTransform(e,t.parseTransform),y=!1!==t.smoothOrigin&&v.smooth,(g=this._pt=new PropTween(this._pt,D,_transformProp,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===h)this._pt=new PropTween(this._pt,v,"scaleY",v.scaleY,(p?_parseRelative(v.scaleY,p+s):s)-v.scaleY||0,_renderCSSProp),this._pt.u=0,w.push("scaleY",h),h+="X";else{if("transformOrigin"===h){b.push(_transformOriginProp,0,D[_transformOriginProp]),a=_convertKeywordsToPercentages(a),v.svg?_applySVGOrigin(e,a,0,y,0,this):((f=parseFloat(a.split(" ")[2])||0)!==v.zOrigin&&_addNonTweeningPT(this,v,"zOrigin",v.zOrigin,f),_addNonTweeningPT(this,D,h,_firstTwoOnly(o),_firstTwoOnly(a)));continue}if("svgOrigin"===h){_applySVGOrigin(e,a,1,y,0,this);continue}if(h in _rotationalProperties){_addRotationalPropTween(this,v,h,l,p?_parseRelative(l,p+a):a);continue}if("smoothOrigin"===h){_addNonTweeningPT(this,v,"smooth",v.smooth,a);continue}if("force3D"===h){v[h]=a;continue}if("transform"===h){_addRawTransformPTs(this,a,e);continue}}else h in D||(h=_checkPropPrefix(h)||h);if(m||(s||0===s)&&(l||0===l)&&!_complexExp.test(a)&&h in D)s||(s=0),(d=(o+"").substr((l+"").length))!==(f=getUnit(a)||(h in _config.units?_config.units[h]:d))&&(l=_convertToUnit(e,h,o,f)),this._pt=new PropTween(this._pt,m?v:D,h,l,(p?_parseRelative(l,p+s):s)-l,m||"px"!==f&&"zIndex"!==h||!1===t.autoRound?_renderCSSProp:_renderRoundedCSSProp),this._pt.u=f||0,d!==f&&"%"!==f&&(this._pt.b=o,this._pt.r=_renderCSSPropWithBeginning);else if(h in D)_tweenComplexCSSString.call(this,e,h,o,p?p+a:a);else if(h in e)this.add(e,h,o||e[h],p?p+a:a,n,i);else if("parseTransform"!==h){_missingPlugin(h,a);continue}m||(h in D?b.push(h,0,D[h]):b.push(h,1,o||e[h])),w.push(h)}_&&_sortPropTweensByPriority(this)},render:function(e,t){if(t.tween._time||!_reverting())for(var r=t._pt;r;)r.r(e,r.d),r=r._next;else t.styles.revert()},get:_get,aliases:_propertyAliases,getSetter:function(e,t,r){var n=_propertyAliases[t];return n&&n.indexOf(",")<0&&(t=n),t in _transformProps&&t!==_transformOriginProp&&(e._gsap.x||_get(e,"x"))?r&&_recentSetterPlugin===r?"scale"===t?_setterScale:_setterTransform:(_recentSetterPlugin=r||{})&&("scale"===t?_setterScaleWithRender:_setterTransformWithRender):e.style&&!_isUndefined(e.style[t])?_setterCSSStyle:~t.indexOf("-")?_setterCSSProp:_getSetter(e,t)},core:{_removeProperty:_removeProperty,_getMatrix:_getMatrix}},positionAndScale,rotation,all;gsap.utils.checkPrefix=_checkPropPrefix,gsap.core.getStyleSaver=_getStyleSaver,positionAndScale="x,y,z,scale,scaleX,scaleY,xPercent,yPercent",rotation="rotation,rotationX,rotationY,skewX,skewY",all=_forEachName(positionAndScale+","+rotation+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(e){_transformProps[e]=1})),_forEachName(rotation,(function(e){_config.units[e]="deg",_rotationalProperties[e]=1})),_propertyAliases[all[13]]=positionAndScale+","+rotation,_forEachName("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(e){var t=e.split(":");_propertyAliases[t[1]]=all[t[0]]})),_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(e){_config.units[e]="px"})),gsap.registerPlugin(CSSPlugin);var gsapWithCSS=gsap.registerPlugin(CSSPlugin)||gsap;gsapWithCSS.core.Tween;var GoAnimation=function(){function e(){this.startPoisiton={x:0,y:0},this.endPoisiton={x:1920,y:0},this.curtain={width:1920,height:1080},this.totalTime=5,this.timeLine=gsapWithCSS.timeline()}return e.getInstance=function(){return this.instance||(this.instance=new e),this.instance},e.prototype.init=function(e,t){var r;null===(r=this.timeLine)||void 0===r||r.clear();var n=t.curtain,i=t.totalTime,o=t.admissionMode;i&&(this.totalTime=i),this.setEndPoisiton(n);var a=this.filterData(e,o);this.goAnimationParams=t;for(var s=0;s<a.length;s++){var l=a[s];if(l instanceof Array)for(var c=0;c<l.length;c++){var u=this.totalTime/l.length,h=l[c],d=this._creatTl("#wrap"+h.cid);this._add(d,c*u)}else{u=this.totalTime/a.length,d=this._creatTl("#wrap"+l.cid);this._add(d,s*u)}}return this.timeLine},e.prototype.filterData=function(e,t){var r;if("left"==t)r=_$1.orderBy(e,["baseData.left"],["asc"]);else if("top"==t)r=_$1.orderBy(e,["baseData.top"],["asc"]);else if("topLeft"==t){var n=this.setSpacing(e,"left");r=_$1.orderBy(n,["spacing"],["asc"])}else if("topRight"==t){var i=this.setSpacing(e,"right");r=_$1.orderBy(i,["spacing"],["asc"])}else if("center"==t){var o=this.splitArrayForCenter(e,"left");r=[_$1.orderBy(o.true,["center.x"],["asc"]),_$1.orderBy(o.false,["center.x"],["desc"])]}else if("spaceBetween"==t){o=this.splitArrayForCenter(e,"left");r=[_$1.orderBy(o.true,["center.x"],["desc"]),_$1.orderBy(o.false,["center.x"],["asc"])]}else r=_$1.orderBy(e,["baseData.left"],["asc"]);return r},e.prototype.getSpacing=function(e,t){var r=e.x,n=e.y,i=t.x,o=t.y,a=Math.abs(r-i),s=Math.abs(n-o);return Math.sqrt(a*a+s*s)},e.prototype.creatPosition=function(e,t){var r=0,n=0;return e?("left"===t?(r=e.left,n=e.top):"right"===t&&(r=e.left+e.width,n=e.top),{x:r,y:n}):{x:r,y:n}},e.prototype.setEndPoisiton=function(e){if(e){var t=e.width,r=e.height;this.curtain=e,this.endPoisiton.x=t,this.endPoisiton.y=r}},e.prototype.setSpacing=function(e,t){var r,n=this;return"left"===t?r=this.startPoisiton:"right"===t&&(r=this.endPoisiton),e.forEach((function(e){var i=e.baseData;if(i){var o=n.creatPosition(i,t),a=n.getSpacing(o,r);e.spacing=a}})),e},e.prototype.setCenter=function(e){return e.forEach((function(e){if(e.baseData){var t=e.baseData.left+e.baseData.width/2,r=e.baseData.top+e.baseData.height/2;e.center={x:t,y:r}}})),e},e.prototype.splitArrayForCenter=function(e,t){var r,n=this,i=this.setCenter(e);return"left"!=t&&"right"!=t||(r=_$1.groupBy(i,(function(e){return e.center.x>=n.curtain.width/2}))),"top"!=t&&"bottom"!=t||(r=_$1.groupBy(i,(function(e){return e.center.y>=n.curtain.height/2}))),r},e.prototype._add=function(e,t){this.timeLine.add(e,t)},e.prototype._creatTl=function(e){var t=gsapWithCSS.timeline();return t.add(this._creatTw(e)),t},e.prototype._creatTw=function(e){var t=this.goAnimationParams.params,r=t.delay,n=t.duration,i=t.repeat,o=t.type,a=t.value;return a&&a.length&&a.forEach((function(e){e.delay=r||0,e.repeat=i||0})),gsapWithCSS[o](e,n,a[0],a[1])},e.prototype.in=function(){},e.prototype.out=function(){},e}(),index=GoAnimation.getInstance(),findItemDeep=function(e,t,r){var n=!1,i=function(e){for(var o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(function(e){return e.cid==t}));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){for(var a=Array.from(e[o].dynamicChildren),s=0;s<a.length;s++)if(a[s]instanceof Array){var l=a[s][1];i(l)}}else if(e[o].dynamicChildren instanceof Array)for(a=e[o].dynamicChildren,s=0;s<a.length;s++)if(a[s]instanceof Array){l=a[s][1];i(l)}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1};function mitt(e,t){return e=e||new Map,__assign$1(__assign$1({},t),{EventType:e,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);if(n){var i=n.slice().map((function(e){return e(r)}));if(i&&1==i.length)return i[0]}(n=e.get("*"))&&n.slice().map((function(e){e(t,r)}))}})}var RuntimeServer=function(){function e(e){this.root=null,this.vuex=Go.getInstance().VueServer,this.eventType=new Map,(null==e?void 0:e.root)&&(this.root=e.root);var t={setGlobalVar:this.setGlobalVar.bind(this),showComponent:this._showComponent.bind(this),hideComponent:this._hideComponent.bind(this),pageChange:this.pageChange.bind(this),changeDynamicState:this.changeDynamicState.bind(this)};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.eventType.set(r,[t[r]])}return e.prototype.findComponentDownward=function(e,t){var r=e.$children;if(r.length)for(var n=0,i=r;n<i.length;n++){var o=i[n];o.$options&&o.$options.propsData&&o.$options.propsData.cid&&(t[o.$options.propsData.cid]=o),o.$children&&o.$children.length&&this.findComponentDownward(o,t)}return t},e.prototype.getAllComponents=function(){var e={};return this.findComponentDownward(this.root,e),e},e.prototype.getComponentByCid=function(e){try{var t=this.getAllComponents()[e];if(!t)throw new Error("The instance was not found");return t}catch(e){console.warn(e)}},e.prototype.getElementByCid=function(e){try{if(!e)throw new Error("Please input the parameters correctly");var t=this.getComponentByCid(e);if(!t)throw new Error("The element was not found");return t.$el}catch(e){console.warn(e)}},e.prototype.setGlobalVar=function(e){try{var t=e.key,r=e.value;if(!(e&&t&&r))throw new Error("An error occurred. Please check whether the incoming parameters are correct! The correct format of data is an object containing key and value");this.setVars(e)}catch(e){console.warn(e)}},e.prototype._showComponent=function(e){try{if(!e)throw new Error("Please input the parameters correctly");this.changeVis({cid:e,flag:!0})}catch(e){console.warn(e)}},e.prototype._hideComponent=function(e){try{if(!e)throw new Error("Please input the parameters correctly");this.changeVis({cid:e,flag:!1})}catch(e){console.warn(e)}},e.prototype.getList=function(e){return e&&"id"===e?this.vuex.callState("list").map((function(e){return e.cid})):this.vuex.callState("list")},e.prototype.getTheme=function(e){var t=this.vuex.callState("theme");return e&&e(t),t},e.prototype.getElement=function(e){var t=this.vuex.callState("list");return findItemDeep(t,e)},e.prototype.changeVis=function(e){return this.vuex.callMutation("changeShow",e)},e.prototype.comToggle=function(e){return this.vuex.callMutation("comToggle",e)},e.prototype.getPageInfo=function(e){var t=this.vuex.callState("caseInfo");return e&&e(t),(null==t?void 0:t.details)?t.details.map((function(e){return{name:e.caseDetailName,path:e.caseDetailPath,id:e.id}})):t},e.prototype.updateComp=function(e){return this.vuex.callMutation("updatComs",e)},e.prototype.changeDynamicState=function(e){return this.vuex.callMutation("changeDynamicState",e)},e.prototype.pageChange=function(e){return this.vuex.callMutation("setPageId",e)},e.prototype.pagePush=function(e,t,r){return void 0===r&&(r={}),this.vuex.callMutation("pagePush",{type:e,value:t,option:r})},e.prototype.activeState=function(e,t){return this.vuex.callMutation("setDynamicActive",{cid:e,name:t})},e.prototype.getVars=function(e){var t=fe.getAllVariables();return e&&e(t),t},e.prototype.setVars=function(e){var t=fe.getVariable(e.key);if(2!=(null==t?void 0:t.model))return this.vuex.callAction("goEditVar",e);console.warn("系统变量禁止修改!")},e}(),Run=function(e){function t(t){var r=e.call(this,t)||this,n=mitt(r.eventType);return r.$emit=n.emit,r.$on=n.on,r.$off=n.off,r}return __extends$2(t,e),Object.defineProperty(t.prototype,"Theme",{get:function(){return this.getTheme()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Components",{get:function(){return this.getAllComponents()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"GlobalVars",{get:function(){return this.getVars()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Pages",{get:function(){return this.getPageInfo()},enumerable:!1,configurable:!0}),t.prototype.getElementById=function(e){this.getElementByCid(e)},t.prototype.getComponentById=function(e){this.getComponentByCid(e)},t.prototype.getPage=function(){},t}(RuntimeServer),G=function(){function e(e){this.$action=new GoEvent(e),this.instance=new Run(e)}return e.prototype.getGlobalvars=function(){for(var e=fe.getAllVariables(),t=e.map((function(e){return e.mapField})),r={},n=function(t){var n=e.find((function(e){return e.mapField==t}));n&&(r[t]=n.value)},i=0,o=t;i<o.length;i++){n(o[i])}var a=this.instance;return new Proxy(r,{has:function(e,t){return!t&&t in e},get:function(e,t){if(t in e)return e[t];throw new ReferenceError('Prop name "'+t+'" does not exist.')},set:function(e,t,r){if(!e[t])return console.log("变量不存在/不能被修改"),!1;if(e[t]=r,!t||"string"!=typeof t)throw new Error("Invalid key");a.setGlobalVar({key:t,value:r})}})},Object.defineProperty(e.prototype,"globalvars",{get:function(){return this.getGlobalvars()},enumerable:!1,configurable:!0}),e}(),GoEvent=function(e){var t=this;this.setGlobalVars=function(e,r){if(!e||"string"!=typeof e)throw new Error("Invalid key");t.instance.setGlobalVar({key:e,value:r})},this.skipTo=function(e){var r=null==e?void 0:e.params;if(!e||0===Object.keys(e).length)throw new Error("事件跳转发生错误:参数:".concat(e," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));if(e.name)t.instance.pagePush("name",e.name,r);else if(e.path)t.instance.pagePush("path",e.path,r);else{if(!e.url)throw new Error("事件跳转发生错误:参数:".concat(e," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));window.open(e.url)}},this.toggle=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e)if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance.comToggle(i):console.warn("请传入正确的参数!")}else console.warn("请传入正确的参数!");else t.instance.comToggle(e);else console.warn("请传入正确的参数!")},this.show=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance._showComponent(i.toString()):console.warn("请传入正确的参数!")}}else t.instance._showComponent(e.toString());else console.warn("请传入正确的参数!")},this.hide=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance._hideComponent(i):console.warn("请传入正确的参数!")}}else t.instance._hideComponent(e);else console.warn("请传入正确的参数!")},this.activeState=function(e,r){t.instance.activeState(e,r)},this.updateComp=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance.updateComp(i):console.warn("请传入正确的参数!")}}else t.instance.updateComp(e);else console.warn("请传入正确的参数!")},this.instance=new Run(e)},run=function(e){return new G(e)},getDataForRelease=function(e,t){console.log("弃用")},createComponent=function(e,t){return t&&e?Go.getInstance().render(e,t):e?Go.getInstance().render(e):void 0},createComponentForParent=function(e,t,r){return void 0!==r&&e?Go.getInstance().renderForParent(e,t,r):e?Go.getInstance().renderForParent(e,t):void 0},emitEvent=function(e,t){return Go.getInstance().emitEvent(e,t||function(){})},log=function(){};exports.Go=Go,exports.GoAnimation=index,exports.Tool=index$1,exports.createComponent=createComponent,exports.createComponentForParent=createComponentForParent,exports.emitEvent=emitEvent,exports.fxhr=index$2,exports.getDataForRelease=getDataForRelease,exports.goUtils=index$3,exports.log=log,exports.refreshData=refreshData,exports.run=run,exports.store=store}));
|
|
64
64
|
//# sourceMappingURL=code.umd.js.map
|