go-core 0.0.49 → 0.0.51

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import t from"lodash";import e from"axios";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function i(t,e){return t(e={exports:{}},e.exports),e.exports}var a=i((function(t,e){t.exports=function(){var e,n;function i(){return e.apply(null,arguments)}function a(t){e=t}function s(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function u(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function c(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(u(t,e))return!1;return!0}function l(t){return void 0===t}function h(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function f(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function d(t,e){var n,r=[],i=t.length;for(n=0;n<i;++n)r.push(e(t[n],n));return r}function p(t,e){for(var n in e)u(e,n)&&(t[n]=e[n]);return u(e,"toString")&&(t.toString=e.toString),u(e,"valueOf")&&(t.valueOf=e.valueOf),t}function m(t,e,n,r){return Kn(t,e,n,r,!0).utc()}function g(){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 v(t){return null==t._pf&&(t._pf=g()),t._pf}function y(t){if(null==t._isValid){var e=v(t),r=n.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&r);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function _(t){var e=m(NaN);return null!=t?p(v(e),t):v(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){var e,n=Object(this),r=n.length>>>0;for(e=0;e<r;e++)if(e in n&&t.call(this,n[e],e,n))return!0;return!1};var b=i.momentProperties=[],w=!1;function D(t,e){var n,r,i,a=b.length;if(l(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),l(e._i)||(t._i=e._i),l(e._f)||(t._f=e._f),l(e._l)||(t._l=e._l),l(e._strict)||(t._strict=e._strict),l(e._tzm)||(t._tzm=e._tzm),l(e._isUTC)||(t._isUTC=e._isUTC),l(e._offset)||(t._offset=e._offset),l(e._pf)||(t._pf=v(e)),l(e._locale)||(t._locale=e._locale),a>0)for(n=0;n<a;n++)l(i=e[r=b[n]])||(t[r]=i);return t}function S(t){D(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,i.updateOffset(this),w=!1)}function T(t){return t instanceof S||null!=t&&null!=t._isAMomentObject}function x(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function E(t,e){var n=!0;return p((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){var r,a,s,o=[],c=arguments.length;for(a=0;a<c;a++){if(r="","object"==typeof arguments[a]){for(s in r+="\n["+a+"] ",arguments[0])u(arguments[0],s)&&(r+=s+": "+arguments[0][s]+", ");r=r.slice(0,-2)}else r=arguments[a];o.push(r)}x(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var O,M={};function k(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),M[t]||(x(e),M[t]=!0)}function C(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function A(t){var e,n;for(n in t)u(t,n)&&(C(e=t[n])?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function P(t,e){var n,r=p({},t);for(n in e)u(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},p(r[n],t[n]),p(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)u(t,n)&&!u(e,n)&&o(t[n])&&(r[n]=p({},r[n]));return r}function R(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,O=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)u(t,e)&&n.push(e);return n};var N={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(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return C(r)?r.call(e,n):r}function V(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}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,Y=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,L={},F={};function j(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(F[t]=i),e&&(F[e[0]]=function(){return V(i.apply(this,arguments),e[1],e[2])}),n&&(F[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function U(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function H(t){var e,n,r=t.match(B);for(e=0,n=r.length;e<n;e++)F[r[e]]?r[e]=F[r[e]]:r[e]=U(r[e]);return function(e){var i,a="";for(i=0;i<n;i++)a+=C(r[i])?r[i].call(e,t):r[i];return a}}function z(t,e){return t.isValid()?(e=G(e,t.localeData()),L[e]=L[e]||H(e),L[e](t)):t.localeData().invalidDate()}function G(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(Y.lastIndex=0;n>=0&&Y.test(t);)t=t.replace(Y,r),Y.lastIndex=0,n-=1;return t}var q={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 W(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(B).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])}var Z="Invalid date";function K(){return this._invalidDate}var $="%d",X=/\d{1,2}/;function Q(t){return this._ordinal.replace("%d",t)}var J={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 tt(t,e,n,r){var i=this._relativeTime[n];return C(i)?i(t,e,n,r):i.replace(/%d/i,t)}function et(t,e){var n=this._relativeTime[t>0?"future":"past"];return C(n)?n(e):n.replace(/%s/i,e)}var nt={};function rt(t,e){var n=t.toLowerCase();nt[n]=nt[n+"s"]=nt[e]=t}function it(t){return"string"==typeof t?nt[t]||nt[t.toLowerCase()]:void 0}function at(t){var e,n,r={};for(n in t)u(t,n)&&(e=it(n))&&(r[e]=t[n]);return r}var st={};function ot(t,e){st[t]=e}function ut(t){var e,n=[];for(e in t)u(t,e)&&n.push({unit:e,priority:st[e]});return n.sort((function(t,e){return t.priority-e.priority})),n}function ct(t){return t%4==0&&t%100!=0||t%400==0}function lt(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function ht(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=lt(e)),n}function ft(t,e){return function(n){return null!=n?(pt(this,t,n),i.updateOffset(this,e),this):dt(this,t)}}function dt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function pt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&ct(t.year())&&1===t.month()&&29===t.date()?(n=ht(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),te(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function mt(t){return C(this[t=it(t)])?this[t]():this}function gt(t,e){if("object"==typeof t){var n,r=ut(t=at(t)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](t[r[n].unit])}else if(C(this[t=it(t)]))return this[t](e);return this}var vt,yt=/\d/,_t=/\d\d/,bt=/\d{3}/,wt=/\d{4}/,Dt=/[+-]?\d{6}/,St=/\d\d?/,Tt=/\d\d\d\d?/,xt=/\d\d\d\d\d\d?/,Et=/\d{1,3}/,Ot=/\d{1,4}/,Mt=/[+-]?\d{1,6}/,kt=/\d+/,Ct=/[+-]?\d+/,At=/Z|[+-]\d\d:?\d\d/gi,Pt=/Z|[+-]\d\d(?::?\d\d)?/gi,Rt=/[+-]?\d+(\.\d{1,3})?/,Nt=/[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;function It(t,e,n){vt[t]=C(e)?e:function(t,r){return t&&n?n:e}}function Vt(t,e){return u(vt,t)?vt[t](e._strict,e._locale):new RegExp(Bt(t))}function Bt(t){return Yt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i})))}function Yt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}vt={};var Lt={};function Ft(t,e){var n,r,i=e;for("string"==typeof t&&(t=[t]),h(e)&&(i=function(t,n){n[e]=ht(t)}),r=t.length,n=0;n<r;n++)Lt[t[n]]=i}function jt(t,e){Ft(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function Ut(t,e,n){null!=e&&u(Lt,t)&&Lt[t](e,n._a,n,t)}var Ht,zt=0,Gt=1,qt=2,Wt=3,Zt=4,Kt=5,$t=6,Xt=7,Qt=8;function Jt(t,e){return(t%e+e)%e}function te(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=Jt(e,12);return t+=(e-n)/12,1===n?ct(t)?29:28:31-n%7%2}Ht=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},j("M",["MM",2],"Mo",(function(){return this.month()+1})),j("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),j("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),rt("month","M"),ot("month",8),It("M",St),It("MM",St,_t),It("MMM",(function(t,e){return e.monthsShortRegex(t)})),It("MMMM",(function(t,e){return e.monthsRegex(t)})),Ft(["M","MM"],(function(t,e){e[Gt]=ht(t)-1})),Ft(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[Gt]=i:v(n).invalidMonth=t}));var ee="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ne="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),re=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ie=Nt,ae=Nt;function se(t,e){return t?s(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||re).test(e)?"format":"standalone"][t.month()]:s(this._months)?this._months:this._months.standalone}function oe(t,e){return t?s(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[re.test(e)?"format":"standalone"][t.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ue(t,e,n){var r,i,a,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=Ht.call(this._shortMonthsParse,s))?i:null:-1!==(i=Ht.call(this._longMonthsParse,s))?i:null:"MMM"===e?-1!==(i=Ht.call(this._shortMonthsParse,s))||-1!==(i=Ht.call(this._longMonthsParse,s))?i:null:-1!==(i=Ht.call(this._longMonthsParse,s))||-1!==(i=Ht.call(this._shortMonthsParse,s))?i:null}function ce(t,e,n){var r,i,a;if(this._monthsParseExact)return ue.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function le(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=ht(e);else if(!h(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),te(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function he(t){return null!=t?(le(this,t),i.updateOffset(this,!0),this):dt(this,"Month")}function fe(){return te(this.year(),this.month())}function de(t){return this._monthsParseExact?(u(this,"_monthsRegex")||me.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=ie),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function pe(t){return this._monthsParseExact?(u(this,"_monthsRegex")||me.call(this),t?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=ae),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function me(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=m([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=Yt(r[e]),i[e]=Yt(i[e]);for(e=0;e<24;e++)a[e]=Yt(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function ge(t){return ct(t)?366:365}j("Y",0,0,(function(){var t=this.year();return t<=9999?V(t,4):"+"+t})),j(0,["YY",2],0,(function(){return this.year()%100})),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),rt("year","y"),ot("year",1),It("Y",Ct),It("YY",St,_t),It("YYYY",Ot,wt),It("YYYYY",Mt,Dt),It("YYYYYY",Mt,Dt),Ft(["YYYYY","YYYYYY"],zt),Ft("YYYY",(function(t,e){e[zt]=2===t.length?i.parseTwoDigitYear(t):ht(t)})),Ft("YY",(function(t,e){e[zt]=i.parseTwoDigitYear(t)})),Ft("Y",(function(t,e){e[zt]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return ht(t)+(ht(t)>68?1900:2e3)};var ve=ft("FullYear",!0);function ye(){return ct(this.year())}function _e(t,e,n,r,i,a,s){var o;return t<100&&t>=0?(o=new Date(t+400,e,n,r,i,a,s),isFinite(o.getFullYear())&&o.setFullYear(t)):o=new Date(t,e,n,r,i,a,s),o}function be(t){var e,n;return t<100&&t>=0?((n=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function we(t,e,n){var r=7+e-n;return-(7+be(t,0,r).getUTCDay()-e)%7+r-1}function De(t,e,n,r,i){var a,s,o=1+7*(e-1)+(7+n-r)%7+we(t,r,i);return o<=0?s=ge(a=t-1)+o:o>ge(t)?(a=t+1,s=o-ge(t)):(a=t,s=o),{year:a,dayOfYear:s}}function Se(t,e,n){var r,i,a=we(t.year(),e,n),s=Math.floor((t.dayOfYear()-a-1)/7)+1;return s<1?r=s+Te(i=t.year()-1,e,n):s>Te(t.year(),e,n)?(r=s-Te(t.year(),e,n),i=t.year()+1):(i=t.year(),r=s),{week:r,year:i}}function Te(t,e,n){var r=we(t,e,n),i=we(t+1,e,n);return(ge(t)-r+i)/7}function xe(t){return Se(t,this._week.dow,this._week.doy).week}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),rt("week","w"),rt("isoWeek","W"),ot("week",5),ot("isoWeek",5),It("w",St),It("ww",St,_t),It("W",St),It("WW",St,_t),jt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=ht(t)}));var Ee={dow:0,doy:6};function Oe(){return this._week.dow}function Me(){return this._week.doy}function ke(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Ce(t){var e=Se(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Ae(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function Pe(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Re(t,e){return t.slice(e,7).concat(t.slice(0,e))}j("d",0,"do","day"),j("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),j("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),j("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),rt("day","d"),rt("weekday","e"),rt("isoWeekday","E"),ot("day",11),ot("weekday",11),ot("isoWeekday",11),It("d",St),It("e",St),It("E",St),It("dd",(function(t,e){return e.weekdaysMinRegex(t)})),It("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),It("dddd",(function(t,e){return e.weekdaysRegex(t)})),jt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:v(n).invalidWeekday=t})),jt(["d","e","E"],(function(t,e,n,r){e[r]=ht(t)}));var Ne="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ie="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Be=Nt,Ye=Nt,Le=Nt;function Fe(t,e){var n=s(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Re(n,this._week.dow):t?n[t.day()]:n}function je(t){return!0===t?Re(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Ue(t){return!0===t?Re(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function He(t,e,n){var r,i,a,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=Ht.call(this._weekdaysParse,s))?i:null:"ddd"===e?-1!==(i=Ht.call(this._shortWeekdaysParse,s))?i:null:-1!==(i=Ht.call(this._minWeekdaysParse,s))?i:null:"dddd"===e?-1!==(i=Ht.call(this._weekdaysParse,s))||-1!==(i=Ht.call(this._shortWeekdaysParse,s))||-1!==(i=Ht.call(this._minWeekdaysParse,s))?i:null:"ddd"===e?-1!==(i=Ht.call(this._shortWeekdaysParse,s))||-1!==(i=Ht.call(this._weekdaysParse,s))||-1!==(i=Ht.call(this._minWeekdaysParse,s))?i:null:-1!==(i=Ht.call(this._minWeekdaysParse,s))||-1!==(i=Ht.call(this._weekdaysParse,s))||-1!==(i=Ht.call(this._shortWeekdaysParse,s))?i:null}function ze(t,e,n){var r,i,a;if(this._weekdaysParseExact)return He.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function Ge(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Ae(t,this.localeData()),this.add(t-e,"d")):e}function qe(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function We(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Pe(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Ze(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=Be),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ke(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ye),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function $e(t){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Le),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Xe(){function t(t,e){return e.length-t.length}var e,n,r,i,a,s=[],o=[],u=[],c=[];for(e=0;e<7;e++)n=m([2e3,1]).day(e),r=Yt(this.weekdaysMin(n,"")),i=Yt(this.weekdaysShort(n,"")),a=Yt(this.weekdays(n,"")),s.push(r),o.push(i),u.push(a),c.push(r),c.push(i),c.push(a);s.sort(t),o.sort(t),u.sort(t),c.sort(t),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Je(){return this.hours()||24}function tn(t,e){j(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function en(t,e){return e._meridiemParse}function nn(t){return"p"===(t+"").toLowerCase().charAt(0)}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Qe),j("k",["kk",2],0,Je),j("hmm",0,0,(function(){return""+Qe.apply(this)+V(this.minutes(),2)})),j("hmmss",0,0,(function(){return""+Qe.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)})),j("Hmm",0,0,(function(){return""+this.hours()+V(this.minutes(),2)})),j("Hmmss",0,0,(function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)})),tn("a",!0),tn("A",!1),rt("hour","h"),ot("hour",13),It("a",en),It("A",en),It("H",St),It("h",St),It("k",St),It("HH",St,_t),It("hh",St,_t),It("kk",St,_t),It("hmm",Tt),It("hmmss",xt),It("Hmm",Tt),It("Hmmss",xt),Ft(["H","HH"],Wt),Ft(["k","kk"],(function(t,e,n){var r=ht(t);e[Wt]=24===r?0:r})),Ft(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),Ft(["h","hh"],(function(t,e,n){e[Wt]=ht(t),v(n).bigHour=!0})),Ft("hmm",(function(t,e,n){var r=t.length-2;e[Wt]=ht(t.substr(0,r)),e[Zt]=ht(t.substr(r)),v(n).bigHour=!0})),Ft("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[Wt]=ht(t.substr(0,r)),e[Zt]=ht(t.substr(r,2)),e[Kt]=ht(t.substr(i)),v(n).bigHour=!0})),Ft("Hmm",(function(t,e,n){var r=t.length-2;e[Wt]=ht(t.substr(0,r)),e[Zt]=ht(t.substr(r))})),Ft("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[Wt]=ht(t.substr(0,r)),e[Zt]=ht(t.substr(r,2)),e[Kt]=ht(t.substr(i))}));var rn=/[ap]\.?m?\.?/i,an=ft("Hours",!0);function sn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var on,un={calendar:N,longDateFormat:q,invalidDate:Z,ordinal:$,dayOfMonthOrdinalParse:X,relativeTime:J,months:ee,monthsShort:ne,week:Ee,weekdays:Ne,weekdaysMin:Ve,weekdaysShort:Ie,meridiemParse:rn},cn={},ln={};function hn(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function fn(t){return t?t.toLowerCase().replace("_","-"):t}function dn(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=fn(t[a]).split("-")).length,n=(n=fn(t[a+1]))?n.split("-"):null;e>0;){if(r=mn(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&hn(i,n)>=e-1)break;e--}a++}return on}function pn(t){return null!=t.match("^[^/\\\\]*$")}function mn(e){var n=null;if(void 0===cn[e]&&t&&t.exports&&pn(e))try{n=on._abbr,r(),gn(n)}catch(t){cn[e]=null}return cn[e]}function gn(t,e){var n;return t&&((n=l(e)?_n(t):vn(t,e))?on=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),on._abbr}function vn(t,e){if(null!==e){var n,r=un;if(e.abbr=t,null!=cn[t])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=cn[t]._config;else if(null!=e.parentLocale)if(null!=cn[e.parentLocale])r=cn[e.parentLocale]._config;else{if(null==(n=mn(e.parentLocale)))return ln[e.parentLocale]||(ln[e.parentLocale]=[]),ln[e.parentLocale].push({name:t,config:e}),null;r=n._config}return cn[t]=new R(P(r,e)),ln[t]&&ln[t].forEach((function(t){vn(t.name,t.config)})),gn(t),cn[t]}return delete cn[t],null}function yn(t,e){if(null!=e){var n,r,i=un;null!=cn[t]&&null!=cn[t].parentLocale?cn[t].set(P(cn[t]._config,e)):(null!=(r=mn(t))&&(i=r._config),e=P(i,e),null==r&&(e.abbr=t),(n=new R(e)).parentLocale=cn[t],cn[t]=n),gn(t)}else null!=cn[t]&&(null!=cn[t].parentLocale?(cn[t]=cn[t].parentLocale,t===gn()&&gn(t)):null!=cn[t]&&delete cn[t]);return cn[t]}function _n(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return on;if(!s(t)){if(e=mn(t))return e;t=[t]}return dn(t)}function bn(){return O(cn)}function wn(t){var e,n=t._a;return n&&-2===v(t).overflow&&(e=n[Gt]<0||n[Gt]>11?Gt:n[qt]<1||n[qt]>te(n[zt],n[Gt])?qt:n[Wt]<0||n[Wt]>24||24===n[Wt]&&(0!==n[Zt]||0!==n[Kt]||0!==n[$t])?Wt:n[Zt]<0||n[Zt]>59?Zt:n[Kt]<0||n[Kt]>59?Kt:n[$t]<0||n[$t]>999?$t:-1,v(t)._overflowDayOfYear&&(e<zt||e>qt)&&(e=qt),v(t)._overflowWeeks&&-1===e&&(e=Xt),v(t)._overflowWeekday&&-1===e&&(e=Qt),v(t).overflow=e),t}var Dn=/^\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)?)?$/,Sn=/^\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)?)?$/,Tn=/Z|[+-]\d\d(?::?\d\d)?/,xn=[["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]],En=[["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/]],On=/^\/?Date\((-?\d+)/i,Mn=/^(?:(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}))$/,kn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Cn(t){var e,n,r,i,a,s,o=t._i,u=Dn.exec(o)||Sn.exec(o),c=xn.length,l=En.length;if(u){for(v(t).iso=!0,e=0,n=c;e<n;e++)if(xn[e][1].exec(u[1])){i=xn[e][0],r=!1!==xn[e][2];break}if(null==i)return void(t._isValid=!1);if(u[3]){for(e=0,n=l;e<n;e++)if(En[e][1].exec(u[3])){a=(u[2]||" ")+En[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(u[4]){if(!Tn.exec(u[4]))return void(t._isValid=!1);s="Z"}t._f=i+(a||"")+(s||""),Un(t)}else t._isValid=!1}function An(t,e,n,r,i,a){var s=[Pn(t),ne.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&s.push(parseInt(a,10)),s}function Pn(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Rn(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Nn(t,e,n){return!t||Ie.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(v(n).weekdayMismatch=!0,n._isValid=!1,!1)}function In(t,e,n){if(t)return kn[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Vn(t){var e,n=Mn.exec(Rn(t._i));if(n){if(e=An(n[4],n[3],n[2],n[5],n[6],n[7]),!Nn(n[1],e,t))return;t._a=e,t._tzm=In(n[8],n[9],n[10]),t._d=be.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),v(t).rfc2822=!0}else t._isValid=!1}function Bn(t){var e=On.exec(t._i);null===e?(Cn(t),!1===t._isValid&&(delete t._isValid,Vn(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:i.createFromInputFallback(t)))):t._d=new Date(+e[1])}function Yn(t,e,n){return null!=t?t:null!=e?e:n}function Ln(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Fn(t){var e,n,r,i,a,s=[];if(!t._d){for(r=Ln(t),t._w&&null==t._a[qt]&&null==t._a[Gt]&&jn(t),null!=t._dayOfYear&&(a=Yn(t._a[zt],r[zt]),(t._dayOfYear>ge(a)||0===t._dayOfYear)&&(v(t)._overflowDayOfYear=!0),n=be(a,0,t._dayOfYear),t._a[Gt]=n.getUTCMonth(),t._a[qt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Wt]&&0===t._a[Zt]&&0===t._a[Kt]&&0===t._a[$t]&&(t._nextDay=!0,t._a[Wt]=0),t._d=(t._useUTC?be:_e).apply(null,s),i=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Wt]=24),t._w&&void 0!==t._w.d&&t._w.d!==i&&(v(t).weekdayMismatch=!0)}}function jn(t){var e,n,r,i,a,s,o,u,c;null!=(e=t._w).GG||null!=e.W||null!=e.E?(a=1,s=4,n=Yn(e.GG,t._a[zt],Se($n(),1,4).year),r=Yn(e.W,1),((i=Yn(e.E,1))<1||i>7)&&(u=!0)):(a=t._locale._week.dow,s=t._locale._week.doy,c=Se($n(),a,s),n=Yn(e.gg,t._a[zt],c.year),r=Yn(e.w,c.week),null!=e.d?((i=e.d)<0||i>6)&&(u=!0):null!=e.e?(i=e.e+a,(e.e<0||e.e>6)&&(u=!0)):i=a),r<1||r>Te(n,a,s)?v(t)._overflowWeeks=!0:null!=u?v(t)._overflowWeekday=!0:(o=De(n,r,i,a,s),t._a[zt]=o.year,t._dayOfYear=o.dayOfYear)}function Un(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],v(t).empty=!0;var e,n,r,a,s,o,u,c=""+t._i,l=c.length,h=0;for(u=(r=G(t._f,t._locale).match(B)||[]).length,e=0;e<u;e++)a=r[e],(n=(c.match(Vt(a,t))||[])[0])&&((s=c.substr(0,c.indexOf(n))).length>0&&v(t).unusedInput.push(s),c=c.slice(c.indexOf(n)+n.length),h+=n.length),F[a]?(n?v(t).empty=!1:v(t).unusedTokens.push(a),Ut(a,n,t)):t._strict&&!n&&v(t).unusedTokens.push(a);v(t).charsLeftOver=l-h,c.length>0&&v(t).unusedInput.push(c),t._a[Wt]<=12&&!0===v(t).bigHour&&t._a[Wt]>0&&(v(t).bigHour=void 0),v(t).parsedDateParts=t._a.slice(0),v(t).meridiem=t._meridiem,t._a[Wt]=Hn(t._locale,t._a[Wt],t._meridiem),null!==(o=v(t).era)&&(t._a[zt]=t._locale.erasConvertYear(o,t._a[zt])),Fn(t),wn(t)}else Vn(t);else Cn(t)}function Hn(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0),e):e}function zn(t){var e,n,r,i,a,s,o=!1,u=t._f.length;if(0===u)return v(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<u;i++)a=0,s=!1,e=D({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Un(e),y(e)&&(s=!0),a+=v(e).charsLeftOver,a+=10*v(e).unusedTokens.length,v(e).score=a,o?a<r&&(r=a,n=e):(null==r||a<r||s)&&(r=a,n=e,s&&(o=!0));p(t,n||e)}function Gn(t){if(!t._d){var e=at(t._i),n=void 0===e.day?e.date:e.day;t._a=d([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),Fn(t)}}function qn(t){var e=new S(wn(Wn(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Wn(t){var e=t._i,n=t._f;return t._locale=t._locale||_n(t._l),null===e||void 0===n&&""===e?_({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),T(e)?new S(wn(e)):(f(e)?t._d=e:s(n)?zn(t):n?Un(t):Zn(t),y(t)||(t._d=null),t))}function Zn(t){var e=t._i;l(e)?t._d=new Date(i.now()):f(e)?t._d=new Date(e.valueOf()):"string"==typeof e?Bn(t):s(e)?(t._a=d(e.slice(0),(function(t){return parseInt(t,10)})),Fn(t)):o(e)?Gn(t):h(e)?t._d=new Date(e):i.createFromInputFallback(t)}function Kn(t,e,n,r,i){var a={};return!0!==e&&!1!==e||(r=e,e=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&c(t)||s(t)&&0===t.length)&&(t=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=t,a._f=e,a._strict=r,qn(a)}function $n(t,e,n,r){return Kn(t,e,n,r,!1)}i.createFromInputFallback=E("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Xn=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=$n.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:_()})),Qn=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=$n.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:_()}));function Jn(t,e){var n,r;if(1===e.length&&s(e[0])&&(e=e[0]),!e.length)return $n();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}function tr(){return Jn("isBefore",[].slice.call(arguments,0))}function er(){return Jn("isAfter",[].slice.call(arguments,0))}var nr=function(){return Date.now?Date.now():+new Date},rr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ir(t){var e,n,r=!1,i=rr.length;for(e in t)if(u(t,e)&&(-1===Ht.call(rr,e)||null!=t[e]&&isNaN(t[e])))return!1;for(n=0;n<i;++n)if(t[rr[n]]){if(r)return!1;parseFloat(t[rr[n]])!==ht(t[rr[n]])&&(r=!0)}return!0}function ar(){return this._isValid}function sr(){return kr(NaN)}function or(t){var e=at(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,s=e.day||0,o=e.hour||0,u=e.minute||0,c=e.second||0,l=e.millisecond||0;this._isValid=ir(e),this._milliseconds=+l+1e3*c+6e4*u+1e3*o*60*60,this._days=+s+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=_n(),this._bubble()}function ur(t){return t instanceof or}function cr(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function lr(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),s=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&ht(t[r])!==ht(e[r]))&&s++;return s+a}function hr(t,e){j(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+V(~~(t/60),2)+e+V(~~t%60,2)}))}hr("Z",":"),hr("ZZ",""),It("Z",Pt),It("ZZ",Pt),Ft(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=dr(Pt,t)}));var fr=/([\+\-]|\d\d)/gi;function dr(t,e){var n,r,i=(e||"").match(t);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(fr)||["-",0,0])[1]+ht(n[2]))?0:"+"===n[0]?r:-r}function pr(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(T(t)||f(t)?t.valueOf():$n(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):$n(t).local()}function mr(t){return-Math.round(t._d.getTimezoneOffset())}function gr(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=dr(Pt,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=mr(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?Nr(this,kr(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:mr(this)}function vr(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function yr(t){return this.utcOffset(0,t)}function _r(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(mr(this),"m")),this}function br(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=dr(At,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function wr(t){return!!this.isValid()&&(t=t?$n(t).utcOffset():0,(this.utcOffset()-t)%60==0)}function Dr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Sr(){if(!l(this._isDSTShifted))return this._isDSTShifted;var t,e={};return D(e,this),(e=Wn(e))._a?(t=e._isUTC?m(e._a):$n(e._a),this._isDSTShifted=this.isValid()&&lr(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Tr(){return!!this.isValid()&&!this._isUTC}function xr(){return!!this.isValid()&&this._isUTC}function Er(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Or=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Mr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function kr(t,e){var n,r,i,a=t,s=null;return ur(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:h(t)||!isNaN(+t)?(a={},e?a[e]=+t:a.milliseconds=+t):(s=Or.exec(t))?(n="-"===s[1]?-1:1,a={y:0,d:ht(s[qt])*n,h:ht(s[Wt])*n,m:ht(s[Zt])*n,s:ht(s[Kt])*n,ms:ht(cr(1e3*s[$t]))*n}):(s=Mr.exec(t))?(n="-"===s[1]?-1:1,a={y:Cr(s[2],n),M:Cr(s[3],n),w:Cr(s[4],n),d:Cr(s[5],n),h:Cr(s[6],n),m:Cr(s[7],n),s:Cr(s[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=Pr($n(a.from),$n(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new or(a),ur(t)&&u(t,"_locale")&&(r._locale=t._locale),ur(t)&&u(t,"_isValid")&&(r._isValid=t._isValid),r}function Cr(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ar(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Pr(t,e){var n;return t.isValid()&&e.isValid()?(e=pr(e,t),t.isBefore(e)?n=Ar(t,e):((n=Ar(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Rr(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(k(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Nr(this,kr(n,r),t),this}}function Nr(t,e,n,r){var a=e._milliseconds,s=cr(e._days),o=cr(e._months);t.isValid()&&(r=null==r||r,o&&le(t,dt(t,"Month")+o*n),s&&pt(t,"Date",dt(t,"Date")+s*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,s||o))}kr.fn=or.prototype,kr.invalid=sr;var Ir=Rr(1,"add"),Vr=Rr(-1,"subtract");function Br(t){return"string"==typeof t||t instanceof String}function Yr(t){return T(t)||f(t)||Br(t)||h(t)||Fr(t)||Lr(t)||null==t}function Lr(t){var e,n,r=o(t)&&!c(t),i=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s=a.length;for(e=0;e<s;e+=1)n=a[e],i=i||u(t,n);return r&&i}function Fr(t){var e=s(t),n=!1;return e&&(n=0===t.filter((function(e){return!h(e)&&Br(t)})).length),e&&n}function jr(t){var e,n,r=o(t)&&!c(t),i=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<a.length;e+=1)n=a[e],i=i||u(t,n);return r&&i}function Ur(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Hr(t,e){1===arguments.length&&(arguments[0]?Yr(arguments[0])?(t=arguments[0],e=void 0):jr(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||$n(),r=pr(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",s=e&&(C(e[a])?e[a].call(this,n):e[a]);return this.format(s||this.localeData().calendar(a,this,$n(n)))}function zr(){return new S(this)}function Gr(t,e){var n=T(t)?t:$n(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=it(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())}function qr(t,e){var n=T(t)?t:$n(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=it(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())}function Wr(t,e,n,r){var i=T(t)?t:$n(t),a=T(e)?e:$n(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))}function Zr(t,e){var n,r=T(t)?t:$n(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=it(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))}function Kr(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function $r(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Xr(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=pr(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=it(e)){case"year":a=Qr(this,r)/12;break;case"month":a=Qr(this,r);break;case"quarter":a=Qr(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:lt(a)}function Qr(t,e){if(t.date()<e.date())return-Qr(e,t);var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function Jr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ti(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?z(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(n,"Z")):z(n,e?"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 t,e,n,r,i="moment",a="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),t="["+i+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=a+'[")]',this.format(t+e+n+r)}function ni(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=z(this,t);return this.localeData().postformat(e)}function ri(t,e){return this.isValid()&&(T(t)&&t.isValid()||$n(t).isValid())?kr({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ii(t){return this.from($n(),t)}function ai(t,e){return this.isValid()&&(T(t)&&t.isValid()||$n(t).isValid())?kr({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function si(t){return this.to($n(),t)}function oi(t){var e;return void 0===t?this._locale._abbr:(null!=(e=_n(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ui=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function ci(){return this._locale}var li=1e3,hi=60*li,fi=60*hi,di=3506328*fi;function pi(t,e){return(t%e+e)%e}function mi(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-di:new Date(t,e,n).valueOf()}function gi(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-di:Date.UTC(t,e,n)}function vi(t){var e,n;if(void 0===(t=it(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?gi:mi,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=pi(e+(this._isUTC?0:this.utcOffset()*hi),fi);break;case"minute":e=this._d.valueOf(),e-=pi(e,hi);break;case"second":e=this._d.valueOf(),e-=pi(e,li)}return this._d.setTime(e),i.updateOffset(this,!0),this}function yi(t){var e,n;if(void 0===(t=it(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?gi:mi,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=fi-pi(e+(this._isUTC?0:this.utcOffset()*hi),fi)-1;break;case"minute":e=this._d.valueOf(),e+=hi-pi(e,hi)-1;break;case"second":e=this._d.valueOf(),e+=li-pi(e,li)-1}return this._d.setTime(e),i.updateOffset(this,!0),this}function _i(){return this._d.valueOf()-6e4*(this._offset||0)}function bi(){return Math.floor(this.valueOf()/1e3)}function wi(){return new Date(this.valueOf())}function Di(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Si(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Ti(){return this.isValid()?this.toISOString():null}function xi(){return y(this)}function Ei(){return p({},v(this))}function Oi(){return v(this).overflow}function Mi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function ki(t,e){var n,r,a,s=this._eras||_n("en")._eras;for(n=0,r=s.length;n<r;++n)switch("string"==typeof s[n].since&&(a=i(s[n].since).startOf("day"),s[n].since=a.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":a=i(s[n].until).startOf("day").valueOf(),s[n].until=a.valueOf()}return s}function Ci(t,e,n){var r,i,a,s,o,u=this.eras();for(t=t.toUpperCase(),r=0,i=u.length;r<i;++r)if(a=u[r].name.toUpperCase(),s=u[r].abbr.toUpperCase(),o=u[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(s===t)return u[r];break;case"NNNN":if(a===t)return u[r];break;case"NNNNN":if(o===t)return u[r]}else if([a,s,o].indexOf(t)>=0)return u[r]}function Ai(t,e){var n=t.since<=t.until?1:-1;return void 0===e?i(t.since).year():i(t.since).year()+(e-t.offset)*n}function Pi(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].name;if(r[t].until<=n&&n<=r[t].since)return r[t].name}return""}function Ri(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].narrow;if(r[t].until<=n&&n<=r[t].since)return r[t].narrow}return""}function Ni(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until)return r[t].abbr;if(r[t].until<=n&&n<=r[t].since)return r[t].abbr}return""}function Ii(){var t,e,n,r,a=this.localeData().eras();for(t=0,e=a.length;t<e;++t)if(n=a[t].since<=a[t].until?1:-1,r=this.clone().startOf("day").valueOf(),a[t].since<=r&&r<=a[t].until||a[t].until<=r&&r<=a[t].since)return(this.year()-i(a[t].since).year())*n+a[t].offset;return this.year()}function Vi(t){return u(this,"_erasNameRegex")||Hi.call(this),t?this._erasNameRegex:this._erasRegex}function Bi(t){return u(this,"_erasAbbrRegex")||Hi.call(this),t?this._erasAbbrRegex:this._erasRegex}function Yi(t){return u(this,"_erasNarrowRegex")||Hi.call(this),t?this._erasNarrowRegex:this._erasRegex}function Li(t,e){return e.erasAbbrRegex(t)}function Fi(t,e){return e.erasNameRegex(t)}function ji(t,e){return e.erasNarrowRegex(t)}function Ui(t,e){return e._eraYearOrdinalRegex||kt}function Hi(){var t,e,n=[],r=[],i=[],a=[],s=this.eras();for(t=0,e=s.length;t<e;++t)r.push(Yt(s[t].name)),n.push(Yt(s[t].abbr)),i.push(Yt(s[t].narrow)),a.push(Yt(s[t].name)),a.push(Yt(s[t].abbr)),a.push(Yt(s[t].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function zi(t,e){j(0,[t,t.length],0,e)}function Gi(t){return Xi.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function qi(t){return Xi.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Wi(){return Te(this.year(),1,4)}function Zi(){return Te(this.isoWeekYear(),1,4)}function Ki(){var t=this.localeData()._week;return Te(this.year(),t.dow,t.doy)}function $i(){var t=this.localeData()._week;return Te(this.weekYear(),t.dow,t.doy)}function Xi(t,e,n,r,i){var a;return null==t?Se(this,r,i).year:(e>(a=Te(t,r,i))&&(e=a),Qi.call(this,t,e,n,r,i))}function Qi(t,e,n,r,i){var a=De(t,e,n,r,i),s=be(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Ji(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),It("N",Li),It("NN",Li),It("NNN",Li),It("NNNN",Fi),It("NNNNN",ji),Ft(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?v(n).era=i:v(n).invalidEra=t})),It("y",kt),It("yy",kt),It("yyy",kt),It("yyyy",kt),It("yo",Ui),Ft(["y","yy","yyy","yyyy"],zt),Ft(["yo"],(function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[zt]=n._locale.eraYearOrdinalParse(t,i):e[zt]=parseInt(t,10)})),j(0,["gg",2],0,(function(){return this.weekYear()%100})),j(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),zi("gggg","weekYear"),zi("ggggg","weekYear"),zi("GGGG","isoWeekYear"),zi("GGGGG","isoWeekYear"),rt("weekYear","gg"),rt("isoWeekYear","GG"),ot("weekYear",1),ot("isoWeekYear",1),It("G",Ct),It("g",Ct),It("GG",St,_t),It("gg",St,_t),It("GGGG",Ot,wt),It("gggg",Ot,wt),It("GGGGG",Mt,Dt),It("ggggg",Mt,Dt),jt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=ht(t)})),jt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),j("Q",0,"Qo","quarter"),rt("quarter","Q"),ot("quarter",7),It("Q",yt),Ft("Q",(function(t,e){e[Gt]=3*(ht(t)-1)})),j("D",["DD",2],"Do","date"),rt("date","D"),ot("date",9),It("D",St),It("DD",St,_t),It("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),Ft(["D","DD"],qt),Ft("Do",(function(t,e){e[qt]=ht(t.match(St)[0])}));var ta=ft("Date",!0);function ea(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}j("DDD",["DDDD",3],"DDDo","dayOfYear"),rt("dayOfYear","DDD"),ot("dayOfYear",4),It("DDD",Et),It("DDDD",bt),Ft(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=ht(t)})),j("m",["mm",2],0,"minute"),rt("minute","m"),ot("minute",14),It("m",St),It("mm",St,_t),Ft(["m","mm"],Zt);var na=ft("Minutes",!1);j("s",["ss",2],0,"second"),rt("second","s"),ot("second",15),It("s",St),It("ss",St,_t),Ft(["s","ss"],Kt);var ra,ia,aa=ft("Seconds",!1);for(j("S",0,0,(function(){return~~(this.millisecond()/100)})),j(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),j(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),j(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),j(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),j(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),j(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),rt("millisecond","ms"),ot("millisecond",16),It("S",Et,yt),It("SS",Et,_t),It("SSS",Et,bt),ra="SSSS";ra.length<=9;ra+="S")It(ra,kt);function sa(t,e){e[$t]=ht(1e3*("0."+t))}for(ra="S";ra.length<=9;ra+="S")Ft(ra,sa);function oa(){return this._isUTC?"UTC":""}function ua(){return this._isUTC?"Coordinated Universal Time":""}ia=ft("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var ca=S.prototype;function la(t){return $n(1e3*t)}function ha(){return $n.apply(null,arguments).parseZone()}function fa(t){return t}ca.add=Ir,ca.calendar=Hr,ca.clone=zr,ca.diff=Xr,ca.endOf=yi,ca.format=ni,ca.from=ri,ca.fromNow=ii,ca.to=ai,ca.toNow=si,ca.get=mt,ca.invalidAt=Oi,ca.isAfter=Gr,ca.isBefore=qr,ca.isBetween=Wr,ca.isSame=Zr,ca.isSameOrAfter=Kr,ca.isSameOrBefore=$r,ca.isValid=xi,ca.lang=ui,ca.locale=oi,ca.localeData=ci,ca.max=Qn,ca.min=Xn,ca.parsingFlags=Ei,ca.set=gt,ca.startOf=vi,ca.subtract=Vr,ca.toArray=Di,ca.toObject=Si,ca.toDate=wi,ca.toISOString=ti,ca.inspect=ei,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ca[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ca.toJSON=Ti,ca.toString=Jr,ca.unix=bi,ca.valueOf=_i,ca.creationData=Mi,ca.eraName=Pi,ca.eraNarrow=Ri,ca.eraAbbr=Ni,ca.eraYear=Ii,ca.year=ve,ca.isLeapYear=ye,ca.weekYear=Gi,ca.isoWeekYear=qi,ca.quarter=ca.quarters=Ji,ca.month=he,ca.daysInMonth=fe,ca.week=ca.weeks=ke,ca.isoWeek=ca.isoWeeks=Ce,ca.weeksInYear=Ki,ca.weeksInWeekYear=$i,ca.isoWeeksInYear=Wi,ca.isoWeeksInISOWeekYear=Zi,ca.date=ta,ca.day=ca.days=Ge,ca.weekday=qe,ca.isoWeekday=We,ca.dayOfYear=ea,ca.hour=ca.hours=an,ca.minute=ca.minutes=na,ca.second=ca.seconds=aa,ca.millisecond=ca.milliseconds=ia,ca.utcOffset=gr,ca.utc=yr,ca.local=_r,ca.parseZone=br,ca.hasAlignedHourOffset=wr,ca.isDST=Dr,ca.isLocal=Tr,ca.isUtcOffset=xr,ca.isUtc=Er,ca.isUTC=Er,ca.zoneAbbr=oa,ca.zoneName=ua,ca.dates=E("dates accessor is deprecated. Use date instead.",ta),ca.months=E("months accessor is deprecated. Use month instead",he),ca.years=E("years accessor is deprecated. Use year instead",ve),ca.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vr),ca.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Sr);var da=R.prototype;function pa(t,e,n,r){var i=_n(),a=m().set(r,e);return i[n](a,t)}function ma(t,e,n){if(h(t)&&(e=t,t=void 0),t=t||"",null!=e)return pa(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=pa(t,r,n,"month");return i}function ga(t,e,n,r){"boolean"==typeof t?(h(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,h(e)&&(n=e,e=void 0),e=e||"");var i,a=_n(),s=t?a._week.dow:0,o=[];if(null!=n)return pa(e,(n+s)%7,r,"day");for(i=0;i<7;i++)o[i]=pa(e,(i+s)%7,r,"day");return o}function va(t,e){return ma(t,e,"months")}function ya(t,e){return ma(t,e,"monthsShort")}function _a(t,e,n){return ga(t,e,n,"weekdays")}function ba(t,e,n){return ga(t,e,n,"weekdaysShort")}function wa(t,e,n){return ga(t,e,n,"weekdaysMin")}da.calendar=I,da.longDateFormat=W,da.invalidDate=K,da.ordinal=Q,da.preparse=fa,da.postformat=fa,da.relativeTime=tt,da.pastFuture=et,da.set=A,da.eras=ki,da.erasParse=Ci,da.erasConvertYear=Ai,da.erasAbbrRegex=Bi,da.erasNameRegex=Vi,da.erasNarrowRegex=Yi,da.months=se,da.monthsShort=oe,da.monthsParse=ce,da.monthsRegex=pe,da.monthsShortRegex=de,da.week=xe,da.firstDayOfYear=Me,da.firstDayOfWeek=Oe,da.weekdays=Fe,da.weekdaysMin=Ue,da.weekdaysShort=je,da.weekdaysParse=ze,da.weekdaysRegex=Ze,da.weekdaysShortRegex=Ke,da.weekdaysMinRegex=$e,da.isPM=nn,da.meridiem=sn,gn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===ht(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=E("moment.lang is deprecated. Use moment.locale instead.",gn),i.langData=E("moment.langData is deprecated. Use moment.localeData instead.",_n);var Da=Math.abs;function Sa(){var t=this._data;return this._milliseconds=Da(this._milliseconds),this._days=Da(this._days),this._months=Da(this._months),t.milliseconds=Da(t.milliseconds),t.seconds=Da(t.seconds),t.minutes=Da(t.minutes),t.hours=Da(t.hours),t.months=Da(t.months),t.years=Da(t.years),this}function Ta(t,e,n,r){var i=kr(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function xa(t,e){return Ta(this,t,e,1)}function Ea(t,e){return Ta(this,t,e,-1)}function Oa(t){return t<0?Math.floor(t):Math.ceil(t)}function Ma(){var t,e,n,r,i,a=this._milliseconds,s=this._days,o=this._months,u=this._data;return a>=0&&s>=0&&o>=0||a<=0&&s<=0&&o<=0||(a+=864e5*Oa(Ca(o)+s),s=0,o=0),u.milliseconds=a%1e3,t=lt(a/1e3),u.seconds=t%60,e=lt(t/60),u.minutes=e%60,n=lt(e/60),u.hours=n%24,s+=lt(n/24),o+=i=lt(ka(s)),s-=Oa(Ca(i)),r=lt(o/12),o%=12,u.days=s,u.months=o,u.years=r,this}function ka(t){return 4800*t/146097}function Ca(t){return 146097*t/4800}function Aa(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=it(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+ka(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Ca(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}}function Pa(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ht(this._months/12):NaN}function Ra(t){return function(){return this.as(t)}}var Na=Ra("ms"),Ia=Ra("s"),Va=Ra("m"),Ba=Ra("h"),Ya=Ra("d"),La=Ra("w"),Fa=Ra("M"),ja=Ra("Q"),Ua=Ra("y");function Ha(){return kr(this)}function za(t){return t=it(t),this.isValid()?this[t+"s"]():NaN}function Ga(t){return function(){return this.isValid()?this._data[t]:NaN}}var qa=Ga("milliseconds"),Wa=Ga("seconds"),Za=Ga("minutes"),Ka=Ga("hours"),$a=Ga("days"),Xa=Ga("months"),Qa=Ga("years");function Ja(){return lt(this.days()/7)}var ts=Math.round,es={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ns(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function rs(t,e,n,r){var i=kr(t).abs(),a=ts(i.as("s")),s=ts(i.as("m")),o=ts(i.as("h")),u=ts(i.as("d")),c=ts(i.as("M")),l=ts(i.as("w")),h=ts(i.as("y")),f=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||s<=1&&["m"]||s<n.m&&["mm",s]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(f=f||l<=1&&["w"]||l<n.w&&["ww",l]),(f=f||c<=1&&["M"]||c<n.M&&["MM",c]||h<=1&&["y"]||["yy",h])[2]=e,f[3]=+t>0,f[4]=r,ns.apply(null,f)}function is(t){return void 0===t?ts:"function"==typeof t&&(ts=t,!0)}function as(t,e){return void 0!==es[t]&&(void 0===e?es[t]:(es[t]=e,"s"===t&&(es.ss=e-1),!0))}function ss(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,a=es;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(i=t),"object"==typeof e&&(a=Object.assign({},es,e),null!=e.s&&null==e.ss&&(a.ss=e.s-1)),r=rs(this,!i,a,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var os=Math.abs;function us(t){return(t>0)-(t<0)||+t}function cs(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,r,i,a,s,o,u=os(this._milliseconds)/1e3,c=os(this._days),l=os(this._months),h=this.asSeconds();return h?(t=lt(u/60),e=lt(t/60),u%=60,t%=60,n=lt(l/12),l%=12,r=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",a=us(this._months)!==us(h)?"-":"",s=us(this._days)!==us(h)?"-":"",o=us(this._milliseconds)!==us(h)?"-":"",i+"P"+(n?a+n+"Y":"")+(l?a+l+"M":"")+(c?s+c+"D":"")+(e||t||u?"T":"")+(e?o+e+"H":"")+(t?o+t+"M":"")+(u?o+r+"S":"")):"P0D"}var ls=or.prototype;return ls.isValid=ar,ls.abs=Sa,ls.add=xa,ls.subtract=Ea,ls.as=Aa,ls.asMilliseconds=Na,ls.asSeconds=Ia,ls.asMinutes=Va,ls.asHours=Ba,ls.asDays=Ya,ls.asWeeks=La,ls.asMonths=Fa,ls.asQuarters=ja,ls.asYears=Ua,ls.valueOf=Pa,ls._bubble=Ma,ls.clone=Ha,ls.get=za,ls.milliseconds=qa,ls.seconds=Wa,ls.minutes=Za,ls.hours=Ka,ls.days=$a,ls.weeks=Ja,ls.months=Xa,ls.years=Qa,ls.humanize=ss,ls.toISOString=cs,ls.toString=cs,ls.toJSON=cs,ls.locale=oi,ls.localeData=ci,ls.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",cs),ls.lang=ui,j("X",0,0,"unix"),j("x",0,0,"valueOf"),It("x",Ct),It("X",Rt),Ft("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t))})),Ft("x",(function(t,e,n){n._d=new Date(ht(t))})),
2
2
  //! moment.js
3
- i.version="2.29.4",a($n),i.fn=ca,i.min=tr,i.max=er,i.now=nr,i.utc=m,i.unix=la,i.months=va,i.isDate=f,i.locale=gn,i.invalid=_,i.duration=kr,i.isMoment=T,i.weekdays=_a,i.parseZone=ha,i.localeData=_n,i.isDuration=ur,i.monthsShort=ya,i.weekdaysMin=wa,i.defineLocale=vn,i.updateLocale=yn,i.locales=bn,i.weekdaysShort=ba,i.normalizeUnits=it,i.relativeTimeRounding=is,i.relativeTimeThreshold=as,i.calendarFormat=Ur,i.prototype=ca,i.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"},i}()})),s={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,tw:null,watermark:null,endnotes:null,selectdChangeOrigin:"",sysConst:[{des:"年份",key:1001,mapField:"GO_DATA_YEAR",mapping:"-",model:"2",name:"GO_DATA_YEAR",value:a().get("year")},{des:"月份",key:1005,mapField:"GO_DATA_MONTH",mapping:"-",model:"2",name:"GO_DATA_MONTH",value:a().get("month")},{des:"日期",key:1004,mapField:"GO_DATA_DATE",mapping:"-",model:"2",name:"GO_DATA_DATE",value:a().get("date")},{des:"星期",key:1003,mapField:"GO_DATA_WEEK",mapping:"-",model:"2",name:"GO_DATA_WEEK",value:a().format("dddd")},{des:"版本",key:1002,mapField:"GO_VERSION",mapping:"-",model:"2",name:"GO_VERSION",value:"1.0.0"}]},o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)};var u=function(){return u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},u.apply(this,arguments)};function c(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))}function l(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}}function h(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var f={createItem:function(e){e.catch={selectd:t.cloneDeep(e.selectd),list:t.cloneDeep(e.list)}},resetData:function(e,n){var r=t.cloneDeep(n);e.selected=r.selected,e.list=r.list},execute:function(e){e.undoRedoPointer===e.undos.length-1?(e.undos.length>10&&t.pullAt(e.undos,0),e.undos.push({selectd:t.cloneDeep(e.selectd),list:t.cloneDeep(e.list)})):e.undos.splice(e.undoRedoPointer+1,e.undos.length-1-e.undoRedoPointer,{selectd:t.cloneDeep(e.selectd),list:t.cloneDeep(e.list)}),e.undoRedoPointer=e.undos.length-1},undo:function(t){if(t.undoRedoPointer>0&&t.undoRedoPointer<t.undos.length){t.undoRedoPointer=t.undoRedoPointer-1;var e=t.undos[t.undoRedoPointer];this.commit("GoCom/resetData",e)}},redo:function(t){if(t.undoRedoPointer>=0&&t.undoRedoPointer<t.undos.length){t.undoRedoPointer=t.undoRedoPointer+1;var e=t.undos[t.undoRedoPointer];this.commit("GoCom/resetData",e)}}},d=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\n"]),p=URL.createObjectURL(d);function m(t,e){return void 0===e&&(e=5e3),c(this,void 0,void 0,(function(){var n;return l(this,(function(r){return n=new Worker(p),[2,new Promise((function(r,i){var a=function(){clearTimeout(o),n.removeEventListener("message",s),n.terminate(),n=null},s=function(t){var e=t.data,n=e.code,s=e.result,o=e.err;a(),1===n?r(s):i(o)};n.postMessage({code:t}),n.addEventListener("message",s);var o=setTimeout((function(){a(),i("timeout")}),e)}))]}))}))}function g(e,n,r,i,a){return c(this,void 0,void 0,(function(){var s,o,u,c,h,f,d,p,m;return l(this,(function(g){switch(g.label){case 0:if(s=e,o=t.cloneDeep(n),u=o.use,c=o.data,!u)return[3,4];h=function(e){var n,r,o;return l(this,(function(u){switch(u.label){case 0:return c[e].use?(n=c[e].dependVars,r={},i&&r&&n&&n.length&&n.map((function(e){var n=t.cloneDeep(i).filter((function(t){var n=t.mapField==e&&1==t.current&&t.eventSourceId==a.cid&&""!=t.value;return n&&(r[e]=t.value),n}));if(!n||0==n.length){var s=i.filter((function(t){return""!=t.value}));s&&s.length&&(r[e]=s[0].value)}})),[4,v(c[e].code,s,r)]):[3,2];case 1:o=u.sent(),s=o.data,u.label=2;case 2:return[2]}}))},f=0,g.label=1;case 1:return f<c.length?[5,h(f)]:[3,4];case 2:g.sent(),g.label=3;case 3:return f++,[3,1];case 4:return p=s,(d=r)&&"object"==typeof s&&(Array.isArray(p)?(p=[],s.forEach((function(t){m={},d.forEach((function(e){m[e.field]=t[e.mapField]})),p.push(m)}))):(p={},d.forEach((function(t){p[t.field]=s[t.mapField]})))),[2,p]}}))}))}function v(t,e,n){return void 0===n&&(n={}),c(this,void 0,void 0,(function(){var r,i,a,s,o;return l(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),a=(r=[e,n,""])[1],s=r[2],"object"==typeof(i=r[0])&&(i=JSON.stringify(e)),"object"==typeof n&&(a=JSON.stringify(n)),Object.keys(n).forEach((function(t){return s+="".concat(t,",")})),o="let data=eval(".concat(i,"); "),o+=s?"let {".concat(s,"} = eval(").concat(a,"); "):"",[4,m(o+="".concat(t))];case 1:return[2,{success:!0,data:u.sent()}];case 2:return[2,{success:!1,error:u.sent(),data:e}];case 3:return[2]}}))}))}function y(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function _(t,e){return t&e}function b(t,e){return t|e}function w(t,e){return t^e}function D(t,e){return t&~e}function S(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function T(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var x,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function O(t){var e,n,r="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),r+=E.charAt(n>>6)+E.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=E.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=E.charAt(n>>2)+E.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function M(t){var e,n="",r=0,i=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var a=E.indexOf(t.charAt(e));a<0||(0==r?(n+=y(a>>2),i=3&a,r=1):1==r?(n+=y(i<<2|a>>4),i=15&a,r=2):2==r?(n+=y(i),n+=y(a>>2),i=3&a,r=3):(n+=y(i<<2|a>>4),n+=y(15&a),r=0))}return 1==r&&(n+=y(i<<2)),n}var k,C=function(t){var e;if(void 0===x){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(x={},e=0;e<16;++e)x[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)x[n.charAt(e)]=e;for(e=0;e<r.length;++e)x[r.charAt(e)]=-1}var i=[],a=0,s=0;for(e=0;e<t.length;++e){var o=t.charAt(e);if("="==o)break;if(-1!=(o=x[o])){if(void 0===o)throw new Error("Illegal character at offset "+e);a|=o,++s>=2?(i[i.length]=a,a=0,s=0):a<<=4}}if(s)throw new Error("Hex encoding incomplete: 4 bits missing");return i},A={decode:function(t){var e;if(void 0===k){var n="= \f\n\r\t \u2028\u2029";for(k=Object.create(null),e=0;e<64;++e)k["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(k["-"]=62,k._=63,e=0;e<n.length;++e)k[n.charAt(e)]=-1}var r=[],i=0,a=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=k[s])){if(void 0===s)throw new Error("Illegal character at offset "+e);i|=s,++a>=4?(r[r.length]=i>>16,r[r.length]=i>>8&255,r[r.length]=255&i,i=0,a=0):i<<=6}}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=i>>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=A.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return A.decode(t)}},P=1e13,R=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,r,i=this.buf,a=i.length;for(n=0;n<a;++n)(r=i[n]*t+e)<P?e=0:r-=(e=0|r/P)*P,i[n]=r;e>0&&(i[n]=e)},t.prototype.sub=function(t){var e,n,r=this.buf,i=r.length;for(e=0;e<i;++e)(n=r[e]-t)<0?(n+=P,t=1):t=0,r[e]=n;for(;0===r[r.length-1];)r.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),r=e.length-2;r>=0;--r)n+=(P+e[r]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;n>=0;--n)e=e*P+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),N=/^(\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)?)?$/,I=/^(\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 V(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var B,Y=function(){function t(e,n){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=n)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,n){for(var r="",i=t;i<e;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},t.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var n="",r=t;r<e;++r)n+=String.fromCharCode(this.get(r));return n},t.prototype.parseStringUTF=function(t,e){for(var n="",r=t;r<e;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},t.prototype.parseStringBMP=function(t,e){for(var n,r,i="",a=t;a<e;)n=this.get(a++),r=this.get(a++),i+=String.fromCharCode(n<<8|r);return i},t.prototype.parseTime=function(t,e,n){var r=this.parseStringISO(t,e),i=(n?N:I).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},t.prototype.parseInteger=function(t,e){for(var n,r=this.get(t),i=r>127,a=i?255:0,s="";r==a&&++t<e;)r=this.get(t);if(0===(n=e-t))return i?-1:0;if(n>4){for(s=r,n<<=3;0==(128&(+s^a));)s=+s<<1,--n;s="("+n+" bit)\n"}i&&(r-=256);for(var o=new R(r),u=t+1;u<e;++u)o.mulAdd(256,this.get(u));return s+o.toString()},t.prototype.parseBitString=function(t,e,n){for(var r=this.get(t),i="("+((e-t-1<<3)-r)+" bit)\n",a="",s=t+1;s<e;++s){for(var o=this.get(s),u=s==e-1?r:0,c=7;c>=u;--c)a+=o>>c&1?"1":"0";if(a.length>n)return i+V(a,n)}return i+a},t.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return V(this.parseStringISO(t,e),n);var r=e-t,i="("+r+" byte)\n";r>(n/=2)&&(e=t+n);for(var a=t;a<e;++a)i+=this.hexByte(this.get(a));return r>n&&(i+="…"),i},t.prototype.parseOID=function(t,e,n){for(var r="",i=new R,a=0,s=t;s<e;++s){var o=this.get(s);if(i.mulAdd(128,127&o),a+=7,!(128&o)){if(""===r)if((i=i.simplify())instanceof R)i.sub(80),r="2."+i.toString();else{var u=i<80?i<40?0:1:2;r=u+"."+(i-40*u)}else r+="."+i.toString();if(r.length>n)return V(r,n);i=new R,a=0}}return a>0&&(r+=".incomplete"),r},t}(),L=function(){function t(t,e,n,r,i){if(!(r instanceof F))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=r,this.sub=i}return t.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()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return V(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return V(this.stream.parseStringISO(e,e+n),t);case 30:return V(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var n=0,r=this.sub.length;n<r;++n)e+=this.sub[n].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;e=0;for(var r=0;r<n;++r)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},t.decode=function(e){var n;n=e instanceof Y?e:new Y(e,0);var r=new Y(n),i=new F(n),a=t.decodeLength(n),s=n.pos,o=s-r.pos,u=null,c=function(){var e=[];if(null!==a){for(var r=s+a;n.pos<r;)e[e.length]=t.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var i=t.decode(n);if(i.tag.isEOC())break;e[e.length]=i}a=s-n.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(i.tagConstructed)u=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");u=c();for(var l=0;l<u.length;++l)if(u[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){u=null}if(null===u){if(null===a)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);n.pos=s+Math.abs(a)}return new t(r,o,a,i,u)},t}(),F=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var n=new R;do{e=t.get(),n.mulAdd(128,127&e)}while(128&e);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),j=[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],U=(1<<26)/j[j.length-1],H=function(){function t(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,a="",s=this.t,o=this.DB-s*this.DB%e;if(s-- >0)for(o<this.DB&&(n=this[s]>>o)>0&&(i=!0,a=y(n));s>=0;)o<e?(n=(this[s]&(1<<o)-1)<<e-o,n|=this[--s]>>(o+=this.DB-e)):(n=this[s]>>(o-=e)&r,o<=0&&(o+=this.DB,--s)),n>0&&(i=!0),i&&(a+=y(n));return i?a:"0"},t.prototype.negate=function(){var e=Z();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+nt(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var n=Z();return this.abs().divRemTo(e,null,n),this.s<0&&n.compareTo(t.ZERO)>0&&e.subTo(n,n),n},t.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new G(e):new q(e),this.exp(t,n)},t.prototype.clone=function(){var t=Z();return this.copyTo(t),t},t.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]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=Z();return this.bitwiseTo(t,_,e),e},t.prototype.or=function(t){var e=Z();return this.bitwiseTo(t,b,e),e},t.prototype.xor=function(t){var e=Z();return this.bitwiseTo(t,w,e),e},t.prototype.andNot=function(t){var e=Z();return this.bitwiseTo(t,D,e),e},t.prototype.not=function(){for(var t=Z(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=Z();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=Z();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+S(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=T(this[n]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,b)},t.prototype.clearBit=function(t){return this.changeBit(t,D)},t.prototype.flipBit=function(t){return this.changeBit(t,w)},t.prototype.add=function(t){var e=Z();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=Z();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=Z();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=Z();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=Z();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=Z(),n=Z();return this.divRemTo(t,e,n),[e,n]},t.prototype.modPow=function(t,e){var n,r,i=t.bitLength(),a=et(1);if(i<=0)return a;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new G(e):e.isEven()?new W(e):new q(e);var s=[],o=3,u=n-1,c=(1<<n)-1;if(s[1]=r.convert(this),n>1){var l=Z();for(r.sqrTo(s[1],l);o<=c;)s[o]=Z(),r.mulTo(l,s[o-2],s[o]),o+=2}var h,f,d=t.t-1,p=!0,m=Z();for(i=nt(t[d])-1;d>=0;){for(i>=u?h=t[d]>>i-u&c:(h=(t[d]&(1<<i+1)-1)<<u-i,d>0&&(h|=t[d-1]>>this.DB+i-u)),o=n;0==(1&h);)h>>=1,--o;if((i-=o)<0&&(i+=this.DB,--d),p)s[h].copyTo(a),p=!1;else{for(;o>1;)r.sqrTo(a,m),r.sqrTo(m,a),o-=2;o>0?r.sqrTo(a,m):(f=a,a=m,m=f),r.mulTo(m,s[h],a)}for(;d>=0&&0==(t[d]&1<<i);)r.sqrTo(a,m),f=a,a=m,m=f,--i<0&&(i=this.DB-1,--d)}return r.revert(a)},t.prototype.modInverse=function(e){var n=e.isEven();if(this.isEven()&&n||0==e.signum())return t.ZERO;for(var r=e.clone(),i=this.clone(),a=et(1),s=et(0),o=et(0),u=et(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(e,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),n?(o.isEven()&&u.isEven()||(o.addTo(this,o),u.subTo(e,u)),o.rShiftTo(1,o)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),n&&a.subTo(o,a),s.subTo(u,s)):(i.subTo(r,i),n&&o.subTo(a,o),u.subTo(s,u))}return 0!=i.compareTo(t.ONE)?t.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},t.prototype.pow=function(t){return this.exp(t,new z)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)return e;for(i<a&&(a=i),a>0&&(e.rShiftTo(a,e),n.rShiftTo(a,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return a>0&&n.lShiftTo(a,n),n},t.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=j[j.length-1]){for(e=0;e<j.length;++e)if(n[0]==j[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<j.length;){for(var r=j[e],i=e+1;i<j.length&&r<U;)r*=j[i++];for(r=n.modInt(r);e<i;)if(r%j[e++]==0)return!1}return n.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(e,n);r=2}this.t=0,this.s=0;for(var i=e.length,a=!1,s=0;--i>=0;){var o=8==r?255&+e[i]:tt(e,i);o<0?"-"==e.charAt(i)&&(a=!0):(a=!1,0==s?this[this.t++]=o:s+r>this.DB?(this[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this[this.t++]=o>>this.DB-s):this[this.t-1]|=o<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&0!=(128&+e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),a&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,a=Math.floor(t/this.DB),s=this.s<<n&this.DM,o=this.t-1;o>=0;--o)e[o+a+1]=this[o]>>r|s,s=(this[o]&i)<<n;for(o=a-1;o>=0;--o)e[o]=0;e[a]=s,e.t=this.t+a+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,a=(1<<r)-1;e[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&a)<<i,e[s-n]=this[s]>>r;r>0&&(e[this.t-n-1]|=(this.s&a)<<i),e.t=this.t-n,e.clamp()}},t.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},t.prototype.multiplyTo=function(e,n){var r=this.abs(),i=e.abs(),a=r.t;for(n.t=a+i.t;--a>=0;)n[a]=0;for(a=0;a<i.t;++a)n[a+r.t]=r.am(0,i[a],n,a,0,r.t);n.s=0,n.clamp(),this.s!=e.s&&t.ZERO.subTo(n,n)},t.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,n,r){var i=e.abs();if(!(i.t<=0)){var a=this.abs();if(a.t<i.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=Z());var s=Z(),o=this.s,u=e.s,c=this.DB-nt(i[i.t-1]);c>0?(i.lShiftTo(c,s),a.lShiftTo(c,r)):(i.copyTo(s),a.copyTo(r));var l=s.t,h=s[l-1];if(0!=h){var f=h*(1<<this.F1)+(l>1?s[l-2]>>this.F2:0),d=this.FV/f,p=(1<<this.F1)/f,m=1<<this.F2,g=r.t,v=g-l,y=null==n?Z():n;for(s.dlShiftTo(v,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),t.ONE.dlShiftTo(l,y),y.subTo(s,s);s.t<l;)s[s.t++]=0;for(;--v>=0;){var _=r[--g]==h?this.DM:Math.floor(r[g]*d+(r[g-1]+m)*p);if((r[g]+=s.am(0,_,r,v,0,l))<_)for(s.dlShiftTo(v,y),r.subTo(y,r);r[g]<--_;)r.subTo(y,r)}null!=n&&(r.drShiftTo(l,n),o!=u&&t.ZERO.subTo(n,n)),r.t=l,r.clamp(),c>0&&r.rShiftTo(c,r),o<0&&t.ZERO.subTo(r,r)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,n){if(e>4294967295||e<1)return t.ONE;var r=Z(),i=Z(),a=n.convert(this),s=nt(e)-1;for(a.copyTo(r);--s>=0;)if(n.sqrTo(r,i),(e&1<<s)>0)n.mulTo(i,a,r);else{var o=r;r=i,i=o}return n.revert(r)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=et(n),i=Z(),a=Z(),s="";for(this.divRemTo(r,i,a);i.signum()>0;)s=(n+a.intValue()).toString(t).substr(1)+s,i.divRemTo(r,i,a);return a.intValue().toString(t)+s},t.prototype.fromRadix=function(e,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),a=!1,s=0,o=0,u=0;u<e.length;++u){var c=tt(e,u);c<0?"-"==e.charAt(u)&&0==this.signum()&&(a=!0):(o=n*o+c,++s>=r&&(this.dMultiply(i),this.dAddOffset(o,0),s=0,o=0))}s>0&&(this.dMultiply(Math.pow(n,s)),this.dAddOffset(o,0)),a&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,n,r){if("number"==typeof n)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),b,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var i=[],a=7&e;i.length=1+(e>>3),n.nextBytes(i),a>0?i[0]&=(1<<a)-1:i[0]=0,this.fromString(i,256)}},t.prototype.bitwiseTo=function(t,e,n){var r,i,a=Math.min(t.t,this.t);for(r=0;r<a;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=a;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=a;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},t.prototype.changeBit=function(e,n){var r=t.ONE.shiftLeft(e);return this.bitwiseTo(r,n,r),r},t.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);r<i;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()},t.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},t.prototype.millerRabin=function(e){var n=this.subtract(t.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var i=n.shiftRight(r);(e=e+1>>1)>j.length&&(e=j.length);for(var a=Z(),s=0;s<e;++s){a.fromInt(j[Math.floor(Math.random()*j.length)]);var o=a.modPow(i,this);if(0!=o.compareTo(t.ONE)&&0!=o.compareTo(n)){for(var u=1;u++<r&&0!=o.compareTo(n);)if(0==(o=o.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=o.compareTo(n))return!1}}return!0},t.prototype.square=function(){var t=Z();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var a=n.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)e(n);else{a<s&&(s=a),s>0&&(n.rShiftTo(s,n),r.rShiftTo(s,r));var o=function(){(a=n.getLowestSetBit())>0&&n.rShiftTo(a,n),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(o,0):(s>0&&r.lShiftTo(s,r),setTimeout((function(){e(r)}),0))};setTimeout(o,10)}},t.prototype.fromNumberAsync=function(e,n,r,i){if("number"==typeof n)if(e<2)this.fromInt(1);else{this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),b,this),this.isEven()&&this.dAddOffset(1,0);var a=this,s=function(){a.dAddOffset(2,0),a.bitLength()>e&&a.subTo(t.ONE.shiftLeft(e-1),a),a.isProbablePrime(n)?setTimeout((function(){i()}),0):setTimeout(s,0)};setTimeout(s,0)}else{var o=[],u=7&e;o.length=1+(e>>3),n.nextBytes(o),u>0?o[0]&=(1<<u)-1:o[0]=0,this.fromString(o,256)}},t}(),z=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),G=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),q=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=Z();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(H.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=Z();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),W=function(){function t(t){this.m=t,this.r2=Z(),this.q3=Z(),H.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Z();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function Z(){return new H(null)}function K(t,e){return new H(t,e)}var $="undefined"!=typeof navigator;$&&"Microsoft Internet Explorer"==navigator.appName?(H.prototype.am=function(t,e,n,r,i,a){for(var s=32767&e,o=e>>15;--a>=0;){var u=32767&this[t],c=this[t++]>>15,l=o*u+c*s;i=((u=s*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+o*c+(i>>>30),n[r++]=1073741823&u}return i},B=30):$&&"Netscape"!=navigator.appName?(H.prototype.am=function(t,e,n,r,i,a){for(;--a>=0;){var s=e*this[t++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},B=26):(H.prototype.am=function(t,e,n,r,i,a){for(var s=16383&e,o=e>>14;--a>=0;){var u=16383&this[t],c=this[t++]>>14,l=o*u+c*s;i=((u=s*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+o*c,n[r++]=268435455&u}return i},B=28),H.prototype.DB=B,H.prototype.DM=(1<<B)-1,H.prototype.DV=1<<B;H.prototype.FV=Math.pow(2,52),H.prototype.F1=52-B,H.prototype.F2=2*B-52;var X,Q,J=[];for(X="0".charCodeAt(0),Q=0;Q<=9;++Q)J[X++]=Q;for(X="a".charCodeAt(0),Q=10;Q<36;++Q)J[X++]=Q;for(X="A".charCodeAt(0),Q=10;Q<36;++Q)J[X++]=Q;function tt(t,e){var n=J[t.charCodeAt(e)];return null==n?-1:n}function et(t){var e=Z();return e.fromInt(t),e}function nt(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}H.ZERO=et(0),H.ONE=et(1);var rt=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}();var it,at,st=null;if(null==st){st=[],at=0;var ot=void 0;if(window.crypto&&window.crypto.getRandomValues){var ut=new Uint32Array(256);for(window.crypto.getRandomValues(ut),ot=0;ot<ut.length;++ot)st[at++]=255&ut[ot]}var ct=0,lt=function(t){if((ct=ct||0)>=256||at>=256)window.removeEventListener?window.removeEventListener("mousemove",lt,!1):window.detachEvent&&window.detachEvent("onmousemove",lt);else try{var e=t.x+t.y;st[at++]=255&e,ct+=1}catch(t){}};window.addEventListener?window.addEventListener("mousemove",lt,!1):window.attachEvent&&window.attachEvent("onmousemove",lt)}function ht(){if(null==it){for(it=new rt;at<256;){var t=Math.floor(65536*Math.random());st[at++]=255&t}for(it.init(st),at=0;at<st.length;++at)st[at]=0;at=0}return it.next()}var ft=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=ht()},t}();var dt=function(){function t(){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 t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=K(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,n=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=t.length-1;r>=0&&e>0;){var i=t.charCodeAt(r--);i<128?n[--e]=i:i>127&&i<2048?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var a=new ft,s=[];e>2;){for(s[0]=0;0==s[0];)a.nextBytes(s);n[--e]=s[0]}return n[--e]=2,n[--e]=0,new H(n)}(t,e);if(null==n)return null;var r=this.doPublic(n);if(null==r)return null;for(var i=r.toString(16),a=i.length,s=0;s<2*e-a;s++)i="0"+i;return i},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=K(t,16),this.e=parseInt(e,16),this.d=K(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,r,i,a,s,o){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=K(t,16),this.e=parseInt(e,16),this.d=K(n,16),this.p=K(r,16),this.q=K(i,16),this.dmp1=K(a,16),this.dmq1=K(s,16),this.coeff=K(o,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new ft,r=t>>1;this.e=parseInt(e,16);for(var i=new H(e,16);;){for(;this.p=new H(t-r,1,n),0!=this.p.subtract(H.ONE).gcd(i).compareTo(H.ONE)||!this.p.isProbablePrime(10););for(;this.q=new H(r,1,n),0!=this.q.subtract(H.ONE).gcd(i).compareTo(H.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q,this.q=a}var s=this.p.subtract(H.ONE),o=this.q.subtract(H.ONE),u=s.multiply(o);if(0==u.gcd(i).compareTo(H.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(u),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(o),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=K(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){var n=t.toByteArray(),r=0;for(;r<n.length&&0==n[r];)++r;if(n.length-r!=e-1||2!=n[r])return null;++r;for(;0!=n[r];)if(++r>=n.length)return null;var i="";for(;++r<n.length;){var a=255&n[r];a<128?i+=String.fromCharCode(a):a>191&&a<224?(i+=String.fromCharCode((31&a)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&a)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,n){var r=new ft,i=t>>1;this.e=parseInt(e,16);var a=new H(e,16),s=this,o=function(){var e=function(){if(s.p.compareTo(s.q)<=0){var t=s.p;s.p=s.q,s.q=t}var e=s.p.subtract(H.ONE),r=s.q.subtract(H.ONE),i=e.multiply(r);0==i.gcd(a).compareTo(H.ONE)?(s.n=s.p.multiply(s.q),s.d=a.modInverse(i),s.dmp1=s.d.mod(e),s.dmq1=s.d.mod(r),s.coeff=s.q.modInverse(s.p),setTimeout((function(){n()}),0)):setTimeout(o,0)},u=function(){s.q=Z(),s.q.fromNumberAsync(i,1,r,(function(){s.q.subtract(H.ONE).gcda(a,(function(t){0==t.compareTo(H.ONE)&&s.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(u,0)}))}))},c=function(){s.p=Z(),s.p.fromNumberAsync(t-i,1,r,(function(){s.p.subtract(H.ONE).gcda(a,(function(t){0==t.compareTo(H.ONE)&&s.p.isProbablePrime(10)?setTimeout(u,0):setTimeout(c,0)}))}))};setTimeout(c,0)};setTimeout(o,0)},t.prototype.sign=function(t,e,n){var r=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,r="",i=0;i<n;i+=2)r+="ff";return K("0001"+r+"00"+t,16)}((pt[n]||"")+e(t).toString(),this.n.bitLength()/4);if(null==r)return null;var i=this.doPrivate(r);if(null==i)return null;var a=i.toString(16);return 0==(1&a.length)?a:"0"+a},t.prototype.verify=function(t,e,n){var r=K(e,16),i=this.doPublic(r);return null==i?null:function(t){for(var e in pt)if(pt.hasOwnProperty(e)){var n=pt[e],r=n.length;if(t.substr(0,r)==n)return t.substr(r)}return t}
3
+ i.version="2.29.4",a($n),i.fn=ca,i.min=tr,i.max=er,i.now=nr,i.utc=m,i.unix=la,i.months=va,i.isDate=f,i.locale=gn,i.invalid=_,i.duration=kr,i.isMoment=T,i.weekdays=_a,i.parseZone=ha,i.localeData=_n,i.isDuration=ur,i.monthsShort=ya,i.weekdaysMin=wa,i.defineLocale=vn,i.updateLocale=yn,i.locales=bn,i.weekdaysShort=ba,i.normalizeUnits=it,i.relativeTimeRounding=is,i.relativeTimeThreshold=as,i.calendarFormat=Ur,i.prototype=ca,i.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"},i}()})),s={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,tw:null,watermark:null,endnotes:null,selectdChangeOrigin:"",sysConst:[{des:"年份",key:1001,mapField:"GO_DATA_YEAR",mapping:"-",model:"2",name:"GO_DATA_YEAR",value:a().get("year")},{des:"月份",key:1005,mapField:"GO_DATA_MONTH",mapping:"-",model:"2",name:"GO_DATA_MONTH",value:a().get("month")},{des:"日期",key:1004,mapField:"GO_DATA_DATE",mapping:"-",model:"2",name:"GO_DATA_DATE",value:a().get("date")},{des:"星期",key:1003,mapField:"GO_DATA_WEEK",mapping:"-",model:"2",name:"GO_DATA_WEEK",value:a().format("dddd")},{des:"版本",key:1002,mapField:"GO_VERSION",mapping:"-",model:"2",name:"GO_VERSION",value:"1.0.0"}]},o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)};var u=function(){return u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},u.apply(this,arguments)};function c(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))}function l(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}}function h(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var f={createItem:function(e){e.catch={selectd:t.cloneDeep(e.selectd),list:t.cloneDeep(e.list)}},resetData:function(e,n){var r=t.cloneDeep(n);e.selected=r.selected,e.list=r.list},execute:function(e){e.undoRedoPointer===e.undos.length-1?(e.undos.length>10&&t.pullAt(e.undos,0),e.undos.push({selectd:t.cloneDeep(e.selectd),list:t.cloneDeep(e.list)})):e.undos.splice(e.undoRedoPointer+1,e.undos.length-1-e.undoRedoPointer,{selectd:t.cloneDeep(e.selectd),list:t.cloneDeep(e.list)}),e.undoRedoPointer=e.undos.length-1},undo:function(t){if(t.undoRedoPointer>0&&t.undoRedoPointer<t.undos.length){t.undoRedoPointer=t.undoRedoPointer-1;var e=t.undos[t.undoRedoPointer];this.commit("GoCom/resetData",e)}},redo:function(t){if(t.undoRedoPointer>=0&&t.undoRedoPointer<t.undos.length){t.undoRedoPointer=t.undoRedoPointer+1;var e=t.undos[t.undoRedoPointer];this.commit("GoCom/resetData",e)}}},d=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\n"]),p=URL.createObjectURL(d);function m(t,e){return void 0===e&&(e=5e3),c(this,void 0,void 0,(function(){var n;return l(this,(function(r){return n=new Worker(p),[2,new Promise((function(r,i){var a=function(){clearTimeout(o),n.removeEventListener("message",s),n.terminate(),n=null},s=function(t){var e=t.data,n=e.code,s=e.result,o=e.err;a(),1===n?r(s):i(o)};n.postMessage({code:t}),n.addEventListener("message",s);var o=setTimeout((function(){a(),i("timeout")}),e)}))]}))}))}function g(e,n,r,i,a){return c(this,void 0,void 0,(function(){var a,s,o,u,c,h,f,d,p;return l(this,(function(m){switch(m.label){case 0:if(a=e,s=t.cloneDeep(n),o=s.use,u=s.data,!o)return[3,4];c=function(e){var n,r,s;return l(this,(function(o){switch(o.label){case 0:return u[e].use?(n=u[e].dependVars,r={},i&&r&&n&&n.length&&n.map((function(e){var n=t.cloneDeep(i).filter((function(t){var n=t.mapField==e&&""!=t.value;return n&&(r[e]=t.value),n}));if(!n||0==n.length){var a=i.filter((function(t){return""!=t.value}));a&&a.length&&(r[e]=a[0].value)}})),[4,v(u[e].code,a,r)]):[3,2];case 1:s=o.sent(),a=s.data,o.label=2;case 2:return[2]}}))},h=0,m.label=1;case 1:return h<u.length?[5,c(h)]:[3,4];case 2:m.sent(),m.label=3;case 3:return h++,[3,1];case 4:return d=a,(f=r)&&"object"==typeof a&&(Array.isArray(d)?(d=[],a.forEach((function(t){p={},f.forEach((function(e){p[e.field]=t[e.mapField]})),d.push(p)}))):(d={},f.forEach((function(t){d[t.field]=a[t.mapField]})))),[2,d]}}))}))}function v(t,e,n){return void 0===n&&(n={}),c(this,void 0,void 0,(function(){var r,i,a,s,o;return l(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),a=(r=[e,n,""])[1],s=r[2],"object"==typeof(i=r[0])&&(i=JSON.stringify(e)),"object"==typeof n&&(a=JSON.stringify(n)),Object.keys(n).forEach((function(t){return s+="".concat(t,",")})),o="let data=eval(".concat(i,"); "),o+=s?"let {".concat(s,"} = eval(").concat(a,"); "):"",[4,m(o+="".concat(t))];case 1:return[2,{success:!0,data:u.sent()}];case 2:return[2,{success:!1,error:u.sent(),data:e}];case 3:return[2]}}))}))}function y(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function _(t,e){return t&e}function b(t,e){return t|e}function w(t,e){return t^e}function D(t,e){return t&~e}function S(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function T(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var x,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function O(t){var e,n,r="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),r+=E.charAt(n>>6)+E.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=E.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=E.charAt(n>>2)+E.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function M(t){var e,n="",r=0,i=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var a=E.indexOf(t.charAt(e));a<0||(0==r?(n+=y(a>>2),i=3&a,r=1):1==r?(n+=y(i<<2|a>>4),i=15&a,r=2):2==r?(n+=y(i),n+=y(a>>2),i=3&a,r=3):(n+=y(i<<2|a>>4),n+=y(15&a),r=0))}return 1==r&&(n+=y(i<<2)),n}var k,C=function(t){var e;if(void 0===x){var n="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(x={},e=0;e<16;++e)x[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)x[n.charAt(e)]=e;for(e=0;e<r.length;++e)x[r.charAt(e)]=-1}var i=[],a=0,s=0;for(e=0;e<t.length;++e){var o=t.charAt(e);if("="==o)break;if(-1!=(o=x[o])){if(void 0===o)throw new Error("Illegal character at offset "+e);a|=o,++s>=2?(i[i.length]=a,a=0,s=0):a<<=4}}if(s)throw new Error("Hex encoding incomplete: 4 bits missing");return i},A={decode:function(t){var e;if(void 0===k){var n="= \f\n\r\t \u2028\u2029";for(k=Object.create(null),e=0;e<64;++e)k["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(k["-"]=62,k._=63,e=0;e<n.length;++e)k[n.charAt(e)]=-1}var r=[],i=0,a=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=k[s])){if(void 0===s)throw new Error("Illegal character at offset "+e);i|=s,++a>=4?(r[r.length]=i>>16,r[r.length]=i>>8&255,r[r.length]=255&i,i=0,a=0):i<<=6}}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=i>>10;break;case 3:r[r.length]=i>>16,r[r.length]=i>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=A.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return A.decode(t)}},P=1e13,R=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,r,i=this.buf,a=i.length;for(n=0;n<a;++n)(r=i[n]*t+e)<P?e=0:r-=(e=0|r/P)*P,i[n]=r;e>0&&(i[n]=e)},t.prototype.sub=function(t){var e,n,r=this.buf,i=r.length;for(e=0;e<i;++e)(n=r[e]-t)<0?(n+=P,t=1):t=0,r[e]=n;for(;0===r[r.length-1];)r.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),r=e.length-2;r>=0;--r)n+=(P+e[r]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;n>=0;--n)e=e*P+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),N=/^(\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)?)?$/,I=/^(\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 V(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var B,Y=function(){function t(e,n){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=n)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,n){for(var r="",i=t;i<e;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},t.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var r=this.get(n);if(r<32||r>176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var n="",r=t;r<e;++r)n+=String.fromCharCode(this.get(r));return n},t.prototype.parseStringUTF=function(t,e){for(var n="",r=t;r<e;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):i>191&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},t.prototype.parseStringBMP=function(t,e){for(var n,r,i="",a=t;a<e;)n=this.get(a++),r=this.get(a++),i+=String.fromCharCode(n<<8|r);return i},t.prototype.parseTime=function(t,e,n){var r=this.parseStringISO(t,e),i=(n?N:I).exec(r);return i?(n&&(i[1]=+i[1],i[1]+=+i[1]<70?2e3:1900),r=i[1]+"-"+i[2]+"-"+i[3]+" "+i[4],i[5]&&(r+=":"+i[5],i[6]&&(r+=":"+i[6],i[7]&&(r+="."+i[7]))),i[8]&&(r+=" UTC","Z"!=i[8]&&(r+=i[8],i[9]&&(r+=":"+i[9]))),r):"Unrecognized time: "+r},t.prototype.parseInteger=function(t,e){for(var n,r=this.get(t),i=r>127,a=i?255:0,s="";r==a&&++t<e;)r=this.get(t);if(0===(n=e-t))return i?-1:0;if(n>4){for(s=r,n<<=3;0==(128&(+s^a));)s=+s<<1,--n;s="("+n+" bit)\n"}i&&(r-=256);for(var o=new R(r),u=t+1;u<e;++u)o.mulAdd(256,this.get(u));return s+o.toString()},t.prototype.parseBitString=function(t,e,n){for(var r=this.get(t),i="("+((e-t-1<<3)-r)+" bit)\n",a="",s=t+1;s<e;++s){for(var o=this.get(s),u=s==e-1?r:0,c=7;c>=u;--c)a+=o>>c&1?"1":"0";if(a.length>n)return i+V(a,n)}return i+a},t.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return V(this.parseStringISO(t,e),n);var r=e-t,i="("+r+" byte)\n";r>(n/=2)&&(e=t+n);for(var a=t;a<e;++a)i+=this.hexByte(this.get(a));return r>n&&(i+="…"),i},t.prototype.parseOID=function(t,e,n){for(var r="",i=new R,a=0,s=t;s<e;++s){var o=this.get(s);if(i.mulAdd(128,127&o),a+=7,!(128&o)){if(""===r)if((i=i.simplify())instanceof R)i.sub(80),r="2."+i.toString();else{var u=i<80?i<40?0:1:2;r=u+"."+(i-40*u)}else r+="."+i.toString();if(r.length>n)return V(r,n);i=new R,a=0}}return a>0&&(r+=".incomplete"),r},t}(),L=function(){function t(t,e,n,r,i){if(!(r instanceof F))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=r,this.sub=i}return t.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()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return V(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return V(this.stream.parseStringISO(e,e+n),t);case 30:return V(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var n=0,r=this.sub.length;n<r;++n)e+=this.sub[n].toPrettyString(t)}return e},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;e=0;for(var r=0;r<n;++r)e=256*e+t.get();return e},t.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},t.decode=function(e){var n;n=e instanceof Y?e:new Y(e,0);var r=new Y(n),i=new F(n),a=t.decodeLength(n),s=n.pos,o=s-r.pos,u=null,c=function(){var e=[];if(null!==a){for(var r=s+a;n.pos<r;)e[e.length]=t.decode(n);if(n.pos!=r)throw new Error("Content size is not correct for container starting at offset "+s)}else try{for(;;){var i=t.decode(n);if(i.tag.isEOC())break;e[e.length]=i}a=s-n.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return e};if(i.tagConstructed)u=c();else if(i.isUniversal()&&(3==i.tagNumber||4==i.tagNumber))try{if(3==i.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");u=c();for(var l=0;l<u.length;++l)if(u[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){u=null}if(null===u){if(null===a)throw new Error("We can't skip over an invalid tag with undefined length at offset "+s);n.pos=s+Math.abs(a)}return new t(r,o,a,i,u)},t}(),F=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var n=new R;do{e=t.get(),n.mulAdd(128,127&e)}while(128&e);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),j=[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],U=(1<<26)/j[j.length-1],H=function(){function t(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return t.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<<e)-1,i=!1,a="",s=this.t,o=this.DB-s*this.DB%e;if(s-- >0)for(o<this.DB&&(n=this[s]>>o)>0&&(i=!0,a=y(n));s>=0;)o<e?(n=(this[s]&(1<<o)-1)<<e-o,n|=this[--s]>>(o+=this.DB-e)):(n=this[s]>>(o-=e)&r,o<=0&&(o+=this.DB,--s)),n>0&&(i=!0),i&&(a+=y(n));return i?a:"0"},t.prototype.negate=function(){var e=Z();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+nt(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var n=Z();return this.abs().divRemTo(e,null,n),this.s<0&&n.compareTo(t.ZERO)>0&&e.subTo(n,n),n},t.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new G(e):new q(e),this.exp(t,n)},t.prototype.clone=function(){var t=Z();return this.copyTo(t),t},t.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]},t.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,r=this.DB-t*this.DB%8,i=0;if(t-- >0)for(r<this.DB&&(n=this[t]>>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<<this.DB-r);t>=0;)r<8?(n=(this[t]&(1<<r)-1)<<8-r,n|=this[--t]>>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e},t.prototype.equals=function(t){return 0==this.compareTo(t)},t.prototype.min=function(t){return this.compareTo(t)<0?this:t},t.prototype.max=function(t){return this.compareTo(t)>0?this:t},t.prototype.and=function(t){var e=Z();return this.bitwiseTo(t,_,e),e},t.prototype.or=function(t){var e=Z();return this.bitwiseTo(t,b,e),e},t.prototype.xor=function(t){var e=Z();return this.bitwiseTo(t,w,e),e},t.prototype.andNot=function(t){var e=Z();return this.bitwiseTo(t,D,e),e},t.prototype.not=function(){for(var t=Z(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},t.prototype.shiftLeft=function(t){var e=Z();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},t.prototype.shiftRight=function(t){var e=Z();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},t.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+S(this[t]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=T(this[n]^e);return t},t.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},t.prototype.setBit=function(t){return this.changeBit(t,b)},t.prototype.clearBit=function(t){return this.changeBit(t,D)},t.prototype.flipBit=function(t){return this.changeBit(t,w)},t.prototype.add=function(t){var e=Z();return this.addTo(t,e),e},t.prototype.subtract=function(t){var e=Z();return this.subTo(t,e),e},t.prototype.multiply=function(t){var e=Z();return this.multiplyTo(t,e),e},t.prototype.divide=function(t){var e=Z();return this.divRemTo(t,e,null),e},t.prototype.remainder=function(t){var e=Z();return this.divRemTo(t,null,e),e},t.prototype.divideAndRemainder=function(t){var e=Z(),n=Z();return this.divRemTo(t,e,n),[e,n]},t.prototype.modPow=function(t,e){var n,r,i=t.bitLength(),a=et(1);if(i<=0)return a;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new G(e):e.isEven()?new W(e):new q(e);var s=[],o=3,u=n-1,c=(1<<n)-1;if(s[1]=r.convert(this),n>1){var l=Z();for(r.sqrTo(s[1],l);o<=c;)s[o]=Z(),r.mulTo(l,s[o-2],s[o]),o+=2}var h,f,d=t.t-1,p=!0,m=Z();for(i=nt(t[d])-1;d>=0;){for(i>=u?h=t[d]>>i-u&c:(h=(t[d]&(1<<i+1)-1)<<u-i,d>0&&(h|=t[d-1]>>this.DB+i-u)),o=n;0==(1&h);)h>>=1,--o;if((i-=o)<0&&(i+=this.DB,--d),p)s[h].copyTo(a),p=!1;else{for(;o>1;)r.sqrTo(a,m),r.sqrTo(m,a),o-=2;o>0?r.sqrTo(a,m):(f=a,a=m,m=f),r.mulTo(m,s[h],a)}for(;d>=0&&0==(t[d]&1<<i);)r.sqrTo(a,m),f=a,a=m,m=f,--i<0&&(i=this.DB-1,--d)}return r.revert(a)},t.prototype.modInverse=function(e){var n=e.isEven();if(this.isEven()&&n||0==e.signum())return t.ZERO;for(var r=e.clone(),i=this.clone(),a=et(1),s=et(0),o=et(0),u=et(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),n?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(e,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),n?(o.isEven()&&u.isEven()||(o.addTo(this,o),u.subTo(e,u)),o.rShiftTo(1,o)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),n&&a.subTo(o,a),s.subTo(u,s)):(i.subTo(r,i),n&&o.subTo(a,o),u.subTo(s,u))}return 0!=i.compareTo(t.ONE)?t.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},t.prototype.pow=function(t){return this.exp(t,new z)},t.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var r=e;e=n,n=r}var i=e.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)return e;for(i<a&&(a=i),a>0&&(e.rShiftTo(a,e),n.rShiftTo(a,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return a>0&&n.lShiftTo(a,n),n},t.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=j[j.length-1]){for(e=0;e<j.length;++e)if(n[0]==j[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<j.length;){for(var r=j[e],i=e+1;i<j.length&&r<U;)r*=j[i++];for(r=n.modInt(r);e<i;)if(r%j[e++]==0)return!1}return n.millerRabin(t)},t.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},t.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},t.prototype.fromString=function(e,n){var r;if(16==n)r=4;else if(8==n)r=3;else if(256==n)r=8;else if(2==n)r=1;else if(32==n)r=5;else{if(4!=n)return void this.fromRadix(e,n);r=2}this.t=0,this.s=0;for(var i=e.length,a=!1,s=0;--i>=0;){var o=8==r?255&+e[i]:tt(e,i);o<0?"-"==e.charAt(i)&&(a=!0):(a=!1,0==s?this[this.t++]=o:s+r>this.DB?(this[this.t-1]|=(o&(1<<this.DB-s)-1)<<s,this[this.t++]=o>>this.DB-s):this[this.t-1]|=o<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&0!=(128&+e[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),a&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},t.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},t.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},t.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,r=this.DB-n,i=(1<<r)-1,a=Math.floor(t/this.DB),s=this.s<<n&this.DM,o=this.t-1;o>=0;--o)e[o+a+1]=this[o]>>r|s,s=(this[o]&i)<<n;for(o=a-1;o>=0;--o)e[o]=0;e[a]=s,e.t=this.t+a+1,e.s=this.s,e.clamp()},t.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,a=(1<<r)-1;e[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)e[s-n-1]|=(this[s]&a)<<i,e[s-n]=this[s]>>r;r>0&&(e[this.t-n-1]|=(this.s&a)<<i),e.t=this.t-n,e.clamp()}},t.prototype.subTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r-=t[n],e[n++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},t.prototype.multiplyTo=function(e,n){var r=this.abs(),i=e.abs(),a=r.t;for(n.t=a+i.t;--a>=0;)n[a]=0;for(a=0;a<i.t;++a)n[a+r.t]=r.am(0,i[a],n,a,0,r.t);n.s=0,n.clamp(),this.s!=e.s&&t.ZERO.subTo(n,n)},t.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;--n>=0;)t[n]=0;for(n=0;n<e.t-1;++n){var r=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,r,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},t.prototype.divRemTo=function(e,n,r){var i=e.abs();if(!(i.t<=0)){var a=this.abs();if(a.t<i.t)return null!=n&&n.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=Z());var s=Z(),o=this.s,u=e.s,c=this.DB-nt(i[i.t-1]);c>0?(i.lShiftTo(c,s),a.lShiftTo(c,r)):(i.copyTo(s),a.copyTo(r));var l=s.t,h=s[l-1];if(0!=h){var f=h*(1<<this.F1)+(l>1?s[l-2]>>this.F2:0),d=this.FV/f,p=(1<<this.F1)/f,m=1<<this.F2,g=r.t,v=g-l,y=null==n?Z():n;for(s.dlShiftTo(v,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),t.ONE.dlShiftTo(l,y),y.subTo(s,s);s.t<l;)s[s.t++]=0;for(;--v>=0;){var _=r[--g]==h?this.DM:Math.floor(r[g]*d+(r[g-1]+m)*p);if((r[g]+=s.am(0,_,r,v,0,l))<_)for(s.dlShiftTo(v,y),r.subTo(y,r);r[g]<--_;)r.subTo(y,r)}null!=n&&(r.drShiftTo(l,n),o!=u&&t.ZERO.subTo(n,n)),r.t=l,r.clamp(),c>0&&r.rShiftTo(c,r),o<0&&t.ZERO.subTo(r,r)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},t.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},t.prototype.exp=function(e,n){if(e>4294967295||e<1)return t.ONE;var r=Z(),i=Z(),a=n.convert(this),s=nt(e)-1;for(a.copyTo(r);--s>=0;)if(n.sqrTo(r,i),(e&1<<s)>0)n.mulTo(i,a,r);else{var o=r;r=i,i=o}return n.revert(r)},t.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},t.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=et(n),i=Z(),a=Z(),s="";for(this.divRemTo(r,i,a);i.signum()>0;)s=(n+a.intValue()).toString(t).substr(1)+s,i.divRemTo(r,i,a);return a.intValue().toString(t)+s},t.prototype.fromRadix=function(e,n){this.fromInt(0),null==n&&(n=10);for(var r=this.chunkSize(n),i=Math.pow(n,r),a=!1,s=0,o=0,u=0;u<e.length;++u){var c=tt(e,u);c<0?"-"==e.charAt(u)&&0==this.signum()&&(a=!0):(o=n*o+c,++s>=r&&(this.dMultiply(i),this.dAddOffset(o,0),s=0,o=0))}s>0&&(this.dMultiply(Math.pow(n,s)),this.dAddOffset(o,0)),a&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,n,r){if("number"==typeof n)if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),b,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var i=[],a=7&e;i.length=1+(e>>3),n.nextBytes(i),a>0?i[0]&=(1<<a)-1:i[0]=0,this.fromString(i,256)}},t.prototype.bitwiseTo=function(t,e,n){var r,i,a=Math.min(t.t,this.t);for(r=0;r<a;++r)n[r]=e(this[r],t[r]);if(t.t<this.t){for(i=t.s&this.DM,r=a;r<this.t;++r)n[r]=e(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=a;r<t.t;++r)n[r]=e(i,t[r]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},t.prototype.changeBit=function(e,n){var r=t.ONE.shiftLeft(e);return this.bitwiseTo(r,n,r),r},t.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n<i;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;n<this.t;)r+=this[n],e[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<t.t;)r+=t[n],e[n++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},t.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},t.prototype.multiplyLowerTo=function(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);r<i;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()},t.prototype.multiplyUpperTo=function(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)n[this.t+r-e]=this.am(e-r,t[r],n,0,0,this.t+r-e);n.clamp(),n.drShiftTo(1,n)},t.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n},t.prototype.millerRabin=function(e){var n=this.subtract(t.ONE),r=n.getLowestSetBit();if(r<=0)return!1;var i=n.shiftRight(r);(e=e+1>>1)>j.length&&(e=j.length);for(var a=Z(),s=0;s<e;++s){a.fromInt(j[Math.floor(Math.random()*j.length)]);var o=a.modPow(i,this);if(0!=o.compareTo(t.ONE)&&0!=o.compareTo(n)){for(var u=1;u++<r&&0!=o.compareTo(n);)if(0==(o=o.modPowInt(2,this)).compareTo(t.ONE))return!1;if(0!=o.compareTo(n))return!1}}return!0},t.prototype.square=function(){var t=Z();return this.squareTo(t),t},t.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(n.compareTo(r)<0){var i=n;n=r,r=i}var a=n.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)e(n);else{a<s&&(s=a),s>0&&(n.rShiftTo(s,n),r.rShiftTo(s,r));var o=function(){(a=n.getLowestSetBit())>0&&n.rShiftTo(a,n),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),n.compareTo(r)>=0?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),n.signum()>0?setTimeout(o,0):(s>0&&r.lShiftTo(s,r),setTimeout((function(){e(r)}),0))};setTimeout(o,10)}},t.prototype.fromNumberAsync=function(e,n,r,i){if("number"==typeof n)if(e<2)this.fromInt(1);else{this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),b,this),this.isEven()&&this.dAddOffset(1,0);var a=this,s=function(){a.dAddOffset(2,0),a.bitLength()>e&&a.subTo(t.ONE.shiftLeft(e-1),a),a.isProbablePrime(n)?setTimeout((function(){i()}),0):setTimeout(s,0)};setTimeout(s,0)}else{var o=[],u=7&e;o.length=1+(e>>3),n.nextBytes(o),u>0?o[0]&=(1<<u)-1:o[0]=0,this.fromString(o,256)}},t}(),z=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),G=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),q=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=Z();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(H.ZERO)>0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=Z();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],r=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),W=function(){function t(t){this.m=t,this.r2=Z(),this.q3=Z(),H.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=Z();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function Z(){return new H(null)}function K(t,e){return new H(t,e)}var $="undefined"!=typeof navigator;$&&"Microsoft Internet Explorer"==navigator.appName?(H.prototype.am=function(t,e,n,r,i,a){for(var s=32767&e,o=e>>15;--a>=0;){var u=32767&this[t],c=this[t++]>>15,l=o*u+c*s;i=((u=s*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+o*c+(i>>>30),n[r++]=1073741823&u}return i},B=30):$&&"Netscape"!=navigator.appName?(H.prototype.am=function(t,e,n,r,i,a){for(;--a>=0;){var s=e*this[t++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},B=26):(H.prototype.am=function(t,e,n,r,i,a){for(var s=16383&e,o=e>>14;--a>=0;){var u=16383&this[t],c=this[t++]>>14,l=o*u+c*s;i=((u=s*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+o*c,n[r++]=268435455&u}return i},B=28),H.prototype.DB=B,H.prototype.DM=(1<<B)-1,H.prototype.DV=1<<B;H.prototype.FV=Math.pow(2,52),H.prototype.F1=52-B,H.prototype.F2=2*B-52;var X,Q,J=[];for(X="0".charCodeAt(0),Q=0;Q<=9;++Q)J[X++]=Q;for(X="a".charCodeAt(0),Q=10;Q<36;++Q)J[X++]=Q;for(X="A".charCodeAt(0),Q=10;Q<36;++Q)J[X++]=Q;function tt(t,e){var n=J[t.charCodeAt(e)];return null==n?-1:n}function et(t){var e=Z();return e.fromInt(t),e}function nt(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}H.ZERO=et(0),H.ONE=et(1);var rt=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,r;for(e=0;e<256;++e)this.S[e]=e;for(n=0,e=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}();var it,at,st=null;if(null==st){st=[],at=0;var ot=void 0;if(window.crypto&&window.crypto.getRandomValues){var ut=new Uint32Array(256);for(window.crypto.getRandomValues(ut),ot=0;ot<ut.length;++ot)st[at++]=255&ut[ot]}var ct=0,lt=function(t){if((ct=ct||0)>=256||at>=256)window.removeEventListener?window.removeEventListener("mousemove",lt,!1):window.detachEvent&&window.detachEvent("onmousemove",lt);else try{var e=t.x+t.y;st[at++]=255&e,ct+=1}catch(t){}};window.addEventListener?window.addEventListener("mousemove",lt,!1):window.attachEvent&&window.attachEvent("onmousemove",lt)}function ht(){if(null==it){for(it=new rt;at<256;){var t=Math.floor(65536*Math.random());st[at++]=255&t}for(it.init(st),at=0;at<st.length;++at)st[at]=0;at=0}return it.next()}var ft=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=ht()},t}();var dt=function(){function t(){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 t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=K(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,n=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var n=[],r=t.length-1;r>=0&&e>0;){var i=t.charCodeAt(r--);i<128?n[--e]=i:i>127&&i<2048?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var a=new ft,s=[];e>2;){for(s[0]=0;0==s[0];)a.nextBytes(s);n[--e]=s[0]}return n[--e]=2,n[--e]=0,new H(n)}(t,e);if(null==n)return null;var r=this.doPublic(n);if(null==r)return null;for(var i=r.toString(16),a=i.length,s=0;s<2*e-a;s++)i="0"+i;return i},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=K(t,16),this.e=parseInt(e,16),this.d=K(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,r,i,a,s,o){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=K(t,16),this.e=parseInt(e,16),this.d=K(n,16),this.p=K(r,16),this.q=K(i,16),this.dmp1=K(a,16),this.dmq1=K(s,16),this.coeff=K(o,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new ft,r=t>>1;this.e=parseInt(e,16);for(var i=new H(e,16);;){for(;this.p=new H(t-r,1,n),0!=this.p.subtract(H.ONE).gcd(i).compareTo(H.ONE)||!this.p.isProbablePrime(10););for(;this.q=new H(r,1,n),0!=this.q.subtract(H.ONE).gcd(i).compareTo(H.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q,this.q=a}var s=this.p.subtract(H.ONE),o=this.q.subtract(H.ONE),u=s.multiply(o);if(0==u.gcd(i).compareTo(H.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(u),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(o),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=K(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){var n=t.toByteArray(),r=0;for(;r<n.length&&0==n[r];)++r;if(n.length-r!=e-1||2!=n[r])return null;++r;for(;0!=n[r];)if(++r>=n.length)return null;var i="";for(;++r<n.length;){var a=255&n[r];a<128?i+=String.fromCharCode(a):a>191&&a<224?(i+=String.fromCharCode((31&a)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&a)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,n){var r=new ft,i=t>>1;this.e=parseInt(e,16);var a=new H(e,16),s=this,o=function(){var e=function(){if(s.p.compareTo(s.q)<=0){var t=s.p;s.p=s.q,s.q=t}var e=s.p.subtract(H.ONE),r=s.q.subtract(H.ONE),i=e.multiply(r);0==i.gcd(a).compareTo(H.ONE)?(s.n=s.p.multiply(s.q),s.d=a.modInverse(i),s.dmp1=s.d.mod(e),s.dmq1=s.d.mod(r),s.coeff=s.q.modInverse(s.p),setTimeout((function(){n()}),0)):setTimeout(o,0)},u=function(){s.q=Z(),s.q.fromNumberAsync(i,1,r,(function(){s.q.subtract(H.ONE).gcda(a,(function(t){0==t.compareTo(H.ONE)&&s.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(u,0)}))}))},c=function(){s.p=Z(),s.p.fromNumberAsync(t-i,1,r,(function(){s.p.subtract(H.ONE).gcda(a,(function(t){0==t.compareTo(H.ONE)&&s.p.isProbablePrime(10)?setTimeout(u,0):setTimeout(c,0)}))}))};setTimeout(c,0)};setTimeout(o,0)},t.prototype.sign=function(t,e,n){var r=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,r="",i=0;i<n;i+=2)r+="ff";return K("0001"+r+"00"+t,16)}((pt[n]||"")+e(t).toString(),this.n.bitLength()/4);if(null==r)return null;var i=this.doPrivate(r);if(null==i)return null;var a=i.toString(16);return 0==(1&a.length)?a:"0"+a},t.prototype.verify=function(t,e,n){var r=K(e,16),i=this.doPublic(r);return null==i?null:function(t){for(var e in pt)if(pt.hasOwnProperty(e)){var n=pt[e],r=n.length;if(t.substr(0,r)==n)return t.substr(r)}return t}
4
4
  /*!
5
5
  Copyright (c) 2011, Yahoo! Inc. All rights reserved.
6
6
  Code licensed under the BSD License:
@@ -15,7 +15,7 @@ version: 2.9.0
15
15
  * @since jsrsasign 2.1
16
16
  * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
17
17
  */
18
- var gt={};void 0!==gt.asn1&&gt.asn1||(gt.asn1={}),gt.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1).length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";e=new H(r,16).xor(t).add(H.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=gt.asn1,n=e.DERBoolean,r=e.DERInteger,i=e.DERBitString,a=e.DEROctetString,s=e.DERNull,o=e.DERObjectIdentifier,u=e.DEREnumerated,c=e.DERUTF8String,l=e.DERNumericString,h=e.DERPrintableString,f=e.DERTeletexString,d=e.DERIA5String,p=e.DERUTCTime,m=e.DERGeneralizedTime,g=e.DERSequence,v=e.DERSet,y=e.DERTaggedObject,_=e.ASN1Util.newObject,b=Object.keys(t);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 n(t[w]);if("int"==w)return new r(t[w]);if("bitstr"==w)return new i(t[w]);if("octstr"==w)return new a(t[w]);if("null"==w)return new s(t[w]);if("oid"==w)return new o(t[w]);if("enum"==w)return new u(t[w]);if("utf8str"==w)return new c(t[w]);if("numstr"==w)return new l(t[w]);if("prnstr"==w)return new h(t[w]);if("telstr"==w)return new f(t[w]);if("ia5str"==w)return new d(t[w]);if("utctime"==w)return new p(t[w]);if("gentime"==w)return new m(t[w]);if("seq"==w){for(var D=t[w],S=[],T=0;T<D.length;T++){var x=_(D[T]);S.push(x)}return new g({array:S})}if("set"==w){for(D=t[w],S=[],T=0;T<D.length;T++){x=_(D[T]);S.push(x)}return new v({array:S})}if("tag"==w){var E=t[w];if("[object Array]"===Object.prototype.toString.call(E)&&3==E.length){var O=_(E[2]);return new y({tag:E[0],explicit:E[1],obj:O})}var M={};if(void 0!==E.explicit&&(M.explicit=E.explicit),void 0!==E.tag&&(M.tag=E.tag),void 0===E.obj)throw"obj shall be specified for 'tag'.";return M.obj=_(E.obj),new y(M)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},gt.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),r=(e=Math.floor(n/40)+"."+n%40,""),i=2;i<t.length;i+=2){var a=("00000000"+parseInt(t.substr(i,2),16).toString(2)).slice(-8);if(r+=a.substr(1,7),"0"==a.substr(0,1))e=e+"."+new H(r,2).toString(10),r=""}return e},gt.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new H(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var a="",s=0;s<i;s++)a+="0";r=a+r;for(s=0;s<r.length-1;s+=7){var o=r.substr(s,7);s!=r.length-7&&(o="1"+o),n+=e(parseInt(o,2))}return n};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),a=40*parseInt(i[0])+parseInt(i[1]);r+=e(a),i.splice(0,2);for(var s=0;s<i.length;s++)r+=n(i[s]);return r},gt.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="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+n).toString(16)+e},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""}},gt.asn1.DERAbstractString=function(t){gt.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},mt.lang.extend(gt.asn1.DERAbstractString,gt.asn1.ASN1Object),gt.asn1.DERAbstractTime=function(t){gt.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,n){var r=this.zeroPadding,i=this.localDateToUTC(t),a=String(i.getFullYear());"utc"==e&&(a=a.substr(2,2));var s=a+r(String(i.getMonth()+1),2)+r(String(i.getDate()),2)+r(String(i.getHours()),2)+r(String(i.getMinutes()),2)+r(String(i.getSeconds()),2);if(!0===n){var o=i.getMilliseconds();if(0!=o){var u=r(String(o),3);s=s+"."+(u=u.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,a){var s=new Date(Date.UTC(t,e-1,n,r,i,a,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},mt.lang.extend(gt.asn1.DERAbstractTime,gt.asn1.ASN1Object),gt.asn1.DERAbstractStructured=function(t){gt.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},mt.lang.extend(gt.asn1.DERAbstractStructured,gt.asn1.ASN1Object),gt.asn1.DERBoolean=function(){gt.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},mt.lang.extend(gt.asn1.DERBoolean,gt.asn1.ASN1Object),gt.asn1.DERInteger=function(t){gt.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=gt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new H(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},mt.lang.extend(gt.asn1.DERInteger,gt.asn1.ASN1Object),gt.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=gt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}gt.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";var r="";for(n=0;n<t.length-1;n+=8){var i=t.substr(n,8),a=parseInt(i,2).toString(16);1==a.length&&(a="0"+a),r+=a}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},mt.lang.extend(gt.asn1.DERBitString,gt.asn1.ASN1Object),gt.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=gt.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}gt.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},mt.lang.extend(gt.asn1.DEROctetString,gt.asn1.DERAbstractString),gt.asn1.DERNull=function(){gt.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},mt.lang.extend(gt.asn1.DERNull,gt.asn1.ASN1Object),gt.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new H(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var a="",s=0;s<i;s++)a+="0";r=a+r;for(s=0;s<r.length-1;s+=7){var o=r.substr(s,7);s!=r.length-7&&(o="1"+o),n+=e(parseInt(o,2))}return n};gt.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),a=40*parseInt(i[0])+parseInt(i[1]);r+=e(a),i.splice(0,2);for(var s=0;s<i.length;s++)r+=n(i[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(t){var e=gt.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},mt.lang.extend(gt.asn1.DERObjectIdentifier,gt.asn1.ASN1Object),gt.asn1.DEREnumerated=function(t){gt.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=gt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new H(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},mt.lang.extend(gt.asn1.DEREnumerated,gt.asn1.ASN1Object),gt.asn1.DERUTF8String=function(t){gt.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},mt.lang.extend(gt.asn1.DERUTF8String,gt.asn1.DERAbstractString),gt.asn1.DERNumericString=function(t){gt.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},mt.lang.extend(gt.asn1.DERNumericString,gt.asn1.DERAbstractString),gt.asn1.DERPrintableString=function(t){gt.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},mt.lang.extend(gt.asn1.DERPrintableString,gt.asn1.DERAbstractString),gt.asn1.DERTeletexString=function(t){gt.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},mt.lang.extend(gt.asn1.DERTeletexString,gt.asn1.DERAbstractString),gt.asn1.DERIA5String=function(t){gt.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},mt.lang.extend(gt.asn1.DERIA5String,gt.asn1.DERAbstractString),gt.asn1.DERUTCTime=function(t){gt.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,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!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},mt.lang.extend(gt.asn1.DERUTCTime,gt.asn1.DERAbstractTime),gt.asn1.DERGeneralizedTime=function(t){gt.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,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!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},mt.lang.extend(gt.asn1.DERGeneralizedTime,gt.asn1.DERAbstractTime),gt.asn1.DERSequence=function(t){gt.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},mt.lang.extend(gt.asn1.DERSequence,gt.asn1.DERAbstractStructured),gt.asn1.DERSet=function(t){gt.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},mt.lang.extend(gt.asn1.DERSet,gt.asn1.DERAbstractStructured),gt.asn1.DERTaggedObject=function(t){gt.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},mt.lang.extend(gt.asn1.DERTaggedObject,gt.asn1.ASN1Object);var vt=window&&window.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yt=function(t){function e(n){var r=t.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(e.hasPrivateKeyProperty(n)||e.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return vt(e,t),e.prototype.parseKey=function(t){try{var e=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?C(t):A.unarmor(t),i=L.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){e=i.sub[1].getHexStringValue(),this.n=K(e,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var a=i.sub[3].getHexStringValue();this.d=K(a,16);var s=i.sub[4].getHexStringValue();this.p=K(s,16);var o=i.sub[5].getHexStringValue();this.q=K(o,16);var u=i.sub[6].getHexStringValue();this.dmp1=K(u,16);var c=i.sub[7].getHexStringValue();this.dmq1=K(c,16);var l=i.sub[8].getHexStringValue();this.coeff=K(l,16)}else{if(2!==i.sub.length)return!1;var h=i.sub[1].sub[0];e=h.sub[0].getHexStringValue(),this.n=K(e,16),n=h.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new gt.asn1.DERInteger({int:0}),new gt.asn1.DERInteger({bigint:this.n}),new gt.asn1.DERInteger({int:this.e}),new gt.asn1.DERInteger({bigint:this.d}),new gt.asn1.DERInteger({bigint:this.p}),new gt.asn1.DERInteger({bigint:this.q}),new gt.asn1.DERInteger({bigint:this.dmp1}),new gt.asn1.DERInteger({bigint:this.dmq1}),new gt.asn1.DERInteger({bigint:this.coeff})]};return new gt.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return O(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new gt.asn1.DERSequence({array:[new gt.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new gt.asn1.DERNull]}),e=new gt.asn1.DERSequence({array:[new gt.asn1.DERInteger({bigint:this.n}),new gt.asn1.DERInteger({int:this.e})]}),n=new gt.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new gt.asn1.DERSequence({array:[t,n]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return O(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var n="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(dt),_t="3.2.1",bt=function(){function t(t){void 0===t&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new yt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(M(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return O(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return O(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,M(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new yt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=_t,t}(),wt=function(t,e){var n=e.xRatio,r=e.yRatio;return t.forEach((function(t){var i;t.baseData.left=t.baseData.left*n,t.baseData.width=t.baseData.width*n,t.baseData.top=t.baseData.top*r,t.baseData.height=t.baseData.height*r,t.baseData.angle=t.baseData.angle,(null===(i=null==t?void 0:t.children)||void 0===i?void 0:i.length)&&wt(null==t?void 0:t.children,e)})),t},Dt=function(t,e,n){var r=t[n];return t.splice(n,1),t.splice(e,0,r),t},St=function(e,n,r){var i=t.findIndex(e,(function(t){return t.cid==r})),a=t.findIndex(e,(function(t){return t.cid==n}));return Dt(e,a,i)},Tt=function(t,e,n){for(var r=-1,i=0;i<t.length;i++){var a=t[i];if(a.children&&a.children.length)for(var s=0;s<a.children.length;s++){if(r=s,a.children[s].cid===n){switch(e){case"up":r>=1&&Dt(a.children,r-1,r);break;case"down":r<a.children.length-2&&Dt(a.children,r+1,r);break;case"top":0!==r&&Dt(a.children,0,r);break;case"bottom":var o=a.children.length-1;r!==o&&Dt(a.children,o,r)}break}}}return t},xt=function(e,n,r){var i=!1,a=function(e){for(var s=0;s<e.length;s++){if(e[s].cid==n){i=e[s],r&&t.remove(e,(function(t){return t.cid==n}));break}if(e[s].children)a(e[s].children);else if(e[s].dynamicChildren){if(e[s].dynamicChildren instanceof Map){for(var o=Array.from(e[s].dynamicChildren),u=0;u<o.length;u++)if(o[u]instanceof Array){var c=o[u][1];a(c)}}else if(e[s].dynamicChildren instanceof Array)for(o=e[s].dynamicChildren,u=0;u<o.length;u++)if(o[u]instanceof Array){c=o[u][1];a(c)}}else e[s].stateChildren&&a(e[s].stateChildren)}};return a(e),i||!1},Et=function(t,e){var n=null,r=function(t,i){for(var a=0;a<t.length;a++)if(t[a].cid==e)n=i;else if(t[a].children)r(t[a].children,t[a]);else if(t[a].dynamicChildren)if(t[a].dynamicChildren instanceof Map){for(var s=Array.from(t[a].dynamicChildren),o=0;o<s.length;o++)if(s[o]instanceof Array){var u=s[o][1];r(u,t[a])}}else t[a].dynamicChildren;else t[a].stateChildren&&r(t[a].stateChildren,t[a])};return r(t,null),n||!1},Ot=function(t,e,n){for(var r,i=function(i){var a=t[i];if(a.cid===e)return r=a,n&&t.splice(i,1),{value:r};if(a.children&&a.children.length){for(var s=0;s<a.children.length;s++)if(a.children[s].cid===e)return r=a.children[s],n&&a.children.splice(s,1),{value:r}}else if(a.stateChildren&&a.stateChildren.length){for(s=0;s<a.stateChildren.length;s++)if(a.stateChildren[s].cid===e)return r=a.stateChildren[s],n&&a.stateChildren.splice(s,1),{value:r}}else if(a.dynamicChildren){var o=void 0;if(a.dynamicChildren instanceof Map?o=a.dynamicChildren.get(a.activeDynamic):a.dynamicChildren instanceof Array&&(o=a.dynamicChildren.find((function(t){return t[0]==a.activeDynamic}))[1]),o)for(s=0;s<o.length;s++)if(o[s].cid===e)return r=o[s],n&&o.splice(s,1),{value:r}}},a=0;a<t.length;a++){var s=i(a);if("object"==typeof s)return s.value}return!!r},Mt=function(t,e,n){var r=Ot(t,e),i=Ot(t,n);return r.pid&&i.pid||!r.pid&&!i.pid},kt=function(t,e){var n=function(t){for(var r,i,a,s=0;s<t.length;s++){var o=t[s];(null===(a=null===(i=null===(r=o.tmpData)||void 0===r?void 0:r.source)||void 0===i?void 0:i.converse)||void 0===a?void 0:a.data.length)&&o.tmpData.source.converse.data.forEach((function(t){t.code=t.code.replace(/&gt;/g,">").replace(/&lt;/g,"<")})),e(o),o&&o.children&&o.children.length?n(o.children):o&&o.dynamicChildren?Array.from(o.dynamicChildren).forEach((function(t,e){n(t[1])})):o.stateChildren&&n(o.stateChildren)}};n(t)},Ct=function(t){var e=function(t,n){for(var r=function(r){var i=t[r],a=Ut();n?i.pid=n:i.drag||(i.baseData.left=0,i.baseData.top=0),i.cid=a,i&&i.children&&i.children.length?e(i.children,a):i&&i.dynamicChildren&&Array.from(i.dynamicChildren).forEach((function(t,n){e(t[1],a)}))},i=0;i<t.length;i++)r(i)};e(t)},At=function(e,n,r,i){try{if(!e||!e.hasOwnProperty(n)&&!e.hasOwnProperty(i))throw"The property you want to modify is not found. Please check whether the attribute ".concat(n," is entered correctly!");if(i){t.cloneDeep(e[i][n]);e[i][n]=r}else e[n]=r}catch(t){console.error(t)}},Pt=function(t,e){e.forEach((function(e){e.baseData.left=e.baseData.left-t.left,e.baseData.top=e.baseData.top-t.top}))},Rt=function(e){var n=t.cloneDeep(e),r=[];return n.children&&n.children.length&&n.children.forEach((function(t){Nt(t,n.baseData),r.push(t)})),r},Nt=function(t,e){t.baseData.left=t.baseData.left+e.left,t.baseData.top=t.baseData.top+e.top},It=function(t,e,n){var r={left:0,top:0};return n&&0!==n?(r.left=t.left-e.left,r.top=t.top-e.top):(r.left=t.left+e.left,r.top=t.top+e.top),r},Vt=function(e,n){var r=t.cloneDeep(e),i=[],a=function(t,e){var n=xt(t,e);i.push(n.baseData),n.pid&&a(t,n.pid)};a(r,n);var s={left:0,top:0};return i.map((function(t){t&&(s.left+=t.left,s.top+=t.top)})),s},Bt=function(e,n){var r=t.cloneDeep(e);return r.length>1&&r.sort((function(t,e){return t.baseData[n]-e.baseData[n]})),r},Yt=function(t,e){var n=[];return t.map((function(t){var r=e.find((function(e){return e.cid===t}));r&&n.push(r)})),Lt(n)},Lt=function(t){if(t.length>0){var e={left:0,top:0,width:0,height:0},n=Bt(t,"left"),r=Bt(t,"top"),i=n[0].baseData,a=n[n.length-1].baseData,s=r[0].baseData,o=r[r.length-1].baseData,u=Math.max.apply(Math,r.map((function(t){return 1*t.baseData.top+1*t.baseData.height}))),c=Math.max.apply(Math,r.map((function(t){return 1*t.baseData.left+1*t.baseData.width})));return e.left=i.left,e.width=Math.max(1*a.left+1*a.width,c)-1*i.left,e.top=s.top,e.height=Math.max(1*o.top+1*o.height,u)-1*s.top,e}return{left:0,top:0,width:0,height:0}},Ft=function(e,n,r){var i=e.children,a=t.cloneDeep(n),s=t.cloneDeep(Lt(i)),o=a.left,u=a.top;a.width,a.height;var c=s.left,l=s.top,h=s.width,f=s.height,d={left:o+c,top:u+l,width:h,height:f,angle:n.angle?n.angle:0};return i.forEach((function(e){var n=t.cloneDeep(e.baseData);e.baseData.left<0?n.left=0:n.left=n.left-c,e.baseData.top<0?n.top=0:n.top=n.top-l,e.baseData=n})),e.baseData=d,e.children=i,d},jt=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];t[n].index=n,r.children&&r.children.length?jt(r.children):e&&e(r)}},Ut=function(){return(Math.random().toString().substr(3,10)+Date.now()).toString()},Ht=function(t,e,n){var r,i;void 0===n&&(n=" copy");var a=new RegExp("".concat(n,"( \\d+)?$")).exec(t);a?(r=a[1]?parseInt(a[1]):0,i=t.slice(0,a.index)):(r=0,i=t);var s=new RegExp("^".concat(i).concat(n,"( [1-9][0-9]*)?$")),o=[];e.forEach((function(t){if(a=s.exec(t)){var e=a[1]?parseInt(a[1]):1;o.push(e)}})),o.sort((function(t,e){return t-e})),r++;for(var u=0,c=o.length;u<c;u++)if(o[u]===r)r++;else if(o[u]>r)break;return i+n+" "+r},zt=function(t,e){try{var n=e||window.location.href;if(-1!=n.indexOf("?")){var r={};return n.slice(n.indexOf("?")+1).split("&").forEach((function(t){var e=t.split("=");r[e[0]]=e[1]})),t?r[t]?r[t]:null:r}return console.log("没有参数"),null}catch(t){console.error(t)}};function Gt(t){for(var e=t.types,n=t.element,r=t.actions,i=t.events,a=function(t){var a=e[t],s=n.tmpData.actions[t];if(s&&s.use){var o=s[s.behave];if(!o)return"continue";"vars"===s.behave?o.map((function(t){t.type=a,t.id=n.cid,t.mapField&&r.push(t)})):o.length>0&&o.forEach((function(t,e){"toggle"===s.behave&&""!==t.value&&t.value.length?i.push({id:n.cid,type:s.behave,children:t.value.map((function(t){return{cid:t.cid,visible:t.visible}})),eventType:a,index:e}):"link"===s.behave&&""!==t.value?i.push({id:n.cid,type:s.behave,link:t.value,eventType:a,index:e}):"page"===s.behave&&""!==t.value?i.push({id:n.cid,type:s.behave,page:t.value,eventType:a,index:e}):"dynamic"===s.behave&&""!==t.value&&t.value.length>0?i.push({id:n.cid,type:s.behave,dynamic:t.value,eventType:a,index:e}):i.push(void 0)}))}},s=0;s<e.length;s++)a(s)}function qt(t){var e=new bt;return e.setPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApWni7uLYVV8iyDPTR6Zs\naj+2BHCn4xTzFeVHADzTdtBiFH9i4fKeDK0IfbPV/9TGeRYNfl0qSfdLtU+1ZIzm\npqHppadukmk5+NbBG4Xm/lAZgVt3dUIrSyamxVjwnymN7PLdxaSOS/mgU6SDGMhN\nTM76AXKZZXWMK12UCXvKkh+TkGufcXzLe7LtrvHPLOgcnEED2CkWATuE9g8K9j4T\neOMxhJcHBUmXLgU6Chufa4nBed2899E7jxJa14+J1IDa2ahrDFLZN7H//ZsvwnXq\nxVbxm0k5jyWqfCpg13V7zD3DxNWlo3MIh2fPtIEUDVhugqPd0jPmqquqdBNTnu2I\nGQIDAQAB"),e.encrypt(t)}var Wt={updataArea:function(t,e){t.currentArea=e},selectdArea:function(t,e){var n=Yt(e,t.list);t.currentArea=n},updataAngle:function(t,e){var n=e.id,r=e.angle,i=Ot(t.list,n);"boolean"!=typeof i&&(i.baseData.angle=r)},updataBaseData:function(t,e){var n=e.data,r=e.ratio,i=xt(t.list,n.cid),a=e.oldData;if("object"!=typeof i||i.pid){if("object"==typeof i&&i.pid){var s=Ot(t.list,i.pid);"object"==typeof s&&(i.baseData.left<0&&(i.baseData.left=0),i.baseData.top<0&&(i.baseData.top=0),Object.assign(i.baseData,n.baseData),Ft(s,s.baseData),t.groupFlag=!t.groupFlag)}}else if(Object.assign(i.baseData,n.baseData),r&&i.children&&i.children.length>0){var o=i.baseData.width/a.width,u=i.baseData.height/a.height;wt(i.children,{xRatio:o,yRatio:u})}},multipleUpdataBaseData:function(e,n){if(n.ratio)for(var r=n.newData,i=n.oldData,a=r.width/i.width,s=r.height/i.height,o=e.cache.length;o--;)e.cache[o].baseData.left=e.cache[o].baseData.left*a,e.cache[o].baseData.width=e.cache[o].baseData.width*a,e.cache[o].baseData.top=e.cache[o].baseData.top*s,e.cache[o].baseData.height=e.cache[o].baseData.height*s;else for(o=e.cache.length;o--;){var u=t.cloneDeep(e.cache[o].baseData);u.left=u.left+n.deltaX,u.top=u.top+n.deltaY,e.cache[o].comPanel?e.cache[o].comPanel.setAttrData(Object.assign(u,n.baseData)):e.cache[o].baseData=u}},multipleUpdata:function(t,e){var n=e.ids,r=e.data,i=Ot(t.list,n);i&&Object.assign(i.baseData,r)},multipleMove:function(t,e){},move:function(t,e){var n=t.selectd,r=e.type,i=e.speed?e.speed:1;if(0!==n.length){var a=t.list.filter((function(t){return n.includes(t.cid)}));0==a.length&&(a=[Ot(t.list,n[0])]);for(var s=0;s<a.length;s++){var o=a[s];if(o.pid&&t.selectd.length>1)return void console.warn("Only one component can be moved within a group");if("up"===r?o.baseData.top=o.baseData.top-i:"down"===r?o.baseData.top+=i:"left"===r?o.baseData.left-=i:"right"===r&&(o.baseData.left+=i),"object"==typeof o&&o.pid){var u=Ot(t.list,o.pid);"object"==typeof u&&(Ft(u,u.baseData),t.groupFlag=!t.groupFlag)}}}else console.warn("Warning! please select the component to move.")},updataGroupBaseData:function(e,n){var r=Ot(e.list,n.pid),i=t.cloneDeep(r);Ot(r.children,n.cid),Ft(r,i.baseData)},editGroupBaseData:function(t,e){var n=Ot(t.list,e);n.children.forEach((function(t){Nt(t,n.baseData)}))},syncBaseData:function(e,n){var r=n.cid,i=n.data,a=n.isContainer,s=t.cloneDeep(e.list);if(void 0!==a){var o=function(t){for(var e=0;e<t.length;e++)r===t[e].cid?t[e].baseData=Object.assign({},t[e].baseData,i):t[e].hasOwnProperty("children")&&o(t[e].children)};s.length&&o(s)}else{var u=xt(s,r);u&&(u.baseData=Object.assign({},u.baseData,i))}e.list=s},updataItemData:function(t,e){var n=e.cid,r=e.propsName,i=e.propsValue,a=Ot(t.list,n);a&&(a[r]=i)},updataOpacity:function(t,e){var n=e.cid,r=e.propsValue,i=Ot(t.list,n);"boolean"!=typeof i&&i&&(i.baseData.opacity=r)}},Zt={delListItem:function(e,n){var r=t.cloneDeep(e.list);"string"==typeof n?xt(r,n,!0):n.forEach((function(t){xt(r,t,!0)})),e.list=r},cloneItem:function(e){if(e.selectd.length>0){e.cloneCache=[];for(var n=0;n<e.selectd.length;n++){var r=Ot(e.list,e.selectd[n]);if("boolean"!=typeof r){var i=t.cloneDeep(r);i.cid=Ut(),i.pid="",e.cloneCache.push(i)}}}},shearItem:function(e,n){if(e.selectd.length>0){e.cloneCache=[];for(var r=0;r<e.selectd.length;r++){var i=Ot(e.list,e.selectd[r],!0);if("boolean"!=typeof i){var a=t.cloneDeep(i);a.cid=Ut(),e.cloneCache.push(a)}}e.selectd=[]}},pasteItem:function(e){var n,r=t.cloneDeep(e.cloneCache);if(r.length>0){var i=[];r.forEach((function(t){t.cid=Ut();var n=Ht(t.name,e.list.map((function(t){return t.name})));if(t.name=n,t.children&&t.children.length>0&&t.children.forEach((function(e){e.pid=t.cid,e.cid=Ut()})),"dynamicComponent"==t.componentType){var r=void 0;t.dynamicChildren instanceof Map?r=t.dynamicChildren.get(t.activeDynamic):t.dynamicChildren instanceof Array&&(r=t.dynamicChildren.find((function(t){return t[0]==t.activeDynamic}))[1]),r.forEach((function(e){e.pid=t.cid,e.cid=Ut()}))}i.push(t.cid)})),e.selectd.length>0?Yt(e.selectd,e.list):Lt(r),r.forEach((function(t){t.baseData.top=t.baseData.top+20,t.baseData.left=t.baseData.left+20})),(n=e.list).unshift.apply(n,t.cloneDeep(r)),e.selectd=i}},updataShow:function(t,e){var n=xt(t.list,e);if("boolean"!=typeof n){var r=!n.isShow;At(n,"isShow",r,"")}},changeShow:function(t,e){var n=e.cid,r=e.flag,i=xt(t.list,n);i&&At(i,"isShow",r,"")},updataLock:function(t,e){var n=xt(t.list,e);if("boolean"!=typeof n){var r=!n.isLock;At(n,"isLock",r,"")}},breakUp:function(t,e){var n;try{if(!e)throw"Please pass in the component CID correctly!";var r=t.list.findIndex((function(t){return t.cid===e})),i=t.list[r],a=Rt(i);a.map((function(t){return t.pid=""})),t.list.splice(r,1),(n=t.list).push.apply(n,a)}catch(t){console.error(t)}},editGroup:function(t,e){var n,r=e.groupId;e.status;try{if(!r)throw"Please pass in the component CID correctly!";var i=t.list.findIndex((function(t){return t.cid===r})),a=t.list[i],s=Rt(a);s.map((function(t){return t.pid=""})),t.list.splice(i,1),(n=t.list).push.apply(n,s)}catch(t){console.error(t)}},combination:function(e){t.cloneDeep(e.list);var n,r,i=[],a=[],s=Ut(),o=Ot(e.list,e.selectd[0]);o.pid?console.info("Sorry, only level 2 is supported group"):o.children&&1===e.selectd.length?console.info("Sorry, only level 2 is supported group"):(e.selectd.forEach((function(t){var n=e.list.findIndex((function(e){return e.cid===t}));if(n>-1){i.push(n);var r=e.list.splice(n,1)[0];r.pid=s,a.push(r)}})),n=i.sort((function(t,e){return t-e}))[0],r=1===a.length?t.cloneDeep(a[0].baseData):e.currentArea,Object.assign(r,{angle:0,opacity:100,rotate:0,rotateY:0}),Pt(r,a),e.list.splice(n,0,{cid:s,pid:"",isShow:!0,isLock:!1,editer:!1,baseData:r,z:0,toggle:!0,name:"群组",type:"folder",children:a}),e.selectd=[s])},moveUp:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e}));n>=1?Dt(t.list,n-1,n):Tt(t.list,"up",e)}catch(t){console.error(t)}},moveDown:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e}));n>-1&&n<=t.list.length-2?Dt(t.list,n+1,n):Tt(t.list,"down",e)}catch(t){console.error(t)}},moveTop:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e}));n>-1&&0!==n?Dt(t.list,0,n):Tt(t.list,"top",e)}catch(t){console.error(t)}},moveBottom:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e})),r=t.list.length-1;n>-1&&n!==r?Dt(t.list,r,n):Tt(t.list,"bottom",e)}catch(t){console.error(t)}}},Kt=function(t,n){void 0===t&&(t="");var r=e.create({baseURL:t,timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return r.interceptors.request.use((function(t){return 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")),"post"===t.method?(t.headers["Content-Type"]="application/json; charset=UTF-8",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(t){return Promise.reject(t)})),r.interceptors.response.use((function(t){var e;return 200===t.status||2e4==t.data.code?(n&&n(t),t.data):(n&&n(t),null==t||t.status,null===(e=null==t?void 0:t.data)||void 0===e||e.code,Promise.reject(t.data))}),(function(t){return n&&n(null==t?void 0:t.response),Promise.reject(t.response)})),r},$t=Kt();function Xt(e,n,r,i){return c(this,void 0,void 0,(function(){var a,s,o,u;return l(this,(function(c){switch(c.label){case 0:a=e,s=t.cloneDeep(r),o=n?n.toLowerCase():"get",c.label=1;case 1:return c.trys.push([1,3,,4]),[4,$t({method:te[o],headers:i,url:a,params:s,timeout:3e4}).then((function(t){return{code:2e4,data:t.data}}))];case 2:return[2,c.sent()];case 3:return u=c.sent(),console.error("error:"+u.message),[3,4];case 4:return[2]}}))}))}function Qt(t){return c(this,void 0,void 0,(function(){var e,n,r;return l(this,(function(i){switch(i.label){case 0:e=window.anUrl?window.anUrl:"",n=e+(window.agentPath?window.agentPath:"/ds/v1/api-proxy/v1/query"),u({},t),i.label=1;case 1:return i.trys.push([1,3,,4]),"{}"==JSON.stringify(null==t?void 0:t.params)&&(null==t||delete t.params),"{}"==JSON.stringify(null==t?void 0:t.headers)&&(null==t||delete t.headers),[4,$t({url:n,headers:{"Content-Type":"application/json;charset=UTF-8"},method:"post",data:{body:null==t?void 0:t.params,headers:null==t?void 0:t.headers,method:null==t?void 0:t.method,url:null==t?void 0:t.url}})];case 2:return[2,i.sent()];case 3:return r=i.sent(),console.error("error:"+r.message),[3,4];case 4:return[2]}}))}))}var Jt,te,ee=function(e,n,r){var i=e.tmpData.source,a=r?r.value.api.agency:i.api.agency,s=i.type;if("static"!==s){var o=r?r.value.api:i[s],u=o.url,c=o.headers,l=o.params,h=o.requestType,f={};u.split("?")[0];var d=function(t){var e=new Object;if(-1!==t.indexOf("?"))for(var n=t.split("?")[1].split("&"),r=0;r<n.length;r++)e[n[r].split("=")[0]]=unescape(n[r].split("=")[1]);return e}(u);c.use&&(f=JSON.parse(c.value));var p={};return l&&t.isString(l)?t.assign(p,d,JSON.parse(l)):t.assign(p,d,l),Object.keys(p).forEach((function(e){var r=p[e],i=n.filter((function(t){return t.mapField==r.toString().replace("@","")}))[0];i&&(p[e]=i.value,u=t.replace(u,d[e],i.value))})),{url:u,requestType:h,params:l,headers:f,agency:a}}return null},ne=function(t,e,n){void 0===e&&(e=[]),e||(e=[]);var r=ee(t,e);r&&n(r)},re=function(t,e,n,r,i){t.then((function(t){!t||2e4!=t.code&&200!=t.code?ae(e,ie({error:!0,message:t.msg?t.msg:"data error"},e,n,r),i):n?ae(e,ie(t.data,e,n,r),i):ae(e,ie(t.data,e,n,r),i,t.data)})).catch((function(t){ae(e,ie({error:!0,message:t.msg?t.msg:"data error"},e,n,r),i)}))},ie=function(t,e,n,r){void 0===n&&(n=!0);try{var i=e.tmpData.source,a=i.converse,s=i.mapFields;return a&&a.use&&n?new Promise((function(n,i){n(g(t,a,s,r,e))})):new Promise((function(e,n){e(t)}))}catch(t){console.error(t)}},ae=function(t,e,n,r){e.then((function(e){r?se(t,e,n,r):se(t,e,n)}))},se=function(t,e,n,r){var i=t.tmpData.source.type;r?("static"==i&&(t.tmpData.source[i].originData=r),"indicatorCQ"===i?t.tmpData.source.indicator.data=e:t.tmpData.source[i].data=e):"indicatorCQ"===i?t.tmpData.source.indicator.data=e:t.tmpData.source[i].data=e,t.source=e,n({cid:t.cid,data:e})},oe=function(t,e,n,r,i){void 0===n&&(n=!0);try{var a=t.tmpData.source.type,s=void 0;s=r||function(){};var o=null;"globalData"==a&&(o=i.find((function(e){return t.tmpData.source[a].id==e.key}))),function(t,e,n,r,i,a){void 0===r&&(r=!0),"globalData"==t&&(t=a.value.type);var s=a?a.value[t]:e.tmpData.source[t];if("api"==t)he(e,n,r,i,a);else if("static"==t){var o=void 0,u=void 0;s.originData&&Object.keys(s.originData).length?u=o=s.originData:o=s.data,ae(e,ie(o,e,r,n),i,u)}else if("datasource"==t)le(s.dsName,{dsType:"1",sql:qt(s.inputSql)},e,n,i,r);else if("staticFile"==t)le(s.dsName,{dsType:s.dsType,sql:""},e,n,i,r);else if("indicator"==t)ce(s.zbId,{},e,n,i,r);else if("indicatorCQ"==t){var c=a?a.value.indicator:e.tmpData.source.indicator;ue(c.zbName,c.params,e,n,i,r)}else i({cid:e.cid,data:"",message:"发生错误"})}(a,t,e,n,s,o)}catch(t){r&&r(t),console.log("error:"+t)}},ue=function(t,e,n,r,i,a){return c(void 0,void 0,void 0,(function(){var s,o,u,c,h,f,d,p,m;return l(this,(function(l){switch(l.label){case 0:return s=window.BaseUrl,o=e.dateType,u=void 0===o?"":o,c=e.endPeriod,h=void 0===c?"":c,f=e.metricsName,d=void 0===f?t:f,p=e.startPeriod,m=void 0===p?"":p,[4,$t({method:"GET",url:"".concat(s,"ds/v1/metrics/v1/data-alarm?dateType=").concat(u,"&endPeriod=").concat(h,"&metricsName=").concat(d,"&startPeriod=").concat(m),timeout:3e4}).then((function(t){if(2e4==t.code){var e=t.data;e?ae(n,ie(e,n,a,r),i):(ae(n,ie({data:e,message:t.msg?t.msg:"data error"},n,a,r),i),i({data:e,message:"发生错误"}))}else i({data:"",message:"发生错误"}),console.error("发生错误"),ae(n,ie({error:!0,message:t.msg?t.msg:"data error"},n,a,r),i)})).catch((function(t){i(t)}))];case 1:return l.sent(),[2]}}))}))},ce=function(t,e,n,r,i,a){return c(void 0,void 0,void 0,(function(){var s,o,u,c,h;return l(this,(function(l){switch(l.label){case 0:return s=window.BaseUrl?window.BaseUrl.replace("/management",""):"",o=zt("YZH_EXCHANGE_TOKEN")?zt("YZH_EXCHANGE_TOKEN"):null===(h=window.yzhAuth)||void 0===h?void 0:h.getToken(),c=window.gdPassid,window.BASE_RELEASE?(console.log("发布:",o),u="".concat(s,"/ds/data-engine/v1/").concat(t,"/zb-query?token=").concat(o,"&passid=").concat(c,"&preview=1")):(console.log("编辑",o),u="".concat(s,"/ds/data-engine/v1/").concat(t,"/zb-query?token=").concat(o,"&passid=").concat(c)),[4,$t({method:"POST",url:u,data:e,timeout:3e4}).then((function(t){if(2e4==t.code){var e=JSON.parse(t.data);e?ae(n,ie(e,n,a,r),i):(ae(n,ie({error:!0,message:t.msg?t.msg:"data error"},n,a,r),i),i({data:e,message:"发生错误"}))}else i({data:"",message:"发生错误"}),console.error("发生错误"),ae(n,ie({error:!0,message:t.msg?t.msg:"data error"},n,a,r),i)})).catch((function(t){i(t)}))];case 1:return l.sent(),[2]}}))}))},le=function(t,e,n,r,i,a){return c(void 0,void 0,void 0,(function(){var s;return l(this,(function(o){switch(o.label){case 0:return s=window.BaseUrl?window.BaseUrl.replace("/management",""):"",[4,$t({method:"get",url:"".concat(s,"/ds/v1/data-proxy/v1/").concat(t,"/query"),params:e,timeout:3e4}).then((function(t){if(2e4==t.code){var e=JSON.parse(t.data);e?ae(n,ie(e,n,a,r),i):(ae(n,ie({error:!0,message:t.msg?t.msg:"data error"},n,a,r),i),i({data:e,message:"发生错误"}))}else i({data:"",message:"发生错误"}),console.error("发生错误"),ae(n,ie({error:!0,message:t.msg?t.msg:"data error"},n,a,r),i)})).catch((function(t){i(t)}))];case 1:return o.sent(),[2]}}))}))},he=function(t,e,n,r,i){void 0===n&&(n=!0);try{var a=ee(t,e,i),s=a.url,o=a.requestType,u=a.params,c=a.headers,l=a.agency,h=s.match(/(@)[\w]*/gm),f=s;h&&h.length&&h.forEach((function(t){var n=e.filter((function(e){return"@"+e.mapField==t})),r="";n&&n.length&&n.forEach((function(t){""!=t.value&&(r=t.value)})),s=f.replaceAll(t,r)})),re(l?Qt({method:o,url:s,params:u,headers:c}):Xt(s,o,u,c),t,n,e,r)}catch(t){console.log("error:"+t)}},fe=function(t,e,n,r,i,a){var s,o;void 0===a&&(a=!0),t&&"api"==(null===(o=null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.source)||void 0===o?void 0:o.type)&&ne(t,e,(function(s){if(o=s.url,!new RegExp("^((https|http|ftp|rtsp|mms)?://)?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z].[a-z]{2,6})(:[0-9]{1,4})?((/?)|(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$").test(o))return n({cid:t.cid,data:{error:!0,message:s.url+"不是一个正确的地址,请正确填写!"}}),!1;var o,u=s.url,c=s.requestType,l=s.params,h=s.headers;s.agency?Qt({method:c,url:u,params:l,headers:h}).then((function(r){r&&2e4==r.code?(!function(t,e,n){try{e.then((function(e){n(e?{cid:t.cid,data:e}:{cid:t.cid,data:"数据发生错误!"})}))}catch(t){console.error(t)}}(t,ie(r.data,t,a,e),n),i&&"function"==typeof i&&i(1)):(i&&"function"==typeof i&&i(0),n({cid:t.cid,data:{error:!0,message:r.msg?r.msg:"error"}}))})).catch((function(e){i&&"function"==typeof i&&i(-1),n({cid:t.cid,data:{error:!0,message:e}})})):Xt(u,c,l,h).then((function(e){var i=[];if(r){var s=t.tmpData.source,o=s.converse,u=s.mapFields;o&&o.use&&a?g(e.data,o,u).then((function(e){i=e,n({cid:t.cid,data:i})})):(i=e.data,n({cid:t.cid,data:i}))}else i=e.data,n({cid:t.cid,data:i})})).catch((function(e){n({cid:t.cid,data:{error:!0,message:e}})}))}))};!function(t){t.json="application/json;charset=UTF-8",t.form="application/x-www-form-urlencoded; charset=UTF-8"}(Jt||(Jt={})),function(t){t.get="GET",t.post="POST",t.put="PUT",t.patch="PATCH",t.delete="DELETE"}(te||(te={}));var de=Object.freeze({__proto__:null,Http:function(t,e){return Kt(t,e)},axios:e,getDataForEvaluator:g,getData:Xt,agentData:Qt,getComponentData:ne,autoUpdateComData:function(e,n,r){var i,a,s,o,u,c=null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.source,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.open,h=null===(u=null===(o=c[null==c?void 0:c.type])||void 0===o?void 0:o.autoUpdate)||void 0===u?void 0:u.time;l&&t.isNumber(h)&&h>0&&setInterval((function(){oe(e,n,!0,r)}),1e3*h)},updateComData:oe,refreshData:fe,get ContentType(){return Jt},get HttpMethod(){return te}}),pe=function(e,n,r){try{var i={},a=[],s=[],o=t.cloneDeep(e);return kt(o,(function(t){var e,n;(null===(n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.actions)||void 0===n?void 0:n.length)&&Gt({types:t.tmpData.actions.map((function(t){return t.eventType})),element:t,actions:a,events:s})})),kt(o,(function(t){var e,n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.source;me(n,a,t,i)})),n&&n.length&&(a=h(h([],a,!0),n,!0)),r&&r.length&&(a=h(h([],a,!0),r,!0)),{shareVariableTree:i,globalVars:a.filter((function(t){return t})),globalEvents:s.filter((function(t){return t}))}}catch(t){return console.error("error",t),{}}},me=function(t,e,n,r){if(t){var i=null==t?void 0:t.type,a=t[i],s=null==t?void 0:t.converse;if(s&&s.use&&s.data.length&&s.data.map((function(t){var e;(null==t?void 0:t.dependVars)&&(null===(e=null==t?void 0:t.dependVars)||void 0===e?void 0:e.length)&&t.dependVars.map((function(t){ge(r,t,n.cid)}))})),"api"===i){var o=a.url.match(/(@)[\w]*/gm);if(o)for(var u=o.map((function(t){return t.replace("@","")})),c=function(t){var i=u[t];if(!i||!e||e.findIndex((function(t){return t.mapField===i}))<0)return"continue";ge(r,i,n.cid)},l=0;l<u.length;l++)c(l)}}},ge=function(e,n,r){if(e[n]&&t.isArray(e[n])){e[n].push(r);var i=e[n];e[n]=t.uniq(i)}else e[n]=[],e[n].push(r)};function ve(e){var n=[],r=[];kt(t.cloneDeep(e),(function(t){var e,i;(null===(i=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.actions)||void 0===i?void 0:i.length)&&Gt({types:t.tmpData.actions.map((function(t){return t.eventType})),element:t,actions:n,events:r})}));var i=r.filter((function(t){return t}));return{actions:n,events:i}}var ye={addGlobalSource:function(t,e){var n=e.name,r=e.value;t.globalSource.push({key:Ut(),name:n,value:r})},editGlobalSource:function(e,n){var r=this,i=n.key,a=n.value,s=e.globalSource.find((function(t){return t.key==i}));s&&(s.name=n.name,s.value=a,kt(t.cloneDeep(e.list),(function(t){var n,a,s;if("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)){var o=null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.source.globalData;(null==o?void 0:o.id)==i&&oe(t,e.globalVars,!0,(function(t){r.commit("GoCom/updataSourceForComponent",t)}),e.globalSource)}})))},delGlobalSource:function(t,e){try{var n=t.globalSource.findIndex((function(t){return t.key===e}));-1!==n&&t.globalSource.splice(n,1)}catch(t){console.error("删除错误",t)}},setSyncFlag:function(t,e){t.syncFlag=e},goUpShareVar:function(t,e){console.log(e,"reload"),t.shareVariable[e.key]=u({},e)},addGoVar:function(t,e){try{var n=e.mapField,r=(e.mold,t.globalConstant.filter((function(t){return t.mapField==n})).length);if(!n||r)throw new Error("添加失败!变量已经存在!");t.globalConstant.push(e),t.globalVars=pe(t.list,t.globalConstant,t.sysConst).globalVars}catch(t){console.warn(t)}},delGoVar:function(e,n){try{var r=n.mapField,i=(n.mold,e.globalConstant.filter((function(t){return t.mapField==r})).length);if(!r||!i)throw new Error("删除失败!");var a=t.cloneDeep(e.globalConstant);t.remove(a,(function(t){return t.mapField==r})),e.globalConstant=a,e.globalVars=pe(e.list,e.globalConstant,e.sysConst).globalVars}catch(t){console.warn(t)}},editGoVar:function(e,n){try{var r=n.mapField;n.mold;if(!e.globalConstant.find((function(t){return t.mapField==r})))throw new Error("修改失败!");var i=t.cloneDeep(e.globalConstant);i.forEach((function(t){t.mapField==r&&Object.assign(t,n)})),e.globalConstant=i,e.globalVars=pe(e.list,e.globalConstant,e.sysConst).globalVars}catch(t){console.warn(t)}},goEditVar:function(t,e){var n=e.key,r=e.value;t.globalVars.forEach((function(t){t.edit=!1})),t.globalVars.forEach((function(t){t.mapField==n&&(t.edit=!0,t.value=r)}))},goDelShareVar:function(t,e){delete t.shareVariable[e]},signal:function(t,e){},goSynchroDataAll:function(e,n){e.list=t.cloneDeep(n)},goSynchroData:function(e,n){if(e){var r=n.cid,i=n.attr,a=n.value,s=n.attrModel,o=Ot(e.list,r);if("boolean"!=typeof o){if(o&&At(o,i,a,s),"actions"===i.toLowerCase()){var u=e.list,c=t.uniqWith(t.concat(ve(u).actions,ve(e.caseList).actions),t.isEqual),l=t.uniqWith(t.concat(ve(u).events,ve(e.caseList).events),t.isEqual);e.globalVars=h(h([],c,!0),e.globalConstant,!0),e.globalEvents=l,e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalVars=c),e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalEvents=l)}if("source"===i){if(!o.tmpData.source)return!1;var f=o.tmpData.source,d=f.type;if("api"===d){var p=f[d].url.match(/(@)[\w]*/gm);if(p)for(var m=p.map((function(t){return t.replace("@","")})),g=function(n){var r=m[n];if(!r||!e.globalVars||e.globalVars.findIndex((function(t){return t.mapField===r}))<0)return"continue";if(e.shareVariableTree||(e.shareVariableTree={}),e.shareVariableTree[r]&&t.isArray(e.shareVariableTree[r])){e.shareVariableTree[r].push(o.cid);var i=e.shareVariableTree[r];e.shareVariableTree[r]=t.uniq(i)}else e.shareVariableTree[r]=[],e.shareVariableTree[r].push(o.cid)},v=0;v<m.length;v++)g(v)}}}}this.commit("GoCom/execute")}},_e={updataList:function(e,n){var r=n.cid,i=t.cloneDeep(n.list),a=t.cloneDeep(e.list);if(console.log(i,a),-1===i.findIndex((function(t){return t.cid===r})))for(var s=0;s<i.length;s++){var o=i[s];if(o.children&&o.children.length)for(var u=o.cid,c=0;c<o.children.length;c++){var l=o.children[c];if(l.cid===r){l.pid=u;var h=t.cloneDeep(o.baseData),f=It(l.baseData,o.baseData,1);Object.assign(l.baseData,f),Ft(o,h);break}}}else{var d=i.find((function(t){return t.cid===r})),p=d.pid;if(p){d.pid="";var m=xt(i,p);console.log(m,"movGroup"),Object.assign(d.baseData,It(d.baseData,m.baseData));s=m.children.findIndex((function(t){return t.cid===d.cid}));m.children.splice(s,1),0===m.children.length?xt(i,m.cid,!0):Ft(m,m.baseData)}}e.list=i},updataListForContrast:function(e,n){var r=n.cid,i=n.list,a=xt(i,r);Et(i,r);var s=Et(e.list,r);if(!a.pid){a.pid=s.cid;var o=t.cloneDeep(a.baseData),u=It(a.baseData,s.baseData,1);Object.assign(a.baseData,u),Ft(s,o)}},updateTree:function(e){for(var n=e.list,r=0;r<n.length;r++){var i=n[r];if(i.pid)(o=Ot(n,i.pid))&&Object.assign(i.baseData,It(i.baseData,o.baseData));if(i.children)for(var a=0;a<i.children.length;a++){var s=i.children[a];if(s.pid!=i.cid){var o=Ot(n,s.pid);if(t.cloneDeep(s.baseData),o){Object.assign(s.baseData,It(s.baseData,o.baseData));var u=It(s.baseData,i.baseData,1);Object.assign(s.baseData,u),Ft(i,i.baseData)}s.pid=i.cid}}}}},be=function(t){return c(this,void 0,void 0,(function(){var e,n,r,i;return l(this,(function(a){switch(a.label){case 0:return e=t.fontUrl,n=t.fontName,r="__custom_font__",(i=document.getElementById(r))?[3,2]:((i=document.createElement("style")).id=r,[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(n,"';src:url(").concat(e,");}"),[2]}}))}))},we=function(t,e,n){return void 0===e&&(e="jspaths"),c(void 0,void 0,void 0,(function(){var r,i;return l(this,(function(a){return r="script","jspaths"==e?r="script":"csspaths"==e&&(r="link"),i=document.createElement(r),"jspaths"==e?(i.defer=!0,i.src=t):"csspaths"==e&&(i.defer=!0,i.href=t),i.className=e,(n||document.head||document.getElementsByTagName("head")[0]).appendChild(i),i.onload=function(){},i.onerror=function(){throw new Error("Failed to load ".concat(t))},[2]}))}))},De=function(t,e){return void 0===e&&(e="jspaths"),c(void 0,void 0,void 0,(function(){var n,r;return l(this,(function(i){switch(i.label){case 0:n=0,i.label=1;case 1:return n<t.length?(r=t[n],"fonts"!=e?[3,2]:(be(r),[3,4])):[3,5];case 2:return[4,we(r,e)];case 3:i.sent(),console.log(55555),i.label=4;case 4:return n++,[3,1];case 5:return[2]}}))}))},Se=function(t){return c(void 0,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return t.fonts&&t.fonts.length?[4,De(t.fonts,"fonts")]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},Te=function(e){return c(void 0,void 0,void 0,(function(){return l(this,(function(n){switch(n.label){case 0:return e.jspaths&&e.jspaths.length?[4,De(e.jspaths,"jspaths")]:[3,2];case 1:n.sent(),n.label=2;case 2:return e.csspaths&&e.csspaths.length?[4,De(e.csspaths,"csspaths")]:[3,4];case 3:n.sent(),n.label=4;case 4:return e.fonts&&e.fonts.length?(t.uniqBy(e.fonts,"name"),[4,De(e.fonts,"fonts")]):[3,6];case 5:n.sent(),n.label=6;case 6:return[2]}}))}))},xe=function(){var t;(t=document.getElementById("__custom_font__")).parentNode.removeChild(t),Array.from(document.getElementsByTagName("script")).filter((function(t){return"jspaths"==t.className})).forEach((function(t){!function(t){for(var e=Array.from(document.getElementsByTagName("script")),n=0;n<e.length;n++)e[n]&&e[n].src&&-1!=e[n].src.indexOf(t)&&e[n].parentNode.removeChild(e[n])}(t.src)})),Array.from(document.getElementsByTagName("link")).filter((function(t){return"csspaths"==t.className})).forEach((function(t){!function(t){for(var e=Array.from(document.getElementsByTagName("link")),n=0;n<e.length;n++)e[n].href,e[n]&&e[n].href&&-1!=e[n].href.indexOf(t)&&e[n].parentNode.removeChild(e[n])}(t.href)}))};var Ee={reset:function(t){t.selectd=[],t.list=[],t.plant=null,t.tw=null,t.watermark=null,t.endnotes=null},setFonts:function(t,e){t.resource.fonts.push({fontName:e.name,fontUrl:e.src}),Se(t.resource)},setCaseInfo:function(t,e){t.caseInfo=e},setPageId:function(t,e){t.pageId=e},addConstant:function(e,n){var r=t.find(e.constant,{name:n.name});r?Object.assign(r,n):e.constant.push(n)},editConstant:function(e,n){var r=t.find(e.constant,{name:n.name});r&&Object.assign(r,n)},delConstant:function(e,n){t.remove(e.constant,(function(t){return t.name==n}))},setResource:function(t,e){var n=e.type,r=e.value;t.resource[n]=r,xe(),Te(t.resource)},updataResource:function(t){xe(),Te(t.resource)},setData:function(t,e){t.selectd=e.selectd},setList:function(t,e){t.list=e},saveDynamicChildren:function(t,e){var n=e.cid,r=e.data,i=e.name,a=t.pages[t.pageIndex].list,s=Ot(a,n);s&&(s.activeDynamic=i,s.dynamicChildren instanceof Array&&(s.dynamicChildren=new Map(s.dynamicChildren)),s.dynamicChildren.set(i,r))},setTheme:function(t,e){t.theme=e},setPlant:function(t,e){var n=e.attr,r=e.value;t.plant||(t.plant={name:"",theme:null,baseData:{width:1920,height:1080,left:0,top:0},option:null,optionDes:null}),t.plant[n]=r},setPlantHeight:function(t,e){t.plant&&(t.plant.baseData.height=t.plant.baseData.height+e)},reversal:function(t,e){t.undos=[],t.undoRedoPointer=-1,t=Object.assign(t,e)},setComTmp:function(t,e){var n=t.list.find((function(t){return t.cid===e[0]}));n.com=e[1],n.tmp=e[2]},setLoading:function(t,e){var n=e.cid,r=e.flag,i=t.list.find((function(t){return t.cid===n}));i&&(i.loading=r)},setMultiple:function(t,e){t.multiple=e},setCaseList:function(t,e){t.caseList=e},updataComponentForList:function(t,e){var n=e.cid,r=e.data,i=t.list,a=xt(i,n);"boolean"!=typeof a&&Object.assign(a,r)},updataComponentForCaseList:function(t,e){var n=e.cid,r=e.data,i=t.caseList,a=xt(i,n);"boolean"!=typeof a&&Object.assign(a,r)},updataComponent:function(t,e){var n=e.cid,r=e.data,i=t.pages&&t.pages[0]&&t.pages[0].list&&t.pages[0].list.length?t.pages[0].list:t.list,a=xt(i,n);"boolean"!=typeof a&&Object.assign(a,r)},updataArea:function(t,e){t.currentArea.left+=e.deltaX,t.currentArea.top+=e.deltaY},updataSource:function(t,e){var n=e.cid,r=e.data,i=Ot(t.list,n);"boolean"!=typeof i&&("indicatorCQ"===i.tmpData.source.type?i.tmpData.source.indicator.data=r:i.tmpData.source[i.tmpData.source.type].data=r)},updataSourceForComponent:function(e,n){var r=n.cid,i=n.data;if(e.list.length){var a=xt(e.list,r);"boolean"!=typeof a&&(a.source=t.cloneDeep(i))}},updataAnimationForComponent:function(t,e){var n=e.cid,r=e.data;if(t.list.length){var i=Ot(t.list,n);"boolean"!=typeof i&&(i.tw=r)}},updataWatermark:function(t,e){t.watermark=e},updataEndnotes:function(t,e){t.endnotes=e},updataAnimation:function(t,e){t.tw=e},setContext:function(t,e){var n=e.cid,r=e.data,i=Ot(t.list,n);"boolean"!=typeof i&&(i.example=r)},setContextList:function(t,e){var n=e.cid,r=e.data;t.contextList[n]=r},setPosition:function(t,e){Nt(t.list.find((function(t){return t.cid===e[0]})),e[1])},setSelect:function(t,e){t.cache=[],t.selectd=e instanceof Array?e:[e],t.selectd.length>1&&t.selectd.forEach((function(e){t.cache.push(t.list.find((function(t){return t.cid===e&&"Other.Plant.Normal"!==t.type})))}))},setActive:function(e,n){var r=t.cloneDeep(n),i=r.id,a=r.multiple,s=r.origin,o=r.ctr,u=t.cloneDeep(e.selectd);if(a){var c=u.includes(i);if(u.length>=1)if(!u.every((function(t){return Mt(e.list,t,n.id)})))return void console.info("sorry Only sibling elements can be selected!");c?u.splice(u.findIndex((function(t){return t===i})),1):u.push(i),e.selectd=u}else e.selectd=[i];e.selectd.forEach((function(t){var n=xt(e.list,t);n.pid&&(xt(e.list,n.pid).toggle=!0);o||(n.toggle=!0)})),e.selectdChangeOrigin=s||""},setCache:function(t){t.cache=[],t.selectd.length>1&&t.selectd.forEach((function(e){t.cache.push(t.list.find((function(t){return t.cid===e})))}))},clearActive:function(t){t.selectd=[]},setMultipleActive:function(t,e){t.selectd=e},syncMenuInfo:function(t){jt(t.menuList,(function(e){var n=10*e.lv+e.index;t.list.filter((function(t){return t.cid===e.id}))[0].z=1e4-n}))},addComs:function(e,n){var r=n.com,i=n.isMobile;"MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[])),i?e.list.push(r):e.list.unshift(r),e.menuList=t.cloneDeep(e.list),this.commit("GoCom/execute")},addComsForParent:function(e,n){var r=n.com,i=n.isMobile,a=n.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",[])),a){var s=xt(e.list,a);i?(s.children=[],s.children.push(r)):s.children.unshift(r)}else i?e.list.splice(0,1,r):e.list.unshift(r);e.menuList=t.cloneDeep(e.list),this.commit("GoCom/execute")},addMyComs:function(e,n){var r;try{var i=n.data,a=n.shareVariableTree,s=n.globalVars,o=n.globalEvents;e.globalVars=t.uniq(t.concat(t.cloneDeep(e.globalVars),s)),e.globalEvents=t.uniq(t.concat(t.cloneDeep(e.globalEvents),o));var u=Object.keys(a),c=Object.keys(e.shareVariableTree),l=t.difference(u,c);l.length?l.forEach((function(n){e.shareVariableTree[n]=t.concat(t.cloneDeep(e.shareVariableTree[n]),a[n])})):e.shareVariableTree=Object.assign(t.cloneDeep(e.shareVariableTree),a),i instanceof Array?(Ct(i),(r=e.list).unshift.apply(r,i)):(Ct([i]),e.list.unshift(i)),e.menuList=t.cloneDeep(e.list),this.commit("GoCom/execute")}catch(t){}},addStateChildren:function(t,e){var n=Ot(t.list,e.pid);n&&n.stateChildren.push(e)},addDynamicChildren:function(t,e){var n=Ot(t.list,e.pid);n&&n.dynamicChildren.push(e)},arraySwap:function(e,n){var r;try{if(!n||2!=n.length)throw new Error("参数错误,方法接受两个组件的CID组成的数组!");var i=t.cloneDeep(e.list),a=xt(i,n[0]),s=xt(i,n[1]),o=xt(i,a.pid),u={},c=0,l=0;if(s)if("selectContainer"==s.componentType){var f=xt(i,n[1]);o?(c=t.findIndex(o.children,(function(t){return t.cid==n[0]})),u=o.children[c],o.children=o.children.filter((function(t){return t.cid!==u.cid}))):(u=xt(i,n[0]),i=i.filter((function(t){return t.cid!==u.cid}))),u.cid=Ut(),u.pid=f.cid,f.children.push(u)}else if(a.pid||s.pid)if(o)if(c=t.findIndex(o.children,(function(t){return t.cid==n[0]})),u=o.children[c],a.pid!==s.pid){f=xt(i,s.pid);l=t.findIndex(f.children,(function(t){return t.cid==n[1]}));d=f.children[l];u.cid=Ut(),u.pid=f.cid,d.cid=Ut(),d.pid=o.cid,o.children.splice(c,1,d),f.children.splice(l,1,u)}else l=t.findIndex(o.children,(function(t){return t.cid==n[1]})),(r=o.children).splice.apply(r,h([l,1],o.children.splice(c,1,o.children[l]),!1));else{var f=xt(i,s.pid);c=t.findIndex(i,(function(t){return t.cid==n[0]})),l=t.findIndex(f.children,(function(t){return t.cid==n[1]})),u=xt(i,a.cid);var d=f.children[l];u.cid=Ut(),u.pid=f.cid,d.cid=Ut(),d.pid=null,i.splice(c,1,d),f.children.splice(l,1,u)}else St(e.list,n[0],n[1]);else c=t.findIndex(o.children,(function(t){return t.cid==n[0]})),u=o.children[c],o.children.splice(c,1),u.cid=Ut(),u.pid=null,i.push(u);e.list=i}catch(t){console.warn("组件位置交换发生错误",t)}},changeDynamicState:function(t,e){var n=Ot(t.list,e.cid);n&&"dynamicComponent"==n.componentType&&(n.dynamicChildren instanceof Array&&n.dynamicChildren.find((function(t){return t[0]==e.activeName}))||n.dynamicChildren instanceof Map&&n.dynamicChildren.has(e.activeName)?n.activeDynamic=e.activeName:console.error(e.activeName+"不是一个正确的状态"))},addAlternateData:function(t,e){t.alternateData[e.pid]||(t.alternateData[e.pid]=[]),t.alternateData[e.pid].push(e)},setOptionForCom:function(t,e){var n,r;try{var i=e.cid,a=e.key,s=e.value,o=xt(t.list,i);o&&(null===(r=null===(n=null==o?void 0:o.tmpData)||void 0===n?void 0:n.option)||void 0===r?void 0:r.hasOwnProperty(a))&&(o.tmpData.option[a]=s)}catch(t){console.warn("同步属性发生错误:"+t)}},mergeConfig:function(e,n){n.length>0&&n.forEach((function(t){e.list.unshift(t)})),e.menuList=t.cloneDeep(e.list),this.commit("GoCom/execute")},updataName:function(t,e){var n=Ot(t.list,e.cid);n&&(n.name=e.name)},setCurrentEdited:function(t,e){if(e){var n=Ot(t.list,e);if("boolean"!=typeof n){var r=Rt(n);n.children=r}t.currentEditerCid=e}else t.currentEditerCid=""}},Oe={layout:function(e,n){var r=function(e,n){try{var r=e.map((function(t){var e=Ot(n,t);if("object"==typeof e)return e;throw"Please check whether the input and output parameters are correct!"}));if(t.every(r,Object))return r;throw"Please check whether the input and output parameters are correct!"}catch(t){return console.error(t),[]}}(e.selectd,e.list);switch(n){case"alignLeft":!function(e,n){1===e.length&&(e[0].baseData.left=0);var r=t.sortBy(e,(function(t){return t.baseData.left}))[0].baseData.left;e.map((function(t){return t.baseData.left=r}))}(r);break;case"alignRight":!function(e,n){if(1===e.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width-e[0].baseData.width}var i=t.sortBy(e,(function(t){return t.baseData.left})),a=1*i[i.length-1].baseData.left+1*i[i.length-1].baseData.width;e.map((function(t){return t.baseData.left=a-1*t.baseData.width}))}(r,e);break;case"horizontally":!function(e,n){if(1===e.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width/2-e[0].baseData.width/2}var i=t.sortBy(e,(function(t){return t.baseData.left})),a=t.sortBy(e,(function(t){return 1*t.baseData.left+1*t.baseData.width})),s=(1*i[0].baseData.left+(1*a[a.length-1].baseData.left+1*a[a.length-1].baseData.width))/2;e.map((function(t){return t.baseData.left=s-t.baseData.width/2}))}(r,e);break;case"alignTop":!function(e,n){1===e.length&&(e[0].baseData.top=0);var r=1*t.sortBy(e,(function(t){return t.baseData.top}))[0].baseData.top;e.map((function(t){return t.baseData.top=r}))}(r);break;case"alignBottom":!function(e,n){if(1===e.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height-e[0].baseData.height}var i=t.sortBy(e,(function(t){return 1*t.baseData.left})),a=1*i[i.length-1].baseData.top+1*i[i.length-1].baseData.height;e.map((function(t){return t.baseData.top=a-1*t.baseData.height}))}(r,e);break;case"verticalCenter":!function(e,n){if(1===e.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height/2-e[0].baseData.height/2}var i=t.sortBy(e,(function(t){return t.baseData.top})),a=t.sortBy(e,(function(t){return 1*t.baseData.top+1*t.baseData.height})),s=(1*i[0].baseData.top+(1*a[a.length-1].baseData.top+1*a[a.length-1].baseData.height))/2;e.map((function(t){return t.baseData.top=s-t.baseData.height/2}))}(r,e);break;case"topDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.top})),r=(n[n.length-1].baseData.top-n[0].baseData.top)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.top=1*n[0].baseData.top+r*e)}))}(r);break;case"bottomDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.top+t.baseData.height})),r=(n[n.length-1].baseData.top+n[n.length-1].baseData.height-(n[0].baseData.top+n[0].baseData.height))/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.top=1*n[0].baseData.top+1*n[0].baseData.height-1*t.baseData.height+r*e)}))}(r);break;case"xCenterDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.left+t.baseData.width/2})),r=1*n[n.length-1].baseData.left+n[n.length-1].baseData.width/2,i=1*n[0].baseData.left+n[0].baseData.width/2,a=(r-i)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.left=i-t.baseData.width/2+a*e)}))}(r);break;case"leftDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.left})),r=(n[n.length-1].baseData.left-n[0].baseData.left)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.left=n[0].baseData.left+r*e)}))}(r);break;case"rightDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.left+t.baseData.width})),r=(n[n.length-1].baseData.left+n[n.length-1].baseData.width-(n[0].baseData.left+n[0].baseData.width))/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.left=n[0].baseData.left+n[0].baseData.width-t.baseData.width+r*e)}))}(r);break;case"yCenterDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.top+t.baseData.height/2})),r=1*n[n.length-1].baseData.top+n[n.length-1].baseData.height/2,i=1*n[0].baseData.top+n[0].baseData.height/2,a=(r-i)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.top=i-t.baseData.height/2+a*e)}))}(r)}}},Me={setPageData:function(t,e){t.pages[0]=e},parasePages:function(t,e){e instanceof Array&&(t.pages=e.map((function(t,e){return t.name||(t.name="页面"+(e+1)),t.path||(t.path="page"+(e+1)),t})))},addPage:function(t,e){var n=t.pages.length+1;e.name="页面"+n,e.path="page"+n,t.pages.push(e),t.pageIndex=t.pages.length-1,t.resource={jspaths:[],csspaths:[],otherpaths:[]}},setCurrentPageIndex:function(t,e){var n=t.globalEvents,r=t.globalVars,i=t.list,a=t.name,s=t.theme,o=t.plant,u=t.shareVariableTree,c=t.resource;t.pages[t.pageIndex]={globalEvents:n,globalVars:r,list:i,name:a,theme:s,plant:o,shareVariableTree:u,resource:c},t.pageIndex=e},setPageDataForIndex:function(t,e){var n=e.index,r=e.data;t.pages[n]=r},setPageName:function(t,e){t.name=e,t.pages[t.pageIndex].name=e},saveCurrentPageData:function(t){var e=t.globalEvents,n=t.globalVars,r=t.list,i=t.name,a=t.theme,s=t.plant,o=t.shareVariableTree,u=t.resource;t.pages[t.pageIndex]={globalEvents:e,globalVars:n,list:r,name:i,theme:a,plant:s,shareVariableTree:o,resource:u}},getCurrentPageData:function(t){var e=t.globalEvents,n=t.globalVars,r=t.list,i=t.name,a=t.theme,s=t.plant,o=t.shareVariableTree,u=t.resource;t.pages[t.pageIndex]={globalEvents:e,globalVars:n,list:r,name:i,theme:a,plant:s,shareVariableTree:o,resource:u}}},ke={segmentationContainer:function(e,n){var r=t.cloneDeep(e.list),i=n.containerData,a=n.direction,s=[];if("del"==a)if(i.pid){var o=function(t){if(t.length)for(var e=0;e<t.length;e++)i.pid===t[e].cid?t[e].children.length&&(t[e].children.map((function(t){t.cid!==i.cid&&1===t.children.length&&(s=t.children)})),t[e].children=[],s.length&&(t[e].children=s)):t[e].hasOwnProperty("children")&&o(t[e].children)};r.length&&o(r)}else r.length&&(r=r.filter((function(t){return t.cid!==i.cid})));else if(i.pid){var u=function(t){for(var e=0;e<t.length;e++)if(i.cid===t[e].cid){t[e].direction=a,1===t[e].children.length&&((s=t[e].children)[0].pid=null,t[e].children=[]);for(var n=0;n<2;n++)t[e].children.push({isLock:!1,isShow:!0,baseData:{width:"col"==a?"100%":"50%",height:"col"==a?"50%":"100%",angle:0,penetrate:0,opacity:100},componentType:"selectContainer",iconClass:"__vue_devtool_undefined__",isAssembly:"__vue_devtool_undefined__",source:[],comData:{actions:[],option:{grid:[{val:8,unit:"px"},{val:8,unit:"px"},{val:8,unit:"px"},{val:8,unit:"px"}],bgColor:{alpha:1,blue:0,green:0,red:0,flag:1,style:"transparent"}}},tmpData:{},dynamic:0,filePath:"/anov-prod/mgt/go/assembly/162-bgImage.png",origin:"anov-go",name:"容器组件",path:"/index.js",viewComName:"selectContainer",optionComName:"",dataComName:"",eventComName:"",direction:"col",assemblyDeveloper:"",devEmail:"",version:null,devDept:"",toggle:!0,cid:Ut(),pid:t[e].cid,nestIndex:0,children:[],isTop:!1,isCol:"col"==a,isRow:"col"!=a,isDragged:!1,grandParentId:i.pid});s.length&&(s[0].cid=Ut(),s[0].pid=t[e].children[0].cid,t[e].children[0].children=s)}else t[e].hasOwnProperty("children")&&u(t[e].children)};r.length&&u(r)}else{var c=xt(r,i.cid);if(c){c.direction=a,1===c.children.length&&(s=c.children,c.children=[]);for(var l=0;l<2;l++)c.children.push({isLock:!1,isShow:!0,baseData:{width:"col"==a?"100%":"50%",height:"col"==a?"50%":"100%",angle:0,penetrate:0,opacity:100},componentType:"selectContainer",iconClass:"__vue_devtool_undefined__",isAssembly:"__vue_devtool_undefined__",source:[],comData:{actions:[],option:{grid:[{val:8,unit:"px"},{val:8,unit:"px"},{val:8,unit:"px"},{val:8,unit:"px"}],bgColor:{alpha:1,blue:0,green:0,red:0,flag:1,style:"transparent"}}},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:Ut(),pid:c.cid,nestIndex:0,children:[],isTop:!1,isCol:"col"==a,isRow:"col"!=a,isDragged:!1,grandParentId:i.pid});s.length&&(s[0].cid=Ut(),s[0].pid=c.children[0].cid,c.children[0].children=s)}}e.list=r}},Ce={getCurrentPage:function(t){return t.pages.length?t.pages[t.pageIndex]:[]},globalSourceTree:function(e){if(e.list.length&&e.globalSource.length){var n=[];return kt(t.cloneDeep(e.list),(function(t){var e,r,i;if("globalData"==(null===(r=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.source)||void 0===r?void 0:r.type)){var a=null===(i=null==t?void 0:t.tmpData)||void 0===i?void 0:i.source.globalData;n.push({name:t.name,cid:t.cid,sourceId:a.id,viewComName:t.viewComName})}})),n}return[]}},Ae={namespaced:!0,state:s,mutations:u(u(u(u(u(u(u(u(u({},f),Wt),Zt),ye),_e),Ee),Oe),Me),ke),actions:{updataList:function(t,e){var n=t.commit;e&&n("updataList",e),n("updateTree")},setActive:function(t,e){var n=t.commit;e&&n("setActive",e)},setSyncFlag:function(t,e){var n=t.commit;e&&n("setSyncFlag",e)},execute:function(t,e){var n=t.commit;e&&n("execute",e)},updataAnimationForComponent:function(t,e){var n=t.commit;e&&n("updataAnimationForComponent",e)},updataAnimation:function(t,e){(0,t.commit)("updataAnimation",e)},setOptionForCom:function(t,e){(0,t.commit)("setOptionForCom",e)}},getters:Ce},Pe=function(){function t(){}return t.setAppStore=function(e){t.store=e},t.prototype.getState=function(){return t.store.state[t.storeModule]},t.prototype.mapState=function(e){return Re(t.storeModule,e)},t.prototype.mapGetters=function(e){return Ie(t.storeModule,e)},t.prototype.mapMutations=function(e){return Ne(t.storeModule,e)},t.prototype.callState=function(e){return t.store.state[t.storeModule][e]},t.prototype.callGetter=function(e,n){return t.store.getters[t.storeModule+"/"+e]},t.prototype.callMutation=function(e,n,r){r?t.store.commit(t.storeModule+"/"+e,n,!0):t.store.commit(t.storeModule+"/"+e,n)},t.prototype.callAction=function(e,n){t.store.dispatch(t.storeModule+"/"+e,n)},t.storeModule="GoCom",t}(),Re=Be((function(t,e){var n;return Ve(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=Ye(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[r].VuexServer=!0})),n})),Ne=Be((function(t,e){var n;return Ve(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this.$store.commit;if(t){var a=Ye(this.$store,"mapMutations",t);if(!a)return;r=a.context.commit}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}})),n})),Ie=Be((function(t,e){var n={};return Ve(e).forEach((function(e){var r=e.key,i=e.val;i=t+i,n[r]=function(){if(!t||Ye(this.$store,"mapGetters",t)){if("production"===process.env.NODE_ENV||i in this.$store.getters)return this.$store.getters[i];console.error("[VuexServer] unknown getter: ".concat(i))}},n[r].VuexServer=!0})),n}));function Ve(t){return Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}}))}function Be(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function Ye(t,e,n){var r=t._modulesNamespaceMap[n];return"production"===process.env.NODE_ENV||r||console.error("[VuexServer] module namespace not found in ".concat(e,"(): ").concat(n)),r}var Le=function(t){var e=this;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=Ut(),t&&(Object.keys(t).forEach((function(n){e[n]=t[n]})),["AnEchartsMap","AnMaptalks","AnEchartsMap1","AnArcgisMapBase","AnAMap1","AnCesium","AnThreeMap3DChina","AnThreeMapForCesium","AnGisMap"].includes(t.viewComName)&&(this.componentType="MultiStateComponent"),"AnDynamic"===t.viewComName&&(this.componentType="dynamicComponent"))},Fe=function(){function e(t){this.vueServer=t,this.loadScript=we}return e.setStore=function(t){this.store=t},e.prototype.loadComponents=function(e){var n=e&&e.list?e.list:[];kt(n,(function(t){t.viewComName&&(t&&t.path&&t.path,t.origin,t.viewComName?t.viewComName:t.rawData.viewComName)})),e&&this.vueServer.callMutation("reversal",t.cloneDeep(e))},e.prototype.addStore=function(t){this.vueServer.callMutation("setActive",{id:t}),this.vueServer.callMutation("addComs",this)},e.prototype._addPlantStore=function(){this.vueServer.callMutation("setPlant",this)},e.prototype._loadComTmp=function(t,e){return c(this,void 0,void 0,(function(){var n,r,i=this;return l(this,(function(a){switch(a.label){case 0:if(window[e])return[3,5];n=function(e){var n;return l(this,(function(r){switch(r.label){case 0:return n=t[e],[4,new Promise((function(t){t(i._load(n))}))];case 1:return r.sent(),[2]}}))},r=0,a.label=1;case 1:return r<t.length?[5,n(r)]:[3,4];case 2:a.sent(),a.label=3;case 3:return r++,[3,1];case 4:window[e]=e,a.label=5;case 5:return[2]}}))}))},e.prototype._load=function(t){return c(this,void 0,void 0,(function(){var e=this;return l(this,(function(n){return[2,new Promise((function(n){n(e.loadScript(t))}))]}))}))},e}(),je=function(){function t(t){var e=t.dbName,n=t.tables,r=t.version,i=void 0===r?1:r,a=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,["dbName","tables","version"]);this.dbName=e,this.tables=n,this.version=i,this.openDB(u({dbName:e,tables:n,version:i},a))}return t.deleteDB=function(t){var e;null===(e=window.indexedDB)||void 0===e||e.deleteDatabase(t)},t.prototype.deleteItem=function(t,e,n){var r=this.storage.transaction(t,"readwrite").objectStore(t).delete(e);return r.onsuccess=function(t){"function"==typeof n&&n(t)},r},t.prototype.getItem=function(t,e,n){var r=this.storage.transaction(t,"readwrite").objectStore(t),i=null;return(i=e?r.get(e):r.getAll()).onsuccess=function(t){var e;"function"==typeof n&&n(null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.result)},i.onerror=function(t){console.error(t),n(t)},i},t.prototype.setItem=function(t,e,n,r){var i=this.storage.transaction(t,"readwrite").objectStore(t).put(n,e);return i.onsuccess=function(t){"function"==typeof r&&r(t)},i.onerror=function(t){"function"==typeof r&&r(t)},i},t.prototype.get=function(t,e){return this.getItem(this.tables[0],t,e)},t.prototype.set=function(t,e,n){return this.setItem(this.tables[0],t,e,n)},t.prototype.delete=function(t,e){return this.deleteItem(this.tables[0],t,e)},t.prototype.clear=function(t,e){var n=this.storage.transaction(this.dbName,"readwrite").objectStore(t).clear();return n.onsuccess=function(t){"function"==typeof e&&e(t)},n},t.prototype.getDB=function(){return this.storage},t.prototype.closeDB=function(){this.storage.close()},t.prototype.openDB=function(t){var e=this,n=t.dbName,r=t.tables,i=t.version,a=t.callback,s=window.indexedDB;if(s)if((null==r?void 0:r.length)<1)console.error("表名不能为空");else{var o=s.open(n,i);o.onerror=function(t){var e,n;console.error("打开数据库失败: ".concat(null===(n=null===(e=t.currentTarget)||void 0===e?void 0:e.error)||void 0===n?void 0:n.message)),"function"==typeof a&&a(t)},o.onsuccess=function(t){var n;e.storage=null===(n=t.target)||void 0===n?void 0:n.result,"function"==typeof a&&a(t)},o.onupgradeneeded=function(t){var n;e.storage=null===(n=t.target)||void 0===n?void 0:n.result,r.forEach((function(n){e.storage.objectStoreNames.contains(n)||(e.storage.createObjectStore(n),"function"==typeof a&&a(t))}))}}else console.error("你的浏览器不支持indexedDB")},t}(),Ue=function(){function t(){this.VueServer=new Pe}return t.getInstance=function(){return this.instance||(this.db=new je({dbName:"AnovGo",tables:["logs"]}),this.instance=new t),this.instance},t.prototype.getAppStore=function(){return t.store},t.setAppStore=function(e){t.store=e,Pe.setAppStore(e),Fe.setStore(e)},t.prototype.add=function(t,e,n){e.MultiState?this.VueServer.callMutation("addStateChildren",e):(this.VueServer.callMutation("addComs",{com:e,isMobile:n}),this.VueServer.callMutation("setActive",{id:t}))},t.prototype.addForParent=function(t,e,n,r){this.VueServer.callMutation("addComsForParent",{com:e,PID:n,isMobile:r}),this.VueServer.callMutation("setActive",{id:t})},t.prototype.render=function(t,e){var n=new Le(t);e?this.add(n.cid,n,!0):this.add(n.cid,n)},t.prototype.renderForParent=function(t,e,n){var r=new Le(t);void 0!==n?this.addForParent(r.cid,r,e,n):this.addForParent(r.cid,r,e)},t.prototype.reversal=function(t){new Fe(new Pe).loadComponents(t)},t.prototype.log=function(e,n,r,i,a){var s=(new Date).toLocaleString();t.db.set(s,{type:n,info:r,user:e,trace:i}),t.db.get(null,(function(t){a&&a()}))},t.prototype.emitEvent=function(t,e){var n=this;!function(t,e,n,r,i,a,s,o){var u,c=i.cid,l=i.actions.eventName,h=[];h=i.hasOwnProperty("index")?t.filter((function(t){return t.id==c&&t.eventType==l&&parseInt(t.index)+1==parseInt(i.index)})):t.filter((function(t){return t.id===c&&t.eventType===l}));var f=i.actions.mode;!e||e.filter((function(t){return t.id===c&&t.type===l}));for(var d=function(t){var a=e[t];if(a.type!=l)return"break";if(a.current=!1,a.eventSourceId="",a.id==c){if(i.hasOwnProperty(a.field))a.value=i[a.field]?i[a.field]:"";else if((null==i?void 0:i.data)&&i.data[a.field])a.value=null==i?void 0:i.data[a.field];else{var o=Ot(r,c),h=null===(u=null==o?void 0:o.tmpData)||void 0===u?void 0:u.actions;h&&h.length?h.forEach((function(t){var e=t.vars.find((function(t){return t.mapField==a.mapField}));e&&(a.value=e.value,a.current=!0)})):(a.current=!1,a.value=null)}var f=n[a.mapField];if(!n)return{value:void 0};f&&f.length&&f.forEach((function(t){a.eventSourceId=t;var n=Ot(r,t);setTimeout((function(){oe(n,e,!0,s)}))}))}},p=0;p<e.length;p++){var m=d(p);if("object"==typeof m)return m.value;if("break"===m)break}var g=function(t){var e=h[t];if("link"==e.type&&window.open(e.link),"page"===e.type&&o&&o(e),"dynamic"===e.type){var n=e.dynamic;n&&n.length&&n.forEach((function(t){var n;e.id===i.cid&&(1!=i.actions.mode?e.index==i.index-1&&(n=xt(r,t.pid))&&(n.activeDynamic=t.name,n.isShow=!0,t.visible||(n.isShow=!1)):(n=xt(r,t.pid))&&(n.activeDynamic=t.name,n.isShow=!0,t.visible||(n.isShow=!1)))}))}"toggle"==e.type&&(2==f?e.children.forEach((function(t){e.index===i.index-1&&a({cid:t.cid,flag:t.visible})})):e.children.forEach((function(t){a({cid:t.cid,flag:t.visible})})))};for(p=0;p<h.length;p++)g(p)}(this.VueServer.callState("globalEvents"),this.VueServer.callState("globalVars"),this.VueServer.callState("shareVariableTree"),this.VueServer.callState("list"),t,(function(t){n.VueServer.callMutation("changeShow",t)}),(function(t){n.VueServer.callMutation("updataSourceForComponent",t)}),e)},t}(),He=Object.defineProperty,ze=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,We=(t,e,n)=>e in t?He(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ze=(t,e)=>{for(var n in e||(e={}))Ge.call(e,n)&&We(t,n,e[n]);if(ze)for(var n of ze(e))qe.call(e,n)&&We(t,n,e[n]);return t},Ke=(t,e,n)=>(We(t,"symbol"!=typeof e?e+"":e,n),n),$e=(t,e,n)=>new Promise(((r,i)=>{var a=t=>{try{o(n.next(t))}catch(t){i(t)}},s=t=>{try{o(n.throw(t))}catch(t){i(t)}},o=t=>t.done?r(t.value):Promise.resolve(t.value).then(a,s);o((n=n.apply(t,e)).next())})),Xe={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,blindOpacity:.005},Qe={childList:!0,subtree:!0,attributeFilter:["style","data-watermark-tag"]};var Je=t=>{let e="";return Object.keys(t).forEach((n=>{const r=n.replace(/([A-Z])/g,"-$1").toLowerCase();e+=`${r}:${t[n]};`})),e},tn=(t="")=>{return`${e=t,window.btoa(decodeURI(encodeURIComponent(e)))}-${(new Date).getTime()}-${Math.floor(Math.random()*Math.pow(10,8))}`;var e};var en=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,nn=i((function(t,e){!function(){function e(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}function r(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){u(r.response,e,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function a(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var s="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=s.saveAs||("object"!=typeof window||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(t,e,n){var o=s.URL||s.webkitURL,u=document.createElement("a");e=e||t.name||"download",u.download=e,u.rel="noopener","string"==typeof t?(u.href=t,u.origin===location.origin?a(u):i(u.href)?r(t,e,n):a(u,u.target="_blank")):(u.href=o.createObjectURL(t),setTimeout((function(){o.revokeObjectURL(u.href)}),4e4),setTimeout((function(){a(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,n,s){if(n=n||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(e(t,s),n);else if(i(t))r(t,n,s);else{var o=document.createElement("a");o.href=t,o.target="_blank",setTimeout((function(){a(o)}))}}:function(t,e,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return r(t,e,n);var a="application/octet-stream"===t.type,u=/constructor/i.test(s.HTMLElement)||s.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&u||o)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var t=l.result;t=c?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},l.readAsDataURL(t)}else{var h=s.URL||s.webkitURL,f=h.createObjectURL(t);i?i.location=f:location.href=f,i=null,setTimeout((function(){h.revokeObjectURL(f)}),4e4)}});s.saveAs=u.saveAs=u,t.exports=u}()})),rn=function(e){if(0===e.length)return[];var n=function(e){for(var r,i,a,s=0;s<e.length;s++)e[s].tmpData&&(e[s]=Object.assign({},(i=e[s],a=void 0,delete(a=t.cloneDeep(i)).comData,u({},a)))),e[s]&&e[s].children&&(null===(r=e[s])||void 0===r?void 0:r.children.length)?n(e[s].children):e[s]&&e[s].dynamicChildren&&Array.from(e[s].dynamicChildren).forEach((function(t,e){n(t[1])}))};return n(e),e},an=function(e){var n=t.cloneDeep(e)?t.cloneDeep(e):{};"string"==typeof e&&(n=JSON.parse(e));var r=[];if(n instanceof Array)n.forEach((function(t,e){var n=JSON.parse(t.caseDetailData)?JSON.parse(t.caseDetailData):{},i=t.caseDetailPath,a=t.caseDetailName,s=n.theme,o=void 0===s?null:s,u=n.globalVars,c=void 0===u?null:u,l=n.shareVariableTree,h=void 0===l?null:l,f=n.plant,d=void 0===f?null:f,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.globalEvents,w=void 0===b?[]:b;r.push({path:v||i,theme:o,name:a,resource:_,globalVars:c,globalEvents:w,shareVariableTree:h,plant:d,list:rn(m)})}));else{var i=n.theme,a=void 0===i?null:i,s=n.globalVars,o=void 0===s?null:s,u=n.shareVariableTree,c=void 0===u?null:u,l=n.plant,h=void 0===l?null:l,f=n.list,d=void 0===f?[]:f,p=n.resource,m=void 0===p?{jspaths:[],csspaths:[],otherpaths:[]}:p,g=n.globalEvents,v=void 0===g?[]:g;r.push({resource:m,theme:a,globalVars:o,globalEvents:v,shareVariableTree:c,plant:h,list:rn(d)})}return r};function sn(t,e){throw new Error("".concat(t,":Expected HTMLElement, got ").concat(e))}var on=function(){function t(t){this.option=t,this.option.isResize&&window.addEventListener("resize",this.resize.bind(this))}return Object.defineProperty(t,"defaultOption",{get:function(){return t._defaultOption},set:function(e){t._defaultOption=e},enumerable:!1,configurable:!0}),t.getInstance=function(e){return t.instance||(t.instance=new t(e)),t.instance},t.prototype.removeResize=function(){window.removeEventListener("resize",this.resize.bind(this))},t.prototype.resize=function(){var t=this.option,e=t.isEqualScale,n=t.wrapSelector,r=t.viewSelector,i=t.designWidth,a=t.designHeight,s=t.horizontal,o=t.vertical,u=document.querySelector(n);u||sn("wrap",u);var c=u.clientWidth,l=u.clientHeight,h=document.querySelector(r);h||sn("view",h),h.style.position="absolute",h.style.width=i+"px",h.style.height=a+"px";var f,d,p,m,g=Math.min(c/i,l/a);if(e){switch(h.style.transform="scale(".concat(g,")"),s){case"center":f=(c-i)/2+"px";break;case"left":f=(g-1)/2*i+"px";break;case"right":p=(g-1)/2*i+"px"}switch(o){case"center":d=(l-a)/2+"px";break;case"top":d=(g-1)/2*a+"px";break;case"bottom":m=(g-1)/2*a+"px"}}else h.style.transform="scale('".concat(c/i,", ").concat(l/a,"')"),f=(c-i)/2+"px",d=(l-a)/2+"px";d?h.style.top=d:m&&(h.style.bottom=m),f?h.style.left=f:p&&(h.style.right=p)},t._defaultOption={isEqualScale:!0,designWidth:1920,designHeight:1080,wrapSelector:"body",viewSelector:"#app",horizontal:"center",vertical:"center",isResize:!0},t}(),un=function(){function e(t){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 e=t.wrap,n=t.target,r=t.type,i=t.size,a=t.callback;this.size=i,this.type=r,this.initOptions(e,n,i),this.initSize(i),this.layout(),this.scale(a),window.addEventListener("resize",this.reset.bind(this,a))}return e.prototype.reset=function(t){this.initSize(this.size),this.layout(),t?this.scale(t):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(t.isElement(e))return e;var n=document.querySelector(e);return t.isElement(n)?n:null},e.prototype.initOptions=function(t,e,n){this.wrap=this.getDom(t),this.target=this.getDom(e),this.target.style.width=n.w+"px",this.target.style.height=n.h+"px",this.verificationDom()},e.prototype.initSize=function(t){this.outSize.w=this.wrap.clientWidth,this.outSize.h=this.wrap.clientHeight,this.inSize=t},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 t=(this.outSize.w-this.inSize.w)/2,e=(this.outSize.h-this.inSize.h)/2;this.target.style.top=e+"px",this.target.style.left=t+"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(t,e){var n;if(t&&e)for(n=t.parentNode;n;){if(e===n)return!0;n=n.parentNode}return!1},e.prototype.scale=function(t){var e=1,n=1;switch(this.type){case 0:e=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h),n=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h);break;case 1:n=e=this.outSize.w/this.inSize.w;break;case 2:e=n=this.outSize.h/this.inSize.h;break;case 3:e=this.outSize.w/this.inSize.w,n=this.outSize.h/this.inSize.h}t&&t([e,n]),this.target.style.transform="scale(".concat(e,",").concat(n,")")},e.prototype.resize=function(){},e}(),cn=i((function(t){!function(e){var n=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n=t(e).toLowerCase();return(r="application/font-woff",i="image/jpeg",{woff:r,woff2:r,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"})[n]||"";var r,i},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=n.charCodeAt(a);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){var e=3e4;o.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,i=new XMLHttpRequest;if(i.onreadystatechange=s,i.ontimeout=u,i.responseType="blob",i.timeout=e,i.open("GET",t,!0),i.send(),o.impl.options.imagePlaceholder){var a=o.impl.options.imagePlaceholder.split(/,/);a&&a[1]&&(r=a[1])}function s(){if(4===i.readyState)if(200===i.status){var e=new FileReader;e.onloadend=function(){var t=e.result.split(/,/)[1];n(t)},e.readAsDataURL(i.response)}else r?n(r):c("cannot fetch resource: "+t+", status: "+i.status)}function u(){r?n(r):c("timeout of "+e+"ms occured while fetching resource: "+t)}function c(t){console.error(t),n("")}}))},uid:function(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}(),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var n=e(t,"border-left-width"),r=e(t,"border-right-width");return t.scrollWidth+n+r},height:function(t){var n=e(t,"border-top-width"),r=e(t,"border-bottom-width");return t.scrollHeight+n+r}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),r=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,a){return s()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return i(e,t,n,a)}))})),r}));function s(){return!e(t)}},shouldProcess:e,impl:{readUrls:r,inline:i}};function e(e){return-1!==e.search(t)}function r(e){for(var r,i=[];null!==(r=t.exec(e));)i.push(r[1]);return i.filter((function(t){return!n.isDataUrl(t)}))}function i(t,e,r,i){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(i||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),i=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),a=function(){return{inlineAll:function e(i){return i instanceof Element?a(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(n.asArray(i.childNodes).map((function(t){return e(t)})))})):Promise.resolve(i);function a(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}},impl:{newImage:t}};function t(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),s={imagePlaceholder:void 0,cacheBust:!1},o={toSvg:u,toPng:function(t,e){return c(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return c(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return c(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return c(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:i,images:a,util:n,inliner:r,options:{}}};function u(t,e){return function(t){void 0===t.imagePlaceholder?o.impl.options.imagePlaceholder=s.imagePlaceholder:o.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?o.impl.options.cacheBust=s.cacheBust:o.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return l(t,e.filter,!0)})).then(h).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor);e.width&&(t.style.width=e.width+"px");e.height&&(t.style.height=e.height+"px");e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||n.width(t),e.height||n.height(t))}))}function c(t,e){return u(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var i=function(t){var r=document.createElement("canvas");if(r.width=e.width||n.width(t),r.height=e.height||n.height(t),e.bgcolor){var i=r.getContext("2d");i.fillStyle=e.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function l(t,e,r){return r||!e||e(t)?Promise.resolve(t).then((function(t){return t instanceof HTMLCanvasElement?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(r){return function(t,e,r){var i=t.childNodes;return 0===i.length?Promise.resolve(e):a(e,n.asArray(i),r).then((function(){return e}));function a(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return l(e,n)})).then((function(e){e&&t.appendChild(e)}))})),r}}(t,r,e)})).then((function(e){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(i).then(a).then(s).then((function(){return e})):e;function r(){function r(t,e){function r(t,e){n.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}t.cssText?e.cssText=t.cssText:r(t,e)}r(window.getComputedStyle(t),e.style)}function i(){function r(r){var i=window.getComputedStyle(t,r),a=i.getPropertyValue("content");if(""!==a&&"none"!==a){var s=n.uid();e.className=e.className+" "+s;var o=document.createElement("style");o.appendChild(u(s,r,i)),e.appendChild(o)}function u(t,e,r){var i="."+t+":"+e,a=r.cssText?s(r):o(r);return document.createTextNode(i+"{"+a+"}");function s(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function o(t){return n.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){r(t)}))}function a(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function s(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(t,e)})):Promise.resolve()}function h(t){return a.inlineAll(t).then((function(){return t}))}t.exports=o}()})),ln=function(t){if(!t)return!1;return 1==new RegExp(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/).test(t)},hn=function(t){for(var e="",n=new Uint8Array(t),r=n.byteLength,i=0;i<r;i++)e+=String.fromCharCode(n[i]);return"data:image/jpeg;base64,".concat(window.btoa(e))},fn=function(t,e){void 0===e&&(e="screenshot.png");try{for(var n=t.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]),a=i.length,s=new Uint8Array(a);a--;)s[a]=i.charCodeAt(a);return new File([s],e,{type:r})}catch(t){console.error("dataURLtoFile:数据转换错误 : "+t)}},dn=function(t,e){return c(void 0,void 0,void 0,(function(){var n;return l(this,(function(r){switch(r.label){case 0:return r.trys.push([0,11,,12]),console.log(t,"----"),"File"!=e||"string"!=typeof t?[3,2]:[4,fn(t)];case 1:case 3:case 5:case 7:return[2,r.sent()];case 2:return"File"!=e||"[object ArrayBuffer]"!=t.toString()?[3,4]:[4,new File([t],"screenshot.png")];case 4:return"Base64"!=e||"string"!=typeof t?[3,6]:[4,t];case 6:return"Base64"!=e||"[object ArrayBuffer]"!=t.toString()?[3,8]:[4,hn(t)];case 8:return[4,new Error("transformData: 转换发生错误")];case 9:throw r.sent();case 10:return[3,12];case 11:return n=r.sent(),console.log(n),[3,12];case 12:return[2]}}))}))},pn=function(t,n,r,i){return c(void 0,void 0,void 0,(function(){return l(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,e({url:t,method:"GET",responseType:"arraybuffer",params:{url:n,dom:r,quality:i}})];case 1:return[2,a.sent()];case 2:return a.sent(),console.warn("请求截图服务器发生错误,请检查地址及参数是否正确!",{url:t,path:n,dom:r,quality:i}),[2,null];case 3:return[2]}}))}))},mn=function(t,e){return c(void 0,void 0,void 0,(function(){var n,r;return l(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!(n=document.querySelector(t)))throw new Error("domToImg:"+t+" dom未被找到!");return[4,cn.toJpeg(n,{style:{transform:"scale(1)",position:"static"},quality:e})];case 1:return[2,i.sent()];case 2:return r=i.sent(),console.warn(r),[3,3];case 3:return[2]}}))}))},gn=function(t){return"".concat(t>15?"":0).concat(t.toString(16))},vn=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,a=void 0===i?1:i;return"#".concat(gn(e)).concat(gn(n)).concat(gn(r)).concat(1===a?"":gn(Math.floor(255*a)))},yn=function(t){var e=t.r,n=t.g,r=t.b;return"rgb(".concat(e,",").concat(n,",").concat(r,")")},_n=function(t,e){void 0===e&&(e=1e4);var n=t.r,r=t.g,i=t.b,a=t.a,s=void 0===a?1:a;return"rgba(".concat(n,",").concat(r,",").concat(i,",").concat(Math.floor(s*e)/e,")")},bn=function(t){var e=t.slice(1),n=1;3===e.length&&(e="".concat(e[0]).concat(e[0]).concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2])),8===e.length&&(n=parseInt(e.slice(6),16)/255,e=e.slice(0,6));var r=parseInt(e,16);return{r:r>>16&255,g:r>>8&255,b:255&r,a:n}},wn=function(t){var e=t.match(/(\d(\.\d+)?)+/g)||[],n=e.map((function(t){return parseInt(t,10)}));return{r:n[0],g:n[1],b:n[2],a:parseFloat(e[3])}},Dn=function(t){if(t.startsWith("#"))return bn(t);if(t.startsWith("rgb"))return wn(t);if("transparent"===t)return bn("#00000000");throw new Error("color string error: ".concat(t))},Sn=Object.freeze({__proto__:null,Watermark:class{constructor(t={}){Ke(this,"options"),Ke(this,"container"),Ke(this,"watermarkContent"),Ke(this,"watermarkDom"),Ke(this,"style"),Ke(this,"watermarkTag"),Ke(this,"shadowRoot"),Ke(this,"mutationObserver"),Ke(this,"_isAgainRender",(t=>{if("attributes"===t.type){if("data-watermark-tag"===t.attributeName)return!0;if(this.watermarkTag===this._getNodeRandomId(t.target))return!0}return!(!t.removedNodes.length||this.watermarkTag!==this._getNodeRandomId(t.removedNodes[0]))})),Ke(this,"_getNodeRandomId",(t=>{var e,n;return null==(e=null==t?void 0:t.dataset)?void 0:e[(n="data-watermark-tag",n.split("-").slice(1).reduce(((t,e,n)=>0===n?e:`${t}${e[0].toUpperCase()+e.slice(1)}`)))]})),Ke(this,"_destroyMutationObserver",(()=>{this.mutationObserver&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.mutationObserver=null)})),Ke(this,"_getWatermarkDom",(t=>$e(this,null,(function*(){this.watermarkDom||(this.watermarkDom=document.createElement("div")),"number"==typeof t&&t&&(this.style.height=`${t}px`);const e=yield function(t){const{text:e,gapX:n,gapY:r,offsetTop:i,offsetLeft:a,width:s,height:o,rotate:u,opacity:c,fontSize:l,fontStyle:h,fontVariant:f,fontWeight:d,fontFamily:p,fontColor:m,textAlign:g,textBaseline:v,image:y,blindText:_,blindOpacity:b}=t;return new Promise(((t,w)=>{const D=document.createElement("canvas"),S=D.getContext("2d"),T=1*(Number(n)+Number(s)),x=1*(Number(r)+Number(o)),E=Number(a)||Number(n)/2,O=Number(i)||Number(r)/2;if(D.setAttribute("width",`${T}px`),D.setAttribute("height",`${x}px`),S){const n=1*s,r=1*o;if(S.translate(1*E,1*O),S.rotate(Math.PI/180*Number(u)),_&&(S.globalAlpha=b,S.font="14px normal",S.fillText(_,0,0)),S.globalAlpha=c,y){const e=new Image;return e.crossOrigin="anonymous",e.referrerPolicy="no-referrer",e.src=y,void(e.onload=()=>{S.drawImage(e,0,0,n,r),t({url:S.canvas.toDataURL(),width:T,height:x})})}const i=Array.isArray(e)?e:[e],a=i.map((t=>S.measureText(t).width)),h=Math.max(...a),f=1*Number(l);S.textAlign=g,S.textBaseline=v,S.fillStyle=m,S.font=M(`${f}px`),h>s&&(S.font=M(f/2+"px"));const d=f+5;let p=(r-(l*i.length+5*(i.length-1)))/2;p=p<0?0:p;for(let t=0;t<i.length;t++)S.fillText(i[t]||"",n/2,p+d*t);t({url:S.canvas.toDataURL(),width:T,height:x})}function M(t){return`${h} ${f} ${d} ${t} ${p}`}return w()}))}(this.options);if(null==e?void 0:e.url){const t=e.url;"repeat"===this.options.mode?this.style.backgroundImage=`url(${t})`:(this.style.backgroundImage=`url(${t}), url(${t})`,this.style.backgroundRepeat="repeat, repeat",this.style.backgroundPosition=`${e.width/2}px ${e.height/2}px, 0 0`),this.options.container||(this.style.position="fixed",this.style.height=void 0),this.watermarkDom.setAttribute("style",Je(this.style))}return this.watermarkDom.setAttribute("data-watermark-tag",this.watermarkTag),this.watermarkDom})))),Ke(this,"_getWatermarkHeight",(()=>{if(!this.container)return 0;let t=0;const{scrollHeight:e=0,clientHeight:n=0}=this.options.container?this.container.parentNode:this.container;return e>n&&(t=Math.max(e,n)),t})),this.options=Object.assign({},Xe,t),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=tn("watermark"),this.mutationObserver=null,this._render()}update(t={}){this.options=Ze(Ze({},this.options),t),this.style.zIndex=this.options.zIndex,this._render()}show(){this.watermarkDom&&(this.style.display="block",this.watermarkDom.setAttribute("style",Je(this.style)))}hide(){this.watermarkDom&&(this.style.display="none",this.watermarkDom.setAttribute("style",Je(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 $e(this,null,(function*(){this._destroyMutationObserver(),this.container=((t,e,n={},r)=>{let i;if("string"==typeof t){if(i=document.getElementById(t),!i)throw new Error(`水印挂载节点未找到,请检查#${t}是否存在`)}else i=null!=t?t:document.body;i.setAttribute("data-watermark-tag",e);const a=Ze({position:"relative"},n);return r||delete a.position,i.setAttribute("style",Je(a)),i})(this.options.container,this.watermarkTag,this.options.containerStyle,this.options.pack),this.watermarkContent||(this.watermarkContent=(t=>{const e=document.createElement("div");return e.setAttribute("style",Je({pointerEvents:"none"})),e.setAttribute("data-watermark-tag",t),e})(this.watermarkTag),this.container.append(this.watermarkContent));const t=this._getWatermarkHeight();if(this.watermarkDom=yield this._getWatermarkDom(t),this.watermarkContent){const t=this.watermarkContent.childNodes||[];for(let e=0;e<t.length;e++)this.watermarkContent.removeChild(t[e])}"function"==typeof this.watermarkContent.attachShadow?this.shadowRoot||(this.shadowRoot=this.watermarkContent.attachShadow({mode:"open"})):this.shadowRoot=this.watermarkContent,this.shadowRoot.append(this.watermarkDom),en&&this.options.monitor&&(this.mutationObserver=new en((t=>{t.forEach((t=>{if(this._isAgainRender(t))return this.destroy(),void this._render()}))})),this.mutationObserver.observe(this.container,Qe),this.shadowRoot&&this.mutationObserver.observe(this.shadowRoot,Qe))}))}},generateComponentList:rn,generateCaseDataJson:an,generatePageData:function(t){var e={},n=e.theme,r=void 0===n?null:n,i=e.globalVars,a=void 0===i?null:i,s=e.shareVariableTree,o=void 0===s?null:s,u=e.plant,c=void 0===u?null:u,l=e.list,h=void 0===l?[]:l,f=e.undos,d=void 0===f?[]:f,p=e.undoRedoPointer,m=void 0===p?-1:p,g=e.globalEvents,v=void 0===g?[]:g;return t&&(r=t.theme,c=t.plant),{theme:r,globalVars:a,globalEvents:v,shareVariableTree:o,plant:c,undos:d,undoRedoPointer:m,list:rn(h)}},exportJson:function(t){var e=t.caseName,n=void 0===e?"case-name":e,r=t.caseImg,i=void 0===r?"":r,s=t.caseRemark,o=void 0===s?"":s,u=t.details,c=t.caseClientType,l={caseClientType:void 0===c?"":c,caseName:n,caseImg:i,caseRemark:o,createTime:a().format("YYYY-MM-DD , h:mm:ss"),caseData:an(u)},h=new Blob([JSON.stringify(l)],{type:"json"});nn.saveAs(h,n+".json")},generateJson:function(t){var e=t.caseName,n=void 0===e?"":e,r=t.caseData;return t.plangInfoForPsd,{caseName:n,createTime:a().format("YYYY-MM-DD , h:mm:ss"),caseData:an(r)}},SizeAdaption:on,Scale:un,loadFontResource:be,loadScript:we,removeTag:xe,loadTag:Te,loadFont:Se,getDataForEvaluator:g,recursion:kt,encrypt:qt,decrypt:function(t){var e=new bt;return e.setPrivateKey("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"),e.decrypt(t)},setActions:Gt,genID:Ut,arraySwap:Dt,arraySwapDeep:Tt,arraySwapForId:St,setAttr:function(t,e,n){for(var r,i=0;i<t.length;i++)(r=t[i]).cid!==e&&r.id!==e||(r[n]=!r[n])},RecursiveList:jt,selectdArea:Yt,setPorp:function(t,e,n){var r=e.find((function(e){return e.cid===t}));"folder"===r.type?r.children.length&&r.children.forEach((function(t){t[n]=!t[n]})):r[n]=!r[n]},setPositionForGroup:Pt,resetPositionForGroup:function(t,e){var n=e.map((function(t){return t.cid}));e.forEach((function(e){e.pid&&Nt(e,t)}));var r=Yt(n,e);return Pt(r,e),{left:r.left,top:r.top,width:r.width,height:r.height}},setPositionForWorld:Nt,breakUp:Rt,findItem:Ot,findItemDeep:xt,findParentDeep:Et,findItemIndexDeep:function(t,e){for(var n,r=0,i=0;i<t.length;i++){var a=t[i];if(r+=1,a.cid==e)break;if(null===(n=null==a?void 0:a.children)||void 0===n?void 0:n.length)for(var s=0;s<(null==a?void 0:a.children.length);s++){if(r+=1,(null==a?void 0:a.children[s]).cid==e)return r}}return r},getLength:function(t){var e=0,n=function(t){for(var r=function(r){if(t[r].isShow&&t[r].children)n(t[r].children);else if(t[r].isShow&&t[r].dynamicChildren){if(t[r].dynamicChildren instanceof Map){for(var i=Array.from(t[r].dynamicChildren),a=0;a<i.length;a++)if(i[a]instanceof Array){var s=i[a][1];n(s)}}else if(t[r].isShow&&t[r].dynamicChildren instanceof Array){console.log(t[r]," array[i].");var o=t[r].dynamicChildren.find((function(e){return e[0]=t[r].activeDynamic}));o&&o.length&&n(o[1])}}else t[r].isShow&&t[r].stateChildren?n(t[r].stateChildren):t[r].isShow&&e++},i=0;i<t.length;i++)r(i)};return n(t),e||!1},getPosition:Lt,updataAttribute:At,isPeer:Mt,transformPosition:It,upDataGroup:Ft,upDataGroupChildren:function(e,n,r){var i=e.children,a=t.cloneDeep(n),s=t.cloneDeep(Lt(i)),o=a.left,u=a.top;a.width,a.height;var c=s.left,l=s.top,h=s.width,f=s.height,d={left:o+c,top:u+l,width:h,height:f,angle:n.angle?n.angle:0};return i.forEach((function(e){var n=t.cloneDeep(e.baseData);e.baseData.left<0?n.left=0:n.left=n.left-c,e.baseData.top<0?n.top=0:n.top=n.top-l,e.baseData=n})),e.children=i,d},resziePositionForGroup:function(e,n,r,i){var a=e.baseData.left,s=e.baseData.top,o=n.left,u=n.top,c=t.cloneDeep(e.children),l=r||"";if(o-a<0)for(var h=0;h<c.length;h++){(f=c[h]).cid!==l&&(f.baseData.left=f.baseData.left+(a-o))}if(u-s<0)for(h=0;h<c.length;h++){var f;(f=c[h]).cid!==l&&(f.baseData.top=f.baseData.top+(s-u))}e.children=c},genCopyName:Ht,resetID:Ct,getUrlParams:zt,updataSizeDeep:wt,resizePosition:Vt,resizeListPosition:function(t,e){var n=function(t,r){for(var i,a=0;a<t.length;a++){var s=t[a];if(s.pid!=r){var o=Vt(e,s.cid),u=Vt(e,s.pid);console.log(o,u),s.baseData.left=o.left-u.left,s.baseData.top=o.top-u.top}(null===(i=null==s?void 0:s.children)||void 0===i?void 0:i.length)&&n(s.children,s.cid)}};n(t,e)},getInteractive:pe,getShareTree:function(t,e){try{var n={},r=[],i=[];return kt(t,(function(t){var a,s,o,u=null===(a=null==t?void 0:t.tmpData)||void 0===a?void 0:a.source;(me(u,e,t,n),null===(o=null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.actions)||void 0===o?void 0:o.length)&&Gt({types:t.tmpData.actions.map((function(t){return t.eventType})),element:t,actions:r,events:i})})),n}catch(t){return console.error(t),{}}},screenshot:function(t){return c(void 0,void 0,void 0,(function(){var e,n,r,i,a,s,o,u;return l(this,(function(c){switch(c.label){case 0:return c.trys.push([0,11,,12]),e=t.dom,n=t.servePath,r=t.targetPath,i=t.quality,a=t.type,s=void 0,ln(n)&&ln(r)?[4,pn(n,r,e,i||.5)]:[3,5];case 1:return(o=c.sent())&&200==o.status&&o.data?(s=o.data,[3,4]):[3,2];case 2:return console.warn("截取错误,请检查网络或服务地址配置是否正确,已转换为dom-to-img."),[4,mn(e,i||.5)];case 3:s=c.sent(),c.label=4;case 4:return[3,7];case 5:return console.warn("地址错误,请检查传入的地址是否争取,已转换为dom-to-img."),[4,mn(e,i||.5)];case 6:s=c.sent(),c.label=7;case 7:return s?[4,dn(s,a)]:[3,9];case 8:return[2,c.sent()];case 9:return[2,null];case 10:return[3,12];case 11:return u=c.sent(),console.error("截图发生错误:"+u),[2,null];case 12:return[2]}}))}))},toHex:gn,toHexString:vn,toRgbString:yn,toRgbaString:_n,parseHexColor:bn,parseRgbaColor:wn,parseColorString:Dn,getColorInfo:function(t){var e=Dn(t);return{hex:vn(e),rgba:_n(e),rgb:yn(e),rgbaObj:e}},hexToRgba:function(t){var e=Dn(t);return _n(e)},rgbaToHex:function(t){var e=Dn(t);return vn(e)}});function Tn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xn(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}
18
+ var gt={};void 0!==gt.asn1&&gt.asn1||(gt.asn1={}),gt.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1).length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";e=new H(r,16).xor(t).add(H.ONE).toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=gt.asn1,n=e.DERBoolean,r=e.DERInteger,i=e.DERBitString,a=e.DEROctetString,s=e.DERNull,o=e.DERObjectIdentifier,u=e.DEREnumerated,c=e.DERUTF8String,l=e.DERNumericString,h=e.DERPrintableString,f=e.DERTeletexString,d=e.DERIA5String,p=e.DERUTCTime,m=e.DERGeneralizedTime,g=e.DERSequence,v=e.DERSet,y=e.DERTaggedObject,_=e.ASN1Util.newObject,b=Object.keys(t);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 n(t[w]);if("int"==w)return new r(t[w]);if("bitstr"==w)return new i(t[w]);if("octstr"==w)return new a(t[w]);if("null"==w)return new s(t[w]);if("oid"==w)return new o(t[w]);if("enum"==w)return new u(t[w]);if("utf8str"==w)return new c(t[w]);if("numstr"==w)return new l(t[w]);if("prnstr"==w)return new h(t[w]);if("telstr"==w)return new f(t[w]);if("ia5str"==w)return new d(t[w]);if("utctime"==w)return new p(t[w]);if("gentime"==w)return new m(t[w]);if("seq"==w){for(var D=t[w],S=[],T=0;T<D.length;T++){var x=_(D[T]);S.push(x)}return new g({array:S})}if("set"==w){for(D=t[w],S=[],T=0;T<D.length;T++){x=_(D[T]);S.push(x)}return new v({array:S})}if("tag"==w){var E=t[w];if("[object Array]"===Object.prototype.toString.call(E)&&3==E.length){var O=_(E[2]);return new y({tag:E[0],explicit:E[1],obj:O})}var M={};if(void 0!==E.explicit&&(M.explicit=E.explicit),void 0!==E.tag&&(M.tag=E.tag),void 0===E.obj)throw"obj shall be specified for 'tag'.";return M.obj=_(E.obj),new y(M)}},this.jsonToASN1HEX=function(t){return this.newObject(t).getEncodedHex()}},gt.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),r=(e=Math.floor(n/40)+"."+n%40,""),i=2;i<t.length;i+=2){var a=("00000000"+parseInt(t.substr(i,2),16).toString(2)).slice(-8);if(r+=a.substr(1,7),"0"==a.substr(0,1))e=e+"."+new H(r,2).toString(10),r=""}return e},gt.asn1.ASN1Util.oidIntToHex=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new H(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var a="",s=0;s<i;s++)a+="0";r=a+r;for(s=0;s<r.length-1;s+=7){var o=r.substr(s,7);s!=r.length-7&&(o="1"+o),n+=e(parseInt(o,2))}return n};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),a=40*parseInt(i[0])+parseInt(i[1]);r+=e(a),i.splice(0,2);for(var s=0;s<i.length;s++)r+=n(i[s]);return r},gt.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="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+n).toString(16)+e},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""}},gt.asn1.DERAbstractString=function(t){gt.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},mt.lang.extend(gt.asn1.DERAbstractString,gt.asn1.ASN1Object),gt.asn1.DERAbstractTime=function(t){gt.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,n){var r=this.zeroPadding,i=this.localDateToUTC(t),a=String(i.getFullYear());"utc"==e&&(a=a.substr(2,2));var s=a+r(String(i.getMonth()+1),2)+r(String(i.getDate()),2)+r(String(i.getHours()),2)+r(String(i.getMinutes()),2)+r(String(i.getSeconds()),2);if(!0===n){var o=i.getMilliseconds();if(0!=o){var u=r(String(o),3);s=s+"."+(u=u.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,r,i,a){var s=new Date(Date.UTC(t,e-1,n,r,i,a,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},mt.lang.extend(gt.asn1.DERAbstractTime,gt.asn1.ASN1Object),gt.asn1.DERAbstractStructured=function(t){gt.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},mt.lang.extend(gt.asn1.DERAbstractStructured,gt.asn1.ASN1Object),gt.asn1.DERBoolean=function(){gt.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},mt.lang.extend(gt.asn1.DERBoolean,gt.asn1.ASN1Object),gt.asn1.DERInteger=function(t){gt.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=gt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new H(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},mt.lang.extend(gt.asn1.DERInteger,gt.asn1.ASN1Object),gt.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=gt.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}gt.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";var r="";for(n=0;n<t.length-1;n+=8){var i=t.substr(n,8),a=parseInt(i,2).toString(16);1==a.length&&(a="0"+a),r+=a}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},mt.lang.extend(gt.asn1.DERBitString,gt.asn1.ASN1Object),gt.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=gt.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}gt.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},mt.lang.extend(gt.asn1.DEROctetString,gt.asn1.DERAbstractString),gt.asn1.DERNull=function(){gt.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},mt.lang.extend(gt.asn1.DERNull,gt.asn1.ASN1Object),gt.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new H(t,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var a="",s=0;s<i;s++)a+="0";r=a+r;for(s=0;s<r.length-1;s+=7){var o=r.substr(s,7);s!=r.length-7&&(o="1"+o),n+=e(parseInt(o,2))}return n};gt.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var r="",i=t.split("."),a=40*parseInt(i[0])+parseInt(i[1]);r+=e(a),i.splice(0,2);for(var s=0;s<i.length;s++)r+=n(i[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(t){var e=gt.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},mt.lang.extend(gt.asn1.DERObjectIdentifier,gt.asn1.ASN1Object),gt.asn1.DEREnumerated=function(t){gt.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=gt.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new H(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},mt.lang.extend(gt.asn1.DEREnumerated,gt.asn1.ASN1Object),gt.asn1.DERUTF8String=function(t){gt.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},mt.lang.extend(gt.asn1.DERUTF8String,gt.asn1.DERAbstractString),gt.asn1.DERNumericString=function(t){gt.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},mt.lang.extend(gt.asn1.DERNumericString,gt.asn1.DERAbstractString),gt.asn1.DERPrintableString=function(t){gt.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},mt.lang.extend(gt.asn1.DERPrintableString,gt.asn1.DERAbstractString),gt.asn1.DERTeletexString=function(t){gt.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},mt.lang.extend(gt.asn1.DERTeletexString,gt.asn1.DERAbstractString),gt.asn1.DERIA5String=function(t){gt.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},mt.lang.extend(gt.asn1.DERIA5String,gt.asn1.DERAbstractString),gt.asn1.DERUTCTime=function(t){gt.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,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!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},mt.lang.extend(gt.asn1.DERUTCTime,gt.asn1.DERAbstractTime),gt.asn1.DERGeneralizedTime=function(t){gt.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,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!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},mt.lang.extend(gt.asn1.DERGeneralizedTime,gt.asn1.DERAbstractTime),gt.asn1.DERSequence=function(t){gt.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){t+=this.asn1Array[e].getEncodedHex()}return this.hV=t,this.hV}},mt.lang.extend(gt.asn1.DERSequence,gt.asn1.DERAbstractStructured),gt.asn1.DERSet=function(t){gt.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},mt.lang.extend(gt.asn1.DERSet,gt.asn1.DERAbstractStructured),gt.asn1.DERTaggedObject=function(t){gt.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},mt.lang.extend(gt.asn1.DERTaggedObject,gt.asn1.ASN1Object);var vt=window&&window.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yt=function(t){function e(n){var r=t.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(e.hasPrivateKeyProperty(n)||e.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}return vt(e,t),e.prototype.parseKey=function(t){try{var e=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?C(t):A.unarmor(t),i=L.decode(r);if(3===i.sub.length&&(i=i.sub[2].sub[0]),9===i.sub.length){e=i.sub[1].getHexStringValue(),this.n=K(e,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var a=i.sub[3].getHexStringValue();this.d=K(a,16);var s=i.sub[4].getHexStringValue();this.p=K(s,16);var o=i.sub[5].getHexStringValue();this.q=K(o,16);var u=i.sub[6].getHexStringValue();this.dmp1=K(u,16);var c=i.sub[7].getHexStringValue();this.dmq1=K(c,16);var l=i.sub[8].getHexStringValue();this.coeff=K(l,16)}else{if(2!==i.sub.length)return!1;var h=i.sub[1].sub[0];e=h.sub[0].getHexStringValue(),this.n=K(e,16),n=h.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new gt.asn1.DERInteger({int:0}),new gt.asn1.DERInteger({bigint:this.n}),new gt.asn1.DERInteger({int:this.e}),new gt.asn1.DERInteger({bigint:this.d}),new gt.asn1.DERInteger({bigint:this.p}),new gt.asn1.DERInteger({bigint:this.q}),new gt.asn1.DERInteger({bigint:this.dmp1}),new gt.asn1.DERInteger({bigint:this.dmq1}),new gt.asn1.DERInteger({bigint:this.coeff})]};return new gt.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return O(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new gt.asn1.DERSequence({array:[new gt.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new gt.asn1.DERNull]}),e=new gt.asn1.DERSequence({array:[new gt.asn1.DERInteger({bigint:this.n}),new gt.asn1.DERInteger({int:this.e})]}),n=new gt.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new gt.asn1.DERSequence({array:[t,n]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return O(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var n="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(dt),_t="3.2.1",bt=function(){function t(t){void 0===t&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new yt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(M(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return O(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return O(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,M(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new yt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=_t,t}(),wt=function(t,e){var n=e.xRatio,r=e.yRatio;return t.forEach((function(t){var i;t.baseData.left=t.baseData.left*n,t.baseData.width=t.baseData.width*n,t.baseData.top=t.baseData.top*r,t.baseData.height=t.baseData.height*r,t.baseData.angle=t.baseData.angle,(null===(i=null==t?void 0:t.children)||void 0===i?void 0:i.length)&&wt(null==t?void 0:t.children,e)})),t},Dt=function(t,e,n){var r=t[n];return t.splice(n,1),t.splice(e,0,r),t},St=function(e,n,r){var i=t.findIndex(e,(function(t){return t.cid==r})),a=t.findIndex(e,(function(t){return t.cid==n}));return Dt(e,a,i)},Tt=function(t,e,n){for(var r=-1,i=0;i<t.length;i++){var a=t[i];if(a.children&&a.children.length)for(var s=0;s<a.children.length;s++){if(r=s,a.children[s].cid===n){switch(e){case"up":r>=1&&Dt(a.children,r-1,r);break;case"down":r<a.children.length-2&&Dt(a.children,r+1,r);break;case"top":0!==r&&Dt(a.children,0,r);break;case"bottom":var o=a.children.length-1;r!==o&&Dt(a.children,o,r)}break}}}return t},xt=function(e,n,r){var i=!1,a=function(e){for(var s=0;s<e.length;s++){if(e[s].cid==n){i=e[s],r&&t.remove(e,(function(t){return t.cid==n}));break}if(e[s].children)a(e[s].children);else if(e[s].dynamicChildren){if(e[s].dynamicChildren instanceof Map){for(var o=Array.from(e[s].dynamicChildren),u=0;u<o.length;u++)if(o[u]instanceof Array){var c=o[u][1];a(c)}}else if(e[s].dynamicChildren instanceof Array)for(o=e[s].dynamicChildren,u=0;u<o.length;u++)if(o[u]instanceof Array){c=o[u][1];a(c)}}else e[s].stateChildren&&a(e[s].stateChildren)}};return a(e),i||!1},Et=function(t,e){var n=null,r=function(t,i){for(var a=0;a<t.length;a++)if(t[a].cid==e)n=i;else if(t[a].children)r(t[a].children,t[a]);else if(t[a].dynamicChildren)if(t[a].dynamicChildren instanceof Map){for(var s=Array.from(t[a].dynamicChildren),o=0;o<s.length;o++)if(s[o]instanceof Array){var u=s[o][1];r(u,t[a])}}else t[a].dynamicChildren;else t[a].stateChildren&&r(t[a].stateChildren,t[a])};return r(t,null),n||!1},Ot=function(t,e,n){for(var r,i=function(i){var a=t[i];if(a.cid===e)return r=a,n&&t.splice(i,1),{value:r};if(a.children&&a.children.length){for(var s=0;s<a.children.length;s++)if(a.children[s].cid===e)return r=a.children[s],n&&a.children.splice(s,1),{value:r}}else if(a.stateChildren&&a.stateChildren.length){for(s=0;s<a.stateChildren.length;s++)if(a.stateChildren[s].cid===e)return r=a.stateChildren[s],n&&a.stateChildren.splice(s,1),{value:r}}else if(a.dynamicChildren){var o=void 0;if(a.dynamicChildren instanceof Map?o=a.dynamicChildren.get(a.activeDynamic):a.dynamicChildren instanceof Array&&(o=a.dynamicChildren.find((function(t){return t[0]==a.activeDynamic}))[1]),o)for(s=0;s<o.length;s++)if(o[s].cid===e)return r=o[s],n&&o.splice(s,1),{value:r}}},a=0;a<t.length;a++){var s=i(a);if("object"==typeof s)return s.value}return!!r},Mt=function(t,e,n){var r=Ot(t,e),i=Ot(t,n);return r.pid&&i.pid||!r.pid&&!i.pid},kt=function(t,e){var n=function(t){for(var r,i,a,s=0;s<t.length;s++){var o=t[s];(null===(a=null===(i=null===(r=o.tmpData)||void 0===r?void 0:r.source)||void 0===i?void 0:i.converse)||void 0===a?void 0:a.data.length)&&o.tmpData.source.converse.data.forEach((function(t){t.code=t.code.replace(/&gt;/g,">").replace(/&lt;/g,"<")})),e(o),o&&o.children&&o.children.length?n(o.children):o&&o.dynamicChildren?Array.from(o.dynamicChildren).forEach((function(t,e){n(t[1])})):o.stateChildren&&n(o.stateChildren)}};n(t)},Ct=function(t){var e=function(t,n){for(var r=function(r){var i=t[r],a=Ut();n?i.pid=n:i.drag||(i.baseData.left=0,i.baseData.top=0),i.cid=a,i&&i.children&&i.children.length?e(i.children,a):i&&i.dynamicChildren&&Array.from(i.dynamicChildren).forEach((function(t,n){e(t[1],a)}))},i=0;i<t.length;i++)r(i)};e(t)},At=function(e,n,r,i){try{if(!e||!e.hasOwnProperty(n)&&!e.hasOwnProperty(i))throw"The property you want to modify is not found. Please check whether the attribute ".concat(n," is entered correctly!");if(i){t.cloneDeep(e[i][n]);e[i][n]=r}else e[n]=r}catch(t){console.error(t)}},Pt=function(t,e){e.forEach((function(e){e.baseData.left=e.baseData.left-t.left,e.baseData.top=e.baseData.top-t.top}))},Rt=function(e){var n=t.cloneDeep(e),r=[];return n.children&&n.children.length&&n.children.forEach((function(t){Nt(t,n.baseData),r.push(t)})),r},Nt=function(t,e){t.baseData.left=t.baseData.left+e.left,t.baseData.top=t.baseData.top+e.top},It=function(t,e,n){var r={left:0,top:0};return n&&0!==n?(r.left=t.left-e.left,r.top=t.top-e.top):(r.left=t.left+e.left,r.top=t.top+e.top),r},Vt=function(e,n){var r=t.cloneDeep(e),i=[],a=function(t,e){var n=xt(t,e);i.push(n.baseData),n.pid&&a(t,n.pid)};a(r,n);var s={left:0,top:0};return i.map((function(t){t&&(s.left+=t.left,s.top+=t.top)})),s},Bt=function(e,n){var r=t.cloneDeep(e);return r.length>1&&r.sort((function(t,e){return t.baseData[n]-e.baseData[n]})),r},Yt=function(t,e){var n=[];return t.map((function(t){var r=e.find((function(e){return e.cid===t}));r&&n.push(r)})),Lt(n)},Lt=function(t){if(t.length>0){var e={left:0,top:0,width:0,height:0},n=Bt(t,"left"),r=Bt(t,"top"),i=n[0].baseData,a=n[n.length-1].baseData,s=r[0].baseData,o=r[r.length-1].baseData,u=Math.max.apply(Math,r.map((function(t){return 1*t.baseData.top+1*t.baseData.height}))),c=Math.max.apply(Math,r.map((function(t){return 1*t.baseData.left+1*t.baseData.width})));return e.left=i.left,e.width=Math.max(1*a.left+1*a.width,c)-1*i.left,e.top=s.top,e.height=Math.max(1*o.top+1*o.height,u)-1*s.top,e}return{left:0,top:0,width:0,height:0}},Ft=function(e,n,r){var i=e.children,a=t.cloneDeep(n),s=t.cloneDeep(Lt(i)),o=a.left,u=a.top;a.width,a.height;var c=s.left,l=s.top,h=s.width,f=s.height,d={left:o+c,top:u+l,width:h,height:f,angle:n.angle?n.angle:0};return i.forEach((function(e){var n=t.cloneDeep(e.baseData);e.baseData.left<0?n.left=0:n.left=n.left-c,e.baseData.top<0?n.top=0:n.top=n.top-l,e.baseData=n})),e.baseData=d,e.children=i,d},jt=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];t[n].index=n,r.children&&r.children.length?jt(r.children):e&&e(r)}},Ut=function(){return(Math.random().toString().substr(3,10)+Date.now()).toString()},Ht=function(t,e,n){var r,i;void 0===n&&(n=" copy");var a=new RegExp("".concat(n,"( \\d+)?$")).exec(t);a?(r=a[1]?parseInt(a[1]):0,i=t.slice(0,a.index)):(r=0,i=t);var s=new RegExp("^".concat(i).concat(n,"( [1-9][0-9]*)?$")),o=[];e.forEach((function(t){if(a=s.exec(t)){var e=a[1]?parseInt(a[1]):1;o.push(e)}})),o.sort((function(t,e){return t-e})),r++;for(var u=0,c=o.length;u<c;u++)if(o[u]===r)r++;else if(o[u]>r)break;return i+n+" "+r},zt=function(t,e){try{var n=e||window.location.href;if(-1!=n.indexOf("?")){var r={};return n.slice(n.indexOf("?")+1).split("&").forEach((function(t){var e=t.split("=");r[e[0]]=e[1]})),t?r[t]?r[t]:null:r}return console.log("没有参数"),null}catch(t){console.error(t)}};function Gt(t){for(var e=t.types,n=t.element,r=t.actions,i=t.events,a=function(t){var a=e[t],s=n.tmpData.actions[t];if(s&&s.use){var o=s[s.behave];if(!o)return"continue";"vars"===s.behave?o.map((function(t){t.type=a,t.id=n.cid,t.mapField&&r.push(t)})):o.length>0&&o.forEach((function(t,e){"toggle"===s.behave&&""!==t.value&&t.value.length?i.push({id:n.cid,type:s.behave,children:t.value.map((function(t){return{cid:t.cid,visible:t.visible}})),eventType:a,index:e}):"link"===s.behave&&""!==t.value?i.push({id:n.cid,type:s.behave,link:t.value,eventType:a,index:e}):"page"===s.behave&&""!==t.value?i.push({id:n.cid,type:s.behave,page:t.value,eventType:a,index:e}):"dynamic"===s.behave&&""!==t.value&&t.value.length>0?i.push({id:n.cid,type:s.behave,dynamic:t.value,eventType:a,index:e}):i.push(void 0)}))}},s=0;s<e.length;s++)a(s)}function qt(t){var e=new bt;return e.setPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApWni7uLYVV8iyDPTR6Zs\naj+2BHCn4xTzFeVHADzTdtBiFH9i4fKeDK0IfbPV/9TGeRYNfl0qSfdLtU+1ZIzm\npqHppadukmk5+NbBG4Xm/lAZgVt3dUIrSyamxVjwnymN7PLdxaSOS/mgU6SDGMhN\nTM76AXKZZXWMK12UCXvKkh+TkGufcXzLe7LtrvHPLOgcnEED2CkWATuE9g8K9j4T\neOMxhJcHBUmXLgU6Chufa4nBed2899E7jxJa14+J1IDa2ahrDFLZN7H//ZsvwnXq\nxVbxm0k5jyWqfCpg13V7zD3DxNWlo3MIh2fPtIEUDVhugqPd0jPmqquqdBNTnu2I\nGQIDAQAB"),e.encrypt(t)}var Wt={updataArea:function(t,e){t.currentArea=e},selectdArea:function(t,e){var n=Yt(e,t.list);t.currentArea=n},updataAngle:function(t,e){var n=e.id,r=e.angle,i=Ot(t.list,n);"boolean"!=typeof i&&(i.baseData.angle=r)},updataBaseData:function(t,e){var n=e.data,r=e.ratio,i=xt(t.list,n.cid),a=e.oldData;if("object"!=typeof i||i.pid){if("object"==typeof i&&i.pid){var s=Ot(t.list,i.pid);"object"==typeof s&&(i.baseData.left<0&&(i.baseData.left=0),i.baseData.top<0&&(i.baseData.top=0),Object.assign(i.baseData,n.baseData),Ft(s,s.baseData),t.groupFlag=!t.groupFlag)}}else if(Object.assign(i.baseData,n.baseData),r&&i.children&&i.children.length>0){var o=i.baseData.width/a.width,u=i.baseData.height/a.height;wt(i.children,{xRatio:o,yRatio:u})}},multipleUpdataBaseData:function(e,n){if(n.ratio)for(var r=n.newData,i=n.oldData,a=r.width/i.width,s=r.height/i.height,o=e.cache.length;o--;)e.cache[o].baseData.left=e.cache[o].baseData.left*a,e.cache[o].baseData.width=e.cache[o].baseData.width*a,e.cache[o].baseData.top=e.cache[o].baseData.top*s,e.cache[o].baseData.height=e.cache[o].baseData.height*s;else for(o=e.cache.length;o--;){var u=t.cloneDeep(e.cache[o].baseData);u.left=u.left+n.deltaX,u.top=u.top+n.deltaY,e.cache[o].comPanel?e.cache[o].comPanel.setAttrData(Object.assign(u,n.baseData)):e.cache[o].baseData=u}},multipleUpdata:function(t,e){var n=e.ids,r=e.data,i=Ot(t.list,n);i&&Object.assign(i.baseData,r)},multipleMove:function(t,e){},move:function(t,e){var n=t.selectd,r=e.type,i=e.speed?e.speed:1;if(0!==n.length){var a=t.list.filter((function(t){return n.includes(t.cid)}));0==a.length&&(a=[Ot(t.list,n[0])]);for(var s=0;s<a.length;s++){var o=a[s];if(o.pid&&t.selectd.length>1)return void console.warn("Only one component can be moved within a group");if("up"===r?o.baseData.top=o.baseData.top-i:"down"===r?o.baseData.top+=i:"left"===r?o.baseData.left-=i:"right"===r&&(o.baseData.left+=i),"object"==typeof o&&o.pid){var u=Ot(t.list,o.pid);"object"==typeof u&&(Ft(u,u.baseData),t.groupFlag=!t.groupFlag)}}}else console.warn("Warning! please select the component to move.")},updataGroupBaseData:function(e,n){var r=Ot(e.list,n.pid),i=t.cloneDeep(r);Ot(r.children,n.cid),Ft(r,i.baseData)},editGroupBaseData:function(t,e){var n=Ot(t.list,e);n.children.forEach((function(t){Nt(t,n.baseData)}))},syncBaseData:function(e,n){var r=n.cid,i=n.data,a=n.isContainer,s=t.cloneDeep(e.list);if(void 0!==a){var o=function(t){for(var e=0;e<t.length;e++)r===t[e].cid?t[e].baseData=Object.assign({},t[e].baseData,i):t[e].hasOwnProperty("children")&&o(t[e].children)};s.length&&o(s)}else{var u=xt(s,r);u&&(u.baseData=Object.assign({},u.baseData,i))}e.list=s},updataItemData:function(t,e){var n=e.cid,r=e.propsName,i=e.propsValue,a=Ot(t.list,n);a&&(a[r]=i)},updataOpacity:function(t,e){var n=e.cid,r=e.propsValue,i=Ot(t.list,n);"boolean"!=typeof i&&i&&(i.baseData.opacity=r)}},Zt={delListItem:function(e,n){var r=t.cloneDeep(e.list);"string"==typeof n?xt(r,n,!0):n.forEach((function(t){xt(r,t,!0)})),e.list=r},cloneItem:function(e){if(e.selectd.length>0){e.cloneCache=[];for(var n=0;n<e.selectd.length;n++){var r=Ot(e.list,e.selectd[n]);if("boolean"!=typeof r){var i=t.cloneDeep(r);i.cid=Ut(),i.pid="",e.cloneCache.push(i)}}}},shearItem:function(e,n){if(e.selectd.length>0){e.cloneCache=[];for(var r=0;r<e.selectd.length;r++){var i=Ot(e.list,e.selectd[r],!0);if("boolean"!=typeof i){var a=t.cloneDeep(i);a.cid=Ut(),e.cloneCache.push(a)}}e.selectd=[]}},pasteItem:function(e){var n,r=t.cloneDeep(e.cloneCache);if(r.length>0){var i=[];r.forEach((function(t){t.cid=Ut();var n=Ht(t.name,e.list.map((function(t){return t.name})));if(t.name=n,t.children&&t.children.length>0&&t.children.forEach((function(e){e.pid=t.cid,e.cid=Ut()})),"dynamicComponent"==t.componentType){var r=void 0;t.dynamicChildren instanceof Map?r=t.dynamicChildren.get(t.activeDynamic):t.dynamicChildren instanceof Array&&(r=t.dynamicChildren.find((function(t){return t[0]==t.activeDynamic}))[1]),r.forEach((function(e){e.pid=t.cid,e.cid=Ut()}))}i.push(t.cid)})),e.selectd.length>0?Yt(e.selectd,e.list):Lt(r),r.forEach((function(t){t.baseData.top=t.baseData.top+20,t.baseData.left=t.baseData.left+20})),(n=e.list).unshift.apply(n,t.cloneDeep(r)),e.selectd=i}},updataShow:function(t,e){var n=xt(t.list,e);if("boolean"!=typeof n){var r=!n.isShow;At(n,"isShow",r,"")}},changeShow:function(t,e){var n=e.cid,r=e.flag,i=xt(t.list,n);i&&At(i,"isShow",r,"")},updataLock:function(t,e){var n=xt(t.list,e);if("boolean"!=typeof n){var r=!n.isLock;At(n,"isLock",r,"")}},breakUp:function(t,e){var n;try{if(!e)throw"Please pass in the component CID correctly!";var r=t.list.findIndex((function(t){return t.cid===e})),i=t.list[r],a=Rt(i);a.map((function(t){return t.pid=""})),t.list.splice(r,1),(n=t.list).push.apply(n,a)}catch(t){console.error(t)}},editGroup:function(t,e){var n,r=e.groupId;e.status;try{if(!r)throw"Please pass in the component CID correctly!";var i=t.list.findIndex((function(t){return t.cid===r})),a=t.list[i],s=Rt(a);s.map((function(t){return t.pid=""})),t.list.splice(i,1),(n=t.list).push.apply(n,s)}catch(t){console.error(t)}},combination:function(e){t.cloneDeep(e.list);var n,r,i=[],a=[],s=Ut(),o=Ot(e.list,e.selectd[0]);o.pid?console.info("Sorry, only level 2 is supported group"):o.children&&1===e.selectd.length?console.info("Sorry, only level 2 is supported group"):(e.selectd.forEach((function(t){var n=e.list.findIndex((function(e){return e.cid===t}));if(n>-1){i.push(n);var r=e.list.splice(n,1)[0];r.pid=s,a.push(r)}})),n=i.sort((function(t,e){return t-e}))[0],r=1===a.length?t.cloneDeep(a[0].baseData):e.currentArea,Object.assign(r,{angle:0,opacity:100,rotate:0,rotateY:0}),Pt(r,a),e.list.splice(n,0,{cid:s,pid:"",isShow:!0,isLock:!1,editer:!1,baseData:r,z:0,toggle:!0,name:"群组",type:"folder",children:a}),e.selectd=[s])},moveUp:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e}));n>=1?Dt(t.list,n-1,n):Tt(t.list,"up",e)}catch(t){console.error(t)}},moveDown:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e}));n>-1&&n<=t.list.length-2?Dt(t.list,n+1,n):Tt(t.list,"down",e)}catch(t){console.error(t)}},moveTop:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e}));n>-1&&0!==n?Dt(t.list,0,n):Tt(t.list,"top",e)}catch(t){console.error(t)}},moveBottom:function(t,e){try{var n=t.list.findIndex((function(t){return t.cid===e})),r=t.list.length-1;n>-1&&n!==r?Dt(t.list,r,n):Tt(t.list,"bottom",e)}catch(t){console.error(t)}}},Kt=function(t,n){void 0===t&&(t="");var r=e.create({baseURL:t,timeout:3e4,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return r.interceptors.request.use((function(t){return 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")),"post"===t.method?(t.headers["Content-Type"]="application/json; charset=UTF-8",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(t){return Promise.reject(t)})),r.interceptors.response.use((function(t){var e;return 200===t.status||2e4==t.data.code?(n&&n(t),t.data):(n&&n(t),null==t||t.status,null===(e=null==t?void 0:t.data)||void 0===e||e.code,Promise.reject(t.data))}),(function(t){return n&&n(null==t?void 0:t.response),Promise.reject(t.response)})),r},$t=Kt();function Xt(e,n,r,i){return c(this,void 0,void 0,(function(){var a,s,o,u;return l(this,(function(c){switch(c.label){case 0:a=e,s=t.cloneDeep(r),o=n?n.toLowerCase():"get",c.label=1;case 1:return c.trys.push([1,3,,4]),[4,$t({method:te[o],headers:i,url:a,params:s,timeout:3e4}).then((function(t){return{code:2e4,data:t.data}}))];case 2:return[2,c.sent()];case 3:return u=c.sent(),console.error("error:"+u.message),[3,4];case 4:return[2]}}))}))}function Qt(t){return c(this,void 0,void 0,(function(){var e,n,r;return l(this,(function(i){switch(i.label){case 0:e=window.anUrl?window.anUrl:"",n=e+(window.agentPath?window.agentPath:"/ds/v1/api-proxy/v1/query"),u({},t),i.label=1;case 1:return i.trys.push([1,3,,4]),"{}"==JSON.stringify(null==t?void 0:t.params)&&(null==t||delete t.params),"{}"==JSON.stringify(null==t?void 0:t.headers)&&(null==t||delete t.headers),[4,$t({url:n,headers:{"Content-Type":"application/json;charset=UTF-8"},method:"post",data:{body:null==t?void 0:t.params,headers:null==t?void 0:t.headers,method:null==t?void 0:t.method,url:null==t?void 0:t.url}})];case 2:return[2,i.sent()];case 3:return r=i.sent(),console.error("error:"+r.message),[3,4];case 4:return[2]}}))}))}var Jt,te,ee=function(e,n,r){var i=e.tmpData.source,a=r?r.value.api.agency:i.api.agency,s=i.type;if("static"!==s){var o=r?r.value.api:i[s],u=o.url,c=o.headers,l=o.params,h=o.requestType,f={};u.split("?")[0];var d=function(t){var e=new Object;if(-1!==t.indexOf("?"))for(var n=t.split("?")[1].split("&"),r=0;r<n.length;r++)e[n[r].split("=")[0]]=unescape(n[r].split("=")[1]);return e}(u);c.use&&(f=JSON.parse(c.value));var p={};return l&&t.isString(l)?t.assign(p,d,JSON.parse(l)):t.assign(p,d,l),Object.keys(p).forEach((function(e){var r=p[e],i=n.filter((function(t){return t.mapField==r.toString().replace("@","")}))[0];i&&(p[e]=i.value,u=t.replace(u,d[e],i.value))})),{url:u,requestType:h,params:l,headers:f,agency:a}}return null},ne=function(t,e,n){void 0===e&&(e=[]),e||(e=[]);var r=ee(t,e);r&&n(r)},re=function(t,e,n,r,i){t.then((function(t){!t||2e4!=t.code&&200!=t.code?ae(e,ie({error:!0,message:t.msg?t.msg:"data error"},e,n,r),i):n?ae(e,ie(t.data,e,n,r),i):ae(e,ie(t.data,e,n,r),i,t.data)})).catch((function(t){ae(e,ie({error:!0,message:t.msg?t.msg:"data error"},e,n,r),i)}))},ie=function(t,e,n,r){void 0===n&&(n=!0);try{var i=e.tmpData.source,a=i.converse,s=i.mapFields;return a&&a.use&&n?new Promise((function(e,n){e(g(t,a,s,r))})):new Promise((function(e,n){e(t)}))}catch(t){console.error(t)}},ae=function(t,e,n,r){e.then((function(e){r?se(t,e,n,r):se(t,e,n)}))},se=function(t,e,n,r){var i=t.tmpData.source.type;r?("static"==i&&(t.tmpData.source[i].originData=r),"indicatorCQ"===i?t.tmpData.source.indicator.data=e:t.tmpData.source[i].data=e):"indicatorCQ"===i?t.tmpData.source.indicator.data=e:t.tmpData.source[i].data=e,t.source=e,n({cid:t.cid,data:e})},oe=function(t,e,n,r,i){void 0===n&&(n=!0);try{var a=t.tmpData.source.type,s=void 0;s=r||function(){};var o=null;"globalData"==a&&(o=i.find((function(e){return t.tmpData.source[a].id==e.key}))),console.log(e,"globalVars"),function(t,e,n,r,i,a){void 0===r&&(r=!0),"globalData"==t&&(t=a.value.type);var s=a?a.value[t]:e.tmpData.source[t];if("api"==t)he(e,n,r,i,a);else if("static"==t){var o=void 0,u=void 0;s.originData&&Object.keys(s.originData).length?u=o=s.originData:o=s.data,ae(e,ie(o,e,r,n),i,u)}else if("datasource"==t)le(s.dsName,{dsType:"1",sql:qt(s.inputSql)},e,n,i,r);else if("staticFile"==t)le(s.dsName,{dsType:s.dsType,sql:""},e,n,i,r);else if("indicator"==t)ce(s.zbId,{},e,n,i,r);else if("indicatorCQ"==t){var c=a?a.value.indicator:e.tmpData.source.indicator;ue(c.zbName,c.params,e,n,i,r)}else i({cid:e.cid,data:"",message:"发生错误"})}(a,t,e,n,s,o)}catch(t){r&&r(t),console.log("error:"+t)}},ue=function(t,e,n,r,i,a){return c(void 0,void 0,void 0,(function(){var s,o,u,c,h,f,d,p,m;return l(this,(function(l){switch(l.label){case 0:return s=window.BaseUrl,o=e.dateType,u=void 0===o?"":o,c=e.endPeriod,h=void 0===c?"":c,f=e.metricsName,d=void 0===f?t:f,p=e.startPeriod,m=void 0===p?"":p,[4,$t({method:"GET",url:"".concat(s,"ds/v1/metrics/v1/data-alarm?dateType=").concat(u,"&endPeriod=").concat(h,"&metricsName=").concat(d,"&startPeriod=").concat(m),timeout:3e4}).then((function(t){if(2e4==t.code){var e=t.data;e?ae(n,ie(e,n,a,r),i):(ae(n,ie({data:e,message:t.msg?t.msg:"data error"},n,a,r),i),i({data:e,message:"发生错误"}))}else i({data:"",message:"发生错误"}),console.error("发生错误"),ae(n,ie({error:!0,message:t.msg?t.msg:"data error"},n,a,r),i)})).catch((function(t){i(t)}))];case 1:return l.sent(),[2]}}))}))},ce=function(t,e,n,r,i,a){return c(void 0,void 0,void 0,(function(){var s,o,u,c,h;return l(this,(function(l){switch(l.label){case 0:return s=window.BaseUrl?window.BaseUrl.replace("/management",""):"",o=zt("YZH_EXCHANGE_TOKEN")?zt("YZH_EXCHANGE_TOKEN"):null===(h=window.yzhAuth)||void 0===h?void 0:h.getToken(),c=window.gdPassid,window.BASE_RELEASE?(console.log("发布:",o),u="".concat(s,"/ds/data-engine/v1/").concat(t,"/zb-query?token=").concat(o,"&passid=").concat(c,"&preview=1")):(console.log("编辑",o),u="".concat(s,"/ds/data-engine/v1/").concat(t,"/zb-query?token=").concat(o,"&passid=").concat(c)),[4,$t({method:"POST",url:u,data:e,timeout:3e4}).then((function(t){if(2e4==t.code){var e=JSON.parse(t.data);e?ae(n,ie(e,n,a,r),i):(ae(n,ie({error:!0,message:t.msg?t.msg:"data error"},n,a,r),i),i({data:e,message:"发生错误"}))}else i({data:"",message:"发生错误"}),console.error("发生错误"),ae(n,ie({error:!0,message:t.msg?t.msg:"data error"},n,a,r),i)})).catch((function(t){i(t)}))];case 1:return l.sent(),[2]}}))}))},le=function(t,e,n,r,i,a){return c(void 0,void 0,void 0,(function(){var s;return l(this,(function(o){switch(o.label){case 0:return s=window.BaseUrl?window.BaseUrl.replace("/management",""):"",[4,$t({method:"get",url:"".concat(s,"/ds/v1/data-proxy/v1/").concat(t,"/query"),params:e,timeout:3e4}).then((function(t){if(2e4==t.code){var e=JSON.parse(t.data);e?ae(n,ie(e,n,a,r),i):(ae(n,ie({error:!0,message:t.msg?t.msg:"data error"},n,a,r),i),i({data:e,message:"发生错误"}))}else i({data:"",message:"发生错误"}),console.error("发生错误"),ae(n,ie({error:!0,message:t.msg?t.msg:"data error"},n,a,r),i)})).catch((function(t){i(t)}))];case 1:return o.sent(),[2]}}))}))},he=function(t,e,n,r,i){void 0===n&&(n=!0);try{var a=ee(t,e,i),s=a.url,o=a.requestType,u=a.params,c=a.headers,l=a.agency,h=s.match(/(@)[\w]*/gm),f=s;h&&h.length&&h.forEach((function(t){var n=e.filter((function(e){return"@"+e.mapField==t})),r="";n&&n.length&&n.forEach((function(t){""!=t.value&&(r=t.value)})),s=f.replaceAll(t,r)})),re(l?Qt({method:o,url:s,params:u,headers:c}):Xt(s,o,u,c),t,n,e,r)}catch(t){console.log("error:"+t)}},fe=function(t,e,n,r,i,a){var s,o;void 0===a&&(a=!0),t&&"api"==(null===(o=null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.source)||void 0===o?void 0:o.type)&&ne(t,e,(function(s){if(o=s.url,!new RegExp("^((https|http|ftp|rtsp|mms)?://)?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+.)*([0-9a-z][0-9a-z-]{0,61})?[0-9a-z].[a-z]{2,6})(:[0-9]{1,4})?((/?)|(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$").test(o))return n({cid:t.cid,data:{error:!0,message:s.url+"不是一个正确的地址,请正确填写!"}}),!1;var o,u=s.url,c=s.requestType,l=s.params,h=s.headers;s.agency?Qt({method:c,url:u,params:l,headers:h}).then((function(r){r&&2e4==r.code?(!function(t,e,n){try{e.then((function(e){n(e?{cid:t.cid,data:e}:{cid:t.cid,data:"数据发生错误!"})}))}catch(t){console.error(t)}}(t,ie(r.data,t,a,e),n),i&&"function"==typeof i&&i(1)):(i&&"function"==typeof i&&i(0),n({cid:t.cid,data:{error:!0,message:r.msg?r.msg:"error"}}))})).catch((function(e){i&&"function"==typeof i&&i(-1),n({cid:t.cid,data:{error:!0,message:e}})})):Xt(u,c,l,h).then((function(e){var i=[];if(r){var s=t.tmpData.source,o=s.converse,u=s.mapFields;o&&o.use&&a?g(e.data,o,u).then((function(e){i=e,n({cid:t.cid,data:i})})):(i=e.data,n({cid:t.cid,data:i}))}else i=e.data,n({cid:t.cid,data:i})})).catch((function(e){n({cid:t.cid,data:{error:!0,message:e}})}))}))};!function(t){t.json="application/json;charset=UTF-8",t.form="application/x-www-form-urlencoded; charset=UTF-8"}(Jt||(Jt={})),function(t){t.get="GET",t.post="POST",t.put="PUT",t.patch="PATCH",t.delete="DELETE"}(te||(te={}));var de=Object.freeze({__proto__:null,Http:function(t,e){return Kt(t,e)},axios:e,getDataForEvaluator:g,getData:Xt,agentData:Qt,getComponentData:ne,autoUpdateComData:function(e,n,r){var i,a,s,o,u,c=null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.source,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.open,h=null===(u=null===(o=c[null==c?void 0:c.type])||void 0===o?void 0:o.autoUpdate)||void 0===u?void 0:u.time;l&&t.isNumber(h)&&h>0&&setInterval((function(){oe(e,n,!0,r)}),1e3*h)},updateComData:oe,refreshData:fe,get ContentType(){return Jt},get HttpMethod(){return te}}),pe=function(e,n,r){try{var i={},a=[],s=[],o=t.cloneDeep(e);return kt(o,(function(t){var e,n;(null===(n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.actions)||void 0===n?void 0:n.length)&&Gt({types:t.tmpData.actions.map((function(t){return t.eventType})),element:t,actions:a,events:s})})),kt(o,(function(t){var e,n=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.source;me(n,a,t,i)})),n&&n.length&&(a=h(h([],a,!0),n,!0)),r&&r.length&&(a=h(h([],a,!0),r,!0)),{shareVariableTree:i,globalVars:a.filter((function(t){return t})),globalEvents:s.filter((function(t){return t}))}}catch(t){return console.error("error",t),{}}},me=function(t,e,n,r){if(t){var i=null==t?void 0:t.type,a=t[i],s=null==t?void 0:t.converse;if(s&&s.use&&s.data.length&&s.data.map((function(t){var e;(null==t?void 0:t.dependVars)&&(null===(e=null==t?void 0:t.dependVars)||void 0===e?void 0:e.length)&&t.dependVars.map((function(t){ge(r,t,n.cid)}))})),"api"===i){var o=a.url.match(/(@)[\w]*/gm);if(o)for(var u=o.map((function(t){return t.replace("@","")})),c=function(t){var i=u[t];if(!i||!e||e.findIndex((function(t){return t.mapField===i}))<0)return"continue";ge(r,i,n.cid)},l=0;l<u.length;l++)c(l)}}},ge=function(e,n,r){if(e[n]&&t.isArray(e[n])){e[n].push(r);var i=e[n];e[n]=t.uniq(i)}else e[n]=[],e[n].push(r)};function ve(e){var n=[],r=[];kt(t.cloneDeep(e),(function(t){var e,i;(null===(i=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.actions)||void 0===i?void 0:i.length)&&Gt({types:t.tmpData.actions.map((function(t){return t.eventType})),element:t,actions:n,events:r})}));var i=r.filter((function(t){return t}));return{actions:n,events:i}}var ye={addGlobalSource:function(t,e){var n=e.name,r=e.value;t.globalSource.push({key:Ut(),name:n,value:r})},editGlobalSource:function(e,n){var r=this,i=n.key,a=n.value,s=e.globalSource.find((function(t){return t.key==i}));s&&(s.name=n.name,s.value=a,kt(t.cloneDeep(e.list),(function(t){var n,a,s;if("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)){var o=null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.source.globalData;(null==o?void 0:o.id)==i&&oe(t,e.globalVars,!0,(function(t){r.commit("GoCom/updataSourceForComponent",t)}),e.globalSource)}})))},delGlobalSource:function(t,e){try{var n=t.globalSource.findIndex((function(t){return t.key===e}));-1!==n&&t.globalSource.splice(n,1)}catch(t){console.error("删除错误",t)}},setSyncFlag:function(t,e){t.syncFlag=e},goUpShareVar:function(t,e){console.log(e,"reload"),t.shareVariable[e.key]=u({},e)},addGoVar:function(t,e){try{var n=e.mapField,r=(e.mold,t.globalConstant.filter((function(t){return t.mapField==n})).length);if(!n||r)throw new Error("添加失败!变量已经存在!");t.globalConstant.push(e),t.globalVars=pe(t.list,t.globalConstant,t.sysConst).globalVars}catch(t){console.warn(t)}},delGoVar:function(e,n){try{var r=n.mapField,i=(n.mold,e.globalConstant.filter((function(t){return t.mapField==r})).length);if(!r||!i)throw new Error("删除失败!");var a=t.cloneDeep(e.globalConstant);t.remove(a,(function(t){return t.mapField==r})),e.globalConstant=a,e.globalVars=pe(e.list,e.globalConstant,e.sysConst).globalVars}catch(t){console.warn(t)}},editGoVar:function(e,n){try{var r=n.mapField;n.mold;if(!e.globalConstant.find((function(t){return t.mapField==r})))throw new Error("修改失败!");var i=t.cloneDeep(e.globalConstant);i.forEach((function(t){t.mapField==r&&Object.assign(t,n)})),e.globalConstant=i,e.globalVars=pe(e.list,e.globalConstant,e.sysConst).globalVars}catch(t){console.warn(t)}},goEditVar:function(t,e){var n=e.key,r=e.value;t.globalVars.forEach((function(t){t.edit=!1})),t.globalVars.forEach((function(t){t.mapField==n&&(t.edit=!0,t.value=r)}))},goDelShareVar:function(t,e){delete t.shareVariable[e]},signal:function(t,e){},goSynchroDataAll:function(e,n){e.list=t.cloneDeep(n)},goSynchroData:function(e,n){if(e){var r=n.cid,i=n.attr,a=n.value,s=n.attrModel,o=Ot(e.list,r);if("boolean"!=typeof o){if(o&&At(o,i,a,s),"actions"===i.toLowerCase()){var u=e.list,c=t.uniqWith(t.concat(ve(u).actions,ve(e.caseList).actions),t.isEqual),l=t.uniqWith(t.concat(ve(u).events,ve(e.caseList).events),t.isEqual);e.globalVars=h(h([],c,!0),e.globalConstant,!0),e.globalEvents=l,e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalVars=c),e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalEvents=l)}if("source"===i){if(!o.tmpData.source)return!1;var f=o.tmpData.source,d=f.type;if("api"===d){var p=f[d].url.match(/(@)[\w]*/gm);if(p)for(var m=p.map((function(t){return t.replace("@","")})),g=function(n){var r=m[n];if(!r||!e.globalVars||e.globalVars.findIndex((function(t){return t.mapField===r}))<0)return"continue";if(e.shareVariableTree||(e.shareVariableTree={}),e.shareVariableTree[r]&&t.isArray(e.shareVariableTree[r])){e.shareVariableTree[r].push(o.cid);var i=e.shareVariableTree[r];e.shareVariableTree[r]=t.uniq(i)}else e.shareVariableTree[r]=[],e.shareVariableTree[r].push(o.cid)},v=0;v<m.length;v++)g(v)}}}}this.commit("GoCom/execute")}},_e={updataList:function(e,n){var r=n.cid,i=t.cloneDeep(n.list),a=t.cloneDeep(e.list);if(console.log(i,a),-1===i.findIndex((function(t){return t.cid===r})))for(var s=0;s<i.length;s++){var o=i[s];if(o.children&&o.children.length)for(var u=o.cid,c=0;c<o.children.length;c++){var l=o.children[c];if(l.cid===r){l.pid=u;var h=t.cloneDeep(o.baseData),f=It(l.baseData,o.baseData,1);Object.assign(l.baseData,f),Ft(o,h);break}}}else{var d=i.find((function(t){return t.cid===r})),p=d.pid;if(p){d.pid="";var m=xt(i,p);console.log(m,"movGroup"),Object.assign(d.baseData,It(d.baseData,m.baseData));s=m.children.findIndex((function(t){return t.cid===d.cid}));m.children.splice(s,1),0===m.children.length?xt(i,m.cid,!0):Ft(m,m.baseData)}}e.list=i},updataListForContrast:function(e,n){var r=n.cid,i=n.list,a=xt(i,r);Et(i,r);var s=Et(e.list,r);if(!a.pid){a.pid=s.cid;var o=t.cloneDeep(a.baseData),u=It(a.baseData,s.baseData,1);Object.assign(a.baseData,u),Ft(s,o)}},updateTree:function(e){for(var n=e.list,r=0;r<n.length;r++){var i=n[r];if(i.pid)(o=Ot(n,i.pid))&&Object.assign(i.baseData,It(i.baseData,o.baseData));if(i.children)for(var a=0;a<i.children.length;a++){var s=i.children[a];if(s.pid!=i.cid){var o=Ot(n,s.pid);if(t.cloneDeep(s.baseData),o){Object.assign(s.baseData,It(s.baseData,o.baseData));var u=It(s.baseData,i.baseData,1);Object.assign(s.baseData,u),Ft(i,i.baseData)}s.pid=i.cid}}}}},be=function(t){return c(this,void 0,void 0,(function(){var e,n,r,i;return l(this,(function(a){switch(a.label){case 0:return e=t.fontUrl,n=t.fontName,r="__custom_font__",(i=document.getElementById(r))?[3,2]:((i=document.createElement("style")).id=r,[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(n,"';src:url(").concat(e,");}"),[2]}}))}))},we=function(t,e,n){return void 0===e&&(e="jspaths"),c(void 0,void 0,void 0,(function(){var r,i;return l(this,(function(a){return r="script","jspaths"==e?r="script":"csspaths"==e&&(r="link"),i=document.createElement(r),"jspaths"==e?(i.defer=!0,i.src=t):"csspaths"==e&&(i.defer=!0,i.href=t),i.className=e,(n||document.head||document.getElementsByTagName("head")[0]).appendChild(i),i.onload=function(){},i.onerror=function(){throw new Error("Failed to load ".concat(t))},[2]}))}))},De=function(t,e){return void 0===e&&(e="jspaths"),c(void 0,void 0,void 0,(function(){var n,r;return l(this,(function(i){switch(i.label){case 0:n=0,i.label=1;case 1:return n<t.length?(r=t[n],"fonts"!=e?[3,2]:(be(r),[3,4])):[3,5];case 2:return[4,we(r,e)];case 3:i.sent(),console.log(55555),i.label=4;case 4:return n++,[3,1];case 5:return[2]}}))}))},Se=function(t){return c(void 0,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return t.fonts&&t.fonts.length?[4,De(t.fonts,"fonts")]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},Te=function(e){return c(void 0,void 0,void 0,(function(){return l(this,(function(n){switch(n.label){case 0:return e.jspaths&&e.jspaths.length?[4,De(e.jspaths,"jspaths")]:[3,2];case 1:n.sent(),n.label=2;case 2:return e.csspaths&&e.csspaths.length?[4,De(e.csspaths,"csspaths")]:[3,4];case 3:n.sent(),n.label=4;case 4:return e.fonts&&e.fonts.length?(t.uniqBy(e.fonts,"name"),[4,De(e.fonts,"fonts")]):[3,6];case 5:n.sent(),n.label=6;case 6:return[2]}}))}))},xe=function(){var t;(t=document.getElementById("__custom_font__")).parentNode.removeChild(t),Array.from(document.getElementsByTagName("script")).filter((function(t){return"jspaths"==t.className})).forEach((function(t){!function(t){for(var e=Array.from(document.getElementsByTagName("script")),n=0;n<e.length;n++)e[n]&&e[n].src&&-1!=e[n].src.indexOf(t)&&e[n].parentNode.removeChild(e[n])}(t.src)})),Array.from(document.getElementsByTagName("link")).filter((function(t){return"csspaths"==t.className})).forEach((function(t){!function(t){for(var e=Array.from(document.getElementsByTagName("link")),n=0;n<e.length;n++)e[n].href,e[n]&&e[n].href&&-1!=e[n].href.indexOf(t)&&e[n].parentNode.removeChild(e[n])}(t.href)}))};var Ee={reset:function(t){t.selectd=[],t.list=[],t.plant=null,t.tw=null,t.watermark=null,t.endnotes=null},setFonts:function(t,e){t.resource.fonts.push({fontName:e.name,fontUrl:e.src}),Se(t.resource)},setCaseInfo:function(t,e){t.caseInfo=e},setPageId:function(t,e){t.pageId=e},addConstant:function(e,n){var r=t.find(e.constant,{name:n.name});r?Object.assign(r,n):e.constant.push(n)},editConstant:function(e,n){var r=t.find(e.constant,{name:n.name});r&&Object.assign(r,n)},delConstant:function(e,n){t.remove(e.constant,(function(t){return t.name==n}))},setResource:function(t,e){var n=e.type,r=e.value;t.resource[n]=r,xe(),Te(t.resource)},updataResource:function(t){xe(),Te(t.resource)},setData:function(t,e){t.selectd=e.selectd},setList:function(t,e){t.list=e},saveDynamicChildren:function(t,e){var n=e.cid,r=e.data,i=e.name,a=t.pages[t.pageIndex].list,s=Ot(a,n);s&&(s.activeDynamic=i,s.dynamicChildren instanceof Array&&(s.dynamicChildren=new Map(s.dynamicChildren)),s.dynamicChildren.set(i,r))},setTheme:function(t,e){t.theme=e},setPlant:function(t,e){var n=e.attr,r=e.value;t.plant||(t.plant={name:"",theme:null,baseData:{width:1920,height:1080,left:0,top:0},option:null,optionDes:null}),t.plant[n]=r},setPlantHeight:function(t,e){t.plant&&(t.plant.baseData.height=t.plant.baseData.height+e)},reversal:function(t,e){t.undos=[],t.undoRedoPointer=-1,t=Object.assign(t,e)},setComTmp:function(t,e){var n=t.list.find((function(t){return t.cid===e[0]}));n.com=e[1],n.tmp=e[2]},setLoading:function(t,e){var n=e.cid,r=e.flag,i=t.list.find((function(t){return t.cid===n}));i&&(i.loading=r)},setMultiple:function(t,e){t.multiple=e},setCaseList:function(t,e){t.caseList=e},updataComponentForList:function(t,e){var n=e.cid,r=e.data,i=t.list,a=xt(i,n);"boolean"!=typeof a&&Object.assign(a,r)},updataComponentForCaseList:function(t,e){var n=e.cid,r=e.data,i=t.caseList,a=xt(i,n);"boolean"!=typeof a&&Object.assign(a,r)},updataComponent:function(t,e){var n=e.cid,r=e.data,i=t.pages&&t.pages[0]&&t.pages[0].list&&t.pages[0].list.length?t.pages[0].list:t.list,a=xt(i,n);"boolean"!=typeof a&&Object.assign(a,r)},updataArea:function(t,e){t.currentArea.left+=e.deltaX,t.currentArea.top+=e.deltaY},updataSource:function(t,e){var n=e.cid,r=e.data,i=Ot(t.list,n);"boolean"!=typeof i&&("indicatorCQ"===i.tmpData.source.type?i.tmpData.source.indicator.data=r:i.tmpData.source[i.tmpData.source.type].data=r)},updataSourceForComponent:function(e,n){var r=n.cid,i=n.data;if(e.list.length){var a=xt(e.list,r);"boolean"!=typeof a&&(a.source=t.cloneDeep(i))}},updataAnimationForComponent:function(t,e){var n=e.cid,r=e.data;if(t.list.length){var i=Ot(t.list,n);"boolean"!=typeof i&&(i.tw=r)}},updataWatermark:function(t,e){t.watermark=e},updataEndnotes:function(t,e){t.endnotes=e},updataAnimation:function(t,e){t.tw=e},setContext:function(t,e){var n=e.cid,r=e.data,i=Ot(t.list,n);"boolean"!=typeof i&&(i.example=r)},setContextList:function(t,e){var n=e.cid,r=e.data;t.contextList[n]=r},setPosition:function(t,e){Nt(t.list.find((function(t){return t.cid===e[0]})),e[1])},setSelect:function(t,e){t.cache=[],t.selectd=e instanceof Array?e:[e],t.selectd.length>1&&t.selectd.forEach((function(e){t.cache.push(t.list.find((function(t){return t.cid===e&&"Other.Plant.Normal"!==t.type})))}))},setActive:function(e,n){var r=t.cloneDeep(n),i=r.id,a=r.multiple,s=r.origin,o=r.ctr,u=t.cloneDeep(e.selectd);if(a){var c=u.includes(i);if(u.length>=1)if(!u.every((function(t){return Mt(e.list,t,n.id)})))return void console.info("sorry Only sibling elements can be selected!");c?u.splice(u.findIndex((function(t){return t===i})),1):u.push(i),e.selectd=u}else e.selectd=[i];e.selectd.forEach((function(t){var n=xt(e.list,t);n.pid&&(xt(e.list,n.pid).toggle=!0);o||(n.toggle=!0)})),e.selectdChangeOrigin=s||""},setCache:function(t){t.cache=[],t.selectd.length>1&&t.selectd.forEach((function(e){t.cache.push(t.list.find((function(t){return t.cid===e})))}))},clearActive:function(t){t.selectd=[]},setMultipleActive:function(t,e){t.selectd=e},syncMenuInfo:function(t){jt(t.menuList,(function(e){var n=10*e.lv+e.index;t.list.filter((function(t){return t.cid===e.id}))[0].z=1e4-n}))},addComs:function(e,n){var r=n.com,i=n.isMobile;"MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[])),i?e.list.push(r):e.list.unshift(r),e.menuList=t.cloneDeep(e.list),this.commit("GoCom/execute")},addComsForParent:function(e,n){var r=n.com,i=n.isMobile,a=n.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",[])),a){var s=xt(e.list,a);i?(s.children=[],s.children.push(r)):s.children.unshift(r)}else i?e.list.splice(0,1,r):e.list.unshift(r);e.menuList=t.cloneDeep(e.list),this.commit("GoCom/execute")},addMyComs:function(e,n){var r;try{var i=n.data,a=n.shareVariableTree,s=n.globalVars,o=n.globalEvents;e.globalVars=t.uniq(t.concat(t.cloneDeep(e.globalVars),s)),e.globalEvents=t.uniq(t.concat(t.cloneDeep(e.globalEvents),o));var u=Object.keys(a),c=Object.keys(e.shareVariableTree),l=t.difference(u,c);l.length?l.forEach((function(n){e.shareVariableTree[n]=t.concat(t.cloneDeep(e.shareVariableTree[n]),a[n])})):e.shareVariableTree=Object.assign(t.cloneDeep(e.shareVariableTree),a),i instanceof Array?(Ct(i),(r=e.list).unshift.apply(r,i)):(Ct([i]),e.list.unshift(i)),e.menuList=t.cloneDeep(e.list),this.commit("GoCom/execute")}catch(t){}},addStateChildren:function(t,e){var n=Ot(t.list,e.pid);n&&n.stateChildren.push(e)},addDynamicChildren:function(t,e){var n=Ot(t.list,e.pid);n&&n.dynamicChildren.push(e)},arraySwap:function(e,n){var r;try{if(!n||2!=n.length)throw new Error("参数错误,方法接受两个组件的CID组成的数组!");var i=t.cloneDeep(e.list),a=xt(i,n[0]),s=xt(i,n[1]),o=xt(i,a.pid),u={},c=0,l=0;if(s)if("selectContainer"==s.componentType){var f=xt(i,n[1]);o?(c=t.findIndex(o.children,(function(t){return t.cid==n[0]})),u=o.children[c],o.children=o.children.filter((function(t){return t.cid!==u.cid}))):(u=xt(i,n[0]),i=i.filter((function(t){return t.cid!==u.cid}))),u.cid=Ut(),u.pid=f.cid,f.children.push(u)}else if(a.pid||s.pid)if(o)if(c=t.findIndex(o.children,(function(t){return t.cid==n[0]})),u=o.children[c],a.pid!==s.pid){f=xt(i,s.pid);l=t.findIndex(f.children,(function(t){return t.cid==n[1]}));d=f.children[l];u.cid=Ut(),u.pid=f.cid,d.cid=Ut(),d.pid=o.cid,o.children.splice(c,1,d),f.children.splice(l,1,u)}else l=t.findIndex(o.children,(function(t){return t.cid==n[1]})),(r=o.children).splice.apply(r,h([l,1],o.children.splice(c,1,o.children[l]),!1));else{var f=xt(i,s.pid);c=t.findIndex(i,(function(t){return t.cid==n[0]})),l=t.findIndex(f.children,(function(t){return t.cid==n[1]})),u=xt(i,a.cid);var d=f.children[l];u.cid=Ut(),u.pid=f.cid,d.cid=Ut(),d.pid=null,i.splice(c,1,d),f.children.splice(l,1,u)}else St(e.list,n[0],n[1]);else c=t.findIndex(o.children,(function(t){return t.cid==n[0]})),u=o.children[c],o.children.splice(c,1),u.cid=Ut(),u.pid=null,i.push(u);e.list=i}catch(t){console.warn("组件位置交换发生错误",t)}},changeDynamicState:function(t,e){var n=Ot(t.list,e.cid);n&&"dynamicComponent"==n.componentType&&(n.dynamicChildren instanceof Array&&n.dynamicChildren.find((function(t){return t[0]==e.activeName}))||n.dynamicChildren instanceof Map&&n.dynamicChildren.has(e.activeName)?n.activeDynamic=e.activeName:console.error(e.activeName+"不是一个正确的状态"))},addAlternateData:function(t,e){t.alternateData[e.pid]||(t.alternateData[e.pid]=[]),t.alternateData[e.pid].push(e)},setOptionForCom:function(t,e){var n,r;try{var i=e.cid,a=e.key,s=e.value,o=xt(t.list,i);o&&(null===(r=null===(n=null==o?void 0:o.tmpData)||void 0===n?void 0:n.option)||void 0===r?void 0:r.hasOwnProperty(a))&&(o.tmpData.option[a]=s)}catch(t){console.warn("同步属性发生错误:"+t)}},mergeConfig:function(e,n){n.length>0&&n.forEach((function(t){e.list.unshift(t)})),e.menuList=t.cloneDeep(e.list),this.commit("GoCom/execute")},updataName:function(t,e){var n=Ot(t.list,e.cid);n&&(n.name=e.name)},setCurrentEdited:function(t,e){if(e){var n=Ot(t.list,e);if("boolean"!=typeof n){var r=Rt(n);n.children=r}t.currentEditerCid=e}else t.currentEditerCid=""}},Oe={layout:function(e,n){var r=function(e,n){try{var r=e.map((function(t){var e=Ot(n,t);if("object"==typeof e)return e;throw"Please check whether the input and output parameters are correct!"}));if(t.every(r,Object))return r;throw"Please check whether the input and output parameters are correct!"}catch(t){return console.error(t),[]}}(e.selectd,e.list);switch(n){case"alignLeft":!function(e,n){1===e.length&&(e[0].baseData.left=0);var r=t.sortBy(e,(function(t){return t.baseData.left}))[0].baseData.left;e.map((function(t){return t.baseData.left=r}))}(r);break;case"alignRight":!function(e,n){if(1===e.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width-e[0].baseData.width}var i=t.sortBy(e,(function(t){return t.baseData.left})),a=1*i[i.length-1].baseData.left+1*i[i.length-1].baseData.width;e.map((function(t){return t.baseData.left=a-1*t.baseData.width}))}(r,e);break;case"horizontally":!function(e,n){if(1===e.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width/2-e[0].baseData.width/2}var i=t.sortBy(e,(function(t){return t.baseData.left})),a=t.sortBy(e,(function(t){return 1*t.baseData.left+1*t.baseData.width})),s=(1*i[0].baseData.left+(1*a[a.length-1].baseData.left+1*a[a.length-1].baseData.width))/2;e.map((function(t){return t.baseData.left=s-t.baseData.width/2}))}(r,e);break;case"alignTop":!function(e,n){1===e.length&&(e[0].baseData.top=0);var r=1*t.sortBy(e,(function(t){return t.baseData.top}))[0].baseData.top;e.map((function(t){return t.baseData.top=r}))}(r);break;case"alignBottom":!function(e,n){if(1===e.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height-e[0].baseData.height}var i=t.sortBy(e,(function(t){return 1*t.baseData.left})),a=1*i[i.length-1].baseData.top+1*i[i.length-1].baseData.height;e.map((function(t){return t.baseData.top=a-1*t.baseData.height}))}(r,e);break;case"verticalCenter":!function(e,n){if(1===e.length){var r=n.plant?n.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height/2-e[0].baseData.height/2}var i=t.sortBy(e,(function(t){return t.baseData.top})),a=t.sortBy(e,(function(t){return 1*t.baseData.top+1*t.baseData.height})),s=(1*i[0].baseData.top+(1*a[a.length-1].baseData.top+1*a[a.length-1].baseData.height))/2;e.map((function(t){return t.baseData.top=s-t.baseData.height/2}))}(r,e);break;case"topDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.top})),r=(n[n.length-1].baseData.top-n[0].baseData.top)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.top=1*n[0].baseData.top+r*e)}))}(r);break;case"bottomDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.top+t.baseData.height})),r=(n[n.length-1].baseData.top+n[n.length-1].baseData.height-(n[0].baseData.top+n[0].baseData.height))/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.top=1*n[0].baseData.top+1*n[0].baseData.height-1*t.baseData.height+r*e)}))}(r);break;case"xCenterDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.left+t.baseData.width/2})),r=1*n[n.length-1].baseData.left+n[n.length-1].baseData.width/2,i=1*n[0].baseData.left+n[0].baseData.width/2,a=(r-i)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.left=i-t.baseData.width/2+a*e)}))}(r);break;case"leftDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.left})),r=(n[n.length-1].baseData.left-n[0].baseData.left)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.left=n[0].baseData.left+r*e)}))}(r);break;case"rightDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.left+t.baseData.width})),r=(n[n.length-1].baseData.left+n[n.length-1].baseData.width-(n[0].baseData.left+n[0].baseData.width))/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.left=n[0].baseData.left+n[0].baseData.width-t.baseData.width+r*e)}))}(r);break;case"yCenterDistribution":!function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var n=t.sortBy(e,(function(t){return t.baseData.top+t.baseData.height/2})),r=1*n[n.length-1].baseData.top+n[n.length-1].baseData.height/2,i=1*n[0].baseData.top+n[0].baseData.height/2,a=(r-i)/(n.length-1);n.map((function(t,e){e>0&&e<n.length-1&&(t.baseData.top=i-t.baseData.height/2+a*e)}))}(r)}}},Me={setPageData:function(t,e){t.pages[0]=e},parasePages:function(t,e){e instanceof Array&&(t.pages=e.map((function(t,e){return t.name||(t.name="页面"+(e+1)),t.path||(t.path="page"+(e+1)),t})))},addPage:function(t,e){var n=t.pages.length+1;e.name="页面"+n,e.path="page"+n,t.pages.push(e),t.pageIndex=t.pages.length-1,t.resource={jspaths:[],csspaths:[],otherpaths:[]}},setCurrentPageIndex:function(t,e){var n=t.globalEvents,r=t.globalVars,i=t.list,a=t.name,s=t.theme,o=t.plant,u=t.shareVariableTree,c=t.resource;t.pages[t.pageIndex]={globalEvents:n,globalVars:r,list:i,name:a,theme:s,plant:o,shareVariableTree:u,resource:c},t.pageIndex=e},setPageDataForIndex:function(t,e){var n=e.index,r=e.data;t.pages[n]=r},setPageName:function(t,e){t.name=e,t.pages[t.pageIndex].name=e},saveCurrentPageData:function(t){var e=t.globalEvents,n=t.globalVars,r=t.list,i=t.name,a=t.theme,s=t.plant,o=t.shareVariableTree,u=t.resource;t.pages[t.pageIndex]={globalEvents:e,globalVars:n,list:r,name:i,theme:a,plant:s,shareVariableTree:o,resource:u}},getCurrentPageData:function(t){var e=t.globalEvents,n=t.globalVars,r=t.list,i=t.name,a=t.theme,s=t.plant,o=t.shareVariableTree,u=t.resource;t.pages[t.pageIndex]={globalEvents:e,globalVars:n,list:r,name:i,theme:a,plant:s,shareVariableTree:o,resource:u}}},ke={segmentationContainer:function(e,n){var r=t.cloneDeep(e.list),i=n.containerData,a=n.direction,s=[];if("del"==a)if(i.pid){var o=function(t){if(t.length)for(var e=0;e<t.length;e++)i.pid===t[e].cid?t[e].children.length&&(t[e].children.map((function(t){t.cid!==i.cid&&1===t.children.length&&(s=t.children)})),t[e].children=[],s.length&&(t[e].children=s)):t[e].hasOwnProperty("children")&&o(t[e].children)};r.length&&o(r)}else r.length&&(r=r.filter((function(t){return t.cid!==i.cid})));else if(i.pid){var u=function(t){for(var e=0;e<t.length;e++)if(i.cid===t[e].cid){t[e].direction=a,1===t[e].children.length&&((s=t[e].children)[0].pid=null,t[e].children=[]);for(var n=0;n<2;n++)t[e].children.push({isLock:!1,isShow:!0,baseData:{width:"col"==a?"100%":"50%",height:"col"==a?"50%":"100%",angle:0,penetrate:0,opacity:100},componentType:"selectContainer",iconClass:"__vue_devtool_undefined__",isAssembly:"__vue_devtool_undefined__",source:[],comData:{actions:[],option:{grid:[{val:8,unit:"px"},{val:8,unit:"px"},{val:8,unit:"px"},{val:8,unit:"px"}],bgColor:{alpha:1,blue:0,green:0,red:0,flag:1,style:"transparent"}}},tmpData:{},dynamic:0,filePath:"/anov-prod/mgt/go/assembly/162-bgImage.png",origin:"anov-go",name:"容器组件",path:"/index.js",viewComName:"selectContainer",optionComName:"",dataComName:"",eventComName:"",direction:"col",assemblyDeveloper:"",devEmail:"",version:null,devDept:"",toggle:!0,cid:Ut(),pid:t[e].cid,nestIndex:0,children:[],isTop:!1,isCol:"col"==a,isRow:"col"!=a,isDragged:!1,grandParentId:i.pid});s.length&&(s[0].cid=Ut(),s[0].pid=t[e].children[0].cid,t[e].children[0].children=s)}else t[e].hasOwnProperty("children")&&u(t[e].children)};r.length&&u(r)}else{var c=xt(r,i.cid);if(c){c.direction=a,1===c.children.length&&(s=c.children,c.children=[]);for(var l=0;l<2;l++)c.children.push({isLock:!1,isShow:!0,baseData:{width:"col"==a?"100%":"50%",height:"col"==a?"50%":"100%",angle:0,penetrate:0,opacity:100},componentType:"selectContainer",iconClass:"__vue_devtool_undefined__",isAssembly:"__vue_devtool_undefined__",source:[],comData:{actions:[],option:{grid:[{val:8,unit:"px"},{val:8,unit:"px"},{val:8,unit:"px"},{val:8,unit:"px"}],bgColor:{alpha:1,blue:0,green:0,red:0,flag:1,style:"transparent"}}},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:Ut(),pid:c.cid,nestIndex:0,children:[],isTop:!1,isCol:"col"==a,isRow:"col"!=a,isDragged:!1,grandParentId:i.pid});s.length&&(s[0].cid=Ut(),s[0].pid=c.children[0].cid,c.children[0].children=s)}}e.list=r}},Ce={getCurrentPage:function(t){return t.pages.length?t.pages[t.pageIndex]:[]},globalSourceTree:function(e){if(e.list.length&&e.globalSource.length){var n=[];return kt(t.cloneDeep(e.list),(function(t){var e,r,i;if("globalData"==(null===(r=null===(e=null==t?void 0:t.tmpData)||void 0===e?void 0:e.source)||void 0===r?void 0:r.type)){var a=null===(i=null==t?void 0:t.tmpData)||void 0===i?void 0:i.source.globalData;n.push({name:t.name,cid:t.cid,sourceId:a.id,viewComName:t.viewComName})}})),n}return[]}},Ae={namespaced:!0,state:s,mutations:u(u(u(u(u(u(u(u(u({},f),Wt),Zt),ye),_e),Ee),Oe),Me),ke),actions:{updataList:function(t,e){var n=t.commit;e&&n("updataList",e),n("updateTree")},setActive:function(t,e){var n=t.commit;e&&n("setActive",e)},setSyncFlag:function(t,e){var n=t.commit;e&&n("setSyncFlag",e)},execute:function(t,e){var n=t.commit;e&&n("execute",e)},updataAnimationForComponent:function(t,e){var n=t.commit;e&&n("updataAnimationForComponent",e)},updataAnimation:function(t,e){(0,t.commit)("updataAnimation",e)},setOptionForCom:function(t,e){(0,t.commit)("setOptionForCom",e)}},getters:Ce},Pe=function(){function t(){}return t.setAppStore=function(e){t.store=e},t.prototype.getState=function(){return t.store.state[t.storeModule]},t.prototype.mapState=function(e){return Re(t.storeModule,e)},t.prototype.mapGetters=function(e){return Ie(t.storeModule,e)},t.prototype.mapMutations=function(e){return Ne(t.storeModule,e)},t.prototype.callState=function(e){return t.store.state[t.storeModule][e]},t.prototype.callGetter=function(e,n){return t.store.getters[t.storeModule+"/"+e]},t.prototype.callMutation=function(e,n,r){r?t.store.commit(t.storeModule+"/"+e,n,!0):t.store.commit(t.storeModule+"/"+e,n)},t.prototype.callAction=function(e,n){t.store.dispatch(t.storeModule+"/"+e,n)},t.storeModule="GoCom",t}(),Re=Be((function(t,e){var n;return Ve(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=Ye(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[r].VuexServer=!0})),n})),Ne=Be((function(t,e){var n;return Ve(e).forEach((function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this.$store.commit;if(t){var a=Ye(this.$store,"mapMutations",t);if(!a)return;r=a.context.commit}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}})),n})),Ie=Be((function(t,e){var n={};return Ve(e).forEach((function(e){var r=e.key,i=e.val;i=t+i,n[r]=function(){if(!t||Ye(this.$store,"mapGetters",t)){if("production"===process.env.NODE_ENV||i in this.$store.getters)return this.$store.getters[i];console.error("[VuexServer] unknown getter: ".concat(i))}},n[r].VuexServer=!0})),n}));function Ve(t){return Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}}))}function Be(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function Ye(t,e,n){var r=t._modulesNamespaceMap[n];return"production"===process.env.NODE_ENV||r||console.error("[VuexServer] module namespace not found in ".concat(e,"(): ").concat(n)),r}var Le=function(t){var e=this;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=Ut(),t&&(Object.keys(t).forEach((function(n){e[n]=t[n]})),["AnEchartsMap","AnMaptalks","AnEchartsMap1","AnArcgisMapBase","AnAMap1","AnCesium","AnThreeMap3DChina","AnThreeMapForCesium","AnGisMap"].includes(t.viewComName)&&(this.componentType="MultiStateComponent"),"AnDynamic"===t.viewComName&&(this.componentType="dynamicComponent"))},Fe=function(){function e(t){this.vueServer=t,this.loadScript=we}return e.setStore=function(t){this.store=t},e.prototype.loadComponents=function(e){var n=e&&e.list?e.list:[];kt(n,(function(t){t.viewComName&&(t&&t.path&&t.path,t.origin,t.viewComName?t.viewComName:t.rawData.viewComName)})),e&&this.vueServer.callMutation("reversal",t.cloneDeep(e))},e.prototype.addStore=function(t){this.vueServer.callMutation("setActive",{id:t}),this.vueServer.callMutation("addComs",this)},e.prototype._addPlantStore=function(){this.vueServer.callMutation("setPlant",this)},e.prototype._loadComTmp=function(t,e){return c(this,void 0,void 0,(function(){var n,r,i=this;return l(this,(function(a){switch(a.label){case 0:if(window[e])return[3,5];n=function(e){var n;return l(this,(function(r){switch(r.label){case 0:return n=t[e],[4,new Promise((function(t){t(i._load(n))}))];case 1:return r.sent(),[2]}}))},r=0,a.label=1;case 1:return r<t.length?[5,n(r)]:[3,4];case 2:a.sent(),a.label=3;case 3:return r++,[3,1];case 4:window[e]=e,a.label=5;case 5:return[2]}}))}))},e.prototype._load=function(t){return c(this,void 0,void 0,(function(){var e=this;return l(this,(function(n){return[2,new Promise((function(n){n(e.loadScript(t))}))]}))}))},e}(),je=function(){function t(t){var e=t.dbName,n=t.tables,r=t.version,i=void 0===r?1:r,a=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,["dbName","tables","version"]);this.dbName=e,this.tables=n,this.version=i,this.openDB(u({dbName:e,tables:n,version:i},a))}return t.deleteDB=function(t){var e;null===(e=window.indexedDB)||void 0===e||e.deleteDatabase(t)},t.prototype.deleteItem=function(t,e,n){var r=this.storage.transaction(t,"readwrite").objectStore(t).delete(e);return r.onsuccess=function(t){"function"==typeof n&&n(t)},r},t.prototype.getItem=function(t,e,n){var r=this.storage.transaction(t,"readwrite").objectStore(t),i=null;return(i=e?r.get(e):r.getAll()).onsuccess=function(t){var e;"function"==typeof n&&n(null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.result)},i.onerror=function(t){console.error(t),n(t)},i},t.prototype.setItem=function(t,e,n,r){var i=this.storage.transaction(t,"readwrite").objectStore(t).put(n,e);return i.onsuccess=function(t){"function"==typeof r&&r(t)},i.onerror=function(t){"function"==typeof r&&r(t)},i},t.prototype.get=function(t,e){return this.getItem(this.tables[0],t,e)},t.prototype.set=function(t,e,n){return this.setItem(this.tables[0],t,e,n)},t.prototype.delete=function(t,e){return this.deleteItem(this.tables[0],t,e)},t.prototype.clear=function(t,e){var n=this.storage.transaction(this.dbName,"readwrite").objectStore(t).clear();return n.onsuccess=function(t){"function"==typeof e&&e(t)},n},t.prototype.getDB=function(){return this.storage},t.prototype.closeDB=function(){this.storage.close()},t.prototype.openDB=function(t){var e=this,n=t.dbName,r=t.tables,i=t.version,a=t.callback,s=window.indexedDB;if(s)if((null==r?void 0:r.length)<1)console.error("表名不能为空");else{var o=s.open(n,i);o.onerror=function(t){var e,n;console.error("打开数据库失败: ".concat(null===(n=null===(e=t.currentTarget)||void 0===e?void 0:e.error)||void 0===n?void 0:n.message)),"function"==typeof a&&a(t)},o.onsuccess=function(t){var n;e.storage=null===(n=t.target)||void 0===n?void 0:n.result,"function"==typeof a&&a(t)},o.onupgradeneeded=function(t){var n;e.storage=null===(n=t.target)||void 0===n?void 0:n.result,r.forEach((function(n){e.storage.objectStoreNames.contains(n)||(e.storage.createObjectStore(n),"function"==typeof a&&a(t))}))}}else console.error("你的浏览器不支持indexedDB")},t}(),Ue=function(){function t(){this.VueServer=new Pe}return t.getInstance=function(){return this.instance||(this.db=new je({dbName:"AnovGo",tables:["logs"]}),this.instance=new t),this.instance},t.prototype.getAppStore=function(){return t.store},t.setAppStore=function(e){t.store=e,Pe.setAppStore(e),Fe.setStore(e)},t.prototype.add=function(t,e,n){e.MultiState?this.VueServer.callMutation("addStateChildren",e):(this.VueServer.callMutation("addComs",{com:e,isMobile:n}),this.VueServer.callMutation("setActive",{id:t}))},t.prototype.addForParent=function(t,e,n,r){this.VueServer.callMutation("addComsForParent",{com:e,PID:n,isMobile:r}),this.VueServer.callMutation("setActive",{id:t})},t.prototype.render=function(t,e){var n=new Le(t);e?this.add(n.cid,n,!0):this.add(n.cid,n)},t.prototype.renderForParent=function(t,e,n){var r=new Le(t);void 0!==n?this.addForParent(r.cid,r,e,n):this.addForParent(r.cid,r,e)},t.prototype.reversal=function(t){new Fe(new Pe).loadComponents(t)},t.prototype.log=function(e,n,r,i,a){var s=(new Date).toLocaleString();t.db.set(s,{type:n,info:r,user:e,trace:i}),t.db.get(null,(function(t){a&&a()}))},t.prototype.emitEvent=function(t,e){var n=this;!function(t,e,n,r,i,a,s,o){var u,c=i.cid,l=i.actions.eventName,h=[];h=i.hasOwnProperty("index")?t.filter((function(t){return t.id==c&&t.eventType==l&&parseInt(t.index)+1==parseInt(i.index)})):t.filter((function(t){return t.id===c&&t.eventType===l}));var f=i.actions.mode;!e||e.filter((function(t){return t.id===c&&t.type===l}));for(var d=function(t){var a=e[t];if(a.type!=l)return"break";if(a.current=!1,a.eventSourceId="",i.hasOwnProperty(a.field))a.value=i[a.field]?i[a.field]:"";else if((null==i?void 0:i.data)&&i.data[a.field])a.value=null==i?void 0:i.data[a.field];else{var o=Ot(r,c),h=null===(u=null==o?void 0:o.tmpData)||void 0===u?void 0:u.actions;h&&h.length?h.forEach((function(t){var e=t.vars.find((function(t){return t.mapField==a.mapField}));e&&(a.value=e.value,a.current=!0)})):(a.current=!1,a.value=null)}var f=n[a.mapField];if(!n)return{value:void 0};f&&f.length&&f.forEach((function(t){a.eventSourceId=t;var n=Ot(r,t);a.id==c&&setTimeout((function(){oe(n,e,!0,s)}))}))},p=0;p<e.length;p++){var m=d(p);if("object"==typeof m)return m.value;if("break"===m)break}var g=function(t){var e=h[t];if("link"==e.type&&window.open(e.link),"page"===e.type&&o&&o(e),"dynamic"===e.type){var n=e.dynamic;n&&n.length&&n.forEach((function(t){var n;e.id===i.cid&&(1!=i.actions.mode?e.index==i.index-1&&(n=xt(r,t.pid))&&(n.activeDynamic=t.name,n.isShow=!0,t.visible||(n.isShow=!1)):(n=xt(r,t.pid))&&(n.activeDynamic=t.name,n.isShow=!0,t.visible||(n.isShow=!1)))}))}"toggle"==e.type&&(2==f?e.children.forEach((function(t){e.index===i.index-1&&a({cid:t.cid,flag:t.visible})})):e.children.forEach((function(t){a({cid:t.cid,flag:t.visible})})))};for(p=0;p<h.length;p++)g(p)}(this.VueServer.callState("globalEvents"),this.VueServer.callState("globalVars"),this.VueServer.callState("shareVariableTree"),this.VueServer.callState("list"),t,(function(t){n.VueServer.callMutation("changeShow",t)}),(function(t){n.VueServer.callMutation("updataSourceForComponent",t)}),e)},t}(),He=Object.defineProperty,ze=Object.getOwnPropertySymbols,Ge=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,We=(t,e,n)=>e in t?He(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ze=(t,e)=>{for(var n in e||(e={}))Ge.call(e,n)&&We(t,n,e[n]);if(ze)for(var n of ze(e))qe.call(e,n)&&We(t,n,e[n]);return t},Ke=(t,e,n)=>(We(t,"symbol"!=typeof e?e+"":e,n),n),$e=(t,e,n)=>new Promise(((r,i)=>{var a=t=>{try{o(n.next(t))}catch(t){i(t)}},s=t=>{try{o(n.throw(t))}catch(t){i(t)}},o=t=>t.done?r(t.value):Promise.resolve(t.value).then(a,s);o((n=n.apply(t,e)).next())})),Xe={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,blindOpacity:.005},Qe={childList:!0,subtree:!0,attributeFilter:["style","data-watermark-tag"]};var Je=t=>{let e="";return Object.keys(t).forEach((n=>{const r=n.replace(/([A-Z])/g,"-$1").toLowerCase();e+=`${r}:${t[n]};`})),e},tn=(t="")=>{return`${e=t,window.btoa(decodeURI(encodeURIComponent(e)))}-${(new Date).getTime()}-${Math.floor(Math.random()*Math.pow(10,8))}`;var e};var en=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,nn=i((function(t,e){!function(){function e(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}function r(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){u(r.response,e,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function a(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var s="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=s.saveAs||("object"!=typeof window||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(t,e,n){var o=s.URL||s.webkitURL,u=document.createElement("a");e=e||t.name||"download",u.download=e,u.rel="noopener","string"==typeof t?(u.href=t,u.origin===location.origin?a(u):i(u.href)?r(t,e,n):a(u,u.target="_blank")):(u.href=o.createObjectURL(t),setTimeout((function(){o.revokeObjectURL(u.href)}),4e4),setTimeout((function(){a(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,n,s){if(n=n||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(e(t,s),n);else if(i(t))r(t,n,s);else{var o=document.createElement("a");o.href=t,o.target="_blank",setTimeout((function(){a(o)}))}}:function(t,e,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return r(t,e,n);var a="application/octet-stream"===t.type,u=/constructor/i.test(s.HTMLElement)||s.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&u||o)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var t=l.result;t=c?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},l.readAsDataURL(t)}else{var h=s.URL||s.webkitURL,f=h.createObjectURL(t);i?i.location=f:location.href=f,i=null,setTimeout((function(){h.revokeObjectURL(f)}),4e4)}});s.saveAs=u.saveAs=u,t.exports=u}()})),rn=function(e){if(0===e.length)return[];var n=function(e){for(var r,i,a,s=0;s<e.length;s++)e[s].tmpData&&(e[s]=Object.assign({},(i=e[s],a=void 0,delete(a=t.cloneDeep(i)).comData,u({},a)))),e[s]&&e[s].children&&(null===(r=e[s])||void 0===r?void 0:r.children.length)?n(e[s].children):e[s]&&e[s].dynamicChildren&&Array.from(e[s].dynamicChildren).forEach((function(t,e){n(t[1])}))};return n(e),e},an=function(e){var n=t.cloneDeep(e)?t.cloneDeep(e):{};"string"==typeof e&&(n=JSON.parse(e));var r=[];if(n instanceof Array)n.forEach((function(t,e){var n=JSON.parse(t.caseDetailData)?JSON.parse(t.caseDetailData):{},i=t.caseDetailPath,a=t.caseDetailName,s=n.theme,o=void 0===s?null:s,u=n.globalVars,c=void 0===u?null:u,l=n.shareVariableTree,h=void 0===l?null:l,f=n.plant,d=void 0===f?null:f,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.globalEvents,w=void 0===b?[]:b;r.push({path:v||i,theme:o,name:a,resource:_,globalVars:c,globalEvents:w,shareVariableTree:h,plant:d,list:rn(m)})}));else{var i=n.theme,a=void 0===i?null:i,s=n.globalVars,o=void 0===s?null:s,u=n.shareVariableTree,c=void 0===u?null:u,l=n.plant,h=void 0===l?null:l,f=n.list,d=void 0===f?[]:f,p=n.resource,m=void 0===p?{jspaths:[],csspaths:[],otherpaths:[]}:p,g=n.globalEvents,v=void 0===g?[]:g;r.push({resource:m,theme:a,globalVars:o,globalEvents:v,shareVariableTree:c,plant:h,list:rn(d)})}return r};function sn(t,e){throw new Error("".concat(t,":Expected HTMLElement, got ").concat(e))}var on=function(){function t(t){this.option=t,this.option.isResize&&window.addEventListener("resize",this.resize.bind(this))}return Object.defineProperty(t,"defaultOption",{get:function(){return t._defaultOption},set:function(e){t._defaultOption=e},enumerable:!1,configurable:!0}),t.getInstance=function(e){return t.instance||(t.instance=new t(e)),t.instance},t.prototype.removeResize=function(){window.removeEventListener("resize",this.resize.bind(this))},t.prototype.resize=function(){var t=this.option,e=t.isEqualScale,n=t.wrapSelector,r=t.viewSelector,i=t.designWidth,a=t.designHeight,s=t.horizontal,o=t.vertical,u=document.querySelector(n);u||sn("wrap",u);var c=u.clientWidth,l=u.clientHeight,h=document.querySelector(r);h||sn("view",h),h.style.position="absolute",h.style.width=i+"px",h.style.height=a+"px";var f,d,p,m,g=Math.min(c/i,l/a);if(e){switch(h.style.transform="scale(".concat(g,")"),s){case"center":f=(c-i)/2+"px";break;case"left":f=(g-1)/2*i+"px";break;case"right":p=(g-1)/2*i+"px"}switch(o){case"center":d=(l-a)/2+"px";break;case"top":d=(g-1)/2*a+"px";break;case"bottom":m=(g-1)/2*a+"px"}}else h.style.transform="scale('".concat(c/i,", ").concat(l/a,"')"),f=(c-i)/2+"px",d=(l-a)/2+"px";d?h.style.top=d:m&&(h.style.bottom=m),f?h.style.left=f:p&&(h.style.right=p)},t._defaultOption={isEqualScale:!0,designWidth:1920,designHeight:1080,wrapSelector:"body",viewSelector:"#app",horizontal:"center",vertical:"center",isResize:!0},t}(),un=function(){function e(t){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 e=t.wrap,n=t.target,r=t.type,i=t.size,a=t.callback;this.size=i,this.type=r,this.initOptions(e,n,i),this.initSize(i),this.layout(),this.scale(a),window.addEventListener("resize",this.reset.bind(this,a))}return e.prototype.reset=function(t){this.initSize(this.size),this.layout(),t?this.scale(t):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(t.isElement(e))return e;var n=document.querySelector(e);return t.isElement(n)?n:null},e.prototype.initOptions=function(t,e,n){this.wrap=this.getDom(t),this.target=this.getDom(e),this.target.style.width=n.w+"px",this.target.style.height=n.h+"px",this.verificationDom()},e.prototype.initSize=function(t){this.outSize.w=this.wrap.clientWidth,this.outSize.h=this.wrap.clientHeight,this.inSize=t},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 t=(this.outSize.w-this.inSize.w)/2,e=(this.outSize.h-this.inSize.h)/2;this.target.style.top=e+"px",this.target.style.left=t+"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(t,e){var n;if(t&&e)for(n=t.parentNode;n;){if(e===n)return!0;n=n.parentNode}return!1},e.prototype.scale=function(t){var e=1,n=1;switch(this.type){case 0:e=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h),n=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h);break;case 1:n=e=this.outSize.w/this.inSize.w;break;case 2:e=n=this.outSize.h/this.inSize.h;break;case 3:e=this.outSize.w/this.inSize.w,n=this.outSize.h/this.inSize.h}t&&t([e,n]),this.target.style.transform="scale(".concat(e,",").concat(n,")")},e.prototype.resize=function(){},e}(),cn=i((function(t){!function(e){var n=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n=t(e).toLowerCase();return(r="application/font-woff",i="image/jpeg",{woff:r,woff2:r,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"})[n]||"";var r,i},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=n.charCodeAt(a);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){var e=3e4;o.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(n){var r,i=new XMLHttpRequest;if(i.onreadystatechange=s,i.ontimeout=u,i.responseType="blob",i.timeout=e,i.open("GET",t,!0),i.send(),o.impl.options.imagePlaceholder){var a=o.impl.options.imagePlaceholder.split(/,/);a&&a[1]&&(r=a[1])}function s(){if(4===i.readyState)if(200===i.status){var e=new FileReader;e.onloadend=function(){var t=e.result.split(/,/)[1];n(t)},e.readAsDataURL(i.response)}else r?n(r):c("cannot fetch resource: "+t+", status: "+i.status)}function u(){r?n(r):c("timeout of "+e+"ms occured while fetching resource: "+t)}function c(t){console.error(t),n("")}}))},uid:function(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}(),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var n=e(t,"border-left-width"),r=e(t,"border-right-width");return t.scrollWidth+n+r},height:function(t){var n=e(t,"border-top-width"),r=e(t,"border-bottom-width");return t.scrollHeight+n+r}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),r=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,a){return s()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return i(e,t,n,a)}))})),r}));function s(){return!e(t)}},shouldProcess:e,impl:{readUrls:r,inline:i}};function e(e){return-1!==e.search(t)}function r(e){for(var r,i=[];null!==(r=t.exec(e));)i.push(r[1]);return i.filter((function(t){return!n.isDataUrl(t)}))}function i(t,e,r,i){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(i||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),i=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),a=function(){return{inlineAll:function e(i){return i instanceof Element?a(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(n.asArray(i.childNodes).map((function(t){return e(t)})))})):Promise.resolve(i);function a(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}},impl:{newImage:t}};function t(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),s={imagePlaceholder:void 0,cacheBust:!1},o={toSvg:u,toPng:function(t,e){return c(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return c(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return c(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return c(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:i,images:a,util:n,inliner:r,options:{}}};function u(t,e){return function(t){void 0===t.imagePlaceholder?o.impl.options.imagePlaceholder=s.imagePlaceholder:o.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?o.impl.options.cacheBust=s.cacheBust:o.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return l(t,e.filter,!0)})).then(h).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor);e.width&&(t.style.width=e.width+"px");e.height&&(t.style.height=e.height+"px");e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||n.width(t),e.height||n.height(t))}))}function c(t,e){return u(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var i=function(t){var r=document.createElement("canvas");if(r.width=e.width||n.width(t),r.height=e.height||n.height(t),e.bgcolor){var i=r.getContext("2d");i.fillStyle=e.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function l(t,e,r){return r||!e||e(t)?Promise.resolve(t).then((function(t){return t instanceof HTMLCanvasElement?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(r){return function(t,e,r){var i=t.childNodes;return 0===i.length?Promise.resolve(e):a(e,n.asArray(i),r).then((function(){return e}));function a(t,e,n){var r=Promise.resolve();return e.forEach((function(e){r=r.then((function(){return l(e,n)})).then((function(e){e&&t.appendChild(e)}))})),r}}(t,r,e)})).then((function(e){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(i).then(a).then(s).then((function(){return e})):e;function r(){function r(t,e){function r(t,e){n.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}t.cssText?e.cssText=t.cssText:r(t,e)}r(window.getComputedStyle(t),e.style)}function i(){function r(r){var i=window.getComputedStyle(t,r),a=i.getPropertyValue("content");if(""!==a&&"none"!==a){var s=n.uid();e.className=e.className+" "+s;var o=document.createElement("style");o.appendChild(u(s,r,i)),e.appendChild(o)}function u(t,e,r){var i="."+t+":"+e,a=r.cssText?s(r):o(r);return document.createTextNode(i+"{"+a+"}");function s(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function o(t){return n.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){r(t)}))}function a(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function s(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(t,e)})):Promise.resolve()}function h(t){return a.inlineAll(t).then((function(){return t}))}t.exports=o}()})),ln=function(t){if(!t)return!1;return 1==new RegExp(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/).test(t)},hn=function(t){for(var e="",n=new Uint8Array(t),r=n.byteLength,i=0;i<r;i++)e+=String.fromCharCode(n[i]);return"data:image/jpeg;base64,".concat(window.btoa(e))},fn=function(t,e){void 0===e&&(e="screenshot.png");try{for(var n=t.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]),a=i.length,s=new Uint8Array(a);a--;)s[a]=i.charCodeAt(a);return new File([s],e,{type:r})}catch(t){console.error("dataURLtoFile:数据转换错误 : "+t)}},dn=function(t,e){return c(void 0,void 0,void 0,(function(){var n;return l(this,(function(r){switch(r.label){case 0:return r.trys.push([0,11,,12]),console.log(t,"----"),"File"!=e||"string"!=typeof t?[3,2]:[4,fn(t)];case 1:case 3:case 5:case 7:return[2,r.sent()];case 2:return"File"!=e||"[object ArrayBuffer]"!=t.toString()?[3,4]:[4,new File([t],"screenshot.png")];case 4:return"Base64"!=e||"string"!=typeof t?[3,6]:[4,t];case 6:return"Base64"!=e||"[object ArrayBuffer]"!=t.toString()?[3,8]:[4,hn(t)];case 8:return[4,new Error("transformData: 转换发生错误")];case 9:throw r.sent();case 10:return[3,12];case 11:return n=r.sent(),console.log(n),[3,12];case 12:return[2]}}))}))},pn=function(t,n,r,i){return c(void 0,void 0,void 0,(function(){return l(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,e({url:t,method:"GET",responseType:"arraybuffer",params:{url:n,dom:r,quality:i}})];case 1:return[2,a.sent()];case 2:return a.sent(),console.warn("请求截图服务器发生错误,请检查地址及参数是否正确!",{url:t,path:n,dom:r,quality:i}),[2,null];case 3:return[2]}}))}))},mn=function(t,e){return c(void 0,void 0,void 0,(function(){var n,r;return l(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!(n=document.querySelector(t)))throw new Error("domToImg:"+t+" dom未被找到!");return[4,cn.toJpeg(n,{style:{transform:"scale(1)",position:"static"},quality:e})];case 1:return[2,i.sent()];case 2:return r=i.sent(),console.warn(r),[3,3];case 3:return[2]}}))}))},gn=function(t){return"".concat(t>15?"":0).concat(t.toString(16))},vn=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,a=void 0===i?1:i;return"#".concat(gn(e)).concat(gn(n)).concat(gn(r)).concat(1===a?"":gn(Math.floor(255*a)))},yn=function(t){var e=t.r,n=t.g,r=t.b;return"rgb(".concat(e,",").concat(n,",").concat(r,")")},_n=function(t,e){void 0===e&&(e=1e4);var n=t.r,r=t.g,i=t.b,a=t.a,s=void 0===a?1:a;return"rgba(".concat(n,",").concat(r,",").concat(i,",").concat(Math.floor(s*e)/e,")")},bn=function(t){var e=t.slice(1),n=1;3===e.length&&(e="".concat(e[0]).concat(e[0]).concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2])),8===e.length&&(n=parseInt(e.slice(6),16)/255,e=e.slice(0,6));var r=parseInt(e,16);return{r:r>>16&255,g:r>>8&255,b:255&r,a:n}},wn=function(t){var e=t.match(/(\d(\.\d+)?)+/g)||[],n=e.map((function(t){return parseInt(t,10)}));return{r:n[0],g:n[1],b:n[2],a:parseFloat(e[3])}},Dn=function(t){if(t.startsWith("#"))return bn(t);if(t.startsWith("rgb"))return wn(t);if("transparent"===t)return bn("#00000000");throw new Error("color string error: ".concat(t))},Sn=Object.freeze({__proto__:null,Watermark:class{constructor(t={}){Ke(this,"options"),Ke(this,"container"),Ke(this,"watermarkContent"),Ke(this,"watermarkDom"),Ke(this,"style"),Ke(this,"watermarkTag"),Ke(this,"shadowRoot"),Ke(this,"mutationObserver"),Ke(this,"_isAgainRender",(t=>{if("attributes"===t.type){if("data-watermark-tag"===t.attributeName)return!0;if(this.watermarkTag===this._getNodeRandomId(t.target))return!0}return!(!t.removedNodes.length||this.watermarkTag!==this._getNodeRandomId(t.removedNodes[0]))})),Ke(this,"_getNodeRandomId",(t=>{var e,n;return null==(e=null==t?void 0:t.dataset)?void 0:e[(n="data-watermark-tag",n.split("-").slice(1).reduce(((t,e,n)=>0===n?e:`${t}${e[0].toUpperCase()+e.slice(1)}`)))]})),Ke(this,"_destroyMutationObserver",(()=>{this.mutationObserver&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.mutationObserver=null)})),Ke(this,"_getWatermarkDom",(t=>$e(this,null,(function*(){this.watermarkDom||(this.watermarkDom=document.createElement("div")),"number"==typeof t&&t&&(this.style.height=`${t}px`);const e=yield function(t){const{text:e,gapX:n,gapY:r,offsetTop:i,offsetLeft:a,width:s,height:o,rotate:u,opacity:c,fontSize:l,fontStyle:h,fontVariant:f,fontWeight:d,fontFamily:p,fontColor:m,textAlign:g,textBaseline:v,image:y,blindText:_,blindOpacity:b}=t;return new Promise(((t,w)=>{const D=document.createElement("canvas"),S=D.getContext("2d"),T=1*(Number(n)+Number(s)),x=1*(Number(r)+Number(o)),E=Number(a)||Number(n)/2,O=Number(i)||Number(r)/2;if(D.setAttribute("width",`${T}px`),D.setAttribute("height",`${x}px`),S){const n=1*s,r=1*o;if(S.translate(1*E,1*O),S.rotate(Math.PI/180*Number(u)),_&&(S.globalAlpha=b,S.font="14px normal",S.fillText(_,0,0)),S.globalAlpha=c,y){const e=new Image;return e.crossOrigin="anonymous",e.referrerPolicy="no-referrer",e.src=y,void(e.onload=()=>{S.drawImage(e,0,0,n,r),t({url:S.canvas.toDataURL(),width:T,height:x})})}const i=Array.isArray(e)?e:[e],a=i.map((t=>S.measureText(t).width)),h=Math.max(...a),f=1*Number(l);S.textAlign=g,S.textBaseline=v,S.fillStyle=m,S.font=M(`${f}px`),h>s&&(S.font=M(f/2+"px"));const d=f+5;let p=(r-(l*i.length+5*(i.length-1)))/2;p=p<0?0:p;for(let t=0;t<i.length;t++)S.fillText(i[t]||"",n/2,p+d*t);t({url:S.canvas.toDataURL(),width:T,height:x})}function M(t){return`${h} ${f} ${d} ${t} ${p}`}return w()}))}(this.options);if(null==e?void 0:e.url){const t=e.url;"repeat"===this.options.mode?this.style.backgroundImage=`url(${t})`:(this.style.backgroundImage=`url(${t}), url(${t})`,this.style.backgroundRepeat="repeat, repeat",this.style.backgroundPosition=`${e.width/2}px ${e.height/2}px, 0 0`),this.options.container||(this.style.position="fixed",this.style.height=void 0),this.watermarkDom.setAttribute("style",Je(this.style))}return this.watermarkDom.setAttribute("data-watermark-tag",this.watermarkTag),this.watermarkDom})))),Ke(this,"_getWatermarkHeight",(()=>{if(!this.container)return 0;let t=0;const{scrollHeight:e=0,clientHeight:n=0}=this.options.container?this.container.parentNode:this.container;return e>n&&(t=Math.max(e,n)),t})),this.options=Object.assign({},Xe,t),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=tn("watermark"),this.mutationObserver=null,this._render()}update(t={}){this.options=Ze(Ze({},this.options),t),this.style.zIndex=this.options.zIndex,this._render()}show(){this.watermarkDom&&(this.style.display="block",this.watermarkDom.setAttribute("style",Je(this.style)))}hide(){this.watermarkDom&&(this.style.display="none",this.watermarkDom.setAttribute("style",Je(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 $e(this,null,(function*(){this._destroyMutationObserver(),this.container=((t,e,n={},r)=>{let i;if("string"==typeof t){if(i=document.getElementById(t),!i)throw new Error(`水印挂载节点未找到,请检查#${t}是否存在`)}else i=null!=t?t:document.body;i.setAttribute("data-watermark-tag",e);const a=Ze({position:"relative"},n);return r||delete a.position,i.setAttribute("style",Je(a)),i})(this.options.container,this.watermarkTag,this.options.containerStyle,this.options.pack),this.watermarkContent||(this.watermarkContent=(t=>{const e=document.createElement("div");return e.setAttribute("style",Je({pointerEvents:"none"})),e.setAttribute("data-watermark-tag",t),e})(this.watermarkTag),this.container.append(this.watermarkContent));const t=this._getWatermarkHeight();if(this.watermarkDom=yield this._getWatermarkDom(t),this.watermarkContent){const t=this.watermarkContent.childNodes||[];for(let e=0;e<t.length;e++)this.watermarkContent.removeChild(t[e])}"function"==typeof this.watermarkContent.attachShadow?this.shadowRoot||(this.shadowRoot=this.watermarkContent.attachShadow({mode:"open"})):this.shadowRoot=this.watermarkContent,this.shadowRoot.append(this.watermarkDom),en&&this.options.monitor&&(this.mutationObserver=new en((t=>{t.forEach((t=>{if(this._isAgainRender(t))return this.destroy(),void this._render()}))})),this.mutationObserver.observe(this.container,Qe),this.shadowRoot&&this.mutationObserver.observe(this.shadowRoot,Qe))}))}},generateComponentList:rn,generateCaseDataJson:an,generatePageData:function(t){var e={},n=e.theme,r=void 0===n?null:n,i=e.globalVars,a=void 0===i?null:i,s=e.shareVariableTree,o=void 0===s?null:s,u=e.plant,c=void 0===u?null:u,l=e.list,h=void 0===l?[]:l,f=e.undos,d=void 0===f?[]:f,p=e.undoRedoPointer,m=void 0===p?-1:p,g=e.globalEvents,v=void 0===g?[]:g;return t&&(r=t.theme,c=t.plant),{theme:r,globalVars:a,globalEvents:v,shareVariableTree:o,plant:c,undos:d,undoRedoPointer:m,list:rn(h)}},exportJson:function(t){var e=t.caseName,n=void 0===e?"case-name":e,r=t.caseImg,i=void 0===r?"":r,s=t.caseRemark,o=void 0===s?"":s,u=t.details,c=t.caseClientType,l={caseClientType:void 0===c?"":c,caseName:n,caseImg:i,caseRemark:o,createTime:a().format("YYYY-MM-DD , h:mm:ss"),caseData:an(u)},h=new Blob([JSON.stringify(l)],{type:"json"});nn.saveAs(h,n+".json")},generateJson:function(t){var e=t.caseName,n=void 0===e?"":e,r=t.caseData;return t.plangInfoForPsd,{caseName:n,createTime:a().format("YYYY-MM-DD , h:mm:ss"),caseData:an(r)}},SizeAdaption:on,Scale:un,loadFontResource:be,loadScript:we,removeTag:xe,loadTag:Te,loadFont:Se,getDataForEvaluator:g,recursion:kt,encrypt:qt,decrypt:function(t){var e=new bt;return e.setPrivateKey("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"),e.decrypt(t)},setActions:Gt,genID:Ut,arraySwap:Dt,arraySwapDeep:Tt,arraySwapForId:St,setAttr:function(t,e,n){for(var r,i=0;i<t.length;i++)(r=t[i]).cid!==e&&r.id!==e||(r[n]=!r[n])},RecursiveList:jt,selectdArea:Yt,setPorp:function(t,e,n){var r=e.find((function(e){return e.cid===t}));"folder"===r.type?r.children.length&&r.children.forEach((function(t){t[n]=!t[n]})):r[n]=!r[n]},setPositionForGroup:Pt,resetPositionForGroup:function(t,e){var n=e.map((function(t){return t.cid}));e.forEach((function(e){e.pid&&Nt(e,t)}));var r=Yt(n,e);return Pt(r,e),{left:r.left,top:r.top,width:r.width,height:r.height}},setPositionForWorld:Nt,breakUp:Rt,findItem:Ot,findItemDeep:xt,findParentDeep:Et,findItemIndexDeep:function(t,e){for(var n,r=0,i=0;i<t.length;i++){var a=t[i];if(r+=1,a.cid==e)break;if(null===(n=null==a?void 0:a.children)||void 0===n?void 0:n.length)for(var s=0;s<(null==a?void 0:a.children.length);s++){if(r+=1,(null==a?void 0:a.children[s]).cid==e)return r}}return r},getLength:function(t){var e=0,n=function(t){for(var r=function(r){if(t[r].isShow&&t[r].children)n(t[r].children);else if(t[r].isShow&&t[r].dynamicChildren){if(t[r].dynamicChildren instanceof Map){for(var i=Array.from(t[r].dynamicChildren),a=0;a<i.length;a++)if(i[a]instanceof Array){var s=i[a][1];n(s)}}else if(t[r].isShow&&t[r].dynamicChildren instanceof Array){console.log(t[r]," array[i].");var o=t[r].dynamicChildren.find((function(e){return e[0]=t[r].activeDynamic}));o&&o.length&&n(o[1])}}else t[r].isShow&&t[r].stateChildren?n(t[r].stateChildren):t[r].isShow&&e++},i=0;i<t.length;i++)r(i)};return n(t),e||!1},getPosition:Lt,updataAttribute:At,isPeer:Mt,transformPosition:It,upDataGroup:Ft,upDataGroupChildren:function(e,n,r){var i=e.children,a=t.cloneDeep(n),s=t.cloneDeep(Lt(i)),o=a.left,u=a.top;a.width,a.height;var c=s.left,l=s.top,h=s.width,f=s.height,d={left:o+c,top:u+l,width:h,height:f,angle:n.angle?n.angle:0};return i.forEach((function(e){var n=t.cloneDeep(e.baseData);e.baseData.left<0?n.left=0:n.left=n.left-c,e.baseData.top<0?n.top=0:n.top=n.top-l,e.baseData=n})),e.children=i,d},resziePositionForGroup:function(e,n,r,i){var a=e.baseData.left,s=e.baseData.top,o=n.left,u=n.top,c=t.cloneDeep(e.children),l=r||"";if(o-a<0)for(var h=0;h<c.length;h++){(f=c[h]).cid!==l&&(f.baseData.left=f.baseData.left+(a-o))}if(u-s<0)for(h=0;h<c.length;h++){var f;(f=c[h]).cid!==l&&(f.baseData.top=f.baseData.top+(s-u))}e.children=c},genCopyName:Ht,resetID:Ct,getUrlParams:zt,updataSizeDeep:wt,resizePosition:Vt,resizeListPosition:function(t,e){var n=function(t,r){for(var i,a=0;a<t.length;a++){var s=t[a];if(s.pid!=r){var o=Vt(e,s.cid),u=Vt(e,s.pid);console.log(o,u),s.baseData.left=o.left-u.left,s.baseData.top=o.top-u.top}(null===(i=null==s?void 0:s.children)||void 0===i?void 0:i.length)&&n(s.children,s.cid)}};n(t,e)},getInteractive:pe,getShareTree:function(t,e){try{var n={},r=[],i=[];return kt(t,(function(t){var a,s,o,u=null===(a=null==t?void 0:t.tmpData)||void 0===a?void 0:a.source;(me(u,e,t,n),null===(o=null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.actions)||void 0===o?void 0:o.length)&&Gt({types:t.tmpData.actions.map((function(t){return t.eventType})),element:t,actions:r,events:i})})),n}catch(t){return console.error(t),{}}},screenshot:function(t){return c(void 0,void 0,void 0,(function(){var e,n,r,i,a,s,o,u;return l(this,(function(c){switch(c.label){case 0:return c.trys.push([0,11,,12]),e=t.dom,n=t.servePath,r=t.targetPath,i=t.quality,a=t.type,s=void 0,ln(n)&&ln(r)?[4,pn(n,r,e,i||.5)]:[3,5];case 1:return(o=c.sent())&&200==o.status&&o.data?(s=o.data,[3,4]):[3,2];case 2:return console.warn("截取错误,请检查网络或服务地址配置是否正确,已转换为dom-to-img."),[4,mn(e,i||.5)];case 3:s=c.sent(),c.label=4;case 4:return[3,7];case 5:return console.warn("地址错误,请检查传入的地址是否争取,已转换为dom-to-img."),[4,mn(e,i||.5)];case 6:s=c.sent(),c.label=7;case 7:return s?[4,dn(s,a)]:[3,9];case 8:return[2,c.sent()];case 9:return[2,null];case 10:return[3,12];case 11:return u=c.sent(),console.error("截图发生错误:"+u),[2,null];case 12:return[2]}}))}))},toHex:gn,toHexString:vn,toRgbString:yn,toRgbaString:_n,parseHexColor:bn,parseRgbaColor:wn,parseColorString:Dn,getColorInfo:function(t){var e=Dn(t);return{hex:vn(e),rgba:_n(e),rgb:yn(e),rgbaObj:e}},hexToRgba:function(t){var e=Dn(t);return _n(e)},rgbaToHex:function(t){var e=Dn(t);return vn(e)}});function Tn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xn(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}
19
19
  /*!
20
20
  * GSAP 3.11.3
21
21
  * https://greensock.com