Files
svgedit/dist/editor/system/extensions/ext-imagelib/ext-imagelib.js

12 lines
78 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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,l=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 l(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")},f={}.hasOwnProperty,has=function(t,e){return f.call(t,e)},h=n.document,p=isObject(h)&&isObject(h.createElement),documentCreateElement=function(t){return p?h.createElement(t):{}},d=!o&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),g=Object.getOwnPropertyDescriptor,v={f:o?g:function getOwnPropertyDescriptor(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),d)try{return g(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),d)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__",x=n[w]||setGlobal(w,{}),S=Function.toString;"function"!=typeof x.inspectSource&&(x.inspectSource=function(t){return S.call(t)});var E,O,k,j=x.inspectSource,A=n.WeakMap,L="function"==typeof A&&/native code/.test(j(A)),R=createCommonjsModule((function(t){(t.exports=function(t,e){return x[t]||(x[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),P=0,_=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++P+_).toString(36)},T=R("keys"),sharedKey=function(t){return T[t]||(T[t]=uid(t))},I={},C=n.WeakMap;if(L){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)||{}},k=function(t){return G.call(U,t)}}else{var B=sharedKey("state");I[B]=!0,E=function(t,e){return b(t,B,e),e},O=function(t){return has(t,B)?t[B]:{}},k=function(t){return has(t,B)}}var q,D={set:E,get:O,has:k,enforce:function(t){return k(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}}},$=createCommonjsModule((function(t){var e=D.get,r=D.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||j(this)}))})),W=n,aFunction=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,e){return arguments.length<2?aFunction(W[t])||aFunction(n[t]):W[t]&&W[t][e]||n[t]&&n[t][e]},z=Math.ceil,V=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?V:z)(t)},J=Math.min,toLength=function(t){return t>0?J(toInteger(t),9007199254740991):0},Y=Math.max,K=Math.min,toAbsoluteIndex=function(t,e){var r=toInteger(t);return r<0?Y(r+e,0):K(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)},X=H.indexOf,objectKeysInternal=function(t,e){var r,n=toIndexedObject(t),o=0,i=[];for(r in n)!has(I,r)&&has(n,r)&&i.push(r);for(;e.length>o;)has(n,r=e[o++])&&(~X(i,r)||i.push(r));return i},Q=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Z=Q.concat("length","prototype"),tt={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,Z)}},et={f:Object.getOwnPropertySymbols},rt=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var e=tt.f(anObject(t)),r=et.f;return r?e.concat(r(t)):e},copyConstructorProperties=function(t,e){for(var r=rt(e),n=m.f,o=v.f,i=0;i<r.length;i++){var a=r[i];has(t,a)||n(t,a,o(e,a))}},nt=/#|\.prototype\./,isForced=function(t,e){var r=it[ot(t)];return r==ct||r!=at&&("function"==typeof e?fails(e):!!e)},ot=isForced.normalize=function(t){return String(t).replace(nt,".").toLowerCase()},it=isForced.data={},at=isForced.NATIVE="N",ct=isForced.POLYFILL="P",ut=isForced,st=v.f,_export=function(t,e){var r,o,i,a,c,u=t.target,s=t.global,l=t.stat;if(r=s?n:l?n[u]||setGlobal(u,{}):(n[u]||{}).prototype)for(o in e){if(a=e[o],i=t.noTargetGet?(c=st(r,o))&&c.value:r[o],!ut(s?o:u+(l?".":"#")+o,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;copyConstructorProperties(a,i)}(t.sham||i&&i.sham)&&b(a,"sham",!0),$(r,o,a,t)}},lt=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),ft=lt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ht=Array.isArray||function isArray(t){return"Array"==classofRaw(t)},toObject=function(t){return Object(requireObjectCoercible(t))},pt=Object.keys||function keys(t){return objectKeysInternal(t,Q)},dt=o?Object.defineProperties:function defineProperties(t,e){anObject(t);for(var r,n=pt(e),o=n.length,i=0;o>i;)m.f(t,r=n[i++],e[r]);return t},gt=getBuiltIn("document","documentElement"),vt=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"</"+"script>"},NullProtoObject=function(){try{q=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;NullProtoObject=q?function(t){t.write(scriptTag("")),t.close();var e=t.parentWindow.Object;return t=null,e}(q):((e=documentCreateElement("iframe")).style.display="none",gt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F);for(var r=Q.length;r--;)delete NullProtoObject.prototype[Q[r]];return NullProtoObject()};I[vt]=!0;var yt=Object.create||function create(t,e){var r;return null!==t?(EmptyConstructor.prototype=anObject(t),r=new EmptyConstructor,EmptyConstructor.prototype=null,r[vt]=t):r=NullProtoObject(),void 0===e?r:dt(r,e)},mt=tt.f,bt={}.toString,wt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],xt={f:function getOwnPropertyNames(t){return wt&&"[object Window]"==bt.call(t)?function(t){try{return mt(t)}catch(t){return wt.slice()}}(t):mt(toIndexedObject(t))}},St=R("wks"),Et=n.Symbol,Ot=ft?Et:Et&&Et.withoutSetter||uid,wellKnownSymbol=function(t){return has(St,t)||(lt&&has(Et,t)?St[t]=Et[t]:St[t]=Ot("Symbol."+t)),St[t]},kt={f:wellKnownSymbol},jt=m.f,defineWellKnownSymbol=function(t){var e=W.Symbol||(W.Symbol={});has(e,t)||jt(e,t,{value:kt.f(t)})},At=m.f,Lt=wellKnownSymbol("toStringTag"),setToStringTag=function(t,e,r){t&&!has(t=r?t:t.prototype,Lt)&&At(t,Lt,{configurable:!0,value:e})},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)}},Rt=wellKnownSymbol("species"),arraySpeciesCreate=function(t,e){var r;return ht(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!ht(r.prototype)?isObject(r)&&null===(r=r[Rt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},Pt=[].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,f){for(var h,p,d=toObject(c),g=l(d),v=functionBindContext(u,s,3),y=toLength(g.length),m=0,b=f||arraySpeciesCreate,w=e?b(c,y):r?b(c,0):void 0;y>m;m++)if((a||m in g)&&(p=v(h=g[m],m,d),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:Pt.call(w,h)}else if(o)return!1;return i?-1:n||o?o:w}},_t={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)},Tt=_t.forEach,It=sharedKey("hidden"),Ct="Symbol",Ut=wellKnownSymbol("toPrimitive"),Ft=D.set,Mt=D.getterFor(Ct),Gt=Object.prototype,Nt=n.Symbol,Bt=getBuiltIn("JSON","stringify"),qt=v.f,Dt=m.f,$t=xt.f,Wt=c.f,zt=R("symbols"),Vt=R("op-symbols"),Jt=R("string-to-symbol-registry"),Yt=R("symbol-to-string-registry"),Kt=R("wks"),Ht=n.QObject,Xt=!Ht||!Ht.prototype||!Ht.prototype.findChild,Qt=o&&fails((function(){return 7!=yt(Dt({},"a",{get:function(){return Dt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=qt(Gt,e);n&&delete Gt[e],Dt(t,e,r),n&&t!==Gt&&Dt(Gt,e,n)}:Dt,wrap=function(t,e){var r=zt[t]=yt(Nt.prototype);return Ft(r,{type:Ct,tag:t,description:e}),o||(r.description=e),r},Zt=ft?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Nt},te=function defineProperty(t,e,r){t===Gt&&te(Vt,e,r),anObject(t);var n=toPrimitive(e,!0);return anObject(r),has(zt,n)?(r.enumerable?(has(t,It)&&t[It][n]&&(t[It][n]=!1),r=yt(r,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,It)||Dt(t,It,createPropertyDescriptor(1,{})),t[It][n]=!0),Qt(t,n,r)):Dt(t,n,r)},ee=function defineProperties(t,e){anObject(t);var r=toIndexedObject(e),n=pt(r).concat(ie(r));return Tt(n,(function(e){o&&!re.call(r,e)||te(t,e,r[e])})),t},re=function propertyIsEnumerable(t){var e=toPrimitive(t,!0),r=Wt.call(this,e);return!(this===Gt&&has(zt,e)&&!has(Vt,e))&&(!(r||!has(this,e)||!has(zt,e)||has(this,It)&&this[It][e])||r)},ne=function getOwnPropertyDescriptor(t,e){var r=toIndexedObject(t),n=toPrimitive(e,!0);if(r!==Gt||!has(zt,n)||has(Vt,n)){var o=qt(r,n);return!o||!has(zt,n)||has(r,It)&&r[It][n]||(o.enumerable=!0),o}},oe=function getOwnPropertyNames(t){var e=$t(toIndexedObject(t)),r=[];return Tt(e,(function(t){has(zt,t)||has(I,t)||r.push(t)})),r},ie=function getOwnPropertySymbols(t){var e=t===Gt,r=$t(e?Vt:toIndexedObject(t)),n=[];return Tt(r,(function(t){!has(zt,t)||e&&!has(Gt,t)||n.push(zt[t])})),n};if(lt||($((Nt=function Symbol(){if(this instanceof Nt)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===Gt&&setter.call(Vt,t),has(this,It)&&has(this[It],e)&&(this[It][e]=!1),Qt(this,e,createPropertyDescriptor(1,t))};return o&&Xt&&Qt(Gt,e,{configurable:!0,set:setter}),wrap(e,t)}).prototype,"toString",(function toString(){return Mt(this).tag})),$(Nt,"withoutSetter",(function(t){return wrap(uid(t),t)})),c.f=re,m.f=te,v.f=ne,tt.f=xt.f=oe,et.f=ie,kt.f=function(t){return wrap(wellKnownSymbol(t),t)},o&&(Dt(Nt.prototype,"description",{configurable:!0,get:function description(){return Mt(this).description}}),$(Gt,"propertyIsEnumerable",re,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!lt,sham:!lt},{Symbol:Nt}),Tt(pt(Kt),(function(t){defineWellKnownSymbol(t)})),_export({target:Ct,stat:!0,forced:!lt},{for:function(t){var e=String(t);if(has(Jt,e))return Jt[e];var r=Nt(e);return Jt[e]=r,Yt[r]=e,r},keyFor:function keyFor(t){if(!Zt(t))throw TypeError(t+" is not a symbol");if(has(Yt,t))return Yt[t]},useSetter:function(){Xt=!0},useSimple:function(){Xt=!1}}),_export({target:"Object",stat:!0,forced:!lt,sham:!o},{create:function create(t,e){return void 0===e?yt(t):ee(yt(t),e)},defineProperty:te,defineProperties:ee,getOwnPropertyDescriptor:ne}),_export({target:"Object",stat:!0,forced:!lt},{getOwnPropertyNames:oe,getOwnPropertySymbols:ie}),_export({target:"Object",stat:!0,forced:fails((function(){et.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return et.f(toObject(t))}}),Bt){var ae=!lt||fails((function(){var t=Nt();return"[null]"!=Bt([t])||"{}"!=Bt({a:t})||"{}"!=Bt(Object(t))}));_export({target:"JSON",stat:!0,forced:ae},{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)&&!Zt(t))return ht(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Zt(e))return e}),o[1]=e,Bt.apply(null,o)}})}Nt.prototype[Ut]||b(Nt.prototype,Ut,Nt.prototype.valueOf),setToStringTag(Nt,Ct),I[It]=!0;var ce=m.f,ue=n.Symbol;if(o&&"function"==typeof ue&&(!("description"in ue.prototype)||void 0!==ue().description)){var se={},le=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof le?new ue(t):void 0===t?ue():ue(t);return""===t&&(se[e]=!0),e};copyConstructorProperties(le,ue);var fe=le.prototype=ue.prototype;fe.constructor=le;var he=fe.toString,pe="Symbol(test)"==String(ue("test")),de=/^Symbol\((.*)\)[^)]+$/;ce(fe,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,e=he.call(t);if(has(se,t))return"";var r=pe?e.slice(7,-1):e.replace(de,"$1");return""===r?void 0:r}}),_export({global:!0,forced:!0},{Symbol:le})}var ge,ve,createProperty=function(t,e,r){var n=toPrimitive(e);n in t?m.f(t,n,createPropertyDescriptor(0,r)):t[n]=r},ye=getBuiltIn("navigator","userAgent")||"",me=n.process,be=me&&me.versions,we=be&&be.v8;we?ve=(ge=we.split("."))[0]+ge[1]:ye&&(!(ge=ye.match(/Edge\/(\d+)/))||ge[1]>=74)&&(ge=ye.match(/Chrome\/(\d+)/))&&(ve=ge[1]);var xe=ve&&+ve,Se=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(t){return xe>=51||!fails((function(){var e=[];return(e.constructor={})[Se]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Ee=wellKnownSymbol("isConcatSpreadable"),Oe=9007199254740991,ke="Maximum allowed index exceeded",je=xe>=51||!fails((function(){var t=[];return t[Ee]=!1,t.concat()[0]!==t})),Ae=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(t){if(!isObject(t))return!1;var e=t[Ee];return void 0!==e?!!e:ht(t)};_export({target:"Array",proto:!0,forced:!je||!Ae},{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))>Oe)throw TypeError(ke);for(r=0;r<o;r++,u++)r in i&&createProperty(c,u,i[r])}else{if(u>=Oe)throw TypeError(ke);createProperty(c,u++,i)}return c.length=u,c}});var arrayMethodIsStrict=function(t,e){var r=[][t];return!!r&&fails((function(){r.call(null,e||function(){throw 1},1)}))},Le=Object.defineProperty,Re={},thrower=function(t){throw t},arrayMethodUsesToLength=function(t,e){if(has(Re,t))return Re[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 Re[t]=!!r&&!fails((function(){if(n&&!o)return!0;var t={length:-1};n?Le(t,1,{enumerable:!0,get:thrower}):t[1]=1,r.call(t,i,a)}))},Pe=_t.forEach,_e=arrayMethodIsStrict("forEach"),Te=arrayMethodUsesToLength("forEach"),Ie=_e&&Te?[].forEach:function forEach(t){return Pe(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=Ie},{forEach:Ie});var Ce=wellKnownSymbol("unscopables"),Ue=Array.prototype;null==Ue[Ce]&&m.f(Ue,Ce,{configurable:!0,value:yt(null)});var addToUnscopables=function(t){Ue[Ce][t]=!0},Fe=H.includes,Me=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:!Me},{includes:function includes(t){return Fe(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var Ge=H.indexOf,Ne=[].indexOf,Be=!!Ne&&1/[1].indexOf(1,-0)<0,qe=arrayMethodIsStrict("indexOf"),De=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0});_export({target:"Array",proto:!0,forced:Be||!qe||!De},{indexOf:function indexOf(t){return Be?Ne.apply(this,arguments)||0:Ge(this,t,arguments.length>1?arguments[1]:void 0)}});var $e,We,ze,Ve={},Je=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Ye=sharedKey("IE_PROTO"),Ke=Object.prototype,He=Je?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,Ye)?t[Ye]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ke:null},Xe=wellKnownSymbol("iterator"),Qe=!1;[].keys&&("next"in(ze=[].keys())?(We=He(He(ze)))!==Object.prototype&&($e=We):Qe=!0),null==$e&&($e={}),has($e,Xe)||b($e,Xe,(function(){return this}));var Ze={IteratorPrototype:$e,BUGGY_SAFARI_ITERATORS:Qe},tr=Ze.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(t,e,r){var n=e+" Iterator";return t.prototype=yt(tr,{next:createPropertyDescriptor(1,r)}),setToStringTag(t,n,!1),Ve[n]=returnThis$1,t},er=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),rr=Ze.IteratorPrototype,nr=Ze.BUGGY_SAFARI_ITERATORS,or=wellKnownSymbol("iterator"),ir="keys",ar="values",cr="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&&d)return d;if(!nr&&t in h)return h[t];switch(t){case ir:return function keys(){return new r(this,t)};case ar:return function values(){return new r(this,t)};case cr:return function entries(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",f=!1,h=t.prototype,p=h[or]||h["@@iterator"]||o&&h[o],d=!nr&&p||getIterationMethod(o),g="Array"==e&&h.entries||p;if(g&&(c=He(g.call(new t)),rr!==Object.prototype&&c.next&&(He(c)!==rr&&(er?er(c,rr):"function"!=typeof c[or]&&b(c,or,returnThis$2)),setToStringTag(c,l,!0))),o==ar&&p&&p.name!==ar&&(f=!0,d=function values(){return p.call(this)}),h[or]!==d&&b(h,or,d),Ve[e]=d,o)if(u={values:getIterationMethod(ar),keys:i?d:getIterationMethod(ir),entries:getIterationMethod(cr)},a)for(s in u)(nr||f||!(s in h))&&$(h,s,u[s]);else _export({target:e,proto:!0,forced:nr||f},u);return u},ur="Array Iterator",sr=D.set,lr=D.getterFor(ur),fr=defineIterator(Array,"Array",(function(t,e){sr(this,{type:ur,target:toIndexedObject(t),index:0,kind:e})}),(function(){var t=lr(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");Ve.Arguments=Ve.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var hr=_t.map,pr=arrayMethodHasSpeciesSupport("map"),dr=arrayMethodUsesToLength("map");_export({target:"Array",proto:!0,forced:!pr||!dr},{map:function map(t){return hr(this,t,arguments.length>1?arguments[1]:void 0)}});var gr=m.f,vr=Function.prototype,yr=vr.toString,mr=/^\s*function ([^ (]*)/,br="name";o&&!(br in vr)&&gr(vr,br,{configurable:!0,get:function(){try{return yr.call(this).match(mr)[1]}catch(t){return""}}});var wr=Object.assign,xr=Object.defineProperty,Sr=!wr||fails((function(){if(o&&1!==wr({b:1},wr(xr({},"a",{enumerable:!0,get:function(){xr(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!=wr({},t)[r]||pt(wr({},e)).join("")!=n}))?function assign(t,e){for(var r=toObject(t),n=arguments.length,i=1,a=et.f,u=c.f;n>i;)for(var s,f=l(arguments[i++]),h=a?pt(f).concat(a(f)):pt(f),p=h.length,d=0;p>d;)s=h[d++],o&&!u.call(f,s)||(r[s]=f[s]);return r}:wr;_export({target:"Object",stat:!0,forced:Object.assign!==Sr},{assign:Sr});var Er={};Er[wellKnownSymbol("toStringTag")]="z";var Or="[object z]"===String(Er),kr=wellKnownSymbol("toStringTag"),jr="Arguments"==classofRaw(function(){return arguments}()),Ar=Or?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),kr))?r:jr?classofRaw(e):"Object"==(n=classofRaw(e))&&"function"==typeof e.callee?"Arguments":n},Lr=Or?{}.toString:function toString(){return"[object "+Ar(this)+"]"};Or||$(Object.prototype,"toString",Lr,{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 Rr,Pr,_r={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")}))},Tr=RegExp.prototype.exec,Ir=String.prototype.replace,Cr=Tr,Ur=(Rr=/a/,Pr=/b*/g,Tr.call(Rr,"a"),Tr.call(Pr,"a"),0!==Rr.lastIndex||0!==Pr.lastIndex),Fr=_r.UNSUPPORTED_Y||_r.BROKEN_CARET,Mr=void 0!==/()??/.exec("")[1];(Ur||Mr||Fr)&&(Cr=function exec(t){var e,r,n,o,i=this,a=Fr&&i.sticky,c=regexpFlags.call(i),u=i.source,s=0,l=t;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),l=String(t).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(u="(?: "+u+")",l=" "+l,s++),r=new RegExp("^(?:"+u+")",c)),Mr&&(r=new RegExp("^"+u+"$(?!\\s)",c)),Ur&&(e=i.lastIndex),n=Tr.call(a?r:i,l),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:Ur&&n&&(i.lastIndex=i.global?n.index+n[0].length:e),Mr&&n&&n.length>1&&Ir.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var Gr=Cr;_export({target:"RegExp",proto:!0,forced:/./.exec!==Gr},{exec:Gr});var Nr=wellKnownSymbol("match"),isRegexp=function(t){var e;return isObject(t)&&(void 0!==(e=t[Nr])?!!e:"RegExp"==classofRaw(t))},notARegexp=function(t){if(isRegexp(t))throw TypeError("The method doesn't accept regular expressions");return t},Br=wellKnownSymbol("match"),correctIsRegexpLogic=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Br]=!1,"/./"[t](e)}catch(t){}}return!1};_export({target:"String",proto:!0,forced:!correctIsRegexpLogic("includes")},{includes:function includes(t){return!!~String(requireObjectCoercible(this)).indexOf(notARegexp(t),arguments.length>1?arguments[1]:void 0)}});var createMethod$2=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}},qr={codeAt:createMethod$2(!1),charAt:createMethod$2(!0)},Dr=qr.charAt,$r="String Iterator",Wr=D.set,zr=D.getterFor($r);defineIterator(String,"String",(function(t){Wr(this,{type:$r,string:String(t),index:0})}),(function next(){var t,e=zr(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Dr(r,n),e.index+=t.length,{value:t,done:!1})}));var Vr=wellKnownSymbol("species"),Jr=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Yr="$0"==="a".replace(/./,"$0"),Kr=wellKnownSymbol("replace"),Hr=!!/./[Kr]&&""===/./[Kr]("a","$0"),Xr=!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[Vr]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||"replace"===t&&(!Jr||!Yr||Hr)||"split"===t&&!Xr){var c=/./[o],u=r(o,""[t],(function(t,e,r,n,o){return e.exec===Gr?i&&!o?{done:!0,value:c.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Yr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Hr}),s=u[0],l=u[1];$(String.prototype,t,s),$(RegExp.prototype,o,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)})}n&&b(RegExp.prototype[o],"sham",!0)},Qr=qr.charAt,advanceStringIndex=function(t,e,r){return e+(r?Qr(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 Gr.call(t,e)},Zr=Math.max,tn=Math.min,en=Math.floor,rn=/\$([$&'`]|\d\d?|<[^>]*>)/g,nn=/\$([$&'`]|\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),l="function"==typeof n;l||(n=String(n));var f=u.global;if(f){var h=u.unicode;u.lastIndex=0}for(var p=[];;){var d=regexpExecAbstract(u,s);if(null===d)break;if(p.push(d),!f)break;""===String(d[0])&&(u.lastIndex=advanceStringIndex(s,toLength(u.lastIndex),h))}for(var g,v="",y=0,m=0;m<p.length;m++){d=p[m];for(var b=String(d[0]),w=Zr(tn(toInteger(d.index),s.length),0),x=[],S=1;S<d.length;S++)x.push(void 0===(g=d[S])?g:String(g));var E=d.groups;if(l){var O=[b].concat(x,w,s);void 0!==E&&O.push(E);var k=String(n.apply(void 0,O))}else k=getSubstitution(b,s,w,x,E,n);w>=y&&(v+=s.slice(y,w)+k,y=w+b.length)}return v+s.slice(y)}];function getSubstitution(t,r,n,o,i,a){var c=n+t.length,u=o.length,s=nn;return void 0!==i&&(i=toObject(i),s=rn),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 l=+a;if(0===l)return e;if(l>u){var f=en(l/10);return 0===f?e:f<=u?void 0===o[f-1]?a.charAt(1):o[f-1]+a.charAt(1):e}s=o[l-1]}return void 0===s?"":s}))}}));var on,an=v.f,cn="".startsWith,un=Math.min,sn=correctIsRegexpLogic("startsWith"),ln=!(sn||(on=an(String.prototype,"startsWith"),!on||on.writable));_export({target:"String",proto:!0,forced:!ln&&!sn},{startsWith:function startsWith(t){var e=String(requireObjectCoercible(this));notARegexp(t);var r=toLength(un(arguments.length>1?arguments[1]:void 0,e.length)),n=String(t);return cn?cn.call(e,n,r):e.slice(r,r+n.length)===n}});var fn={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 hn in fn){var pn=n[hn],dn=pn&&pn.prototype;if(dn&&dn.forEach!==Ie)try{b(dn,"forEach",Ie)}catch(t){dn.forEach=Ie}}var gn=wellKnownSymbol("iterator"),vn=wellKnownSymbol("toStringTag"),yn=fr.values;for(var mn in fn){var bn=n[mn],wn=bn&&bn.prototype;if(wn){if(wn[gn]!==yn)try{b(wn,gn,yn)}catch(t){wn[gn]=yn}if(wn[vn]||b(wn,vn,mn),fn[mn])for(var xn in fr)if(wn[xn]!==fr[xn])try{b(wn,xn,fr[xn])}catch(t){wn[xn]=fr[xn]}}}var Sn=wellKnownSymbol("iterator"),En=!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[Sn]||"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},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}},On=wellKnownSymbol("iterator"),kn=Array.prototype,isArrayIteratorMethod=function(t){return void 0!==t&&(Ve.Array===t||kn[On]===t)},jn=wellKnownSymbol("iterator"),getIteratorMethod=function(t){if(null!=t)return t[jn]||t["@@iterator"]||Ve[Ar(t)]},An=function from(t){var e,r,n,o,i,a,c=toObject(t),u="function"==typeof this?this:Array,s=arguments.length,l=s>1?arguments[1]:void 0,f=void 0!==l,h=getIteratorMethod(c),p=0;if(f&&(l=functionBindContext(l,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=f?l(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=f?callWithSafeIterationClosing(o,l,[n.value,p],!0):n.value,createProperty(r,p,a);return r.length=p,r},Ln=2147483647,Rn=/[^\0-\u007E]/,Pn=/[.\u3002\uFF0E\uFF61]/g,_n="Overflow: input needs wider integers to process",Tn=Math.floor,In=String.fromCharCode,digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,e,r){var n=0;for(t=r?Tn(t/700):t>>1,t+=Tn(t/e);t>455;n+=36)t=Tn(t/35);return Tn(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(In(r));var u=n.length,s=u;for(u&&n.push("-");s<o;){var l=Ln;for(e=0;e<t.length;e++)(r=t[e])>=i&&r<l&&(l=r);var f=s+1;if(l-i>Tn((Ln-a)/f))throw RangeError(_n);for(a+=(l-i)*f,i=l,e=0;e<t.length;e++){if((r=t[e])<i&&++a>Ln)throw RangeError(_n);if(r==i){for(var h=a,p=36;;p+=36){var d=p<=c?1:p>=c+26?26:p-c;if(h<d)break;var g=h-d,v=36-d;n.push(In(digitToBasic(d+g%v))),h=Tn(g/v)}n.push(In(digitToBasic(h))),c=adapt(a,f,s==u),a=0,++s}}++a,++i}return n.join("")},redefineAll=function(t,e,r){for(var n in e)$(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))},Cn=getBuiltIn("fetch"),Un=getBuiltIn("Headers"),Fn=wellKnownSymbol("iterator"),Mn="URLSearchParams",Gn="URLSearchParamsIterator",Nn=D.set,Bn=D.getterFor(Mn),qn=D.getterFor(Gn),Dn=/\+/g,$n=Array(4),percentSequence=function(t){return $n[t-1]||($n[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(Dn," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(percentSequence(r--),percentDecode);return e}},Wn=/[!'()~]|%20/g,zn={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return zn[t]},serialize=function(t){return encodeURIComponent(t).replace(Wn,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")},Vn=createIteratorConstructor((function Iterator(t,e){Nn(this,{type:Gn,iterator:getIterator(Bn(t).entries),kind:e})}),"Iterator",(function next(){var t=qn(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})),Jn=function URLSearchParams(){anInstance(this,Jn,Mn);var t,e,r,n,o,i,a,c,u,s=arguments.length>0?arguments[0]:void 0,l=this,f=[];if(Nn(l,{type:Mn,entries:f,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");f.push({key:a.value+"",value:c.value+""})}else for(u in s)has(s,u)&&f.push({key:u,value:s[u]+""});else parseSearchParams(f,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:s+"")},Yn=Jn.prototype;redefineAll(Yn,{append:function append(t,e){validateArgumentsLength(arguments.length,2);var r=Bn(this);r.entries.push({key:t+"",value:e+""}),r.updateURL()},delete:function(t){validateArgumentsLength(arguments.length,1);for(var e=Bn(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=Bn(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=Bn(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=Bn(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=Bn(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=Bn(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=Bn(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 Vn(this,"keys")},values:function values(){return new Vn(this,"values")},entries:function entries(){return new Vn(this,"entries")}},{enumerable:!0}),$(Yn,Fn,Yn.entries),$(Yn,"toString",(function toString(){for(var t,e=Bn(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(Jn,Mn),_export({global:!0,forced:!En},{URLSearchParams:Jn}),En||"function"!=typeof Cn||"function"!=typeof Un||_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,Ar(r)===Mn&&((n=e.headers?new Un(e.headers):new Un).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=yt(e,{body:createPropertyDescriptor(0,String(r)),headers:createPropertyDescriptor(0,n)}))),o.push(e)),Cn.apply(this,o)}});var Kn,Hn={URLSearchParams:Jn,getState:Bn},Xn=qr.codeAt,Qn=n.URL,Zn=Hn.URLSearchParams,to=Hn.getState,eo=D.set,ro=D.getterFor("URL"),no=Math.floor,oo=Math.pow,io="Invalid scheme",ao="Invalid host",co="Invalid port",uo=/[A-Za-z]/,so=/[\d+-.A-Za-z]/,lo=/\d/,fo=/^(0x|0X)/,ho=/^[0-7]+$/,po=/^\d+$/,go=/^[\dA-Fa-f]+$/,vo=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,yo=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,mo=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,bo=/[\u0009\u000A\u000D]/g,parseHost=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return ao;if(!(r=parseIPv6(e.slice(1,-1))))return ao;t.host=r}else if(isSpecial(t)){if(e=function(t){var e,r,n=[],o=t.toLowerCase().replace(Pn,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(Rn.test(r)?"xn--"+encode(r):r);return n.join(".")}(e),vo.test(e))return ao;if(null===(r=parseIPv4(e)))return ao;t.host=r}else{if(yo.test(e))return ao;for(r="",n=An(e),o=0;o<n.length;o++)r+=percentEncode(n[o],wo);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=fo.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?po:8==i?ho:go).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>=oo(256,5-e))return null}else if(a>255)return null;for(c=r.pop(),n=0;n<r.length;n++)c+=r[n]*oo(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,l=null,f=0,char=function(){return t.charAt(f)};if(":"==char()){if(":"!=t.charAt(1))return;f+=2,l=++s}for(;char();){if(8==s)return;if(":"!=char()){for(e=r=0;r<4&&go.test(char());)e=16*e+parseInt(char(),16),f++,r++;if("."==char()){if(0==r)return;if(f-=r,s>6)return;for(n=0;char();){if(o=null,n>0){if(!("."==char()&&n<4))return;f++}if(!lo.test(char()))return;for(;lo.test(char());){if(i=parseInt(char(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;f++}u[s]=256*u[s]+o,2!=++n&&4!=n||s++}if(4!=n)return;break}if(":"==char()){if(f++,!char())return}else if(char())return;u[s++]=e}else{if(null!==l)return;f++,l=++s}}if(null!==l)for(a=s-l,s=7;0!=s&&a>0;)c=u[s],u[s--]=u[l+a-1],u[l+--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=no(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},wo={},xo=Sr({},wo,{" ":1,'"':1,"<":1,">":1,"`":1}),So=Sr({},xo,{"#":1,"?":1,"{":1,"}":1}),Eo=Sr({},So,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,e){var r=Xn(t,0);return r>32&&r<127&&!has(e,t)?t:encodeURIComponent(t)},Oo={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(t){return has(Oo,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&&uo.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()},ko={},jo={},Ao={},Lo={},Ro={},Po={},_o={},To={},Io={},Co={},Uo={},Fo={},Mo={},Go={},No={},Bo={},qo={},Do={},$o={},Wo={},zo={},parseURL=function(t,e,r,n){var o,i,a,c,u,s=r||ko,l=0,f="",h=!1,p=!1,d=!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(mo,"")),e=e.replace(bo,""),o=An(e);l<=o.length;){switch(i=o[l],s){case ko:if(!i||!uo.test(i)){if(r)return io;s=Ao;continue}f+=i.toLowerCase(),s=jo;break;case jo:if(i&&(so.test(i)||"+"==i||"-"==i||"."==i))f+=i.toLowerCase();else{if(":"!=i){if(r)return io;f="",s=Ao,l=0;continue}if(r&&(isSpecial(t)!=has(Oo,f)||"file"==f&&(includesCredentials(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=f,r)return void(isSpecial(t)&&Oo[t.scheme]==t.port&&(t.port=null));f="","file"==t.scheme?s=Go:isSpecial(t)&&n&&n.scheme==t.scheme?s=Lo:isSpecial(t)?s=To:"/"==o[l+1]?(s=Ro,l++):(t.cannotBeABaseURL=!0,t.path.push(""),s=$o)}break;case Ao:if(!n||n.cannotBeABaseURL&&"#"!=i)return io;if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,s=zo;break}s="file"==n.scheme?Go:Po;continue;case Lo:if("/"!=i||"/"!=o[l+1]){s=Po;continue}s=Io,l++;break;case Ro:if("/"==i){s=Co;break}s=Do;continue;case Po:if(t.scheme=n.scheme,i==Kn)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=_o;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=Wo;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=Do;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=zo}break;case _o:if(!isSpecial(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,s=Do;continue}s=Co}else s=Io;break;case To:if(s=Io,"/"!=i||"/"!=f.charAt(l+1))continue;l++;break;case Io:if("/"!=i&&"\\"!=i){s=Co;continue}break;case Co:if("@"==i){h&&(f="%40"+f),h=!0,a=An(f);for(var g=0;g<a.length;g++){var v=a[g];if(":"!=v||d){var y=percentEncode(v,Eo);d?t.password+=y:t.username+=y}else d=!0}f=""}else if(i==Kn||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(h&&""==f)return"Invalid authority";l-=An(f).length+1,f="",s=Uo}else f+=i;break;case Uo:case Fo:if(r&&"file"==t.scheme){s=Bo;continue}if(":"!=i||p){if(i==Kn||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(isSpecial(t)&&""==f)return ao;if(r&&""==f&&(includesCredentials(t)||null!==t.port))return;if(c=parseHost(t,f))return c;if(f="",s=qo,r)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return ao;if(c=parseHost(t,f))return c;if(f="",s=Mo,r==Fo)return}break;case Mo:if(!lo.test(i)){if(i==Kn||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)||r){if(""!=f){var m=parseInt(f,10);if(m>65535)return co;t.port=isSpecial(t)&&m===Oo[t.scheme]?null:m,f=""}if(r)return;s=qo;continue}return co}f+=i;break;case Go:if(t.scheme="file","/"==i||"\\"==i)s=No;else{if(!n||"file"!=n.scheme){s=Do;continue}if(i==Kn)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=Wo;else{if("#"!=i){startsWithWindowsDriveLetter(o.slice(l).join(""))||(t.host=n.host,t.path=n.path.slice(),shortenURLsPath(t)),s=Do;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=zo}}break;case No:if("/"==i||"\\"==i){s=Bo;break}n&&"file"==n.scheme&&!startsWithWindowsDriveLetter(o.slice(l).join(""))&&(isWindowsDriveLetter(n.path[0],!0)?t.path.push(n.path[0]):t.host=n.host),s=Do;continue;case Bo:if(i==Kn||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&isWindowsDriveLetter(f))s=Do;else if(""==f){if(t.host="",r)return;s=qo}else{if(c=parseHost(t,f))return c;if("localhost"==t.host&&(t.host=""),r)return;f="",s=qo}continue}f+=i;break;case qo:if(isSpecial(t)){if(s=Do,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=Kn&&(s=Do,"/"!=i))continue}else t.fragment="",s=zo;else t.query="",s=Wo;break;case Do:if(i==Kn||"/"==i||"\\"==i&&isSpecial(t)||!r&&("?"==i||"#"==i)){if(".."===(u=(u=f).toLowerCase())||"%2e."===u||".%2e"===u||"%2e%2e"===u?(shortenURLsPath(t),"/"==i||"\\"==i&&isSpecial(t)||t.path.push("")):isSingleDot(f)?"/"==i||"\\"==i&&isSpecial(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&isWindowsDriveLetter(f)&&(t.host&&(t.host=""),f=f.charAt(0)+":"),t.path.push(f)),f="","file"==t.scheme&&(i==Kn||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",s=Wo):"#"==i&&(t.fragment="",s=zo)}else f+=percentEncode(i,So);break;case $o:"?"==i?(t.query="",s=Wo):"#"==i?(t.fragment="",s=zo):i!=Kn&&(t.path[0]+=percentEncode(i,wo));break;case Wo:r||"#"!=i?i!=Kn&&("'"==i&&isSpecial(t)?t.query+="%27":t.query+="#"==i?"%23":percentEncode(i,wo)):(t.fragment="",s=zo);break;case zo:i!=Kn&&(t.fragment+=percentEncode(i,xo))}l++}},Vo=function URL(t){var e,r,n=anInstance(this,Vo,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(t),c=eo(n,{type:"URL"});if(void 0!==i)if(i instanceof Vo)e=ro(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 Zn,s=to(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))},Jo=Vo.prototype,serializeURL=function(){var t=ro(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=ro(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 ro(this).scheme+":"},getUsername=function(){return ro(this).username},getPassword=function(){return ro(this).password},getHost=function(){var t=ro(this),e=t.host,r=t.port;return null===e?"":null===r?serializeHost(e):serializeHost(e)+":"+r},getHostname=function(){var t=ro(this).host;return null===t?"":serializeHost(t)},getPort=function(){var t=ro(this).port;return null===t?"":String(t)},getPathname=function(){var t=ro(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},getSearch=function(){var t=ro(this).query;return t?"?"+t:""},getSearchParams=function(){return ro(this).searchParams},getHash=function(){var t=ro(this).fragment;return t?"#"+t:""},accessorDescriptor=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(o&&dt(Jo,{href:accessorDescriptor(serializeURL,(function(t){var e=ro(this),r=String(t),n=parseURL(e,r);if(n)throw TypeError(n);to(e.searchParams).updateSearchParams(e.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(t){var e=ro(this);parseURL(e,String(t)+":",ko)})),username:accessorDescriptor(getUsername,(function(t){var e=ro(this),r=An(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=percentEncode(r[n],Eo)}})),password:accessorDescriptor(getPassword,(function(t){var e=ro(this),r=An(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=percentEncode(r[n],Eo)}})),host:accessorDescriptor(getHost,(function(t){var e=ro(this);e.cannotBeABaseURL||parseURL(e,String(t),Uo)})),hostname:accessorDescriptor(getHostname,(function(t){var e=ro(this);e.cannotBeABaseURL||parseURL(e,String(t),Fo)})),port:accessorDescriptor(getPort,(function(t){var e=ro(this);cannotHaveUsernamePasswordPort(e)||(""==(t=String(t))?e.port=null:parseURL(e,t,Mo))})),pathname:accessorDescriptor(getPathname,(function(t){var e=ro(this);e.cannotBeABaseURL||(e.path=[],parseURL(e,t+"",qo))})),search:accessorDescriptor(getSearch,(function(t){var e=ro(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",parseURL(e,t,Wo)),to(e.searchParams).updateSearchParams(e.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(t){var e=ro(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",parseURL(e,t,zo)):e.fragment=null}))}),$(Jo,"toJSON",(function toJSON(){return serializeURL.call(this)}),{enumerable:!0}),$(Jo,"toString",(function toString(){return serializeURL.call(this)}),{enumerable:!0}),Qn){var Yo=Qn.createObjectURL,Ko=Qn.revokeObjectURL;Yo&&$(Vo,"createObjectURL",(function createObjectURL(t){return Yo.apply(Qn,arguments)})),Ko&&$(Vo,"revokeObjectURL",(function revokeObjectURL(t){return Ko.apply(Qn,arguments)}))}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)}))}}setToStringTag(Vo,"URL"),_export({global:!0,forced:!En,sham:!o},{URL:Vo}),defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("iterator"),defineWellKnownSymbol("toStringTag");var Ho=[].reverse,Xo=[1,2];_export({target:"Array",proto:!0,forced:String(Xo)===String(Xo.reverse())},{reverse:function reverse(){return ht(this)&&(this.length=this.length),Ho.call(this)}});var Qo=arrayMethodHasSpeciesSupport("slice"),Zo=arrayMethodUsesToLength("slice",{ACCESSORS:!0,0:0,1:2}),ti=wellKnownSymbol("species"),ei=[].slice,ri=Math.max;_export({target:"Array",proto:!0,forced:!Qo||!Zo},{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(ht(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!ht(r.prototype)?isObject(r)&&null===(r=r[ti])&&(r=void 0):r=void 0,r===Array||void 0===r))return ei.call(i,c,u);for(n=new(void 0===r?Array:r)(ri(u-c,0)),o=0;c<u;c++,o++)c in i&&createProperty(n,o,i[c]);return n.length=o,n}});var ni=Date.prototype,oi="Invalid Date",ii="toString",ai=ni.toString,ci=ni.getTime;new Date(NaN)+""!=oi&&$(ni,ii,(function toString(){var t=ci.call(this);return t==t?ai.call(this):oi})),setToStringTag(n.JSON,"JSON",!0),setToStringTag(Math,"Math",!0),_export({target:"Object",stat:!0,sham:!o},{create:yt}),_export({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:m.f});var ui=fails((function(){He(1)}));_export({target:"Object",stat:!0,forced:ui,sham:!Je},{getPrototypeOf:function getPrototypeOf(t){return He(toObject(t))}}),_export({target:"Object",stat:!0},{setPrototypeOf:er});var si=n.Promise,li=wellKnownSymbol("species"),fi=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,l,f,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(f=t[c])[0],f[1]):h(t[c]))&&s instanceof Result)return s;return new Result(!1)}i=a.call(t)}for(l=i.next;!(f=l.call(i)).done;)if("object"==typeof(s=callWithSafeIterationClosing(i,h,f.value,n))&&s&&s instanceof Result)return s;return new Result(!1)}).stop=function(t){return new Result(!0,t)}})),hi=wellKnownSymbol("iterator"),pi=!1;try{var di=0,gi={next:function(){return{done:!!di++}},return:function(){pi=!0}};gi[hi]=function(){return this},Array.from(gi,(function(){throw 2}))}catch(t){}var vi,yi,mi,bi=wellKnownSymbol("species"),speciesConstructor=function(t,e){var r,n=anObject(t).constructor;return void 0===n||null==(r=anObject(n)[bi])?e:aFunction$1(r)},wi=/(iphone|ipod|ipad).*applewebkit/i.test(ye),xi=n.location,Si=n.setImmediate,Ei=n.clearImmediate,Oi=n.process,ki=n.MessageChannel,ji=n.Dispatch,Ai=0,Li={},Ri="onreadystatechange",run=function(t){if(Li.hasOwnProperty(t)){var e=Li[t];delete Li[t],e()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){n.postMessage(t+"",xi.protocol+"//"+xi.host)};Si&&Ei||(Si=function setImmediate(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return Li[++Ai]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},vi(Ai),Ai},Ei=function clearImmediate(t){delete Li[t]},"process"==classofRaw(Oi)?vi=function(t){Oi.nextTick(runner(t))}:ji&&ji.now?vi=function(t){ji.now(runner(t))}:ki&&!wi?(mi=(yi=new ki).port2,yi.port1.onmessage=listener,vi=functionBindContext(mi.postMessage,mi,1)):!n.addEventListener||"function"!=typeof postMessage||n.importScripts||fails(post)||"file:"===xi.protocol?vi=Ri in documentCreateElement("script")?function(t){gt.appendChild(documentCreateElement("script")).onreadystatechange=function(){gt.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)}:(vi=post,n.addEventListener("message",listener,!1)));var Pi,_i,Ti,Ii,Ci,Ui,Fi,Mi,Gi={set:Si,clear:Ei},Ni=v.f,Bi=Gi.set,qi=n.MutationObserver||n.WebKitMutationObserver,Di=n.process,$i=n.Promise,Wi="process"==classofRaw(Di),zi=Ni(n,"queueMicrotask"),Vi=zi&&zi.value;Vi||(Pi=function(){var t,e;for(Wi&&(t=Di.domain)&&t.exit();_i;){e=_i.fn,_i=_i.next;try{e()}catch(t){throw _i?Ii():Ti=void 0,t}}Ti=void 0,t&&t.enter()},Wi?Ii=function(){Di.nextTick(Pi)}:qi&&!wi?(Ci=!0,Ui=document.createTextNode(""),new qi(Pi).observe(Ui,{characterData:!0}),Ii=function(){Ui.data=Ci=!Ci}):$i&&$i.resolve?(Fi=$i.resolve(void 0),Mi=Fi.then,Ii=function(){Mi.call(Fi,Pi)}):Ii=function(){Bi.call(n,Pi)});var Ji,Yi,Ki,Hi,Xi=Vi||function(t){var e={fn:t,next:void 0};Ti&&(Ti.next=e),_i||(_i=e,Ii()),Ti=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)},Qi={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,e){if(anObject(t),isObject(e)&&e.constructor===t)return e;var r=Qi.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}}},Zi=Gi.set,ta=wellKnownSymbol("species"),ea="Promise",ra=D.get,na=D.set,oa=D.getterFor(ea),ia=si,aa=n.TypeError,ca=n.document,ua=n.process,sa=getBuiltIn("fetch"),la=Qi.f,fa=la,ha="process"==classofRaw(ua),pa=!!(ca&&ca.createEvent&&n.dispatchEvent),da="unhandledrejection",ga=ut(ea,(function(){if(!(j(ia)!==String(ia))){if(66===xe)return!0;if(!ha&&"function"!=typeof PromiseRejectionEvent)return!0}if(xe>=51&&/native code/.test(ia))return!1;var t=ia.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[ta]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),va=ga||!function(t,e){if(!e&&!pi)return!1;var r=!1;try{var n={};n[hi]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){ia.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;Xi((function(){for(var o=e.value,i=1==e.state,a=0;n.length>a;){var c,u,s,l=n[a++],f=i?l.ok:l.fail,h=l.resolve,p=l.reject,d=l.domain;try{f?(i||(2===e.rejection&&onHandleUnhandled(t,e),e.rejection=1),!0===f?c=o:(d&&d.enter(),c=f(o),d&&(d.exit(),s=!0)),c===l.promise?p(aa("Promise-chain cycle")):(u=isThenable(c))?u.call(c,h,p):h(c)):p(o)}catch(t){d&&!s&&d.exit(),p(t)}}e.reactions=[],e.notified=!1,r&&!e.rejection&&onUnhandled(t,e)}))}},dispatchEvent=function(t,e,r){var o,i;pa?((o=ca.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===da&&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){Zi.call(n,(function(){var r,n=e.value;if(isUnhandled(e)&&(r=perform((function(){ha?ua.emit("unhandledRejection",n,t):dispatchEvent(da,t,n)})),e.rejection=ha||isUnhandled(e)?2:1,r.error))throw r.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t,e){Zi.call(n,(function(){ha?ua.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 aa("Promise can't be resolved itself");var o=isThenable(r);o?Xi((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)}}};ga&&(ia=function Promise(t){anInstance(this,ia,ea),aFunction$1(t),Ji.call(this);var e=ra(this);try{t(bind(internalResolve,this,e),bind(internalReject,this,e))}catch(t){internalReject(this,e,t)}},(Ji=function Promise(t){na(this,{type:ea,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll(ia.prototype,{then:function then(t,e){var r=oa(this),n=la(speciesConstructor(this,ia));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=ha?ua.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)}}),Yi=function(){var t=new Ji,e=ra(t);this.promise=t,this.resolve=bind(internalResolve,t,e),this.reject=bind(internalReject,t,e)},Qi.f=la=function(t){return t===ia||t===Ki?new Yi(t):fa(t)},"function"==typeof si&&(Hi=si.prototype.then,$(si.prototype,"then",(function then(t,e){var r=this;return new ia((function(t,e){Hi.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof sa&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve(ia,sa.apply(n,arguments))}}))),_export({global:!0,wrap:!0,forced:ga},{Promise:ia}),setToStringTag(ia,ea,!1),function(t){var e=getBuiltIn(t),r=m.f;o&&e&&!e[li]&&r(e,li,{configurable:!0,get:function(){return this}})}(ea),Ki=getBuiltIn(ea),_export({target:ea,stat:!0,forced:ga},{reject:function reject(t){var e=la(this);return e.reject.call(void 0,t),e.promise}}),_export({target:ea,stat:!0,forced:ga},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:ea,stat:!0,forced:va},{all:function all(t){var e=this,r=la(e),n=r.resolve,o=r.reject,i=perform((function(){var r=aFunction$1(e.resolve),i=[],a=0,c=1;fi(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=la(e),n=r.reject,o=perform((function(){var o=aFunction$1(e.resolve);fi(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var ya="toString",ma=RegExp.prototype,ba=ma.toString,wa=fails((function(){return"/a/b"!=ba.call({source:"a",flags:"b"})})),xa=ba.name!=ya;(wa||xa)&&$(RegExp.prototype,ya,(function toString(){var t=anObject(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in ma)?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===l)throw new Error("Generator is already running");if(n===f){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=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=l;var p=tryCatch(t,e,r);if("normal"===p.type){if(n=r.done?f:s,p.arg===h)continue;return{value:p.arg,done:r.done}}"throw"===p.type&&(n=f,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",l="executing",f="completed",h={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};p[i]=function(){return this};var d=Object.getPrototypeOf,g=d&&d(d(values([])));g&&g!==r&&n.call(g,i)&&(p=g);var v=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=v.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(v),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(v),define(v,c,"Generator"),v[i]=function(){return this},v.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 Sa=_t.find,Ea="find",Oa=!0,ka=arrayMethodUsesToLength(Ea);Ea in[]&&Array(1).find((function(){Oa=!1})),_export({target:"Array",proto:!0,forced:Oa||!ka},{find:function find(t){return Sa(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables(Ea);var ja=[].join,Aa=l!=Object,La=arrayMethodIsStrict("join",",");_export({target:"Array",proto:!0,forced:Aa||!La},{join:function join(t){return ja.call(toIndexedObject(this),void 0===t?",":t)}});var Ra=_t.some,Pa=arrayMethodIsStrict("some"),_a=arrayMethodUsesToLength("some");_export({target:"Array",proto:!0,forced:!Pa||!_a},{some:function some(t){return Ra(this,t,arguments.length>1?arguments[1]:void 0)}});var Ta=c.f,createMethod$3=function(t){return function(e){for(var r,n=toIndexedObject(e),i=pt(n),a=i.length,c=0,u=[];a>c;)r=i[c++],o&&!Ta.call(n,r)||u.push(t?[r,n[r]]:n[r]);return u}},Ia={entries:createMethod$3(!0),values:createMethod$3(!1)}.entries;_export({target:"Object",stat:!0},{entries:function entries(t){return Ia(t)}});var Ca=[].push,Ua=Math.min,Fa=4294967295,Ma=!fails((function(){return!RegExp(Fa,"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?Fa: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":""),l=0,f=new RegExp(t.source,s+"g");(i=Gr.call(f,n))&&!((a=f.lastIndex)>l&&(u.push(n.slice(l,i.index)),i.length>1&&i.index<n.length&&Ca.apply(u,i.slice(1)),c=i[0].length,l=a,u.length>=o));)f.lastIndex===i.index&&f.lastIndex++;return l===n.length?!c&&f.test("")||u.push(""):u.push(n.slice(l)),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,l=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Ma?"y":"g"),f=new u(Ma?a:"^(?:"+a.source+")",l),h=void 0===o?Fa:o>>>0;if(0===h)return[];if(0===c.length)return null===regexpExecAbstract(f,c)?[c]:[];for(var p=0,d=0,g=[];d<c.length;){f.lastIndex=Ma?d:0;var v,y=regexpExecAbstract(f,Ma?c:c.slice(d));if(null===y||(v=Ua(toLength(f.lastIndex+(Ma?0:d)),c.length))===p)d=advanceStringIndex(c,d,s);else{if(g.push(c.slice(p,d)),g.length===h)return g;for(var m=1;m<=y.length-1;m++)if(g.push(y[m]),g.length===h)return g;d=p=v}}return g.push(c.slice(p)),g}]}),!Ma);var Ga="\t\n\v\f\r    \u2028\u2029\ufeff",Na="["+Ga+"]",Ba=RegExp("^"+Na+Na+"*"),qa=RegExp(Na+Na+"*$"),createMethod$4=function(t){return function(e){var r=String(requireObjectCoercible(e));return 1&t&&(r=r.replace(Ba,"")),2&t&&(r=r.replace(qa,"")),r}},Da={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},$a=Da.trim;_export({target:"String",proto:!0,forced:function(t){return fails((function(){return!!Ga[t]()||"…"!="…"[t]()||Ga[t].name!==t}))}("trim")},{trim:function trim(){return $a(this)}});var Wa=/"/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(Wa,"&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 za=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:"imagelib",init:function init(t){var e=this;return _asyncToGenerator(regeneratorRuntime.mark((function _callee2(){var r,n,o,i,a,c,u,s,l,f,h,p,d,g,v,y,m,b,w,x,S;return regeneratorRuntime.wrap((function _callee2$(E){for(;;)switch(E.prev=E.next){case 0:return x=function _showBrowser(){var t=r("#imgbrowse");if(t.length)r("#imgbrowse_holder").show();else{r("<div id=imgbrowse_holder><div id=imgbrowse class=toolbar_button></div></div>").insertAfter("#svg_docprops"),t=r("#imgbrowse");var e=a.select_lib,n=r("<ul id=imglib_opts>").appendTo(t),o=r('<iframe src="javascript:0"/>').prependTo(t).hide().wrap("<div id=lib_framewrap>"),i=r("<h1>").prependTo(t).text(e).css({position:"absolute",top:0,left:0,width:"100%"}),u=r("<button>"+c.common.cancel+"</button>").appendTo(t).on("click touchend",(function(){r("#imgbrowse_holder").hide()})).css({position:"absolute",top:5,right:-10}),s=r("<span>").css({position:"absolute",top:5,left:10}).appendTo(t),l=r("<button hidden>"+a.show_list+"</button>").appendTo(s).on("click touchend",(function(){o.attr("src","about:blank").hide(),n.show(),i.text(e),l.hide()})).css({"margin-right":5}).hide();r("<select><option value=s>"+a.import_single+"</option><option value=m>"+a.import_multi+"</option><option value=o>"+a.open+"</option></select>").appendTo(s).change((function(){switch(p=r(this).val()){case"s":case"o":w(!1);break;case"m":w(!0)}})).css({"margin-top":10}),u.prepend(r.getSvgIcon("cancel",!0)),l.prepend(r.getSvgIcon("tool_imagelib",!0)),a.imgLibs.forEach((function(t){var e=t.name,a=t.url,c=t.description;r("<li>").appendTo(n).text(e).on("click touchend",(function(){o.attr("src",a).show(),i.text(e),n.hide(),l.show()})).append("<span>".concat(c,"</span>"))}))}},w=function _toggleMulti(t){r("#lib_framewrap, #imglib_opts").css({right:t?200:10}),v||(v=r("<div id=imglib_preview>").css({position:"absolute",top:45,right:10,width:180,bottom:45,background:"#fff",overflow:"auto"}).insertAfter("#lib_framewrap"),y=r("<button disabled>Import selected</button>").appendTo("#imgbrowse").on("click touchend",(function(){r.each(d,(function(t){var e=this[0],r=this[1];"svg"===e?u.importSvgString(r):f(r),u.moveSelectedElements(20*t,20*t,!1)})),v.empty(),d=[],r("#imgbrowse_holder").hide()})).css({position:"absolute",bottom:10,right:-10})),v.toggle(t),y.toggle(t)},b=function _onMessage3(){return(b=_asyncToGenerator(regeneratorRuntime.mark((function _callee(t){var e,a,m,b,w,x,S,E,O,k,j,A,L,R,P,_,T;return regeneratorRuntime.wrap((function _callee$(I){for(;;)switch(I.prev=I.next){case 0:if(e=t.origin,(a=t.data)&&["string","object"].includes(_typeof(a))){I.next=3;break}return I.abrupt("return");case 3:if(I.prev=3,"imagelib"===(a="object"===_typeof(a)?a:JSON.parse(a)).namespace){I.next=7;break}return I.abrupt("return");case 7:if(s.includes("*")||s.includes(e)){I.next=10;break}return console.log("Origin ".concat(e," not whitelisted for posting to ").concat(window.origin)),I.abrupt("return");case 10:if(x="href"in a,(w="name"in a)||!g){I.next=15;break}return g=!1,I.abrupt("return");case 15:x&&(m=a.href,a=a.data),r("#dialog_box").hide(),b=w?"meta":a.charAt(0),I.next=28;break;case 20:if(I.prev=20,I.t0=I.catch(3),"string"!=typeof a){I.next=28;break}if("{"===(S=a.charAt(0))||!g){I.next=27;break}return g=!1,I.abrupt("return");case 27:"|"===S&&(E=a.indexOf("|",1),m=a.substr(1,E-1),a=a.substr(E+1),b=a.charAt(0));case 28:I.t1=b,I.next="meta"===I.t1?31:"<"===I.t1?47:"d"===I.t1?49:60;break;case 31:if(g=!1,h[(k=a).id]=k,L=k.name||"file",R=c.notification.retrieving.replace("%s",L),"m"===p){I.next=43;break}return I.next=39,r.process_cancel(R);case 39:g=!0,r("#dialog_box").hide(),I.next=46;break;case 43:O=r("<div>").text(R).data("id",k.id),v.append(O),k.entry=O;case 46:return I.abrupt("return");case 47:return j=!0,I.abrupt("break",62);case 49:if(!a.startsWith("data:image/svg+xml")){I.next=57;break}return"data:image/svg+xml;base64,",P=a.substring("data:image/svg+xml;base64,".length),a=n(P),j=!0,I.abrupt("break",62);case 57:if(!a.startsWith("data:image/")){I.next=60;break}return A=!0,I.abrupt("break",62);case 60:return"m"!==p?l():h[m].entry.remove(),I.abrupt("return");case 62:I.t2=p,I.next="s"===I.t2?65:"m"===I.t2?68:"o"===I.t2?72:83;break;case 65:return j?u.importSvgString(a):A&&f(a),l(),I.abrupt("break",83);case 68:return d.push([j?"svg":"img",a]),k=h[m],j?(k&&k.name?_=k.name:(T=(new DOMParser).parseFromString(o(a),"text/xml").documentElement,_=r(T).children("title").first().text()||"(SVG #"+a.length+")"),k?v.children().each((function(){r(this).data("id")===m&&(k.preview_url?r(this).html(r("<span>").append(r("<img>").attr("src",k.preview_url),_)):r(this).text(_),y.removeAttr("disabled"))})):(v.append(r("<div>").text(_)),y.removeAttr("disabled"))):(k&&k.preview_url?(_=k.name||"",O=r("<span>").append(r("<img>").attr("src",k.preview_url),_)):O=r("<img>").attr("src",a),k?v.children().each((function(){r(this).data("id")===m&&(r(this).html(O),y.removeAttr("disabled"))})):(v.append(r("<div>").append(O)),y.removeAttr("disabled"))),I.abrupt("break",83);case 72:if(j){I.next=74;break}return I.abrupt("break",83);case 74:return l(),I.next=77,i.openPrep();case 77:if(I.sent){I.next=80;break}return I.abrupt("return");case 80:return u.clear(),u.setSvgString(a),I.abrupt("break",83);case 83:case"end":return I.stop()}}),_callee,null,[[3,20]])})))).apply(this,arguments)},m=function _onMessage2(t){return b.apply(this,arguments)},f=function _importImage(t){var e=u.addSVGElementFromJson({element:"image",attr:{x:0,y:0,width:0,height:0,id:u.getNextId(),style:"pointer-events:inherit"}});u.clearSelection(),u.addToSelection([e]),u.setImageURL(t)},l=function _closeBrowser(){r("#imgbrowse_holder").hide(),document.activeElement.blur()},r=t.$,n=t.decode64,o=t.dropXMLInternalSubset,i=e,E.next=10,za("imagelib",i.curPrefs.lang);case 10:return a=E.sent,c=i.uiStrings,u=i.canvas,s=a.imgLibs.map((function(t){var e=t.url;try{return new URL(e).origin}catch(t){return location.origin}})),h={},p="s",d=[],g=!1,window.addEventListener("message",m,!0),S=[{id:"tool_imagelib",type:"app_menu",icon:"imagelib.png",position:4,events:{mouseup:x}}],E.abrupt("return",{svgicons:"ext-imagelib.xml",buttons:a.buttons.map((function(t,e){return Object.assign(S[e],t)})),callback:function callback(){r("<style>").text("#imgbrowse_holder {position: absolute;top: 0;left: 0;width: 100%;height: 100%;background-color: rgba(0, 0, 0, .5);z-index: 5;}#imgbrowse {position: absolute;top: 25px;left: 25px;right: 25px;bottom: 25px;min-width: 300px;min-height: 200px;background: #B0B0B0;border: 1px outset #777;}#imgbrowse h1 {font-size: 20px;margin: .4em;text-align: center;}#lib_framewrap,#imgbrowse > ul {position: absolute;top: 45px;left: 10px;right: 10px;bottom: 10px;background: white;margin: 0;padding: 0;}#imgbrowse > ul {overflow: auto;}#imgbrowse > div {border: 1px solid #666;}#imglib_preview > div {padding: 5px;font-size: 12px;}#imglib_preview img {display: block;margin: 0 auto;max-height: 100px;}#imgbrowse li {list-style: none;padding: .5em;background: #E8E8E8;border-bottom: 1px solid #B0B0B0;line-height: 1.2em;font-style: sans-serif;}#imgbrowse li > span {color: #666;font-size: 15px;display: block;}#imgbrowse li:hover {background: #FFC;cursor: pointer;}#imgbrowse iframe {width: 100%;height: 100%;border: 0;}").appendTo("head")}});case 20:case"end":return E.stop()}}),_callee2)})))()}})}}}));