Files
svgedit/dist/editor/system/extensions/ext-imagelib/ext-imagelib.js
JFH 7ff3c3aebe V7 preview (#481)
* #issue-fix The new menu will ask if you want to erase the current content but it will ignore the answer

* #issue-fix  dialog needs to be closer than the original

* #issue-fix main menu alignment changes

* #issue_fix double click and opensvg issue fixed

* #issue-fix process_cancel change to seConfirm

* #issue-fix review how the top toolbar display when many buttons are displayed

* #issue-fix unwanted css reoved

* #issue-fix BOTTOM TOOLS Make sure all features of the bottom toolbar are working

* #issue-fix IMPORT IMAGE menu open issue fixed

* #issue-fix alert dialog overwrite style

* #issue-fix lint issue fixed

* npm update + associated fixes

* #36 look of opacity button should like the zoom button (without the dropdown button)

* #37 Clicking anywhere on the bottom bar (for example below the opacity button is displaying the “color popup”.)

* #38 The opacity button does not update with the current element

* #42 When you import an image, it works well but the dialog should disappear automatically

* Fixes #53: 4th option for the background display fixed

* Fixes #53: 4th option for the background fixed

* #49 the x button does not work

* Fixes #41: Alignment fixes in bottom bar

* fix test scenario

* #39 opacity button/stroke size/radius button don’t allow the 0 value

* #41 The look and alignment of stroke size and stroke style should be consistent with the rest of the bottom bar.

* #44 Text font dropdown is broken

* #52 Fix the export

* Fixes #44: Text font dropdown fixed

* Fixes #44: Text font dropdown fixed

* Fixes #44: Text font dropdown fixed

* Fixes #44: Text font dropdown fixed

* Update index.html

* update husky

* fixes

* moves from index.html to js

* fix #66

* fix #48 first set of new icons

* Reorganize tools in left panel to be more intuitive

* Update button styles to adapt to new icons

* Fix #48 new set of icons for alignments

* Variabilisation of icon bkgd colors
Update of color choice to fit new icons design

* Update canvas and rulers colors

* Improve layer handle design

* Modernize SVG Logo but keeping original spirit

* Fix #48 continue improve icons

* Continue to reorganise left panel

* Update right panel handle for layers

* Fix #48 new set of icons for main menu

* Improve main menu design

* Rework menu organisation

* Rework menu organisation

* Update input element design

* New icons

* Improve Zoom Module

* Improve Color Picker Module

* New icons

* New icons

* #65 restore the feature of start/end marker lines partially did

* #64 The export dialog needs to include the quality options (except for PDF)

* #39 opacity button/stroke size/radius button don’t allow the 0 value

* #39 eslint changes

* #69 menu button style overwrite

* #65 restore the feature of start/end marker lines

* #43 With a small window, the look of the top toolbar is broken

* #43 tool top alignment revert

* #46 Move this jQuery component to a web component  for graduate and picker components

* #46 Move this jQuery component to a web component

* remove some non standard lint rules

* #46 picker convert as pure javascript changes

* #46 jquery plugin convert to pure javascript

* #46 jquery plugin change to pure javascript

* #46 jquery remove and convert to pure javascript

* #46 slider issue fixed

* #46 ColorValuePicker and js convertion

* #46 globals $ remov from slider class

* #46 jquery convert pure javascript changes

* #46 jquery to js convertion changes

* #46 paintbox and current element color set issue fixed

* #46 unwanted files removed

* #46 $.extend modify changes

* #46 extend modifiey changes

* #46 $.extend change to pure javascript

* #46 extend and data changes

* #46 jquery removed

* #45 These buttons don't work and dropdown is broken

* #45 These buttons don't work and dropdown is broken

* #45 These buttons don't work and dropdown is broken commit reverted

* #43 With a small window, the look of the top toolbar is broken

* Update jQuery.jPicker.js

* #76 draggable modification changes

* #76 jquery-ui-1.8.17.custom.min.js removed from editor

* #76 jquery ui file removed

* npm update

* #77 console issue fixed

* #77 <SVG> button issue fixed

* #77 shortkey issue fixed

* #77 jquery hotkeys plugin changes

* #77 hotkey plugin related changes

* #78 hotkey related code comment.

* #78 js-hotkeys/jquery.hotkeys.min.js file removed from svgedit.js

* #51 Rewrite the color palette without elix

* #81 unwanted files removed

* #81 folder name renamed

* #81 folder rename changes

* #81 jquery-ui  folder renamed

* #81 jquery modify changes

* #81 globals $ removed

* remove licence-badger (breaks ci)

* build

* fix tests

* fix folder spelling

* skip accessibility for now

* Update onpush.yml

* use npm dragmove

* #82 jquery convertion changes

* #82 javascript convertion changes

* #82 workarea related javascript convertion changes

* #82 javascript convertion cahnges

* #82 ungroup button added changes

* #82 menu unwanted code removed and button changes

* Update .gitignore

* refactor with Panel classes

* add MainMenu class

* move handlers

* fix lint

* fix test

Co-authored-by: Agriya Dev5 <agriya.dev5@agriya.in>
Co-authored-by: mathieucura <mathieu@optimistik.fr>
2021-03-14 22:45:09 +01:00

10 lines
79 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
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){"use strict";return{execute:function(){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),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).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)}))}}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t){var e={exports:{}};return t(e,e.exports),e.exports}var check=function(t){return t&&t.Math==Math&&t},r=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof e&&e)||function(){return this}()||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},n=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a={f:i&&!o.call({1:2},1)?function propertyIsEnumerable(t){var e=i(this,t);return!!e&&e.enumerable}:o},createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},c={}.toString,classofRaw=function(t){return c.call(t).slice(8,-1)},s="".split,u=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 u(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)},f=r.document,p=isObject(f)&&isObject(f.createElement),documentCreateElement=function(t){return p?f.createElement(t):{}},h=!n&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),d=Object.getOwnPropertyDescriptor,g={f:n?d:function getOwnPropertyDescriptor(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),h)try{return d(t,e)}catch(t){}if(has(t,e))return createPropertyDescriptor(!a.f.call(t,e),t[e])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},m=Object.defineProperty,v={f:n?m:function defineProperty(t,e,r){if(anObject(t),e=toPrimitive(e,!0),anObject(r),h)try{return m(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}},y=n?function(t,e,r){return v.f(t,e,createPropertyDescriptor(1,r))}:function(t,e,r){return t[e]=r,t},setGlobal=function(t,e){try{y(r,t,e)}catch(n){r[t]=e}return e},b="__core-js_shared__",w=r[b]||setGlobal(b,{}),x=Function.toString;"function"!=typeof w.inspectSource&&(w.inspectSource=function(t){return x.call(t)});var S,_,E,k=w.inspectSource,O=r.WeakMap,L="function"==typeof O&&/native code/.test(k(O)),j=createCommonjsModule((function(t){(t.exports=function(t,e){return w[t]||(w[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.9.0",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),A=0,P=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++A+P).toString(36)},I=j("keys"),sharedKey=function(t){return I[t]||(I[t]=uid(t))},R={},T=r.WeakMap;if(L){var U=w.state||(w.state=new T),C=U.get,G=U.has,M=U.set;S=function(t,e){return e.facade=t,M.call(U,t,e),e},_=function(t){return C.call(U,t)||{}},E=function(t){return G.call(U,t)}}else{var N=sharedKey("state");R[N]=!0,S=function(t,e){return e.facade=t,y(t,N,e),e},_=function(t){return has(t,N)?t[N]:{}},E=function(t){return has(t,N)}}var D,B={set:S,get:_,has:E,enforce:function(t){return E(t)?_(t):S(t,{})},getterFor:function(t){return function(e){var r;if(!isObject(e)||(r=_(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},q=createCommonjsModule((function(t){var e=B.get,n=B.enforce,o=String(String).split("String");(t.exports=function(t,e,i,a){var c,s=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||has(i,"name")||y(i,"name",e),(c=n(i)).source||(c.source=o.join("string"==typeof e?e:""))),t!==r?(s?!l&&t[e]&&(u=!0):delete t[e],u?t[e]=i:y(t,e,i)):u?t[e]=i:setGlobal(e,i)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&e(this).source||k(this)}))})),$=r,aFunction=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,e){return arguments.length<2?aFunction($[t])||aFunction(r[t]):$[t]&&$[t][e]||r[t]&&r[t][e]},z=Math.ceil,V=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?V:z)(t)},W=Math.min,toLength=function(t){return t>0?W(toInteger(t),9007199254740991):0},K=Math.max,J=Math.min,toAbsoluteIndex=function(t,e){var r=toInteger(t);return r<0?K(r+e,0):J(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}},Y={includes:createMethod(!0),indexOf:createMethod(!1)},H=Y.indexOf,objectKeysInternal=function(t,e){var r,n=toIndexedObject(t),o=0,i=[];for(r in n)!has(R,r)&&has(n,r)&&i.push(r);for(;e.length>o;)has(n,r=e[o++])&&(~H(i,r)||i.push(r));return i},X=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Z=X.concat("length","prototype"),Q={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,Z)}},tt={f:Object.getOwnPropertySymbols},et=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var e=Q.f(anObject(t)),r=tt.f;return r?e.concat(r(t)):e},copyConstructorProperties=function(t,e){for(var r=et(e),n=v.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,st=g.f,_export=function(t,e){var n,o,i,a,c,s=t.target,u=t.global,l=t.stat;if(n=u?r:l?r[s]||setGlobal(s,{}):(r[s]||{}).prototype)for(o in e){if(a=e[o],i=t.noTargetGet?(c=st(n,o))&&c.value:n[o],!ct(u?o:s+(l?".":"#")+o,t.forced)&&void 0!==i){if(typeof a==typeof i)continue;copyConstructorProperties(a,i)}(t.sham||i&&i.sham)&&y(a,"sham",!0),q(n,o,a,t)}},ut=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),lt=ut&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ft=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,X)},ht=n?Object.defineProperties:function defineProperties(t,e){anObject(t);for(var r,n=pt(e),o=n.length,i=0;o>i;)v.f(t,r=n[i++],e[r]);return t},dt=getBuiltIn("document","documentElement"),gt=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"</"+"script>"},NullProtoObject=function(){try{D=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;NullProtoObject=D?function(t){t.write(scriptTag("")),t.close();var e=t.parentWindow.Object;return t=null,e}(D):((e=documentCreateElement("iframe")).style.display="none",dt.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()};R[gt]=!0;var mt=Object.create||function create(t,e){var r;return null!==t?(EmptyConstructor.prototype=anObject(t),r=new EmptyConstructor,EmptyConstructor.prototype=null,r[gt]=t):r=NullProtoObject(),void 0===e?r:ht(r,e)},vt=Q.f,yt={}.toString,bt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],wt={f:function getOwnPropertyNames(t){return bt&&"[object Window]"==yt.call(t)?function(t){try{return vt(t)}catch(t){return bt.slice()}}(t):vt(toIndexedObject(t))}},xt=j("wks"),St=r.Symbol,_t=lt?St:St&&St.withoutSetter||uid,wellKnownSymbol=function(t){return has(xt,t)||(ut&&has(St,t)?xt[t]=St[t]:xt[t]=_t("Symbol."+t)),xt[t]},Et={f:wellKnownSymbol},kt=v.f,defineWellKnownSymbol=function(t){var e=$.Symbol||($.Symbol={});has(e,t)||kt(e,t,{value:Et.f(t)})},Ot=v.f,Lt=wellKnownSymbol("toStringTag"),setToStringTag=function(t,e,r){t&&!has(t=r?t:t.prototype,Lt)&&Ot(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)}},jt=wellKnownSymbol("species"),arraySpeciesCreate=function(t,e){var r;return ft(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!ft(r.prototype)?isObject(r)&&null===(r=r[jt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},At=[].push,createMethod$1=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=7==t,c=5==t||i;return function(s,l,f,p){for(var h,d,g=toObject(s),m=u(g),v=functionBindContext(l,f,3),y=toLength(m.length),b=0,w=p||arraySpeciesCreate,x=e?w(s,y):r||a?w(s,0):void 0;y>b;b++)if((c||b in m)&&(d=v(h=m[b],b,g),t))if(e)x[b]=d;else if(d)switch(t){case 3:return!0;case 5:return h;case 6:return b;case 2:At.call(x,h)}else switch(t){case 4:return!1;case 7:At.call(x,h)}return i?-1:n||o?o:x}},Pt={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),filterOut:createMethod$1(7)},It=Pt.forEach,Rt=sharedKey("hidden"),Tt="Symbol",Ut=wellKnownSymbol("toPrimitive"),Ft=B.set,Ct=B.getterFor(Tt),Gt=Object.prototype,Mt=r.Symbol,Nt=getBuiltIn("JSON","stringify"),Dt=g.f,Bt=v.f,qt=wt.f,$t=a.f,zt=j("symbols"),Vt=j("op-symbols"),Wt=j("string-to-symbol-registry"),Kt=j("symbol-to-string-registry"),Jt=j("wks"),Yt=r.QObject,Ht=!Yt||!Yt.prototype||!Yt.prototype.findChild,Xt=n&&fails((function(){return 7!=mt(Bt({},"a",{get:function(){return Bt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Dt(Gt,e);n&&delete Gt[e],Bt(t,e,r),n&&t!==Gt&&Bt(Gt,e,n)}:Bt,wrap=function(t,e){var r=zt[t]=mt(Mt.prototype);return Ft(r,{type:Tt,tag:t,description:e}),n||(r.description=e),r},Zt=lt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Mt},Qt=function defineProperty(t,e,r){t===Gt&&Qt(Vt,e,r),anObject(t);var n=toPrimitive(e,!0);return anObject(r),has(zt,n)?(r.enumerable?(has(t,Rt)&&t[Rt][n]&&(t[Rt][n]=!1),r=mt(r,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,Rt)||Bt(t,Rt,createPropertyDescriptor(1,{})),t[Rt][n]=!0),Xt(t,n,r)):Bt(t,n,r)},te=function defineProperties(t,e){anObject(t);var r=toIndexedObject(e),o=pt(r).concat(oe(r));return It(o,(function(e){n&&!ee.call(r,e)||Qt(t,e,r[e])})),t},ee=function propertyIsEnumerable(t){var e=toPrimitive(t,!0),r=$t.call(this,e);return!(this===Gt&&has(zt,e)&&!has(Vt,e))&&(!(r||!has(this,e)||!has(zt,e)||has(this,Rt)&&this[Rt][e])||r)},re=function getOwnPropertyDescriptor(t,e){var r=toIndexedObject(t),n=toPrimitive(e,!0);if(r!==Gt||!has(zt,n)||has(Vt,n)){var o=Dt(r,n);return!o||!has(zt,n)||has(r,Rt)&&r[Rt][n]||(o.enumerable=!0),o}},ne=function getOwnPropertyNames(t){var e=qt(toIndexedObject(t)),r=[];return It(e,(function(t){has(zt,t)||has(R,t)||r.push(t)})),r},oe=function getOwnPropertySymbols(t){var e=t===Gt,r=qt(e?Vt:toIndexedObject(t)),n=[];return It(r,(function(t){!has(zt,t)||e&&!has(Gt,t)||n.push(zt[t])})),n};if(ut||(q((Mt=function Symbol(){if(this instanceof Mt)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,Rt)&&has(this[Rt],e)&&(this[Rt][e]=!1),Xt(this,e,createPropertyDescriptor(1,t))};return n&&Ht&&Xt(Gt,e,{configurable:!0,set:setter}),wrap(e,t)}).prototype,"toString",(function toString(){return Ct(this).tag})),q(Mt,"withoutSetter",(function(t){return wrap(uid(t),t)})),a.f=ee,v.f=Qt,g.f=re,Q.f=wt.f=ne,tt.f=oe,Et.f=function(t){return wrap(wellKnownSymbol(t),t)},n&&(Bt(Mt.prototype,"description",{configurable:!0,get:function description(){return Ct(this).description}}),q(Gt,"propertyIsEnumerable",ee,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!ut,sham:!ut},{Symbol:Mt}),It(pt(Jt),(function(t){defineWellKnownSymbol(t)})),_export({target:Tt,stat:!0,forced:!ut},{for:function(t){var e=String(t);if(has(Wt,e))return Wt[e];var r=Mt(e);return Wt[e]=r,Kt[r]=e,r},keyFor:function keyFor(t){if(!Zt(t))throw TypeError(t+" is not a symbol");if(has(Kt,t))return Kt[t]},useSetter:function(){Ht=!0},useSimple:function(){Ht=!1}}),_export({target:"Object",stat:!0,forced:!ut,sham:!n},{create:function create(t,e){return void 0===e?mt(t):te(mt(t),e)},defineProperty:Qt,defineProperties:te,getOwnPropertyDescriptor:re}),_export({target:"Object",stat:!0,forced:!ut},{getOwnPropertyNames:ne,getOwnPropertySymbols:oe}),_export({target:"Object",stat:!0,forced:fails((function(){tt.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return tt.f(toObject(t))}}),Nt){var ie=!ut||fails((function(){var t=Mt();return"[null]"!=Nt([t])||"{}"!=Nt({a:t})||"{}"!=Nt(Object(t))}));_export({target:"JSON",stat:!0,forced:ie},{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 ft(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Zt(e))return e}),o[1]=e,Nt.apply(null,o)}})}Mt.prototype[Ut]||y(Mt.prototype,Ut,Mt.prototype.valueOf),setToStringTag(Mt,Tt),R[Rt]=!0;var ae=v.f,ce=r.Symbol;if(n&&"function"==typeof ce&&(!("description"in ce.prototype)||void 0!==ce().description)){var se={},ue=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof ue?new ce(t):void 0===t?ce():ce(t);return""===t&&(se[e]=!0),e};copyConstructorProperties(ue,ce);var le=ue.prototype=ce.prototype;le.constructor=ue;var fe=le.toString,pe="Symbol(test)"==String(ce("test")),he=/^Symbol\((.*)\)[^)]+$/;ae(le,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,e=fe.call(t);if(has(se,t))return"";var r=pe?e.slice(7,-1):e.replace(he,"$1");return""===r?void 0:r}}),_export({global:!0,forced:!0},{Symbol:ue})}var de={};de[wellKnownSymbol("toStringTag")]="z";var ge="[object z]"===String(de),me=wellKnownSymbol("toStringTag"),ve="Arguments"==classofRaw(function(){return arguments}()),ye=ge?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),me))?r:ve?classofRaw(e):"Object"==(n=classofRaw(e))&&"function"==typeof e.callee?"Arguments":n},be=ge?{}.toString:function toString(){return"[object "+ye(this)+"]"};ge||q(Object.prototype,"toString",be,{unsafe:!0}),defineWellKnownSymbol("iterator");var we,xe,Se,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}},_e={codeAt:createMethod$2(!1),charAt:createMethod$2(!0)},Ee=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),ke=sharedKey("IE_PROTO"),Oe=Object.prototype,Le=Ee?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,ke)?t[ke]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Oe:null},je=wellKnownSymbol("iterator"),Ae=!1;[].keys&&("next"in(Se=[].keys())?(xe=Le(Le(Se)))!==Object.prototype&&(we=xe):Ae=!0),(null==we||fails((function(){var t={};return we[je].call(t)!==t})))&&(we={}),has(we,je)||y(we,je,(function(){return this}));var Pe={IteratorPrototype:we,BUGGY_SAFARI_ITERATORS:Ae},Ie={},Re=Pe.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(t,e,r){var n=e+" Iterator";return t.prototype=mt(Re,{next:createPropertyDescriptor(1,r)}),setToStringTag(t,n,!1),Ie[n]=returnThis$1,t},Te=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),Ue=Pe.IteratorPrototype,Fe=Pe.BUGGY_SAFARI_ITERATORS,Ce=wellKnownSymbol("iterator"),Ge="keys",Me="values",Ne="entries",returnThis$2=function(){return this},defineIterator=function(t,e,r,n,o,i,a){createIteratorConstructor(r,e,n);var c,s,u,getIterationMethod=function(t){if(t===o&&d)return d;if(!Fe&&t in p)return p[t];switch(t){case Ge:return function keys(){return new r(this,t)};case Me:return function values(){return new r(this,t)};case Ne:return function entries(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",f=!1,p=t.prototype,h=p[Ce]||p["@@iterator"]||o&&p[o],d=!Fe&&h||getIterationMethod(o),g="Array"==e&&p.entries||h;if(g&&(c=Le(g.call(new t)),Ue!==Object.prototype&&c.next&&(Le(c)!==Ue&&(Te?Te(c,Ue):"function"!=typeof c[Ce]&&y(c,Ce,returnThis$2)),setToStringTag(c,l,!0))),o==Me&&h&&h.name!==Me&&(f=!0,d=function values(){return h.call(this)}),p[Ce]!==d&&y(p,Ce,d),Ie[e]=d,o)if(s={values:getIterationMethod(Me),keys:i?d:getIterationMethod(Ge),entries:getIterationMethod(Ne)},a)for(u in s)(Fe||f||!(u in p))&&q(p,u,s[u]);else _export({target:e,proto:!0,forced:Fe||f},s);return s},De=_e.charAt,Be="String Iterator",qe=B.set,$e=B.getterFor(Be);defineIterator(String,"String",(function(t){qe(this,{type:Be,string:String(t),index:0})}),(function next(){var t,e=$e(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=De(r,n),e.index+=t.length,{value:t,done:!1})}));var ze=wellKnownSymbol("unscopables"),Ve=Array.prototype;null==Ve[ze]&&v.f(Ve,ze,{configurable:!0,value:mt(null)});var addToUnscopables=function(t){Ve[ze][t]=!0},We="Array Iterator",Ke=B.set,Je=B.getterFor(We),Ye=defineIterator(Array,"Array",(function(t,e){Ke(this,{type:We,target:toIndexedObject(t),index:0,kind:e})}),(function(){var t=Je(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");Ie.Arguments=Ie.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var He={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},Xe=wellKnownSymbol("iterator"),Ze=wellKnownSymbol("toStringTag"),Qe=Ye.values;for(var tr in He){var er=r[tr],rr=er&&er.prototype;if(rr){if(rr[Xe]!==Qe)try{y(rr,Xe,Qe)}catch(t){rr[Xe]=Qe}if(rr[Ze]||y(rr,Ze,tr),He[tr])for(var nr in Ye)if(rr[nr]!==Ye[nr])try{y(rr,nr,Ye[nr])}catch(t){rr[nr]=Ye[nr]}}}defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("toStringTag"),setToStringTag(Math,"Math",!0),setToStringTag(r.JSON,"JSON",!0);var or=fails((function(){Le(1)}));_export({target:"Object",stat:!0,forced:or,sham:!Ee},{getPrototypeOf:function getPrototypeOf(t){return Le(toObject(t))}});var arrayMethodIsStrict=function(t,e){var r=[][t];return!!r&&fails((function(){r.call(null,e||function(){throw 1},1)}))},ir=Pt.forEach,ar=arrayMethodIsStrict("forEach")?[].forEach:function forEach(t){return ir(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=ar},{forEach:ar});var cr=v.f,sr=Function.prototype,ur=sr.toString,lr=/^\s*function ([^ (]*)/,fr="name";n&&!(fr in sr)&&cr(sr,fr,{configurable:!0,get:function(){try{return ur.call(this).match(lr)[1]}catch(t){return""}}}),_export({target:"Object",stat:!0},{setPrototypeOf:Te});var pr=r.Promise,redefineAll=function(t,e,r){for(var n in e)q(t,n,e[n],r);return t},hr=wellKnownSymbol("species"),anInstance=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},dr=wellKnownSymbol("iterator"),gr=Array.prototype,isArrayIteratorMethod=function(t){return void 0!==t&&(Ie.Array===t||gr[dr]===t)},mr=wellKnownSymbol("iterator"),getIteratorMethod=function(t){if(null!=t)return t[mr]||t["@@iterator"]||Ie[ye(t)]},iteratorClose=function(t){var e=t.return;if(void 0!==e)return anObject(e.call(t)).value},Result=function(t,e){this.stopped=t,this.result=e},iterate=function(t,e,r){var n,o,i,a,c,s,u,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),d=functionBindContext(e,l,1+f+h),stop=function(t){return n&&iteratorClose(n),new Result(!0,t)},callFn=function(t){return f?(anObject(t),h?d(t[0],t[1],stop):d(t[0],t[1])):h?d(t,stop):d(t)};if(p)n=t;else{if("function"!=typeof(o=getIteratorMethod(t)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(o)){for(i=0,a=toLength(t.length);a>i;i++)if((c=callFn(t[i]))&&c instanceof Result)return c;return new Result(!1)}n=o.call(t)}for(s=n.next;!(u=s.call(n)).done;){try{c=callFn(u.value)}catch(t){throw iteratorClose(n),t}if("object"==typeof c&&c&&c instanceof Result)return c}return new Result(!1)},vr=wellKnownSymbol("iterator"),yr=!1;try{var br=0,wr={next:function(){return{done:!!br++}},return:function(){yr=!0}};wr[vr]=function(){return this},Array.from(wr,(function(){throw 2}))}catch(t){}var xr,Sr,_r,Er=wellKnownSymbol("species"),kr=getBuiltIn("navigator","userAgent")||"",Or=/(iphone|ipod|ipad).*applewebkit/i.test(kr),Lr="process"==classofRaw(r.process),jr=r.location,Ar=r.setImmediate,Pr=r.clearImmediate,Ir=r.process,Rr=r.MessageChannel,Tr=r.Dispatch,Ur=0,Fr={},Cr="onreadystatechange",run=function(t){if(Fr.hasOwnProperty(t)){var e=Fr[t];delete Fr[t],e()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){r.postMessage(t+"",jr.protocol+"//"+jr.host)};Ar&&Pr||(Ar=function setImmediate(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return Fr[++Ur]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},xr(Ur),Ur},Pr=function clearImmediate(t){delete Fr[t]},Lr?xr=function(t){Ir.nextTick(runner(t))}:Tr&&Tr.now?xr=function(t){Tr.now(runner(t))}:Rr&&!Or?(_r=(Sr=new Rr).port2,Sr.port1.onmessage=listener,xr=functionBindContext(_r.postMessage,_r,1)):r.addEventListener&&"function"==typeof postMessage&&!r.importScripts&&jr&&"file:"!==jr.protocol&&!fails(post)?(xr=post,r.addEventListener("message",listener,!1)):xr=Cr in documentCreateElement("script")?function(t){dt.appendChild(documentCreateElement("script")).onreadystatechange=function(){dt.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)});var Gr,Mr,Nr,Dr,Br,qr,$r,zr,Vr={set:Ar,clear:Pr},Wr=/web0s(?!.*chrome)/i.test(kr),Kr=g.f,Jr=Vr.set,Yr=r.MutationObserver||r.WebKitMutationObserver,Hr=r.document,Xr=r.process,Zr=r.Promise,Qr=Kr(r,"queueMicrotask"),tn=Qr&&Qr.value;tn||(Gr=function(){var t,e;for(Lr&&(t=Xr.domain)&&t.exit();Mr;){e=Mr.fn,Mr=Mr.next;try{e()}catch(t){throw Mr?Dr():Nr=void 0,t}}Nr=void 0,t&&t.enter()},Or||Lr||Wr||!Yr||!Hr?Zr&&Zr.resolve?($r=Zr.resolve(void 0),zr=$r.then,Dr=function(){zr.call($r,Gr)}):Dr=Lr?function(){Xr.nextTick(Gr)}:function(){Jr.call(r,Gr)}:(Br=!0,qr=Hr.createTextNode(""),new Yr(Gr).observe(qr,{characterData:!0}),Dr=function(){qr.data=Br=!Br}));var en,rn,nn=tn||function(t){var e={fn:t,next:void 0};Nr&&(Nr.next=e),Mr||(Mr=e,Dr()),Nr=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)},on={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,e){if(anObject(t),isObject(e)&&e.constructor===t)return e;var r=on.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}}},an=r.process,cn=an&&an.versions,sn=cn&&cn.v8;sn?rn=(en=sn.split("."))[0]+en[1]:kr&&(!(en=kr.match(/Edge\/(\d+)/))||en[1]>=74)&&(en=kr.match(/Chrome\/(\d+)/))&&(rn=en[1]);var un,ln,fn,pn,hn=rn&&+rn,dn=Vr.set,gn=wellKnownSymbol("species"),mn="Promise",vn=B.get,yn=B.set,bn=B.getterFor(mn),wn=pr,xn=r.TypeError,Sn=r.document,_n=r.process,En=getBuiltIn("fetch"),kn=on.f,On=kn,Ln=!!(Sn&&Sn.createEvent&&r.dispatchEvent),jn="function"==typeof PromiseRejectionEvent,An="unhandledrejection",Pn=ct(mn,(function(){if(!(k(wn)!==String(wn))){if(66===hn)return!0;if(!Lr&&!jn)return!0}if(hn>=51&&/native code/.test(wn))return!1;var t=wn.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[gn]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),In=Pn||!function(t,e){if(!e&&!yr)return!1;var r=!1;try{var n={};n[vr]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){wn.all(t).catch((function(){}))})),isThenable=function(t){var e;return!(!isObject(t)||"function"!=typeof(e=t.then))&&e},notify$1=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;nn((function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var a,c,s,u=r[i++],l=o?u.ok:u.fail,f=u.resolve,p=u.reject,h=u.domain;try{l?(o||(2===t.rejection&&onHandleUnhandled(t),t.rejection=1),!0===l?a=n:(h&&h.enter(),a=l(n),h&&(h.exit(),s=!0)),a===u.promise?p(xn("Promise-chain cycle")):(c=isThenable(a))?c.call(a,f,p):f(a)):p(n)}catch(t){h&&!s&&h.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&onUnhandled(t)}))}},dispatchEvent=function(t,e,n){var o,i;Ln?((o=Sn.createEvent("Event")).promise=e,o.reason=n,o.initEvent(t,!1,!0),r.dispatchEvent(o)):o={promise:e,reason:n},!jn&&(i=r["on"+t])?i(o):t===An&&function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},onUnhandled=function(t){dn.call(r,(function(){var e,r=t.facade,n=t.value;if(isUnhandled(t)&&(e=perform((function(){Lr?_n.emit("unhandledRejection",n,r):dispatchEvent(An,r,n)})),t.rejection=Lr||isUnhandled(t)?2:1,e.error))throw e.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t){dn.call(r,(function(){var e=t.facade;Lr?_n.emit("rejectionHandled",e):dispatchEvent("rejectionhandled",e,t.value)}))},bind=function(t,e,r){return function(n){t(e,n,r)}},internalReject=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,notify$1(t,!0))},internalResolve=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw xn("Promise can't be resolved itself");var n=isThenable(e);n?nn((function(){var r={done:!1};try{n.call(e,bind(internalResolve,r,t),bind(internalReject,r,t))}catch(e){internalReject(r,e,t)}})):(t.value=e,t.state=1,notify$1(t,!1))}catch(e){internalReject({done:!1},e,t)}}};Pn&&(wn=function Promise(t){anInstance(this,wn,mn),aFunction$1(t),un.call(this);var e=vn(this);try{t(bind(internalResolve,e),bind(internalReject,e))}catch(t){internalReject(e,t)}},(un=function Promise(t){yn(this,{type:mn,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=redefineAll(wn.prototype,{then:function then(t,e){var r,n,o,i=bn(this),a=kn((r=wn,void 0===(o=anObject(this).constructor)||null==(n=anObject(o)[Er])?r:aFunction$1(n)));return a.ok="function"!=typeof t||t,a.fail="function"==typeof e&&e,a.domain=Lr?_n.domain:void 0,i.parent=!0,i.reactions.push(a),0!=i.state&&notify$1(i,!1),a.promise},catch:function(t){return this.then(void 0,t)}}),ln=function(){var t=new un,e=vn(t);this.promise=t,this.resolve=bind(internalResolve,e),this.reject=bind(internalReject,e)},on.f=kn=function(t){return t===wn||t===fn?new ln(t):On(t)},"function"==typeof pr&&(pn=pr.prototype.then,q(pr.prototype,"then",(function then(t,e){var r=this;return new wn((function(t,e){pn.call(r,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof En&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve(wn,En.apply(r,arguments))}}))),_export({global:!0,wrap:!0,forced:Pn},{Promise:wn}),setToStringTag(wn,mn,!1),function(t){var e=getBuiltIn(t),r=v.f;n&&e&&!e[hr]&&r(e,hr,{configurable:!0,get:function(){return this}})}(mn),fn=getBuiltIn(mn),_export({target:mn,stat:!0,forced:Pn},{reject:function reject(t){var e=kn(this);return e.reject.call(void 0,t),e.promise}}),_export({target:mn,stat:!0,forced:Pn},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:mn,stat:!0,forced:In},{all:function all(t){var e=this,r=kn(e),n=r.resolve,o=r.reject,i=perform((function(){var r=aFunction$1(e.resolve),i=[],a=0,c=1;iterate(t,(function(t){var s=a++,u=!1;i.push(void 0),c++,r.call(e,t).then((function(t){u||(u=!0,i[s]=t,--c||n(i))}),o)})),--c||n(i)}));return i.error&&o(i.value),r.promise},race:function race(t){var e=this,r=kn(e),n=r.reject,o=perform((function(){var o=aFunction$1(e.resolve);iterate(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});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},Rn="toString",Tn=RegExp.prototype,Un=Tn.toString,Fn=fails((function(){return"/a/b"!=Un.call({source:"a",flags:"b"})})),Cn=Un.name!=Rn;for(var Gn in(Fn||Cn)&&q(RegExp.prototype,Rn,(function toString(){var t=anObject(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in Tn)?regexpFlags.call(t):r)}),{unsafe:!0}),He){var Mn=r[Gn],Nn=Mn&&Mn.prototype;if(Nn&&Nn.forEach!==ar)try{y(Nn,"forEach",ar)}catch(t){Nn.forEach=ar}}var Dn=[].reverse,Bn=[1,2];_export({target:"Array",proto:!0,forced:String(Bn)===String(Bn.reverse())},{reverse:function reverse(){return ft(this)&&(this.length=this.length),Dn.call(this)}});var createProperty=function(t,e,r){var n=toPrimitive(e);n in t?v.f(t,n,createPropertyDescriptor(0,r)):t[n]=r},qn=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(t){return hn>=51||!fails((function(){var e=[];return(e.constructor={})[qn]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},$n=arrayMethodHasSpeciesSupport("slice"),zn=wellKnownSymbol("species"),Vn=[].slice,Wn=Math.max;_export({target:"Array",proto:!0,forced:!$n},{slice:function slice(t,e){var r,n,o,i=toIndexedObject(this),a=toLength(i.length),c=toAbsoluteIndex(t,a),s=toAbsoluteIndex(void 0===e?a:e,a);if(ft(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!ft(r.prototype)?isObject(r)&&null===(r=r[zn])&&(r=void 0):r=void 0,r===Array||void 0===r))return Vn.call(i,c,s);for(n=new(void 0===r?Array:r)(Wn(s-c,0)),o=0;c<s;c++,o++)c in i&&createProperty(n,o,i[c]);return n.length=o,n}}),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=s;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===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===s)throw n=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=l;var h=tryCatch(t,e,r);if("normal"===h.type){if(n=r.done?f:u,h.arg===p)continue;return{value:h.arg,done:r.done}}"throw"===h.type&&(n=f,r.method="throw",r.arg=h.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 s="suspendedStart",u="suspendedYield",l="executing",f="completed",p={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var h={};h[i]=function(){return this};var d=Object.getPrototypeOf,g=d&&d(d(values([])));g&&g!==r&&n.call(g,i)&&(h=g);var m=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(h);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 s=c.arg,u=s.value;return u&&"object"===_typeof(u)&&n.call(u,"__await")?e.resolve(u.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(u).then((function(t){s.value=t,i(s)}),(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 p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=tryCatch(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;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,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}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=m.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(m),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(m),define(m,c,"Generator"),m[i]=function(){return this},m.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"),s=n.call(i,"finallyLoc");if(c&&s){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(!s)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,p):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),p},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),p}},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),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}));var Kn=Pt.map,Jn=arrayMethodHasSpeciesSupport("map");_export({target:"Array",proto:!0,forced:!Jn},{map:function map(t){return Kn(this,t,arguments.length>1?arguments[1]:void 0)}});var Yn=wellKnownSymbol("iterator"),Hn=!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[Yn]||"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})),Xn=Object.assign,Zn=Object.defineProperty,Qn=!Xn||fails((function(){if(n&&1!==Xn({b:1},Xn(Zn({},"a",{enumerable:!0,get:function(){Zn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=Xn({},t)[r]||pt(Xn({},e)).join("")!=o}))?function assign(t,e){for(var r=toObject(t),o=arguments.length,i=1,c=tt.f,s=a.f;o>i;)for(var l,f=u(arguments[i++]),p=c?pt(f).concat(c(f)):pt(f),h=p.length,d=0;h>d;)l=p[d++],n&&!s.call(f,l)||(r[l]=f[l]);return r}:Xn,callWithSafeIterationClosing=function(t,e,r,n){try{return n?e(anObject(r)[0],r[1]):e(r)}catch(e){throw iteratorClose(t),e}},to=function from(t){var e,r,n,o,i,a,c=toObject(t),s="function"==typeof this?this:Array,u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,p=getIteratorMethod(c),h=0;if(f&&(l=functionBindContext(l,u>2?arguments[2]:void 0,2)),null==p||s==Array&&isArrayIteratorMethod(p))for(r=new s(e=toLength(c.length));e>h;h++)a=f?l(c[h],h):c[h],createProperty(r,h,a);else for(i=(o=p.call(c)).next,r=new s;!(n=i.call(o)).done;h++)a=f?callWithSafeIterationClosing(o,l,[n.value,h],!0):n.value,createProperty(r,h,a);return r.length=h,r},eo=2147483647,ro=/[^\0-\u007E]/,no=/[.\u3002\uFF0E\uFF61]/g,oo="Overflow: input needs wider integers to process",io=Math.floor,ao=String.fromCharCode,digitToBasic=function(t){return t+22+75*(t<26)},adapt=function(t,e,r){var n=0;for(t=r?io(t/700):t>>1,t+=io(t/e);t>455;n+=36)t=io(t/35);return io(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(ao(r));var s=n.length,u=s;for(s&&n.push("-");u<o;){var l=eo;for(e=0;e<t.length;e++)(r=t[e])>=i&&r<l&&(l=r);var f=u+1;if(l-i>io((eo-a)/f))throw RangeError(oo);for(a+=(l-i)*f,i=l,e=0;e<t.length;e++){if((r=t[e])<i&&++a>eo)throw RangeError(oo);if(r==i){for(var p=a,h=36;;h+=36){var d=h<=c?1:h>=c+26?26:h-c;if(p<d)break;var g=p-d,m=36-d;n.push(ao(digitToBasic(d+g%m))),p=io(g/m)}n.push(ao(digitToBasic(p))),c=adapt(a,f,u==s),a=0,++u}}++a,++i}return n.join("")},getIterator=function(t){var e=getIteratorMethod(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return anObject(e.call(t))},co=getBuiltIn("fetch"),so=getBuiltIn("Headers"),uo=wellKnownSymbol("iterator"),lo="URLSearchParams",fo="URLSearchParamsIterator",po=B.set,ho=B.getterFor(lo),go=B.getterFor(fo),mo=/\+/g,vo=Array(4),percentSequence=function(t){return vo[t-1]||(vo[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(mo," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(percentSequence(r--),percentDecode);return e}},yo=/[!'()~]|%20/g,bo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(t){return bo[t]},serialize=function(t){return encodeURIComponent(t).replace(yo,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")},wo=createIteratorConstructor((function Iterator(t,e){po(this,{type:fo,iterator:getIterator(ho(t).entries),kind:e})}),"Iterator",(function next(){var t=go(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})),xo=function URLSearchParams(){anInstance(this,xo,lo);var t,e,r,n,o,i,a,c,s,u=arguments.length>0?arguments[0]:void 0,l=this,f=[];if(po(l,{type:lo,entries:f,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==u)if(isObject(u))if("function"==typeof(t=getIteratorMethod(u)))for(r=(e=t.call(u)).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(s in u)has(u,s)&&f.push({key:s,value:u[s]+""});else parseSearchParams(f,"string"==typeof u?"?"===u.charAt(0)?u.slice(1):u:u+"")},So=xo.prototype;redefineAll(So,{append:function append(t,e){validateArgumentsLength(arguments.length,2);var r=ho(this);r.entries.push({key:t+"",value:e+""}),r.updateURL()},delete:function(t){validateArgumentsLength(arguments.length,1);for(var e=ho(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=ho(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=ho(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=ho(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=ho(this),o=n.entries,i=!1,a=t+"",c=e+"",s=0;s<o.length;s++)(r=o[s]).key===a&&(i?o.splice(s--,1):(i=!0,r.value=c));i||o.push({key:a,value:c}),n.updateURL()},sort:function sort(){var t,e,r,n=ho(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=ho(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 wo(this,"keys")},values:function values(){return new wo(this,"values")},entries:function entries(){return new wo(this,"entries")}},{enumerable:!0}),q(So,uo,So.entries),q(So,"toString",(function toString(){for(var t,e=ho(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(xo,lo),_export({global:!0,forced:!Hn},{URLSearchParams:xo}),Hn||"function"!=typeof co||"function"!=typeof so||_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,ye(r)===lo&&((n=e.headers?new so(e.headers):new so).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),e=mt(e,{body:createPropertyDescriptor(0,String(r)),headers:createPropertyDescriptor(0,n)}))),o.push(e)),co.apply(this,o)}});var _o,Eo={URLSearchParams:xo,getState:ho},ko=_e.codeAt,Oo=r.URL,Lo=Eo.URLSearchParams,jo=Eo.getState,Ao=B.set,Po=B.getterFor("URL"),Io=Math.floor,Ro=Math.pow,To="Invalid scheme",Uo="Invalid host",Fo="Invalid port",Co=/[A-Za-z]/,Go=/[\d+-.A-Za-z]/,Mo=/\d/,No=/^(0x|0X)/,Do=/^[0-7]+$/,Bo=/^\d+$/,qo=/^[\dA-Fa-f]+$/,$o=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,zo=/[\u0000\t\u000A\u000D #/:?@[\\]]/,Vo=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,Wo=/[\t\u000A\u000D]/g,parseHost=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return Uo;if(!(r=parseIPv6(e.slice(1,-1))))return Uo;t.host=r}else if(isSpecial(t)){if(e=function(t){var e,r,n=[],o=t.toLowerCase().replace(no,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(ro.test(r)?"xn--"+encode(r):r);return n.join(".")}(e),$o.test(e))return Uo;if(null===(r=parseIPv4(e)))return Uo;t.host=r}else{if(zo.test(e))return Uo;for(r="",n=to(e),o=0;o<n.length;o++)r+=percentEncode(n[o],Ko);t.host=r}},parseIPv4=function(t){var e,r,n,o,i,a,c,s=t.split(".");if(s.length&&""==s[s.length-1]&&s.pop(),(e=s.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=s[n]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=No.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?Bo:8==i?Do:qo).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>=Ro(256,5-e))return null}else if(a>255)return null;for(c=r.pop(),n=0;n<r.length;n++)c+=r[n]*Ro(256,3-n);return c},parseIPv6=function(t){var e,r,n,o,i,a,c,s=[0,0,0,0,0,0,0,0],u=0,l=null,f=0,char=function(){return t.charAt(f)};if(":"==char()){if(":"!=t.charAt(1))return;f+=2,l=++u}for(;char();){if(8==u)return;if(":"!=char()){for(e=r=0;r<4&&qo.test(char());)e=16*e+parseInt(char(),16),f++,r++;if("."==char()){if(0==r)return;if(f-=r,u>6)return;for(n=0;char();){if(o=null,n>0){if(!("."==char()&&n<4))return;f++}if(!Mo.test(char()))return;for(;Mo.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++}s[u]=256*s[u]+o,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==char()){if(f++,!char())return}else if(char())return;s[u++]=e}else{if(null!==l)return;f++,l=++u}}if(null!==l)for(a=u-l,u=7;0!=u&&a>0;)c=s[u],s[u--]=s[l+a-1],s[l+--a]=c;else if(8!=u)return;return s},serializeHost=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=Io(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},Ko={},Jo=Qn({},Ko,{" ":1,'"':1,"<":1,">":1,"`":1}),Yo=Qn({},Jo,{"#":1,"?":1,"{":1,"}":1}),Ho=Qn({},Yo,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(t,e){var r=ko(t,0);return r>32&&r<127&&!has(e,t)?t:encodeURIComponent(t)},Xo={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(t){return has(Xo,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&&Co.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()},Zo={},Qo={},ti={},ei={},ri={},ni={},oi={},ii={},ai={},ci={},si={},ui={},li={},fi={},pi={},hi={},di={},gi={},mi={},vi={},yi={},parseURL=function(t,e,r,n){var o,i,a,c,s,u=r||Zo,l=0,f="",p=!1,h=!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(Vo,"")),e=e.replace(Wo,""),o=to(e);l<=o.length;){switch(i=o[l],u){case Zo:if(!i||!Co.test(i)){if(r)return To;u=ti;continue}f+=i.toLowerCase(),u=Qo;break;case Qo:if(i&&(Go.test(i)||"+"==i||"-"==i||"."==i))f+=i.toLowerCase();else{if(":"!=i){if(r)return To;f="",u=ti,l=0;continue}if(r&&(isSpecial(t)!=has(Xo,f)||"file"==f&&(includesCredentials(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=f,r)return void(isSpecial(t)&&Xo[t.scheme]==t.port&&(t.port=null));f="","file"==t.scheme?u=fi:isSpecial(t)&&n&&n.scheme==t.scheme?u=ei:isSpecial(t)?u=ii:"/"==o[l+1]?(u=ri,l++):(t.cannotBeABaseURL=!0,t.path.push(""),u=mi)}break;case ti:if(!n||n.cannotBeABaseURL&&"#"!=i)return To;if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,u=yi;break}u="file"==n.scheme?fi:ni;continue;case ei:if("/"!=i||"/"!=o[l+1]){u=ni;continue}u=ai,l++;break;case ri:if("/"==i){u=ci;break}u=gi;continue;case ni:if(t.scheme=n.scheme,i==_o)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))u=oi;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="",u=vi;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(),u=gi;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="",u=yi}break;case oi:if(!isSpecial(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,u=gi;continue}u=ci}else u=ai;break;case ii:if(u=ai,"/"!=i||"/"!=f.charAt(l+1))continue;l++;break;case ai:if("/"!=i&&"\\"!=i){u=ci;continue}break;case ci:if("@"==i){p&&(f="%40"+f),p=!0,a=to(f);for(var g=0;g<a.length;g++){var m=a[g];if(":"!=m||d){var v=percentEncode(m,Ho);d?t.password+=v:t.username+=v}else d=!0}f=""}else if(i==_o||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(p&&""==f)return"Invalid authority";l-=to(f).length+1,f="",u=si}else f+=i;break;case si:case ui:if(r&&"file"==t.scheme){u=hi;continue}if(":"!=i||h){if(i==_o||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)){if(isSpecial(t)&&""==f)return Uo;if(r&&""==f&&(includesCredentials(t)||null!==t.port))return;if(c=parseHost(t,f))return c;if(f="",u=di,r)return;continue}"["==i?h=!0:"]"==i&&(h=!1),f+=i}else{if(""==f)return Uo;if(c=parseHost(t,f))return c;if(f="",u=li,r==ui)return}break;case li:if(!Mo.test(i)){if(i==_o||"/"==i||"?"==i||"#"==i||"\\"==i&&isSpecial(t)||r){if(""!=f){var y=parseInt(f,10);if(y>65535)return Fo;t.port=isSpecial(t)&&y===Xo[t.scheme]?null:y,f=""}if(r)return;u=di;continue}return Fo}f+=i;break;case fi:if(t.scheme="file","/"==i||"\\"==i)u=pi;else{if(!n||"file"!=n.scheme){u=gi;continue}if(i==_o)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="",u=vi;else{if("#"!=i){startsWithWindowsDriveLetter(o.slice(l).join(""))||(t.host=n.host,t.path=n.path.slice(),shortenURLsPath(t)),u=gi;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",u=yi}}break;case pi:if("/"==i||"\\"==i){u=hi;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),u=gi;continue;case hi:if(i==_o||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&isWindowsDriveLetter(f))u=gi;else if(""==f){if(t.host="",r)return;u=di}else{if(c=parseHost(t,f))return c;if("localhost"==t.host&&(t.host=""),r)return;f="",u=di}continue}f+=i;break;case di:if(isSpecial(t)){if(u=gi,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=_o&&(u=gi,"/"!=i))continue}else t.fragment="",u=yi;else t.query="",u=vi;break;case gi:if(i==_o||"/"==i||"\\"==i&&isSpecial(t)||!r&&("?"==i||"#"==i)){if(".."===(s=(s=f).toLowerCase())||"%2e."===s||".%2e"===s||"%2e%2e"===s?(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==_o||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",u=vi):"#"==i&&(t.fragment="",u=yi)}else f+=percentEncode(i,Yo);break;case mi:"?"==i?(t.query="",u=vi):"#"==i?(t.fragment="",u=yi):i!=_o&&(t.path[0]+=percentEncode(i,Ko));break;case vi:r||"#"!=i?i!=_o&&("'"==i&&isSpecial(t)?t.query+="%27":t.query+="#"==i?"%23":percentEncode(i,Ko)):(t.fragment="",u=yi);break;case yi:i!=_o&&(t.fragment+=percentEncode(i,Jo))}l++}},bi=function URL(t){var e,r,o=anInstance(this,bi,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(t),c=Ao(o,{type:"URL"});if(void 0!==i)if(i instanceof bi)e=Po(i);else if(r=parseURL(e={},String(i)))throw TypeError(r);if(r=parseURL(c,a,null,e))throw TypeError(r);var s=c.searchParams=new Lo,u=jo(s);u.updateSearchParams(c.query),u.updateURL=function(){c.query=String(s)||null},n||(o.href=serializeURL.call(o),o.origin=getOrigin.call(o),o.protocol=getProtocol.call(o),o.username=getUsername.call(o),o.password=getPassword.call(o),o.host=getHost.call(o),o.hostname=getHostname.call(o),o.port=getPort.call(o),o.pathname=getPathname.call(o),o.search=getSearch.call(o),o.searchParams=getSearchParams.call(o),o.hash=getHash.call(o))},wi=bi.prototype,serializeURL=function(){var t=Po(this),e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,c=t.query,s=t.fragment,u=e+":";return null!==o?(u+="//",includesCredentials(t)&&(u+=r+(n?":"+n:"")+"@"),u+=serializeHost(o),null!==i&&(u+=":"+i)):"file"==e&&(u+="//"),u+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==c&&(u+="?"+c),null!==s&&(u+="#"+s),u},getOrigin=function(){var t=Po(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 Po(this).scheme+":"},getUsername=function(){return Po(this).username},getPassword=function(){return Po(this).password},getHost=function(){var t=Po(this),e=t.host,r=t.port;return null===e?"":null===r?serializeHost(e):serializeHost(e)+":"+r},getHostname=function(){var t=Po(this).host;return null===t?"":serializeHost(t)},getPort=function(){var t=Po(this).port;return null===t?"":String(t)},getPathname=function(){var t=Po(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},getSearch=function(){var t=Po(this).query;return t?"?"+t:""},getSearchParams=function(){return Po(this).searchParams},getHash=function(){var t=Po(this).fragment;return t?"#"+t:""},accessorDescriptor=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(n&&ht(wi,{href:accessorDescriptor(serializeURL,(function(t){var e=Po(this),r=String(t),n=parseURL(e,r);if(n)throw TypeError(n);jo(e.searchParams).updateSearchParams(e.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(t){var e=Po(this);parseURL(e,String(t)+":",Zo)})),username:accessorDescriptor(getUsername,(function(t){var e=Po(this),r=to(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=percentEncode(r[n],Ho)}})),password:accessorDescriptor(getPassword,(function(t){var e=Po(this),r=to(String(t));if(!cannotHaveUsernamePasswordPort(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=percentEncode(r[n],Ho)}})),host:accessorDescriptor(getHost,(function(t){var e=Po(this);e.cannotBeABaseURL||parseURL(e,String(t),si)})),hostname:accessorDescriptor(getHostname,(function(t){var e=Po(this);e.cannotBeABaseURL||parseURL(e,String(t),ui)})),port:accessorDescriptor(getPort,(function(t){var e=Po(this);cannotHaveUsernamePasswordPort(e)||(""==(t=String(t))?e.port=null:parseURL(e,t,li))})),pathname:accessorDescriptor(getPathname,(function(t){var e=Po(this);e.cannotBeABaseURL||(e.path=[],parseURL(e,t+"",di))})),search:accessorDescriptor(getSearch,(function(t){var e=Po(this);""==(t=String(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",parseURL(e,t,vi)),jo(e.searchParams).updateSearchParams(e.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(t){var e=Po(this);""!=(t=String(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",parseURL(e,t,yi)):e.fragment=null}))}),q(wi,"toJSON",(function toJSON(){return serializeURL.call(this)}),{enumerable:!0}),q(wi,"toString",(function toString(){return serializeURL.call(this)}),{enumerable:!0}),Oo){var xi=Oo.createObjectURL,Si=Oo.revokeObjectURL;xi&&q(bi,"createObjectURL",(function createObjectURL(t){return xi.apply(Oo,arguments)})),Si&&q(bi,"revokeObjectURL",(function revokeObjectURL(t){return Si.apply(Oo,arguments)}))}setToStringTag(bi,"URL"),_export({global:!0,forced:!Hn,sham:!n},{URL:bi});var _i=Y.includes;_export({target:"Array",proto:!0},{includes:function includes(t){return _i(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var Ei=wellKnownSymbol("match"),notARegexp=function(t){if(function(t){var e;return isObject(t)&&(void 0!==(e=t[Ei])?!!e:"RegExp"==classofRaw(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},ki=wellKnownSymbol("match"),correctIsRegexpLogic=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[ki]=!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 Oi=wellKnownSymbol("isConcatSpreadable"),Li=9007199254740991,ji="Maximum allowed index exceeded",Ai=hn>=51||!fails((function(){var t=[];return t[Oi]=!1,t.concat()[0]!==t})),Pi=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(t){if(!isObject(t))return!1;var e=t[Oi];return void 0!==e?!!e:ft(t)};_export({target:"Array",proto:!0,forced:!Ai||!Pi},{concat:function concat(t){var e,r,n,o,i,a=toObject(this),c=arraySpeciesCreate(a,0),s=0;for(e=-1,n=arguments.length;e<n;e++)if(isConcatSpreadable(i=-1===e?a:arguments[e])){if(s+(o=toLength(i.length))>Li)throw TypeError(ji);for(r=0;r<o;r++,s++)r in i&&createProperty(c,s,i[r])}else{if(s>=Li)throw TypeError(ji);createProperty(c,s++,i)}return c.length=s,c}});var Ii=Y.indexOf,Ri=[].indexOf,Ti=!!Ri&&1/[1].indexOf(1,-0)<0,Ui=arrayMethodIsStrict("indexOf");function RE(t,e){return RegExp(t,e)}_export({target:"Array",proto:!0,forced:Ti||!Ui},{indexOf:function indexOf(t){return Ti?Ri.apply(this,arguments)||0:Ii(this,t,arguments.length>1?arguments[1]:void 0)}});var Fi,Ci,Gi={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")}))},Mi=RegExp.prototype.exec,Ni=String.prototype.replace,Di=Mi,Bi=(Fi=/a/,Ci=/b*/g,Mi.call(Fi,"a"),Mi.call(Ci,"a"),0!==Fi.lastIndex||0!==Ci.lastIndex),qi=Gi.UNSUPPORTED_Y||Gi.BROKEN_CARET,$i=void 0!==/()??/.exec("")[1];(Bi||$i||qi)&&(Di=function exec(t){var e,r,n,o,i=this,a=qi&&i.sticky,c=regexpFlags.call(i),s=i.source,u=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])&&(s="(?: "+s+")",l=" "+l,u++),r=new RegExp("^(?:"+s+")",c)),$i&&(r=new RegExp("^"+s+"$(?!\\s)",c)),Bi&&(e=i.lastIndex),n=Mi.call(a?r:i,l),a?n?(n.input=n.input.slice(u),n[0]=n[0].slice(u),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:Bi&&n&&(i.lastIndex=i.global?n.index+n[0].length:e),$i&&n&&n.length>1&&Ni.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var zi=Di;_export({target:"RegExp",proto:!0,forced:/./.exec!==zi},{exec:zi});var Vi=wellKnownSymbol("species"),Wi=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Ki="$0"==="a".replace(/./,"$0"),Ji=wellKnownSymbol("replace"),Yi=!!/./[Ji]&&""===/./[Ji]("a","$0"),Hi=!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]})),Xi=_e.charAt,advanceStringIndex=function(t,e,r){return e+(r?Xi(t,e).length:1)},Zi=Math.floor,Qi="".replace,ta=/\$([$&'`]|\d\d?|<[^>]*>)/g,ea=/\$([$&'`]|\d\d?)/g,getSubstitution=function(t,e,r,n,o,i){var a=r+t.length,c=n.length,s=ea;return void 0!==o&&(o=toObject(o),s=ta),Qi.call(i,s,(function(i,s){var u;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(a);case"<":u=o[s.slice(1,-1)];break;default:var l=+s;if(0===l)return i;if(l>c){var f=Zi(l/10);return 0===f?i:f<=c?void 0===n[f-1]?s.charAt(1):n[f-1]+s.charAt(1):i}u=n[l-1]}return void 0===u?"":u}))},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 zi.call(t,e)},ra=Math.max,na=Math.min;!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[Vi]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||"replace"===t&&(!Wi||!Ki||Yi)||"split"===t&&!Hi){var c=/./[o],s=r(o,""[t],(function(t,e,r,n,o){return e.exec===zi?i&&!o?{done:!0,value:c.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Ki,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Yi}),u=s[0],l=s[1];q(String.prototype,t,u),q(RegExp.prototype,o,2==e?function(t,e){return l.call(t,this,e)}:function(t){return l.call(t,this)})}n&&y(RegExp.prototype[o],"sham",!0)}("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 s=anObject(t),u=String(this),l="function"==typeof n;l||(n=String(n));var f=s.global;if(f){var p=s.unicode;s.lastIndex=0}for(var h=[];;){var d=regexpExecAbstract(s,u);if(null===d)break;if(h.push(d),!f)break;""===String(d[0])&&(s.lastIndex=advanceStringIndex(u,toLength(s.lastIndex),p))}for(var g,m="",v=0,y=0;y<h.length;y++){d=h[y];for(var b=String(d[0]),w=ra(na(toInteger(d.index),u.length),0),x=[],S=1;S<d.length;S++)x.push(void 0===(g=d[S])?g:String(g));var _=d.groups;if(l){var E=[b].concat(x,w,u);void 0!==_&&E.push(_);var k=String(n.apply(void 0,E))}else k=getSubstitution(b,u,w,x,_,n);w>=v&&(m+=u.slice(v,w)+k,v=w+b.length)}return m+u.slice(v)}]}));var oa,ia=g.f,aa="".startsWith,ca=Math.min,sa=correctIsRegexpLogic("startsWith"),ua=!(sa||(oa=ia(String.prototype,"startsWith"),!oa||oa.writable));function __variableDynamicImportRuntime0__(t){switch(t){case"./locale/de.js":return Promise.resolve().then((function(){return fa}));case"./locale/en.js":return Promise.resolve().then((function(){return pa}));case"./locale/fr.js":return Promise.resolve().then((function(){return ha}));case"./locale/pl.js":return Promise.resolve().then((function(){return da}));case"./locale/pt-BR.js":return Promise.resolve().then((function(){return ga}));case"./locale/ro.js":return Promise.resolve().then((function(){return ma}));case"./locale/sk.js":return Promise.resolve().then((function(){return va}));case"./locale/sl.js":return Promise.resolve().then((function(){return ya}));case"./locale/zh-CN.js":return Promise.resolve().then((function(){return ba}));default:return Promise.reject(new Error("Unknown variable dynamic import: "+t))}}
/**
* @file ext-imagelib.js
*
* @license MIT
*
* @copyright 2010 Alexis Deveria
*
*/_export({target:"String",proto:!0,forced:!ua&&!sa},{startsWith:function startsWith(t){var e=String(requireObjectCoercible(this));notARegexp(t);var r=toLength(ca(arguments.length>1?arguments[1]:void 0,e.length)),n=String(t);return aa?aa.call(e,n,r):e.slice(r,r+n.length)===n}});var la=function(){var t=_asyncToGenerator(regeneratorRuntime.mark((function _callee(t){var e;return regeneratorRuntime.wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,__variableDynamicImportRuntime0__("./locale/".concat(encodeURIComponent(t),".js"));case 3:e=r.sent,r.next=12;break;case 6:return r.prev=6,r.t0=r.catch(0),console.error("Missing translation (".concat(t,") - using 'en'")),r.next=11,Promise.resolve().then((function(){return pa}));case 11:e=r.sent;case 12:return r.abrupt("return",e.default);case 13:case"end":return r.stop()}}),_callee,null,[[0,6]])})));return function loadExtensionTranslation(e){return t.apply(this,arguments)}}(),fa=(t("default",{name:"imagelib",init:function init(t){var e=this;return _asyncToGenerator(regeneratorRuntime.mark((function _callee3(){var r,n,o,i,a,c,s,u,l,f,p,h,d,g,m,v,y,b,w,x,S;return regeneratorRuntime.wrap((function _callee3$(_){for(;;)switch(_.prev=_.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_editor"),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%"});r('<button><img class="svg_icon" src="./images/cancel.svg" alt="icon" width="16" height="16" />'+c.common.cancel+"</button>").appendTo(t).on("click touchend",(function(){r("#imgbrowse_holder").hide()})).css({position:"absolute",top:5,right:-10});var s=r("<span>").css({position:"absolute",top:5,left:10}).appendTo(t),u=r('<button hidden><img class="svg_icon" src="./images/library.svg" alt="icon" width="16" height="16" />'+a.show_list+"</button>").appendTo(s).on("click touchend",(function(){o.attr("src","about:blank").hide(),n.show(),i.text(e),u.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(h=r(this).val()){case"s":case"o":w(!1);break;case"m":w(!0)}})).css({"margin-top":10}),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(),u.show()})).append("<span>".concat(c,"</span>"))}))}},w=function _toggleMulti(t){r("#lib_framewrap, #imglib_opts").css({right:t?200:10}),m||(m=r("<div id=imglib_preview>").css({position:"absolute",top:45,right:10,width:180,bottom:45,background:"#fff",overflow:"auto"}).insertAfter("#lib_framewrap"),v=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?s.importSvgString(r):f(r),s.moveSelectedElements(20*t,20*t,!1)})),m.empty(),d=[],r("#imgbrowse_holder").hide()})).css({position:"absolute",bottom:10,right:-10})),m.toggle(t),v.toggle(t)},b=function _onMessage3(){return(b=_asyncToGenerator(regeneratorRuntime.mark((function _callee2(t){var e,a,y,b,w,x,S,_,E,k,O,L,j,A,P,I,R;return regeneratorRuntime.wrap((function _callee2$(T){for(;;)switch(T.prev=T.next){case 0:if(e=t.origin,(a=t.data)&&["string","object"].includes(_typeof(a))){T.next=3;break}return T.abrupt("return");case 3:if(T.prev=3,"imagelib"===(a="object"===_typeof(a)?a:JSON.parse(a)).namespace){T.next=7;break}return T.abrupt("return");case 7:if(u.includes("*")||u.includes(e)){T.next=10;break}return console.log("Origin ".concat(e," not whitelisted for posting to ").concat(window.origin)),T.abrupt("return");case 10:if(x="href"in a,(w="name"in a)||!g){T.next=15;break}return g=!1,T.abrupt("return");case 15:x&&(y=a.href,a=a.data),document.querySelector("se-elix-alert-dialog")&&document.querySelector("se-elix-alert-dialog").remove(),b=w?"meta":a.charAt(0),T.next=28;break;case 20:if(T.prev=20,T.t0=T.catch(3),"string"!=typeof a){T.next=28;break}if("{"===(S=a.charAt(0))||!g){T.next=27;break}return g=!1,T.abrupt("return");case 27:"|"===S&&(_=a.indexOf("|",1),y=a.substr(1,_-1),a=a.substr(_+1),b=a.charAt(0));case 28:T.t1=b,T.next="meta"===T.t1?31:"<"===T.t1?46:"d"===T.t1?48:59;break;case 31:if(g=!1,p[(k=a).id]=k,j=k.name||"file",A=c.notification.retrieving.replace("%s",j),"m"===h){T.next=42;break}return T.next=39,seConfirm(A);case 39:g=!0,T.next=45;break;case 42:E=r("<div>").text(A).data("id",k.id),m.append(E),k.entry=E;case 45:return T.abrupt("return");case 46:return O=!0,T.abrupt("break",61);case 48:if(!a.startsWith("data:image/svg+xml")){T.next=56;break}return"data:image/svg+xml;base64,",P=a.substring("data:image/svg+xml;base64,".length),a=n(P),O=!0,T.abrupt("break",61);case 56:if(!a.startsWith("data:image/")){T.next=59;break}return L=!0,T.abrupt("break",61);case 59:return"m"!==h?l():p[y].entry.remove(),T.abrupt("return");case 61:T.t2=h,T.next="s"===T.t2?64:"m"===T.t2?67:"o"===T.t2?71:82;break;case 64:return O?i.svgCanvas.importSvgString(a):L&&f(a),l(),T.abrupt("break",82);case 67:return d.push([O?"svg":"img",a]),k=p[y],O?(k&&k.name?I=k.name:(R=(new DOMParser).parseFromString(o(a),"text/xml").documentElement,I=r(R).children("title").first().text()||"(SVG #"+a.length+")"),k?m.children().each((function(){r(this).data("id")===y&&(k.preview_url?r(this).html(r("<span>").append(r("<img>").attr("src",k.preview_url),I)):r(this).text(I),v.removeAttr("disabled"))})):(m.append(r("<div>").text(I)),v.removeAttr("disabled"))):(k&&k.preview_url?(I=k.name||"",E=r("<span>").append(r("<img>").attr("src",k.preview_url),I)):E=r("<img>").attr("src",a),k?m.children().each((function(){r(this).data("id")===y&&(r(this).html(E),v.removeAttr("disabled"))})):(m.append(r("<div>").append(E)),v.removeAttr("disabled"))),T.abrupt("break",82);case 71:if(O){T.next=73;break}return T.abrupt("break",82);case 73:return l(),T.next=76,i.openPrep();case 76:if(T.sent){T.next=79;break}return T.abrupt("return");case 79:return s.clear(),s.setSvgString(a),T.abrupt("break",82);case 82:case"end":return T.stop()}}),_callee2,null,[[3,20]])})))).apply(this,arguments)},y=function _onMessage2(t){return b.apply(this,arguments)},f=function _importImage(t){var e=s.addSVGElementFromJson({element:"image",attr:{x:0,y:0,width:0,height:0,id:s.getNextId(),style:"pointer-events:inherit"}});s.clearSelection(),s.addToSelection([e]),s.setImageURL(t)},l=function _closeBrowser(){r("#imgbrowse_holder").hide(),document.activeElement.blur()},r=t.$,n=t.decode64,o=t.dropXMLInternalSubset,i=e,_.next=10,la(i.configObj.pref("lang"));case 10:return a=_.sent,c=i.uiStrings,s=i.canvas,u=a.imgLibs.map((function(t){var e=t.url;try{return new URL(e).origin}catch(t){return location.origin}})),p={},h="s",d=[],g=!1,window.addEventListener("message",y,!0),S={id:"tool_imagelib",click:function click(){x()}},_.abrupt("return",{svgicons:"ext-imagelib.xml",events:S,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 _.stop()}}),_callee3)})))()}}),Object.freeze({__proto__:null,default:{select_lib:"Select an image library",show_list:"Show library list",import_single:"Import single",import_multi:"Import multiple",open:"Open as new document",buttons:[{title:"Bilder-Bibliothek"}],imgLibs:[{name:"Demo library (local)",url:"extensions/ext-imagelib/index.html",description:"Demonstration library for SVG-edit on this server"},{name:"IAN Symbol Libraries",url:"https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php?svgedit=3",description:"Free library of illustrations"}]}})),pa=Object.freeze({__proto__:null,default:{select_lib:"Select an image library",show_list:"Show library list",import_single:"Import single",import_multi:"Import multiple",open:"Open as new document",buttons:[{title:"Image library"}],imgLibs:[{name:"Demo library (local)",url:"extensions/ext-imagelib/index.html",description:"Demonstration library for SVG-edit on this server"},{name:"IAN Symbol Libraries",url:"https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php?svgedit=3",description:"Free library of illustrations"}]}}),ha=Object.freeze({__proto__:null,default:{select_lib:"Choisir une bibliothèque d'images",show_list:"show_list",import_single:"import_single",import_multi:"import_multi",open:"open",buttons:[{title:"Bibliothèque d'images"}],imgLibs:[{name:"Demo library (local)",url:"extensions/ext-imagelib/index.html",description:"Demonstration library for SVG-edit on this server"},{name:"IAN Symbol Libraries",url:"https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php?svgedit=3",description:"Free library of illustrations"}]}}),da=Object.freeze({__proto__:null,default:{select_lib:"Select an image library",show_list:"Show library list",import_single:"Import single",import_multi:"Import multiple",open:"Open as new document",buttons:[{title:"Biblioteka obrazów"}],imgLibs:[{name:"Demo library (local)",url:"extensions/ext-imagelib/index.html",description:"Demonstration library for SVG-edit on this server"},{name:"IAN Symbol Libraries",url:"https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php?svgedit=3",description:"Free library of illustrations"}]}}),ga=Object.freeze({__proto__:null,default:{select_lib:"Select an image library",show_list:"Show library list",import_single:"Import single",import_multi:"Import multiple",open:"Open as new document",buttons:[{title:"Biblioteca de Imagens"}],imgLibs:[{name:"Demo library (local)",url:"extensions/ext-imagelib/index.html",description:"Demonstration library for SVG-edit on this server"},{name:"IAN Symbol Libraries",url:"https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php?svgedit=3",description:"Free library of illustrations"}]}}),ma=Object.freeze({__proto__:null,default:{select_lib:"Select an image library",show_list:"Show library list",import_single:"Import single",import_multi:"Import multiple",open:"Open as new document",buttons:[{title:"Bibliotecă de Imagini"}],imgLibs:[{name:"Demo library (local)",url:"extensions/ext-imagelib/index.html",description:"Demonstration library for SVG-edit on this server"},{name:"IAN Symbol Libraries",url:"https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php?svgedit=3",description:"Free library of illustrations"}]}}),va=Object.freeze({__proto__:null,default:{select_lib:"Select an image library",show_list:"Show library list",import_single:"Import single",import_multi:"Import multiple",open:"Open as new document",buttons:[{title:"Knižnica obrázkov"}],imgLibs:[{name:"Demo library (local)",url:"extensions/ext-imagelib/index.html",description:"Demonstration library for SVG-edit on this server"},{name:"IAN Symbol Libraries",url:"https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php?svgedit=3",description:"Free library of illustrations"}]}}),ya=Object.freeze({__proto__:null,default:{select_lib:"Select an image library",show_list:"Show library list",import_single:"Import single",import_multi:"Import multiple",open:"Open as new document",buttons:[{title:"Knjižnica slik"}],imgLibs:[{name:"Demo library (local)",url:"extensions/ext-imagelib/index.html",description:"Demonstration library for SVG-edit on this server"},{name:"IAN Symbol Libraries",url:"https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php?svgedit=3",description:"Free library of illustrations"}]}}),ba=Object.freeze({__proto__:null,default:{select_lib:"Select an image library",show_list:"Show library list",import_single:"Import single",import_multi:"Import multiple",open:"Open as new document",buttons:[{title:"图像库"}],imgLibs:[{name:"Demo library (local)",url:"extensions/ext-imagelib/index.html",description:"Demonstration library for SVG-edit on this server"},{name:"IAN Symbol Libraries",url:"https://ian.umces.edu/symbols/catalog/svgedit/album_chooser.php?svgedit=3",description:"Free library of illustrations"}]}})}}}));