svgedit/dist/editor/system/extensions/ext-storage/ext-storage.js

12 lines
75 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

System.register([],(function(t,e){"use strict";return{execute:function(){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var check=function(t){return t&&t.Math==Math&&t},n=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof r&&r)||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},o=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),i={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,c={f:a&&!i.call({1:2},1)?function propertyIsEnumerable(t){var e=a(this,t);return!!e&&e.enumerable}:i},createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},u={}.toString,classofRaw=function(t){return u.call(t).slice(8,-1)},s="".split,f=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?s.call(t,""):Object(t)}:Object,requireObjectCoercible=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},toIndexedObject=function(t){return f(requireObjectCoercible(t))},isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},toPrimitive=function(t,e){if(!isObject(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!isObject(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},l={}.hasOwnProperty,has=function(t,e){return l.call(t,e)},h=n.document,p=isObject(h)&&isObject(h.createElement),documentCreateElement=function(t){return p?h.createElement(t):{}},v=!o&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),d=Object.getOwnPropertyDescriptor,g={f:o?d:function getOwnPropertyDescriptor(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),v)try{return d(t,e)}catch(t){}if(has(t,e))return createPropertyDescriptor(!c.f.call(t,e),t[e])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},y=Object.defineProperty,m={f:o?y:function defineProperty(t,e,r){if(anObject(t),e=toPrimitive(e,!0),anObject(r),v)try{return y(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},b=o?function(t,e,r){return m.f(t,e,createPropertyDescriptor(1,r))}:function(t,e,r){return t[e]=r,t},setGlobal=function(t,e){try{b(n,t,e)}catch(r){n[t]=e}return e},w="__core-js_shared__",S=n[w]||setGlobal(w,{}),x=Function.toString;"function"!=typeof S.inspectSource&&(S.inspectSource=function(t){return x.call(t)});var E,O,A,P=S.inspectSource,j=n.WeakMap,k="function"==typeof j&&/native code/.test(P(j)),L=createCommonjsModule((function(t){(t.exports=function(t,e){return S[t]||(S[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),R=0,I=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++R+I).toString(36)},T=L("keys"),sharedKey=function(t){return T[t]||(T[t]=uid(t))},_={},C=n.WeakMap;if(k){var U=new C,M=U.get,G=U.has,N=U.set;E=function(t,e){return N.call(U,t,e),e},O=function(t){return M.call(U,t)||{}},A=function(t){return G.call(U,t)}}else{var q=sharedKey("state");_[q]=!0,E=function(t,e){return b(t,q,e),e},O=function(t){return has(t,q)?t[q]:{}},A=function(t){return has(t,q)}}var B={set:E,get:O,has:A,enforce:function(t){return A(t)?O(t):E(t,{})},getterFor:function(t){return function(e){var r;if(!isObject(e)||(r=O(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},D=createCommonjsModule((function(t){var e=B.get,r=B.enforce,o=String(String).split("String");(t.exports=function(t,e,i,a){var c=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,s=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||has(i,"name")||b(i,"name",e),r(i).source=o.join("string"==typeof e?e:"")),t!==n?(c?!s&&t[e]&&(u=!0):delete t[e],u?t[e]=i:b(t,e,i)):u?t[e]=i:setGlobal(e,i)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&e(this).source||P(this)}))})),$=n,aFunction=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,e){return arguments.length<2?aFunction($[t])||aFunction(n[t]):$[t]&&$[t][e]||n[t]&&n[t][e]},V=Math.ceil,W=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?W:V)(t)},K=Math.min,toLength=function(t){return t>0?K(toInteger(t),9007199254740991):0},Y=Math.max,z=Math.min,toAbsoluteIndex=function(t,e){var r=toInteger(t);return r<0?Y(r+e,0):z(r,e)},createMethod=function(t){return function(e,r,n){var o,i=toIndexedObject(e),a=toLength(i.length),c=toAbsoluteIndex(n,a);if(t&&r!=r){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===r)return t||c||0;return!t&&-1}},H={includes:createMethod(!0),indexOf:createMethod(!1)},J=H.indexOf,objectKeysInternal=function(t,e){var r,n=toIndexedObject(t),o=0,i=[];for(r in n)!has(_,r)&&has(n,r)&&i.push(r);for(;e.length>o;)has(n,r=e[o++])&&(~J(i,r)||i.push(r));return i},X=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Q=X.concat("length","prototype"),Z={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,Q)}},tt={f:Object.getOwnPropertySymbols},et=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var e=Z.f(anObject(t)),r=tt.f;return r?e.concat(r(t)):e},copyConstructorProperties=function(t,e){for(var r=et(e),n=m.f,o=g.f,i=0;i<r.length;i++){var a=r[i];has(t,a)||n(t,a,o(e,a))}},rt=/#|\.prototype\./,isForced=function(t,e){var r=ot[nt(t)];return r==at||r!=it&&("function"==typeof e?fails(e):!!e)},nt=isForced.normalize=function(t){return String(t).replace(rt,".").toLowerCase()},ot=isForced.data={},it=isForced.NATIVE="N",at=isForced.POLYFILL="P",ct=isForced,ut=g.f,_export=function(t,e){var r,o,i,a,c,u=t.target,s=t.global,f=t.stat;if(r=s?n:f?n[u]||setGlobal(u,{}):(n[u]||{}).prototype)for(o in e){if(a=e[o],i=t.noTargetGet?(c=ut(r,o))&&c.value:r[o],!ct(s?o:u+(f?".":"#")+o,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;copyConstructorProperties(a,i)}(t.sham||i&&i.sham)&&b(a,"sham",!0),D(r,o,a,t)}},aFunction$1=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},functionBindContext=function(t,e,r){if(aFunction$1(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},toObject=function(t){return Object(requireObjectCoercible(t))},st=Array.isArray||function isArray(t){return"Array"==classofRaw(t)},ft=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),lt=ft&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ht=L("wks"),pt=n.Symbol,vt=lt?pt:pt&&pt.withoutSetter||uid,wellKnownSymbol=function(t){return has(ht,t)||(ft&&has(pt,t)?ht[t]=pt[t]:ht[t]=vt("Symbol."+t)),ht[t]},dt=wellKnownSymbol("species"),arraySpeciesCreate=function(t,e){var r;return st(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!st(r.prototype)?isObject(r)&&null===(r=r[dt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},gt=[].push,createMethod$1=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=5==t||i;return function(c,u,s,l){for(var h,p,v=toObject(c),d=f(v),g=functionBindContext(u,s,3),y=toLength(d.length),m=0,b=l||arraySpeciesCreate,w=e?b(c,y):r?b(c,0):void 0;y>m;m++)if((a||m in d)&&(p=g(h=d[m],m,v),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:gt.call(w,h)}else if(o)return!1;return i?-1:n||o?o:w}},yt={forEach:createMethod$1(0),map:createMethod$1(1),filter:createMethod$1(2),some:createMethod$1(3),every:createMethod$1(4),find:createMethod$1(5),findIndex:createMethod$1(6)},arrayMethodIsStrict=function(t,e){var r=[][t];return!!r&&fails((function(){r.call(null,e||function(){throw 1},1)}))},mt=Object.defineProperty,bt={},thrower=function(t){throw t},arrayMethodUsesToLength=function(t,e){if(has(bt,t))return bt[t];e||(e={});var r=[][t],n=!!has(e,"ACCESSORS")&&e.ACCESSORS,i=has(e,0)?e[0]:thrower,a=has(e,1)?e[1]:void 0;return bt[t]=!!r&&!fails((function(){if(n&&!o)return!0;var t={length:-1};n?mt(t,1,{enumerable:!0,get:thrower}):t[1]=1,r.call(t,i,a)}))},wt=yt.forEach,St=arrayMethodIsStrict("forEach"),xt=arrayMethodUsesToLength("forEach"),Et=St&&xt?[].forEach:function forEach(t){return wt(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=Et},{forEach:Et});var Ot,At=Object.keys||function keys(t){return objectKeysInternal(t,X)},Pt=o?Object.defineProperties:function defineProperties(t,e){anObject(t);for(var r,n=At(e),o=n.length,i=0;o>i;)m.f(t,r=n[i++],e[r]);return t},jt=getBuiltIn("document","documentElement"),kt=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"</"+"script>"},NullProtoObject=function(){try{Ot=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;NullProtoObject=Ot?function(t){t.write(scriptTag("")),t.close();var e=t.parentWindow.Object;return t=null,e}(Ot):((e=documentCreateElement("iframe")).style.display="none",jt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F);for(var r=X.length;r--;)delete NullProtoObject.prototype[X[r]];return NullProtoObject()};_[kt]=!0;var Lt=Object.create||function create(t,e){var r;return null!==t?(EmptyConstructor.prototype=anObject(t),r=new EmptyConstructor,EmptyConstructor.prototype=null,r[kt]=t):r=NullProtoObject(),void 0===e?r:Pt(r,e)},Rt=wellKnownSymbol("unscopables"),It=Array.prototype;null==It[Rt]&&m.f(It,Rt,{configurable:!0,value:Lt(null)});var addToUnscopables=function(t){It[Rt][t]=!0},Tt=H.includes,_t=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:!_t},{includes:function includes(t){return Tt(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var Ct,Ut,Ft,Mt={},Gt=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Nt=sharedKey("IE_PROTO"),qt=Object.prototype,Bt=Gt?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,Nt)?t[Nt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?qt:null},Dt=wellKnownSymbol("iterator"),$t=!1;[].keys&&("next"in(Ft=[].keys())?(Ut=Bt(Bt(Ft)))!==Object.prototype&&(Ct=Ut):$t=!0),null==Ct&&(Ct={}),has(Ct,Dt)||b(Ct,Dt,(function(){return this}));var Vt={IteratorPrototype:Ct,BUGGY_SAFARI_ITERATORS:$t},Wt=m.f,Kt=wellKnownSymbol("toStringTag"),setToStringTag=function(t,e,r){t&&!has(t=r?t:t.prototype,Kt)&&Wt(t,Kt,{configurable:!0,value:e})},Yt=Vt.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(t,e,r){var n=e+" Iterator";return t.prototype=Lt(Yt,{next:createPropertyDescriptor(1,r)}),setToStringTag(t,n,!1),Mt[n]=returnThis$1,t},zt=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function setPrototypeOf(r,n){return anObject(r),function(t){if(!isObject(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Ht=Vt.IteratorPrototype,Jt=Vt.BUGGY_SAFARI_ITERATORS,Xt=wellKnownSymbol("iterator"),Qt="keys",Zt="values",te="entries",returnThis$2=function(){return this},defineIterator=function(t,e,r,n,o,i,a){createIteratorConstructor(r,e,n);var c,u,s,getIterationMethod=function(t){if(t===o&&v)return v;if(!Jt&&t in h)return h[t];switch(t){case Qt:return function keys(){return new r(this,t)};case Zt:return function values(){return new r(this,t)};case te:return function entries(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",l=!1,h=t.prototype,p=h[Xt]||h["@@iterator"]||o&&h[o],v=!Jt&&p||getIterationMethod(o),d="Array"==e&&h.entries||p;if(d&&(c=Bt(d.call(new t)),Ht!==Object.prototype&&c.next&&(Bt(c)!==Ht&&(zt?zt(c,Ht):"function"!=typeof c[Xt]&&b(c,Xt,returnThis$2)),setToStringTag(c,f,!0))),o==Zt&&p&&p.name!==Zt&&(l=!0,v=function values(){return p.call(this)}),h[Xt]!==v&&b(h,Xt,v),Mt[e]=v,o)if(u={values:getIterationMethod(Zt),keys:i?v:getIterationMethod(Qt),entries:getIterationMethod(te)},a)for(s in u)(Jt||l||!(s in h))&&D(h,s,u[s]);else _export({target:e,proto:!0,forced:Jt||l},u);return u},ee="Array Iterator",re=B.set,ne=B.getterFor(ee),oe=defineIterator(Array,"Array",(function(t,e){re(this,{type:ee,target:toIndexedObject(t),index:0,kind:e})}),(function(){var t=ne(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");Mt.Arguments=Mt.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var ie=c.f,createMethod$2=function(t){return function(e){for(var r,n=toIndexedObject(e),i=At(n),a=i.length,c=0,u=[];a>c;)r=i[c++],o&&!ie.call(n,r)||u.push(t?[r,n[r]]:n[r]);return u}},ae={entries:createMethod$2(!0),values:createMethod$2(!1)}.entries;_export({target:"Object",stat:!0},{entries:function entries(t){return ae(t)}});var ce=fails((function(){At(1)}));_export({target:"Object",stat:!0,forced:ce},{keys:function keys(t){return At(toObject(t))}});var ue={};ue[wellKnownSymbol("toStringTag")]="z";var se="[object z]"===String(ue),fe=wellKnownSymbol("toStringTag"),le="Arguments"==classofRaw(function(){return arguments}()),he=se?classofRaw:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),fe))?r:le?classofRaw(e):"Object"==(n=classofRaw(e))&&"function"==typeof e.callee?"Arguments":n},pe=se?{}.toString:function toString(){return"[object "+he(this)+"]"};se||D(Object.prototype,"toString",pe,{unsafe:!0});var regexpFlags=function(){var t=anObject(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function RE(t,e){return RegExp(t,e)}var ve,de,ge={UNSUPPORTED_Y:fails((function(){var t=RE("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:fails((function(){var t=RE("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},ye=RegExp.prototype.exec,me=String.prototype.replace,be=ye,we=(ve=/a/,de=/b*/g,ye.call(ve,"a"),ye.call(de,"a"),0!==ve.lastIndex||0!==de.lastIndex),Se=ge.UNSUPPORTED_Y||ge.BROKEN_CARET,xe=void 0!==/()??/.exec("")[1];(we||xe||Se)&&(be=function exec(t){var e,r,n,o,i=this,a=Se&&i.sticky,c=regexpFlags.call(i),u=i.source,s=0,f=t;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),f=String(t).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(u="(?: "+u+")",f=" "+f,s++),r=new RegExp("^(?:"+u+")",c)),xe&&(r=new RegExp("^"+u+"$(?!\\s)",c)),we&&(e=i.lastIndex),n=ye.call(a?r:i,f),a?n?(n.input=n.input.slice(s),n[0]=n[0].slice(s),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:we&&n&&(i.lastIndex=i.global?n.index+n[0].length:e),xe&&n&&n.length>1&&me.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var Ee=be;_export({target:"RegExp",proto:!0,forced:/./.exec!==Ee},{exec:Ee});var Oe=wellKnownSymbol("match"),isRegexp=function(t){var e;return isObject(t)&&(void 0!==(e=t[Oe])?!!e:"RegExp"==classofRaw(t))},notARegexp=function(t){if(isRegexp(t))throw TypeError("The method doesn't accept regular expressions");return t},Ae=wellKnownSymbol("match");_export({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Ae]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function includes(t){return!!~String(requireObjectCoercible(this)).indexOf(notARegexp(t),arguments.length>1?arguments[1]:void 0)}});var createMethod$3=function(t){return function(e,r){var n,o,i=String(requireObjectCoercible(e)),a=toInteger(r),c=i.length;return a<0||a>=c?t?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):n:t?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},Pe={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},je=Pe.charAt,ke="String Iterator",Le=B.set,Re=B.getterFor(ke);defineIterator(String,"String",(function(t){Le(this,{type:ke,string:String(t),index:0})}),(function next(){var t,e=Re(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=je(r,n),e.index+=t.length,{value:t,done:!1})}));var Ie=wellKnownSymbol("species"),Te=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),_e="$0"==="a".replace(/./,"$0"),Ce=wellKnownSymbol("replace"),Ue=!!/./[Ce]&&""===/./[Ce]("a","$0"),Fe=!fails((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),fixRegexpWellKnownSymbolLogic=function(t,e,r,n){var o=wellKnownSymbol(t),i=!fails((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!fails((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Ie]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||"replace"===t&&(!Te||!_e||Ue)||"split"===t&&!Fe){var c=/./[o],u=r(o,""[t],(function(t,e,r,n,o){return e.exec===Ee?i&&!o?{done:!0,value:c.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:_e,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Ue}),s=u[0],f=u[1];D(String.prototype,t,s),D(RegExp.prototype,o,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)})}n&&b(RegExp.prototype[o],"sham",!0)},Me=Pe.charAt,advanceStringIndex=function(t,e,r){return e+(r?Me(t,e).length:1)},regexpExecAbstract=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==classofRaw(t))throw TypeError("RegExp#exec called on incompatible receiver");return Ee.call(t,e)};fixRegexpWellKnownSymbolLogic("match",1,(function(t,e,r){return[function match(e){var r=requireObjectCoercible(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var o=anObject(t),i=String(this);if(!o.global)return regexpExecAbstract(o,i);var a=o.unicode;o.lastIndex=0;for(var c,u=[],s=0;null!==(c=regexpExecAbstract(o,i));){var f=String(c[0]);u[s]=f,""===f&&(o.lastIndex=advanceStringIndex(i,toLength(o.lastIndex),a)),s++}return 0===s?null:u}]}));var Ge=Math.max,Ne=Math.min,qe=Math.floor,Be=/\$([$&'`]|\d\d?|<[^>]*>)/g,De=/\$([$&'`]|\d\d?)/g;fixRegexpWellKnownSymbolLogic("replace",2,(function(t,e,r,n){var o=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=n.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function replace(r,n){var o=requireObjectCoercible(this),i=null==r?void 0:r[t];return void 0!==i?i.call(r,o,n):e.call(String(o),r,n)},function(t,n){if(!o&&i||"string"==typeof n&&-1===n.indexOf(a)){var c=r(e,t,this,n);if(c.done)return c.value}var u=anObject(t),s=String(this),f="function"==typeof n;f||(n=String(n));var l=u.global;if(l){var h=u.unicode;u.lastIndex=0}for(var p=[];;){var v=regexpExecAbstract(u,s);if(null===v)break;if(p.push(v),!l)break;""===String(v[0])&&(u.lastIndex=advanceStringIndex(s,toLength(u.lastIndex),h))}for(var d,g="",y=0,m=0;m<p.length;m++){v=p[m];for(var b=String(v[0]),w=Ge(Ne(toInteger(v.index),s.length),0),S=[],x=1;x<v.length;x++)S.push(void 0===(d=v[x])?d:String(d));var E=v.groups;if(f){var O=[b].concat(S,w,s);void 0!==E&&O.push(E);var A=String(n.apply(void 0,O))}else A=getSubstitution(b,s,w,S,E,n);w>=y&&(g+=s.slice(y,w)+A,y=w+b.length)}return g+s.slice(y)}];function getSubstitution(t,r,n,o,i,a){var c=n+t.length,u=o.length,s=De;return void 0!==i&&(i=toObject(i),s=Be),e.call(a,s,(function(e,a){var s;switch(a.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(c);case"<":s=i[a.slice(1,-1)];break;default:var f=+a;if(0===f)return e;if(f>u){var l=qe(f/10);return 0===l?e:l<=u?void 0===o[l-1]?a.charAt(1):o[l-1]+a.charAt(1):e}s=o[f-1]}return void 0===s?"":s}))}}));var $e={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var Ve in $e){var We=n[Ve],Ke=We&&We.prototype;if(Ke&&Ke.forEach!==Et)try{b(Ke,"forEach",Et)}catch(t){Ke.forEach=Et}}var Ye=wellKnownSymbol("iterator"),ze=wellKnownSymbol("toStringTag"),He=oe.values;for(var Je in $e){var Xe=n[Je],Qe=Xe&&Xe.prototype;if(Qe){if(Qe[Ye]!==He)try{b(Qe,Ye,He)}catch(t){Qe[Ye]=He}if(Qe[ze]||b(Qe,ze,Je),$e[Je])for(var Ze in oe)if(Qe[Ze]!==oe[Ze])try{b(Qe,Ze,oe[Ze])}catch(t){Qe[Ze]=oe[Ze]}}}var tr=wellKnownSymbol("iterator"),er=!fails((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[tr]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),anInstance=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},rr=Object.assign,nr=Object.defineProperty,or=!rr||fails((function(){if(o&&1!==rr({b:1},rr(nr({},"a",{enumerable:!0,get:function(){nr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=rr({},t)[r]||At(rr({},e)).join("")!=n}))?function assign(t,e){for(var r=toObject(t),n=arguments.length,i=1,a=tt.f,u=c.f;n>i;)for(var s,l=f(arguments[i++]),h=a?At(l).concat(a(l)):At(l),p=h.length,v=0;p>v;)s=h[v++],o&&!u.call(l,s)||(r[s]=l[s]);return r}:rr,callWithSafeIterationClosing=function(t,e,r,n){try{return n?e(anObject(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&anObject(o.call(t)),e}},ir=wellKnownSymbol("iterator"),ar=Array.prototype,isArrayIteratorMethod=function(t){return void 0!==t&&(Mt.Array===t||ar[ir]===t)},createProperty=function(t,e,r){var n=toPrimitive(e);n in t?m.f(t,n,createPropertyDescriptor(0,r)):t[n]=r},cr=wellKnownSymbol("iterator"),getIteratorMethod=function(t){if(null!=t)return t[cr]||t["@@iterator"]||Mt[he(t)]},ur=function from(t){var e,r,n,o,i,a,c=toObject(t),u="function"==typeof this?this:Array,s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,h=getIteratorMethod(c),p=0;if(l&&(f=functionBindContext(f,s>2?arguments[2]:void 0,2)),null==h||u==Array&&isArrayIteratorMethod(h))for(r=new u(e=toLength(c.length));e>p;p++)a=l?f(c[p],p):c[p],createProperty(r,p,a);else for(i=(o=h.call(c)).next,r=new u;!(n=i.call(o)).done;p++)a=l?callWithSafeIterationClosing(o,f,[n.value,p],!0):n.value,createProperty(r,p,a);return r.length=p,r},sr=2147483647,fr=/[^\0-\u007E]/,lr=/[.\u3002\uFF0E\uFF61]/g,hr="Overflow: input needs wider integers to process",pr=Math.floor,vr=String.fromCharCode,digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,e,r){var n=0;for(t=r?pr(t/700):t>>1,t+=pr(t/e);t>455;n+=36)t=pr(t/35);return pr(n+36*t/(t+38))},encode=function(t){var e,r,n=[],o=(t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=t.charCodeAt(r++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),r--)}else e.push(o)}return e}(t)).length,i=128,a=0,c=72;for(e=0;e<t.length;e++)(r=t[e])<128&&n.push(vr(r));var u=n.length,s=u;for(u&&n.push("-");s<o;){var f=sr;for(e=0;e<t.length;e++)(r=t[e])>=i&&r<f&&(f=r);var l=s+1;if(f-i>pr((sr-a)/l))throw RangeError(hr);for(a+=(f-i)*l,i=f,e=0;e<t.length;e++){if((r=t[e])<i&&++a>sr)throw RangeError(hr);if(r==i){for(var h=a,p=36;;p+=36){var v=p<=c?1:p>=c+26?26:p-c;if(h<v)break;var d=h-v,g=36-v;n.push(vr(digitToBasic(v+d%g))),h=pr(d/g)}n.push(vr(digitToBasic(h))),c=adapt(a,l,s==u),a=0,++s}}++a,++i}return n.join("")},redefineAll=function(t,e,r){for(var n in e)D(t,n,e[n],r);return t},getIterator=function(t){var e=getIteratorMethod(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return anObject(e.call(t))},dr=getBuiltIn("fetch"),gr=getBuiltIn("Headers"),yr=wellKnownSymbol("iterator"),mr="URLSearchParams",br="URLSearchParamsIterator",wr=B.set,Sr=B.getterFor(mr),xr=B.getterFor(br),Er=/\+/g,Or=Array(4),percentSequence=function(t){return Or[t-1]||(Or[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},percentDecode=function(t){try{return decodeURIComponent(t)}catch(e){return t}},deserialize=function(t){var e=t.replace(Er," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(percentSequence(r--),percentDecode);return e}},Ar=/[!'()~]|%20/g,Pr={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return Pr[t]},serialize=function(t){return encodeURIComponent(t).replace(Ar,replacer)},parseSearchParams=function(t,e){if(e)for(var r,n,o=e.split("&"),i=0;i<o.length;)(r=o[i++]).length&&(n=r.split("="),t.push({key:deserialize(n.shift()),value:deserialize(n.join("="))}))},updateSearchParams=function(t){this.entries.length=0,parseSearchParams(this.entries,t)},validateArgumentsLength=function(t,e){if(t<e)throw TypeError("Not enough arguments")},jr=createIteratorConstructor((function Iterator(t,e){wr(this,{type:br,iterator:getIterator(Sr(t).entries),kind:e})}),"Iterator",(function next(){var t=xr(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r})),kr=function URLSearchParams(){anInstance(this,kr,mr);var t,e,r,n,o,i,a,c,u,s=arguments.length>0?arguments[0]:void 0,f=this,l=[];if(wr(f,{type:mr,entries:l,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==s)if(isObject(s))if("function"==typeof(t=getIteratorMethod(s)))for(r=(e=t.call(s)).next;!(n=r.call(e)).done;){if((a=(i=(o=getIterator(anObject(n.value))).next).call(o)).done||(c=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");l.push({key:a.value+"",value:c.value+""})}else for(u in s)has(s,u)&&l.push({key:u,value:s[u]+""});else parseSearchParams(l,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:s+"")},Lr=kr.prototype;redefineAll(Lr,{append:function append(t,e){validateArgumentsLength(arguments.length,2);var r=Sr(this);r.entries.push({key:t+"",value:e+""}),r.updateURL()},delete:function(t){validateArgumentsLength(arguments.length,1);for(var e=Sr(this),r=e.entries,n=t+"",o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;e.updateURL()},get:function get(t){validateArgumentsLength(arguments.length,1);for(var e=Sr(this).entries,r=t+"",n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function getAll(t){validateArgumentsLength(arguments.length,1);for(var e=Sr(this).entries,r=t+"",n=[],o=0;o<e.length;o++)e[o].key===r&&n.push(e[o].value);return n},has:function has(t){validateArgumentsLength(arguments.length,1);for(var e=Sr(this).entries,r=t+"",n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function set(t,e){validateArgumentsLength(arguments.length,1);for(var r,n=Sr(this),o=n.entries,i=!1,a=t+"",c=e+"",u=0;u<o.length;u++)(r=o[u]).key===a&&(i?o.splice(u--,1):(i=!0,r.value=c));i||o.push({key:a,value:c}),n.updateURL()},sort:function sort(){var t,e,r,n=Sr(this),o=n.entries,i=o.slice();for(o.length=0,r=0;r<i.length;r++){for(t=i[r],e=0;e<r;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===r&&o.push(t)}n.updateURL()},forEach:function forEach(t){for(var e,r=Sr(this).entries,n=functionBindContext(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function keys(){return new jr(this,"keys")},values:function values(){return new jr(this,"values")},entries:function entries(){return new jr(this,"entries")}},{enumerable:!0}),D(Lr,yr,Lr.entries),D(Lr,"toString",(function toString(){for(var t,e=Sr(this).entries,r=[],n=0;n<e.length;)t=e[n++],r.push(serialize(t.key)+"="+serialize(t.value));return r.join("&")}),{enumerable:!0}),setToStringTag(kr,mr),_export({global:!0,forced:!er},{URLSearchParams:kr}),er||"function"!=typeof dr||"function"!=typeof gr||_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){var e,r,n,o=[t];return arguments.length>1&&(isObject(e=arguments[1])&&(r=e.body,he(r)===mr&&((n=e.headers?new gr(e.headers):new gr).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=Lt(e,{body:createPropertyDescriptor(0,String(r)),headers:createPropertyDescriptor(0,n)}))),o.push(e)),dr.apply(this,o)}});var Rr,Ir={URLSearchParams:kr,getState:Sr},Tr=Pe.codeAt,_r=n.URL,Cr=Ir.URLSearchParams,Ur=Ir.getState,Fr=B.set,Mr=B.getterFor("URL"),Gr=Math.floor,Nr=Math.pow,qr="Invalid scheme",Br="Invalid host",Dr="Invalid port",$r=/[A-Za-z]/,Vr=/[\d+-.A-Za-z]/,Wr=/\d/,Kr=/^(0x|0X)/,Yr=/^[0-7]+$/,zr=/^\d+$/,Hr=/^[\dA-Fa-f]+$/,Jr=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,Xr=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,Qr=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,Zr=/[\u0009\u000A\u000D]/g,parseHost=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return Br;if(!(r=parseIPv6(e.slice(1,-1))))return Br;t.host=r}else if(isSpecial(t)){if(e=function(t){var e,r,n=[],o=t.toLowerCase().replace(lr,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(fr.test(r)?"xn--"+encode(r):r);return n.join(".")}(e),Jr.test(e))return Br;if(null===(r=parseIPv4(e)))return Br;t.host=r}else{if(Xr.test(e))return Br;for(r="",n=ur(e),o=0;o<n.length;o++)r+=percentEncode(n[o],tn);t.host=r}},parseIPv4=function(t){var e,r,n,o,i,a,c,u=t.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(e=u.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=u[n]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=Kr.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?zr:8==i?Yr:Hr).test(o))return t;a=parseInt(o,i)}r.push(a)}for(n=0;n<e;n++)if(a=r[n],n==e-1){if(a>=Nr(256,5-e))return null}else if(a>255)return null;for(c=r.pop(),n=0;n<r.length;n++)c+=r[n]*Nr(256,3-n);return c},parseIPv6=function(t){var e,r,n,o,i,a,c,u=[0,0,0,0,0,0,0,0],s=0,f=null,l=0,char=function(){return t.charAt(l)};if(":"==char()){if(":"!=t.charAt(1))return;l+=2,f=++s}for(;char();){if(8==s)return;if(":"!=char()){for(e=r=0;r<4&&Hr.test(char());)e=16*e+parseInt(char(),16),l++,r++;if("."==char()){if(0==r)return;if(l-=r,s>6)return;for(n=0;char();){if(o=null,n>0){if(!("."==char()&&n<4))return;l++}if(!Wr.test(char()))return;for(;Wr.test(char());){if(i=parseInt(char(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}u[s]=256*u[s]+o,2!=++n&&4!=n||s++}if(4!=n)return;break}if(":"==char()){if(l++,!char())return}else if(char())return;u[s++]=e}else{if(null!==f)return;l++,f=++s}}if(null!==f)for(a=s-f,s=7;0!=s&&a>0;)c=u[s],u[s--]=u[f+a-1],u[f+--a]=c;else if(8!=s)return;return u},serializeHost=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=Gr(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=t[r].toString(16),r<7&&(e+=":")));return"["+e+"]"}return t},tn={},en=or({},tn,{" ":1,'"':1,"<":1,">":1,"`":1}),rn=or({},en,{"#":1,"?":1,"{":1,"}":1}),nn=or({},rn,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,e){var r=Tr(t,0);return r>32&&r<127&&!has(e,t)?t:encodeURIComponent(t)},on={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(t){return has(on,t.scheme)},includesCredentials=function(t){return""!=t.username||""!=t.password},cannotHaveUsernamePasswordPort=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},isWindowsDriveLetter=function(t,e){var r;return 2==t.length&&$r.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},startsWithWindowsDriveLetter=function(t){var e;return t.length>1&&isWindowsDriveLetter(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},shortenURLsPath=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&isWindowsDriveLetter(e[0],!0)||e.pop()},isSingleDot=function(t){return"."===t||"%2e"===t.toLowerCase()},an={},cn={},un={},sn={},fn={},ln={},hn={},pn={},vn={},dn={},gn={},yn={},mn={},bn={},wn={},Sn={},xn={},En={},On={},An={},Pn={},parseURL=function(t,e,r,n){var o,i,a,c,u,s=r||an,f=0,l="",h=!1,p=!1,v=!1;for(r||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(Qr,"")),e=e.replace(Zr,""),o=ur(e);f<=o.length;){switch(i=o[f],s){case an:if(!i||!$r.test(i)){if(r)return qr;s=un;continue}l+=i.toLowerCase(),s=cn;break;case cn:if(i&&(Vr.test(i)||"+"==i||"-"==i||"."==i))l+=i.toLowerCase();else{if(":"!=i){if(r)return qr;l="",s=un,f=0;continue}if(r&&(isSpecial(t)!=has(on,l)||"file"==l&&(includesCredentials(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=l,r)return void(isSpecial(t)&&on[t.scheme]==t.port&&(t.port=null));l="","file"==t.scheme?s=bn:isSpecial(t)&&n&&n.scheme==t.scheme?s=sn:isSpecial(t)?s=pn:"/"==o[f+1]?(s=fn,f++):(t.cannotBeABaseURL=!0,t.path.push(""),s=On)}break;case un:if(!n||n.cannotBeABaseURL&&"#"!=i)return qr;if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,s=Pn;break}s="file"==n.scheme?bn:ln;continue;case sn:if("/"!=i||"/"!=o[f+1]){s=ln;continue}s=vn,f++;break;case fn:if("/"==i){s=dn;break}s=En;continue;case ln:if(t.scheme=n.scheme,i==Rr)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query;else if("/"==i||"\\"==i&&isSpecial(t))s=hn;else if("?"==i)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query="",s=An;else{if("#"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.path.pop(),s=En;continue}t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=Pn}break;case hn:if(!isSpecial(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,s=En;continue}s=dn}else s=vn;break;case pn:if(s=vn,"/"!=i||"/"!=l.charAt(f+1))continue;f++;break;case vn:if("/"!=i&&"\\"!=i){s=dn;continue}break;case dn:if("@"==i){h&&(l="%40"+l),h=!0,a=ur(l);for(var d=0;d<a.length;d++){var g=a[d];if(":"!=g||v){var y=percentEncode(g,nn);v?t.password+=y:t.username+=y}else v=!0}l=""}else if(i==Rr||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(h&&""==l)return"Invalid authority";f-=ur(l).length+1,l="",s=gn}else l+=i;break;case gn:case yn:if(r&&"file"==t.scheme){s=Sn;continue}if(":"!=i||p){if(i==Rr||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(isSpecial(t)&&""==l)return Br;if(r&&""==l&&(includesCredentials(t)||null!==t.port))return;if(c=parseHost(t,l))return c;if(l="",s=xn,r)return;continue}"["==i?p=!0:"]"==i&&(p=!1),l+=i}else{if(""==l)return Br;if(c=parseHost(t,l))return c;if(l="",s=mn,r==yn)return}break;case mn:if(!Wr.test(i)){if(i==Rr||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)||r){if(""!=l){var m=parseInt(l,10);if(m>65535)return Dr;t.port=isSpecial(t)&&m===on[t.scheme]?null:m,l=""}if(r)return;s=xn;continue}return Dr}l+=i;break;case bn:if(t.scheme="file","/"==i||"\\"==i)s=wn;else{if(!n||"file"!=n.scheme){s=En;continue}if(i==Rr)t.host=n.host,t.path=n.path.slice(),t.query=n.query;else if("?"==i)t.host=n.host,t.path=n.path.slice(),t.query="",s=An;else{if("#"!=i){startsWithWindowsDriveLetter(o.slice(f).join(""))||(t.host=n.host,t.path=n.path.slice(),shortenURLsPath(t)),s=En;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=Pn}}break;case wn:if("/"==i||"\\"==i){s=Sn;break}n&&"file"==n.scheme&&!startsWithWindowsDriveLetter(o.slice(f).join(""))&&(isWindowsDriveLetter(n.path[0],!0)?t.path.push(n.path[0]):t.host=n.host),s=En;continue;case Sn:if(i==Rr||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&isWindowsDriveLetter(l))s=En;else if(""==l){if(t.host="",r)return;s=xn}else{if(c=parseHost(t,l))return c;if("localhost"==t.host&&(t.host=""),r)return;l="",s=xn}continue}l+=i;break;case xn:if(isSpecial(t)){if(s=En,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=Rr&&(s=En,"/"!=i))continue}else t.fragment="",s=Pn;else t.query="",s=An;break;case En:if(i==Rr||"/"==i||"\\"==i&&isSpecial(t)||!r&&("?"==i||"#"==i)){if(".."===(u=(u=l).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(shortenURLsPath(t),"/"==i||"\\"==i&&isSpecial(t)||t.path.push("")):isSingleDot(l)?"/"==i||"\\"==i&&isSpecial(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&isWindowsDriveLetter(l)&&(t.host&&(t.host=""),l=l.charAt(0)+":"),t.path.push(l)),l="","file"==t.scheme&&(i==Rr||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",s=An):"#"==i&&(t.fragment="",s=Pn)}else l+=percentEncode(i,rn);break;case On:"?"==i?(t.query="",s=An):"#"==i?(t.fragment="",s=Pn):i!=Rr&&(t.path[0]+=percentEncode(i,tn));break;case An:r||"#"!=i?i!=Rr&&("'"==i&&isSpecial(t)?t.query+="%27":t.query+="#"==i?"%23":percentEncode(i,tn)):(t.fragment="",s=Pn);break;case Pn:i!=Rr&&(t.fragment+=percentEncode(i,en))}f++}},jn=function URL(t){var e,r,n=anInstance(this,jn,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(t),c=Fr(n,{type:"URL"});if(void 0!==i)if(i instanceof jn)e=Mr(i);else if(r=parseURL(e={},String(i)))throw TypeError(r);if(r=parseURL(c,a,null,e))throw TypeError(r);var u=c.searchParams=new Cr,s=Ur(u);s.updateSearchParams(c.query),s.updateURL=function(){c.query=String(u)||null},o||(n.href=serializeURL.call(n),n.origin=getOrigin.call(n),n.protocol=getProtocol.call(n),n.username=getUsername.call(n),n.password=getPassword.call(n),n.host=getHost.call(n),n.hostname=getHostname.call(n),n.port=getPort.call(n),n.pathname=getPathname.call(n),n.search=getSearch.call(n),n.searchParams=getSearchParams.call(n),n.hash=getHash.call(n))},kn=jn.prototype,serializeURL=function(){var t=Mr(this),e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,c=t.query,u=t.fragment,s=e+":";return null!==o?(s+="//",includesCredentials(t)&&(s+=r+(n?":"+n:"")+"@"),s+=serializeHost(o),null!==i&&(s+=":"+i)):"file"==e&&(s+="//"),s+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==c&&(s+="?"+c),null!==u&&(s+="#"+u),s},getOrigin=function(){var t=Mr(this),e=t.scheme,r=t.port;if("blob"==e)try{return new URL(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&isSpecial(t)?e+"://"+serializeHost(t.host)+(null!==r?":"+r:""):"null"},getProtocol=function(){return Mr(this).scheme+":"},getUsername=function(){return Mr(this).username},getPassword=function(){return Mr(this).password},getHost=function(){var t=Mr(this),e=t.host,r=t.port;return null===e?"":null===r?serializeHost(e):serializeHost(e)+":"+r},getHostname=function(){var t=Mr(this).host;return null===t?"":serializeHost(t)},getPort=function(){var t=Mr(this).port;return null===t?"":String(t)},getPathname=function(){var t=Mr(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},getSearch=function(){var t=Mr(this).query;return t?"?"+t:""},getSearchParams=function(){return Mr(this).searchParams},getHash=function(){var t=Mr(this).fragment;return t?"#"+t:""},accessorDescriptor=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&Pt(kn,{href:accessorDescriptor(serializeURL,(function(t){var e=Mr(this),r=String(t),n=parseURL(e,r);if(n)throw TypeError(n);Ur(e.searchParams).updateSearchParams(e.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(t){var e=Mr(this);parseURL(e,String(t)+":",an)})),username:accessorDescriptor(getUsername,(function(t){var e=Mr(this),r=ur(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=percentEncode(r[n],nn)}})),password:accessorDescriptor(getPassword,(function(t){var e=Mr(this),r=ur(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=percentEncode(r[n],nn)}})),host:accessorDescriptor(getHost,(function(t){var e=Mr(this);e.cannotBeABaseURL||parseURL(e,String(t),gn)})),hostname:accessorDescriptor(getHostname,(function(t){var e=Mr(this);e.cannotBeABaseURL||parseURL(e,String(t),yn)})),port:accessorDescriptor(getPort,(function(t){var e=Mr(this);cannotHaveUsernamePasswordPort(e)||(""==(t=String(t))?e.port=null:parseURL(e,t,mn))})),pathname:accessorDescriptor(getPathname,(function(t){var e=Mr(this);e.cannotBeABaseURL||(e.path=[],parseURL(e,t+"",xn))})),search:accessorDescriptor(getSearch,(function(t){var e=Mr(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",parseURL(e,t,An)),Ur(e.searchParams).updateSearchParams(e.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(t){var e=Mr(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",parseURL(e,t,Pn)):e.fragment=null}))}),D(kn,"toJSON",(function toJSON(){return serializeURL.call(this)}),{enumerable:!0}),D(kn,"toString",(function toString(){return serializeURL.call(this)}),{enumerable:!0}),_r){var Ln=_r.createObjectURL,Rn=_r.revokeObjectURL;Ln&&D(jn,"createObjectURL",(function createObjectURL(t){return Ln.apply(_r,arguments)})),Rn&&D(jn,"revokeObjectURL",(function revokeObjectURL(t){return Rn.apply(_r,arguments)}))}setToStringTag(jn,"URL"),_export({global:!0,forced:!er,sham:!o},{URL:jn});var In=Z.f,Tn={}.toString,_n="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Cn={f:function getOwnPropertyNames(t){return _n&&"[object Window]"==Tn.call(t)?function(t){try{return In(t)}catch(t){return _n.slice()}}(t):In(toIndexedObject(t))}},Un={f:wellKnownSymbol},Fn=m.f,defineWellKnownSymbol=function(t){var e=$.Symbol||($.Symbol={});has(e,t)||Fn(e,t,{value:Un.f(t)})},Mn=yt.forEach,Gn=sharedKey("hidden"),Nn="Symbol",qn=wellKnownSymbol("toPrimitive"),Bn=B.set,Dn=B.getterFor(Nn),$n=Object.prototype,Vn=n.Symbol,Wn=getBuiltIn("JSON","stringify"),Kn=g.f,Yn=m.f,zn=Cn.f,Hn=c.f,Jn=L("symbols"),Xn=L("op-symbols"),Qn=L("string-to-symbol-registry"),Zn=L("symbol-to-string-registry"),to=L("wks"),eo=n.QObject,ro=!eo||!eo.prototype||!eo.prototype.findChild,no=o&&fails((function(){return 7!=Lt(Yn({},"a",{get:function(){return Yn(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Kn($n,e);n&&delete $n[e],Yn(t,e,r),n&&t!==$n&&Yn($n,e,n)}:Yn,wrap=function(t,e){var r=Jn[t]=Lt(Vn.prototype);return Bn(r,{type:Nn,tag:t,description:e}),o||(r.description=e),r},oo=lt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Vn},io=function defineProperty(t,e,r){t===$n&&io(Xn,e,r),anObject(t);var n=toPrimitive(e,!0);return anObject(r),has(Jn,n)?(r.enumerable?(has(t,Gn)&&t[Gn][n]&&(t[Gn][n]=!1),r=Lt(r,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,Gn)||Yn(t,Gn,createPropertyDescriptor(1,{})),t[Gn][n]=!0),no(t,n,r)):Yn(t,n,r)},ao=function defineProperties(t,e){anObject(t);var r=toIndexedObject(e),n=At(r).concat(fo(r));return Mn(n,(function(e){o&&!co.call(r,e)||io(t,e,r[e])})),t},co=function propertyIsEnumerable(t){var e=toPrimitive(t,!0),r=Hn.call(this,e);return!(this===$n&&has(Jn,e)&&!has(Xn,e))&&(!(r||!has(this,e)||!has(Jn,e)||has(this,Gn)&&this[Gn][e])||r)},uo=function getOwnPropertyDescriptor(t,e){var r=toIndexedObject(t),n=toPrimitive(e,!0);if(r!==$n||!has(Jn,n)||has(Xn,n)){var o=Kn(r,n);return!o||!has(Jn,n)||has(r,Gn)&&r[Gn][n]||(o.enumerable=!0),o}},so=function getOwnPropertyNames(t){var e=zn(toIndexedObject(t)),r=[];return Mn(e,(function(t){has(Jn,t)||has(_,t)||r.push(t)})),r},fo=function getOwnPropertySymbols(t){var e=t===$n,r=zn(e?Xn:toIndexedObject(t)),n=[];return Mn(r,(function(t){!has(Jn,t)||e&&!has($n,t)||n.push(Jn[t])})),n};if(ft||(D((Vn=function Symbol(){if(this instanceof Vn)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=uid(t),setter=function(t){this===$n&&setter.call(Xn,t),has(this,Gn)&&has(this[Gn],e)&&(this[Gn][e]=!1),no(this,e,createPropertyDescriptor(1,t))};return o&&ro&&no($n,e,{configurable:!0,set:setter}),wrap(e,t)}).prototype,"toString",(function toString(){return Dn(this).tag})),D(Vn,"withoutSetter",(function(t){return wrap(uid(t),t)})),c.f=co,m.f=io,g.f=uo,Z.f=Cn.f=so,tt.f=fo,Un.f=function(t){return wrap(wellKnownSymbol(t),t)},o&&(Yn(Vn.prototype,"description",{configurable:!0,get:function description(){return Dn(this).description}}),D($n,"propertyIsEnumerable",co,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!ft,sham:!ft},{Symbol:Vn}),Mn(At(to),(function(t){defineWellKnownSymbol(t)})),_export({target:Nn,stat:!0,forced:!ft},{for:function(t){var e=String(t);if(has(Qn,e))return Qn[e];var r=Vn(e);return Qn[e]=r,Zn[r]=e,r},keyFor:function keyFor(t){if(!oo(t))throw TypeError(t+" is not a symbol");if(has(Zn,t))return Zn[t]},useSetter:function(){ro=!0},useSimple:function(){ro=!1}}),_export({target:"Object",stat:!0,forced:!ft,sham:!o},{create:function create(t,e){return void 0===e?Lt(t):ao(Lt(t),e)},defineProperty:io,defineProperties:ao,getOwnPropertyDescriptor:uo}),_export({target:"Object",stat:!0,forced:!ft},{getOwnPropertyNames:so,getOwnPropertySymbols:fo}),_export({target:"Object",stat:!0,forced:fails((function(){tt.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return tt.f(toObject(t))}}),Wn){var lo=!ft||fails((function(){var t=Vn();return"[null]"!=Wn([t])||"{}"!=Wn({a:t})||"{}"!=Wn(Object(t))}));_export({target:"JSON",stat:!0,forced:lo},{stringify:function stringify(t,e,r){for(var n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e,(isObject(e)||void 0!==t)&&!oo(t))return st(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!oo(e))return e}),o[1]=e,Wn.apply(null,o)}})}Vn.prototype[qn]||b(Vn.prototype,qn,Vn.prototype.valueOf),setToStringTag(Vn,Nn),_[Gn]=!0;var ho=m.f,po=n.Symbol;if(o&&"function"==typeof po&&(!("description"in po.prototype)||void 0!==po().description)){var vo={},go=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof go?new po(t):void 0===t?po():po(t);return""===t&&(vo[e]=!0),e};copyConstructorProperties(go,po);var yo=go.prototype=po.prototype;yo.constructor=go;var mo=yo.toString,bo="Symbol(test)"==String(po("test")),wo=/^Symbol\((.*)\)[^)]+$/;ho(yo,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,e=mo.call(t);if(has(vo,t))return"";var r=bo?e.slice(7,-1):e.replace(wo,"$1");return""===r?void 0:r}}),_export({global:!0,forced:!0},{Symbol:go})}defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("iterator"),defineWellKnownSymbol("toStringTag");var So=[].reverse,xo=[1,2];_export({target:"Array",proto:!0,forced:String(xo)===String(xo.reverse())},{reverse:function reverse(){return st(this)&&(this.length=this.length),So.call(this)}});var Eo,Oo,Ao=getBuiltIn("navigator","userAgent")||"",Po=n.process,jo=Po&&Po.versions,ko=jo&&jo.v8;ko?Oo=(Eo=ko.split("."))[0]+Eo[1]:Ao&&(!(Eo=Ao.match(/Edge\/(\d+)/))||Eo[1]>=74)&&(Eo=Ao.match(/Chrome\/(\d+)/))&&(Oo=Eo[1]);var Lo=Oo&&+Oo,Ro=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(t){return Lo>=51||!fails((function(){var e=[];return(e.constructor={})[Ro]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Io=arrayMethodHasSpeciesSupport("slice"),To=arrayMethodUsesToLength("slice",{ACCESSORS:!0,0:0,1:2}),_o=wellKnownSymbol("species"),Co=[].slice,Uo=Math.max;_export({target:"Array",proto:!0,forced:!Io||!To},{slice:function slice(t,e){var r,n,o,i=toIndexedObject(this),a=toLength(i.length),c=toAbsoluteIndex(t,a),u=toAbsoluteIndex(void 0===e?a:e,a);if(st(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!st(r.prototype)?isObject(r)&&null===(r=r[_o])&&(r=void 0):r=void 0,r===Array||void 0===r))return Co.call(i,c,u);for(n=new(void 0===r?Array:r)(Uo(u-c,0)),o=0;c<u;c++,o++)c in i&&createProperty(n,o,i[c]);return n.length=o,n}});var Fo=Date.prototype,Mo="Invalid Date",Go="toString",No=Fo.toString,qo=Fo.getTime;new Date(NaN)+""!=Mo&&D(Fo,Go,(function toString(){var t=qo.call(this);return t==t?No.call(this):Mo}));var Bo=m.f,Do=Function.prototype,$o=Do.toString,Vo=/^\s*function ([^ (]*)/,Wo="name";o&&!(Wo in Do)&&Bo(Do,Wo,{configurable:!0,get:function(){try{return $o.call(this).match(Vo)[1]}catch(t){return""}}}),setToStringTag(n.JSON,"JSON",!0),setToStringTag(Math,"Math",!0),_export({target:"Object",stat:!0,sham:!o},{create:Lt}),_export({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:m.f});var Ko=fails((function(){Bt(1)}));_export({target:"Object",stat:!0,forced:Ko,sham:!Gt},{getPrototypeOf:function getPrototypeOf(t){return Bt(toObject(t))}}),_export({target:"Object",stat:!0},{setPrototypeOf:zt});var Yo=n.Promise,zo=wellKnownSymbol("species"),Ho=createCommonjsModule((function(t){var Result=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,r,n,o){var i,a,c,u,s,f,l,h=functionBindContext(e,r,n?2:1);if(o)i=t;else{if("function"!=typeof(a=getIteratorMethod(t)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(a)){for(c=0,u=toLength(t.length);u>c;c++)if((s=n?h(anObject(l=t[c])[0],l[1]):h(t[c]))&&s instanceof Result)return s;return new Result(!1)}i=a.call(t)}for(f=i.next;!(l=f.call(i)).done;)if("object"==typeof(s=callWithSafeIterationClosing(i,h,l.value,n))&&s&&s instanceof Result)return s;return new Result(!1)}).stop=function(t){return new Result(!0,t)}})),Jo=wellKnownSymbol("iterator"),Xo=!1;try{var Qo=0,Zo={next:function(){return{done:!!Qo++}},return:function(){Xo=!0}};Zo[Jo]=function(){return this},Array.from(Zo,(function(){throw 2}))}catch(t){}var ti,ei,ri,ni=wellKnownSymbol("species"),speciesConstructor=function(t,e){var r,n=anObject(t).constructor;return void 0===n||null==(r=anObject(n)[ni])?e:aFunction$1(r)},oi=/(iphone|ipod|ipad).*applewebkit/i.test(Ao),ii=n.location,ai=n.setImmediate,ci=n.clearImmediate,ui=n.process,si=n.MessageChannel,fi=n.Dispatch,li=0,hi={},pi="onreadystatechange",run=function(t){if(hi.hasOwnProperty(t)){var e=hi[t];delete hi[t],e()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){n.postMessage(t+"",ii.protocol+"//"+ii.host)};ai&&ci||(ai=function setImmediate(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return hi[++li]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},ti(li),li},ci=function clearImmediate(t){delete hi[t]},"process"==classofRaw(ui)?ti=function(t){ui.nextTick(runner(t))}:fi&&fi.now?ti=function(t){fi.now(runner(t))}:si&&!oi?(ri=(ei=new si).port2,ei.port1.onmessage=listener,ti=functionBindContext(ri.postMessage,ri,1)):!n.addEventListener||"function"!=typeof postMessage||n.importScripts||fails(post)||"file:"===ii.protocol?ti=pi in documentCreateElement("script")?function(t){jt.appendChild(documentCreateElement("script")).onreadystatechange=function(){jt.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)}:(ti=post,n.addEventListener("message",listener,!1)));var vi,di,gi,yi,mi,bi,wi,Si,xi={set:ai,clear:ci},Ei=g.f,Oi=xi.set,Ai=n.MutationObserver||n.WebKitMutationObserver,Pi=n.process,ji=n.Promise,ki="process"==classofRaw(Pi),Li=Ei(n,"queueMicrotask"),Ri=Li&&Li.value;Ri||(vi=function(){var t,e;for(ki&&(t=Pi.domain)&&t.exit();di;){e=di.fn,di=di.next;try{e()}catch(t){throw di?yi():gi=void 0,t}}gi=void 0,t&&t.enter()},ki?yi=function(){Pi.nextTick(vi)}:Ai&&!oi?(mi=!0,bi=document.createTextNode(""),new Ai(vi).observe(bi,{characterData:!0}),yi=function(){bi.data=mi=!mi}):ji&&ji.resolve?(wi=ji.resolve(void 0),Si=wi.then,yi=function(){Si.call(wi,vi)}):yi=function(){Oi.call(n,vi)});var Ii,Ti,_i,Ci,Ui=Ri||function(t){var e={fn:t,next:void 0};gi&&(gi.next=e),di||(di=e,yi()),gi=e},PromiseCapability=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=aFunction$1(e),this.reject=aFunction$1(r)},Fi={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,e){if(anObject(t),isObject(e)&&e.constructor===t)return e;var r=Fi.f(t);return(0,r.resolve)(e),r.promise},perform=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Mi=xi.set,Gi=wellKnownSymbol("species"),Ni="Promise",qi=B.get,Bi=B.set,Di=B.getterFor(Ni),$i=Yo,Vi=n.TypeError,Wi=n.document,Ki=n.process,Yi=getBuiltIn("fetch"),zi=Fi.f,Hi=zi,Ji="process"==classofRaw(Ki),Xi=!!(Wi&&Wi.createEvent&&n.dispatchEvent),Qi="unhandledrejection",Zi=ct(Ni,(function(){if(!(P($i)!==String($i))){if(66===Lo)return!0;if(!Ji&&"function"!=typeof PromiseRejectionEvent)return!0}if(Lo>=51&&/native code/.test($i))return!1;var t=$i.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[Gi]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),ta=Zi||!function(t,e){if(!e&&!Xo)return!1;var r=!1;try{var n={};n[Jo]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){$i.all(t).catch((function(){}))})),isThenable=function(t){var e;return!(!isObject(t)||"function"!=typeof(e=t.then))&&e},notify$1=function(t,e,r){if(!e.notified){e.notified=!0;var n=e.reactions;Ui((function(){for(var o=e.value,i=1==e.state,a=0;n.length>a;){var c,u,s,f=n[a++],l=i?f.ok:f.fail,h=f.resolve,p=f.reject,v=f.domain;try{l?(i||(2===e.rejection&&onHandleUnhandled(t,e),e.rejection=1),!0===l?c=o:(v&&v.enter(),c=l(o),v&&(v.exit(),s=!0)),c===f.promise?p(Vi("Promise-chain cycle")):(u=isThenable(c))?u.call(c,h,p):h(c)):p(o)}catch(t){v&&!s&&v.exit(),p(t)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&onUnhandled(t,e)}))}},dispatchEvent=function(t,e,r){var o,i;Xi?((o=Wi.createEvent("Event")).promise=e,o.reason=r,o.initEvent(t,!1,!0),n.dispatchEvent(o)):o={promise:e,reason:r},(i=n["on"+t])?i(o):t===Qi&&function(t,e){var r=n.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))}("Unhandled promise rejection",r)},onUnhandled=function(t,e){Mi.call(n,(function(){var r,n=e.value;if(isUnhandled(e)&&(r=perform((function(){Ji?Ki.emit("unhandledRejection",n,t):dispatchEvent(Qi,t,n)})),e.rejection=Ji||isUnhandled(e)?2:1,r.error))throw r.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t,e){Mi.call(n,(function(){Ji?Ki.emit("rejectionHandled",t):dispatchEvent("rejectionhandled",t,e.value)}))},bind=function(t,e,r,n){return function(o){t(e,r,o,n)}},internalReject=function(t,e,r,n){e.done||(e.done=!0,n&&(e=n),e.value=r,e.state=2,notify$1(t,e,!0))},internalResolve=function(t,e,r,n){if(!e.done){e.done=!0,n&&(e=n);try{if(t===r)throw Vi("Promise can't be resolved itself");var o=isThenable(r);o?Ui((function(){var n={done:!1};try{o.call(r,bind(internalResolve,t,n,e),bind(internalReject,t,n,e))}catch(r){internalReject(t,n,r,e)}})):(e.value=r,e.state=1,notify$1(t,e,!1))}catch(r){internalReject(t,{done:!1},r,e)}}};Zi&&($i=function Promise(t){anInstance(this,$i,Ni),aFunction$1(t),Ii.call(this);var e=qi(this);try{t(bind(internalResolve,this,e),bind(internalReject,this,e))}catch(t){internalReject(this,e,t)}},(Ii=function Promise(t){Bi(this,{type:Ni,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll($i.prototype,{then:function then(t,e){var r=Di(this),n=zi(speciesConstructor(this,$i));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=Ji?Ki.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&notify$1(this,r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Ti=function(){var t=new Ii,e=qi(t);this.promise=t,this.resolve=bind(internalResolve,t,e),this.reject=bind(internalReject,t,e)},Fi.f=zi=function(t){return t===$i||t===_i?new Ti(t):Hi(t)},"function"==typeof Yo&&(Ci=Yo.prototype.then,D(Yo.prototype,"then",(function then(t,e){var r=this;return new $i((function(t,e){Ci.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof Yi&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve($i,Yi.apply(n,arguments))}}))),_export({global:!0,wrap:!0,forced:Zi},{Promise:$i}),setToStringTag($i,Ni,!1),function(t){var e=getBuiltIn(t),r=m.f;o&&e&&!e[zo]&&r(e,zo,{configurable:!0,get:function(){return this}})}(Ni),_i=getBuiltIn(Ni),_export({target:Ni,stat:!0,forced:Zi},{reject:function reject(t){var e=zi(this);return e.reject.call(void 0,t),e.promise}}),_export({target:Ni,stat:!0,forced:Zi},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:Ni,stat:!0,forced:ta},{all:function all(t){var e=this,r=zi(e),n=r.resolve,o=r.reject,i=perform((function(){var r=aFunction$1(e.resolve),i=[],a=0,c=1;Ho(t,(function(t){var u=a++,s=!1;i.push(void 0),c++,r.call(e,t).then((function(t){s||(s=!0,i[u]=t,--c||n(i))}),o)})),--c||n(i)}));return i.error&&o(i.value),r.promise},race:function race(t){var e=this,r=zi(e),n=r.reject,o=perform((function(){var o=aFunction$1(e.resolve);Ho(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var ea="toString",ra=RegExp.prototype,na=ra.toString,oa=fails((function(){return"/a/b"!=na.call({source:"a",flags:"b"})})),ia=na.name!=ea;function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function asyncGeneratorStep(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function _next(t){asyncGeneratorStep(i,n,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(i,n,o,_next,_throw,"throw",t)}_next(void 0)}))}}function _slicedToArray(t,e){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}(t,e)||function _unsupportedIterableToArray(t,e){if(!t)return;if("string"==typeof t)return _arrayLikeToArray(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(t,e)}(t,e)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}(oa||ia)&&D(RegExp.prototype,ea,(function toString(){var t=anObject(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in ra)?regexpFlags.call(t):r)}),{unsafe:!0});createCommonjsModule((function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var o=e&&e.prototype instanceof Generator?e:Generator,i=Object.create(o.prototype),a=new Context(n||[]);return i._invoke=function makeInvokeMethod(t,e,r){var n=u;return function invoke(o,i){if(n===f)throw new Error("Generator is already running");if(n===l){if("throw"===o)throw i;return doneResult()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=maybeInvokeDelegate(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===u)throw n=l,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var p=tryCatch(t,e,r);if("normal"===p.type){if(n=r.done?l:s,p.arg===h)continue;return{value:p.arg,done:r.done}}"throw"===p.type&&(n=l,r.method="throw",r.arg=p.arg)}}}(t,r,a),i}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var u="suspendedStart",s="suspendedYield",f="executing",l="completed",h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};p[i]=function(){return this};var v=Object.getPrototypeOf,d=v&&v(v(values([])));d&&d!==r&&n.call(d,i)&&(p=d);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){var r;this._invoke=function enqueue(o,i){function callInvokeWithMethodAndArg(){return new e((function(r,a){!function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"===_typeof(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}(o,i,r,a)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,maybeInvokeDelegate(t,r),"throw"===r.method))return h;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=tryCatch(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function next(){for(;++o<t.length;)if(n.call(t,o))return next.value=t[o],next.done=!1,next;return next.value=e,next.done=!0,next};return a.next=a}}return{next:doneResult}}function doneResult(){return{value:e,done:!0}}return GeneratorFunction.prototype=g.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunction.displayName=define(GeneratorFunctionPrototype,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[a]=function(){return this},t.AsyncIterator=AsyncIterator,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},defineIteratorMethods(g),define(g,c,"Generator"),g[i]=function(){return this},g.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function next(){for(;e.length;){var r=e.pop();if(r in t)return next.value=r,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(resetTryEntry),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var r=this;function handle(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),h}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,n){return this.delegate={iterator:values(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}));var aa=wellKnownSymbol("isConcatSpreadable"),ca=9007199254740991,ua="Maximum allowed index exceeded",sa=Lo>=51||!fails((function(){var t=[];return t[aa]=!1,t.concat()[0]!==t})),fa=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(t){if(!isObject(t))return!1;var e=t[aa];return void 0!==e?!!e:st(t)};_export({target:"Array",proto:!0,forced:!sa||!fa},{concat:function concat(t){var e,r,n,o,i,a=toObject(this),c=arraySpeciesCreate(a,0),u=0;for(e=-1,n=arguments.length;e<n;e++)if(isConcatSpreadable(i=-1===e?a:arguments[e])){if(u+(o=toLength(i.length))>ca)throw TypeError(ua);for(r=0;r<o;r++,u++)r in i&&createProperty(c,u,i[r])}else{if(u>=ca)throw TypeError(ua);createProperty(c,u++,i)}return c.length=u,c}});var la=yt.find,ha="find",pa=!0,va=arrayMethodUsesToLength(ha);ha in[]&&Array(1).find((function(){pa=!1})),_export({target:"Array",proto:!0,forced:pa||!va},{find:function find(t){return la(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables(ha);var da=[].join,ga=f!=Object,ya=arrayMethodIsStrict("join",",");_export({target:"Array",proto:!0,forced:ga||!ya},{join:function join(t){return da.call(toIndexedObject(this),void 0===t?",":t)}});var ma=yt.some,ba=arrayMethodIsStrict("some"),wa=arrayMethodUsesToLength("some");_export({target:"Array",proto:!0,forced:!ba||!wa},{some:function some(t){return ma(this,t,arguments.length>1?arguments[1]:void 0)}});var Sa=[].push,xa=Math.min,Ea=4294967295,Oa=!fails((function(){return!RegExp(Ea,"y")}));fixRegexpWellKnownSymbolLogic("split",2,(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=String(requireObjectCoercible(this)),o=void 0===r?Ea:r>>>0;if(0===o)return[];if(void 0===t)return[n];if(!isRegexp(t))return e.call(n,t,o);for(var i,a,c,u=[],s=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,l=new RegExp(t.source,s+"g");(i=Ee.call(l,n))&&!((a=l.lastIndex)>f&&(u.push(n.slice(f,i.index)),i.length>1&&i.index<n.length&&Sa.apply(u,i.slice(1)),c=i[0].length,f=a,u.length>=o));)l.lastIndex===i.index&&l.lastIndex++;return f===n.length?!c&&l.test("")||u.push(""):u.push(n.slice(f)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function split(e,r){var o=requireObjectCoercible(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(String(o),e,r)},function(t,o){var i=r(n,t,this,o,n!==e);if(i.done)return i.value;var a=anObject(t),c=String(this),u=speciesConstructor(a,RegExp),s=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Oa?"y":"g"),l=new u(Oa?a:"^(?:"+a.source+")",f),h=void 0===o?Ea:o>>>0;if(0===h)return[];if(0===c.length)return null===regexpExecAbstract(l,c)?[c]:[];for(var p=0,v=0,d=[];v<c.length;){l.lastIndex=Oa?v:0;var g,y=regexpExecAbstract(l,Oa?c:c.slice(v));if(null===y||(g=xa(toLength(l.lastIndex+(Oa?0:v)),c.length))===p)v=advanceStringIndex(c,v,s);else{if(d.push(c.slice(p,v)),d.length===h)return d;for(var m=1;m<=y.length-1;m++)if(d.push(y[m]),d.length===h)return d;v=p=g}}return d.push(c.slice(p)),d}]}),!Oa);var Aa="\t\n\v\f\r    \u2028\u2029\ufeff",Pa="["+Aa+"]",ja=RegExp("^"+Pa+Pa+"*"),ka=RegExp(Pa+Pa+"*$"),createMethod$4=function(t){return function(e){var r=String(requireObjectCoercible(e));return 1&t&&(r=r.replace(ja,"")),2&t&&(r=r.replace(ka,"")),r}},La={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},Ra=La.trim;_export({target:"String",proto:!0,forced:function(t){return fails((function(){return!!Aa[t]()||"…"!="…"[t]()||Aa[t].name!==t}))}("trim")},{trim:function trim(){return Ra(this)}});var Ia=/"/g;_export({target:"String",proto:!0,forced:function(t){return fails((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}("bold")},{bold:function bold(){return t="b",e="",r="",n=String(requireObjectCoercible(this)),o="<"+t,""!==e&&(o+=" "+e+'="'+String(r).replace(Ia,"&quot;")+'"'),o+">"+n+"</"+t+">";var t,e,r,n,o}});
/**
* Localizing script for SVG-edit UI.
* @module locale
* @license MIT
*
* @copyright 2010 Narendra Sisodya
* @copyright 2010 Alexis Deveria
*
*/
jQuery;var Ta=function(){var t=_asyncToGenerator(regeneratorRuntime.mark((function _callee2(t,r){var n;return regeneratorRuntime.wrap((function _callee2$(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,e.import("./extensions/ext-".concat(t,"/locale/").concat(r,".js"));case 3:n=o.sent,o.next=12;break;case 6:return o.prev=6,o.t0=o.catch(0),console.error("Missing translation (".concat(r,") for extension ").concat(t," - using 'en'")),o.next=11,e.import("./extensions/ext-".concat(t,"/locale/en.js"));case 11:n=o.sent;case 12:return o.abrupt("return",n.default);case 13:case"end":return o.stop()}}),_callee2,null,[[0,6]])})));return function loadExtensionTranslation(e,r){return t.apply(this,arguments)}}();t("default",{name:"storage",init:function init(t){var e=t.$,r=this,n=r.canvas,o=r.curConfig,i=o.emptyStorageOnDecline,a=o.noStorageOnLoad,c=o.forceStorage,u=r.storage,s=r.updateCanvas;function replaceStoragePrompt(t){t=t?"storagePrompt="+t:"";var e=top.location;e.href.includes("storagePrompt=")?e.href=e.href.replace(/([&?])storagePrompt=[^&]*(&?)/,(function(e,r,n){return(t?r:"")+t+(!t&&n?r:n||"")})):e.href+=(e.href.includes("?")?"&":"?")+t}function setSVGContentStorage(t){if(u){var e="svgedit-"+r.curConfig.canvasName;t?u.setItem(e,t):u.removeItem(e)}}function expireCookie(t){document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"}function setupBeforeUnloadListener(){window.addEventListener("beforeunload",(function(t){if(document.cookie.match(/(?:^|;\s*)svgeditstore=(?:prefsAndContent|prefsOnly)/)){document.cookie.match(/(?:^|;\s*)svgeditstore=prefsAndContent/)&&setSVGContentStorage(n.getSvgString()),r.setConfig({no_save_warning:!0});var e=r.curPrefs;Object.entries(e).forEach((function(t){var e=_slicedToArray(t,2),r=e[0],n=e[1];r="svg-edit-"+r,void 0!==n&&(u?u.setItem(r,n):window.widget?window.widget.setPreferenceForKey(n,r):(n=encodeURIComponent(n),document.cookie=encodeURIComponent(r)+"="+n+"; expires=Fri, 31 Dec 9999 23:59:59 GMT"))}))}}))}var f=!1;return{name:"storage",langReady:function langReady(t){return _asyncToGenerator(regeneratorRuntime.mark((function _callee(){var n,o,l,h,p,v,d,g,y,m,b,w,S,x,E,O,A,P;return regeneratorRuntime.wrap((function _callee$(j){for(;;)switch(j.prev=j.next){case 0:return t.lang,n=new URL(top.location).searchParams.get("storagePrompt"),j.next=4,Ta("storage",r.curPrefs.lang);case 4:if(o=j.sent,l=o.message,h=o.storagePrefsAndContent,p=o.storagePrefsOnly,v=o.storagePrefs,d=o.storageNoPrefsOrContent,g=o.storageNoPrefs,y=o.rememberLabel,m=o.rememberTooltip,!f){j.next=8;break}return j.abrupt("return");case 8:if(f=!0,c||"true"!==n&&("false"===n||document.cookie.match(/(?:^|;\s*)svgeditstore=(?:prefsAndContent|prefsOnly)/))){j.next=44;break}return b=[],u?b.unshift({value:"prefsAndContent",text:h},{value:"prefsOnly",text:p},{value:"noPrefsOrContent",text:d}):b.unshift({value:"prefsOnly",text:v},{value:"noPrefsOrContent",text:g}),w=e("#dialog_container")[0].style.width,S=e("#dialog_container")[0].style.marginLeft,x=e("#dialog_content")[0].style.height,E=e("#dialog_container")[0].style.height,e("#dialog_content")[0].style.height="120px",e("#dialog_container")[0].style.height="170px",e("#dialog_container")[0].style.width="800px",e("#dialog_container")[0].style.marginLeft="-400px",r.storagePromptState="waiting",j.next=20,e.select(l,b,null,null,{label:y,checked:!0,tooltip:m});case 20:if(O=j.sent,A=O.response,P=O.checked,!A||"noPrefsOrContent"===A){j.next=30;break}if(document.cookie="svgeditstore="+encodeURIComponent(A)+"; expires=Fri, 31 Dec 9999 23:59:59 GMT","true"!==n||!P){j.next=28;break}return replaceStoragePrompt(),j.abrupt("return");case 28:j.next=35;break;case 30:if(expireCookie("svgeditstore"),A&&i&&(setSVGContentStorage(""),Object.keys(r.curPrefs).forEach((function(t){t="svg-edit-"+t,u&&u.removeItem(t),expireCookie(t)}))),!A||!P){j.next=35;break}return replaceStoragePrompt("false"),j.abrupt("return");case 35:e("#dialog_container")[0].style.width=w,e("#dialog_container")[0].style.marginLeft=S,e("#dialog_content")[0].style.height=x,e("#dialog_container")[0].style.height=E,setupBeforeUnloadListener(),r.storagePromptState="closed",s(!0),j.next=45;break;case 44:a&&!c||setupBeforeUnloadListener();case 45:case"end":return j.stop()}}),_callee)})))()}}}})}}}));