UNPKG

springroll-container

Version:

The iframe controller for interacting with SpringRoll applications

1 lines 140 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).springroll=t.springroll||{})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==e&&e,n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(t){return!1}}(),i="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function c(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function v(t){var e=new FileReader,n=p(e);return e.readAsArrayBuffer(t),n}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:o&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&o&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=f(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(v)}),this.text=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,n=p(e);return e.readAsText(t),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(S)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=l(t),e=c(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},h.prototype.delete=function(t){delete this.map[l(t)]},h.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},h.prototype.set=function(t,e){this.map[l(t)]=c(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),d(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),d(t)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(t,e){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=function(t){var e=t.toUpperCase();return m.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function S(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}})),e}function w(t,e){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},g.call(b.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var k=[301,302,303,307,308];w.redirect=function(t,e){if(-1===k.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})};var E=e.DOMException;try{new E}catch(t){(E=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),E.prototype.constructor=E}function B(t,n){return new Promise((function(r,i){var a=new b(t,n);if(a.signal&&a.signal.aborted)return i(new E("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var t,e,n={status:u.status,statusText:u.statusText,headers:(t=u.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}})),e)};n.url="responseURL"in u?u.responseURL:n.headers.get("X-Request-URL");var o="response"in u?u.response:u.responseText;setTimeout((function(){r(new w(o,n))}),0)},u.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){i(new E("Aborted","AbortError"))}),0)},u.open(a.method,function(t){try{return""===t&&e.location.href?e.location.href:t}catch(e){return t}}(a.url),!0),"include"===a.credentials?u.withCredentials=!0:"omit"===a.credentials&&(u.withCredentials=!1),"responseType"in u&&(o?u.responseType="blob":s&&a.headers.get("Content-Type")&&-1!==a.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof h?a.headers.forEach((function(t,e){u.setRequestHeader(e,t)})):Object.getOwnPropertyNames(n.headers).forEach((function(t){u.setRequestHeader(t,c(n.headers[t]))})),a.signal&&(a.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&a.signal.removeEventListener("abort",l)}),u.send(void 0===a._bodyInit?null:a._bodyInit)}))}B.polyfill=!0,e.fetch||(e.fetch=B,e.Headers=h,e.Request=b,e.Response=w);var x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},P=function(t){return t&&t.Math==Math&&t},L=P("object"==typeof globalThis&&globalThis)||P("object"==typeof window&&window)||P("object"==typeof self&&self)||P("object"==typeof x&&x)||function(){return this}()||Function("return this")(),_={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},O="object"==typeof document&&document.all,A={all:O,IS_HTMLDDA:void 0===O&&void 0!==O},C=A.all,V=A.IS_HTMLDDA?function(t){return"function"==typeof t||t===C}:function(t){return"function"==typeof t},D=V,M=A.all,T=A.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:D(t)||t===M}:function(t){return"object"==typeof t?null!==t:D(t)},I=T,R=L.document,j=I(R)&&I(R.createElement),N=function(t){return j?R.createElement(t):{}},K=N("span").classList,F=K&&K.constructor&&K.constructor.prototype,G=F===Object.prototype?void 0:F,U=function(t){try{return!!t()}catch(t){return!0}},H=!U((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),z=H,q=Function.prototype,W=q.call,X=z&&q.bind.bind(W,W),Y=z?X:function(t){return function(){return W.apply(t,arguments)}},J=Y,$=J({}.toString),Q=J("".slice),Z=function(t){return Q($(t),8,-1)},tt=Z,et=Y,nt=function(t){if("Function"===tt(t))return et(t)},rt=String,ot=function(t){try{return rt(t)}catch(t){return"Object"}},it=V,st=ot,at=TypeError,ut=function(t){if(it(t))return t;throw at(st(t)+" is not a function")},lt=ut,ct=H,dt=nt(nt.bind),ht=function(t,e){return lt(t),void 0===e?t:ct?dt(t,e):function(){return t.apply(e,arguments)}},ft=U,pt=Z,vt=Object,yt=Y("".split),gt=ft((function(){return!vt("z").propertyIsEnumerable(0)}))?function(t){return"String"==pt(t)?yt(t,""):vt(t)}:vt,mt=function(t){return null==t},bt=mt,St=TypeError,wt=function(t){if(bt(t))throw St("Can't call method on "+t);return t},kt=wt,Et=Object,Bt=function(t){return Et(kt(t))},xt=Math.ceil,Pt=Math.floor,Lt=Math.trunc||function(t){var e=+t;return(e>0?Pt:xt)(e)},_t=Lt,Ot=function(t){var e=+t;return e!=e||0===e?0:_t(e)},At=Ot,Ct=Math.min,Vt=function(t){return t>0?Ct(At(t),9007199254740991):0},Dt=function(t){return Vt(t.length)},Mt=Z,Tt=Array.isArray||function(t){return"Array"==Mt(t)},It={exports:{}},Rt=L,jt=Object.defineProperty,Nt=function(t,e){try{jt(Rt,t,{value:e,configurable:!0,writable:!0})}catch(n){Rt[t]=e}return e},Kt=Nt,Ft="__core-js_shared__",Gt=L[Ft]||Kt(Ft,{}),Ut=Gt;(It.exports=function(t,e){return Ut[t]||(Ut[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.28.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.28.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Ht,zt,qt=It.exports,Wt=Bt,Xt=Y({}.hasOwnProperty),Yt=Object.hasOwn||function(t,e){return Xt(Wt(t),e)},Jt=Y,$t=0,Qt=Math.random(),Zt=Jt(1..toString),te=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Zt(++$t+Qt,36)},ee="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ne=L,re=ee,oe=ne.process,ie=ne.Deno,se=oe&&oe.versions||ie&&ie.version,ae=se&&se.v8;ae&&(zt=(Ht=ae.split("."))[0]>0&&Ht[0]<4?1:+(Ht[0]+Ht[1])),!zt&&re&&(!(Ht=re.match(/Edge\/(\d+)/))||Ht[1]>=74)&&(Ht=re.match(/Chrome\/(\d+)/))&&(zt=+Ht[1]);var ue=zt,le=ue,ce=U,de=!!Object.getOwnPropertySymbols&&!ce((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&le&&le<41})),he=de&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,fe=qt,pe=Yt,ve=te,ye=de,ge=he,me=L.Symbol,be=fe("wks"),Se=ge?me.for||me:me&&me.withoutSetter||ve,we=function(t){return pe(be,t)||(be[t]=ye&&pe(me,t)?me[t]:Se("Symbol."+t)),be[t]},ke={};ke[we("toStringTag")]="z";var Ee="[object z]"===String(ke),Be=Ee,xe=V,Pe=Z,Le=we("toStringTag"),_e=Object,Oe="Arguments"==Pe(function(){return arguments}()),Ae=Be?Pe:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=_e(t),Le))?n:Oe?Pe(e):"Object"==(r=Pe(e))&&xe(e.callee)?"Arguments":r},Ce=L,Ve=V,De=function(t,e){return arguments.length<2?(n=Ce[t],Ve(n)?n:void 0):Ce[t]&&Ce[t][e];var n},Me=V,Te=Gt,Ie=Y(Function.toString);Me(Te.inspectSource)||(Te.inspectSource=function(t){return Ie(t)});var Re=Te.inspectSource,je=Y,Ne=U,Ke=V,Fe=Ae,Ge=Re,Ue=function(){},He=[],ze=De("Reflect","construct"),qe=/^\s*(?:class|function)\b/,We=je(qe.exec),Xe=!qe.exec(Ue),Ye=function(t){if(!Ke(t))return!1;try{return ze(Ue,He,t),!0}catch(t){return!1}},Je=function(t){if(!Ke(t))return!1;switch(Fe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Xe||!!We(qe,Ge(t))}catch(t){return!0}};Je.sham=!0;var $e=!ze||Ne((function(){var t;return Ye(Ye.call)||!Ye(Object)||!Ye((function(){t=!0}))||t}))?Je:Ye,Qe=Tt,Ze=$e,tn=T,en=we("species"),nn=Array,rn=function(t){var e;return Qe(t)&&(e=t.constructor,(Ze(e)&&(e===nn||Qe(e.prototype))||tn(e)&&null===(e=e[en]))&&(e=void 0)),void 0===e?nn:e},on=function(t,e){return new(rn(t))(0===e?0:e)},sn=ht,an=gt,un=Bt,ln=Dt,cn=on,dn=Y([].push),hn=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,s=7==t,a=5==t||i;return function(u,l,c,d){for(var h,f,p=un(u),v=an(p),y=sn(l,c),g=ln(v),m=0,b=d||cn,S=e?b(u,g):n||s?b(u,0):void 0;g>m;m++)if((a||m in v)&&(f=y(h=v[m],m,p),t))if(e)S[m]=f;else if(f)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:dn(S,h)}else switch(t){case 4:return!1;case 7:dn(S,h)}return i?-1:r||o?o:S}},fn={forEach:hn(0),map:hn(1),filter:hn(2),some:hn(3),every:hn(4),find:hn(5),findIndex:hn(6),filterReject:hn(7)},pn=U,vn=function(t,e){var n=[][t];return!!n&&pn((function(){n.call(null,e||function(){return 1},1)}))},yn=fn.forEach,gn=vn("forEach")?[].forEach:function(t){return yn(this,t,arguments.length>1?arguments[1]:void 0)},mn=!U((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),bn={},Sn=N,wn=!mn&&!U((function(){return 7!=Object.defineProperty(Sn("div"),"a",{get:function(){return 7}}).a})),kn=mn&&U((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),En=T,Bn=String,xn=TypeError,Pn=function(t){if(En(t))return t;throw xn(Bn(t)+" is not an object")},Ln=H,_n=Function.prototype.call,On=Ln?_n.bind(_n):function(){return _n.apply(_n,arguments)},An=Y({}.isPrototypeOf),Cn=De,Vn=V,Dn=An,Mn=Object,Tn=he?function(t){return"symbol"==typeof t}:function(t){var e=Cn("Symbol");return Vn(e)&&Dn(e.prototype,Mn(t))},In=ut,Rn=mt,jn=function(t,e){var n=t[e];return Rn(n)?void 0:In(n)},Nn=On,Kn=V,Fn=T,Gn=TypeError,Un=On,Hn=T,zn=Tn,qn=jn,Wn=function(t,e){var n,r;if("string"===e&&Kn(n=t.toString)&&!Fn(r=Nn(n,t)))return r;if(Kn(n=t.valueOf)&&!Fn(r=Nn(n,t)))return r;if("string"!==e&&Kn(n=t.toString)&&!Fn(r=Nn(n,t)))return r;throw Gn("Can't convert object to primitive value")},Xn=TypeError,Yn=we("toPrimitive"),Jn=function(t,e){if(!Hn(t)||zn(t))return t;var n,r=qn(t,Yn);if(r){if(void 0===e&&(e="default"),n=Un(r,t,e),!Hn(n)||zn(n))return n;throw Xn("Can't convert object to primitive value")}return void 0===e&&(e="number"),Wn(t,e)},$n=Jn,Qn=Tn,Zn=function(t){var e=$n(t,"string");return Qn(e)?e:e+""},tr=mn,er=wn,nr=kn,rr=Pn,or=Zn,ir=TypeError,sr=Object.defineProperty,ar=Object.getOwnPropertyDescriptor,ur="enumerable",lr="configurable",cr="writable";bn.f=tr?nr?function(t,e,n){if(rr(t),e=or(e),rr(n),"function"==typeof t&&"prototype"===e&&"value"in n&&cr in n&&!n[cr]){var r=ar(t,e);r&&r[cr]&&(t[e]=n.value,n={configurable:lr in n?n[lr]:r[lr],enumerable:ur in n?n[ur]:r[ur],writable:!1})}return sr(t,e,n)}:sr:function(t,e,n){if(rr(t),e=or(e),rr(n),er)try{return sr(t,e,n)}catch(t){}if("get"in n||"set"in n)throw ir("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var dr=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},hr=bn,fr=dr,pr=mn?function(t,e,n){return hr.f(t,e,fr(1,n))}:function(t,e,n){return t[e]=n,t},vr=L,yr=_,gr=G,mr=gn,br=pr,Sr=function(t){if(t&&t.forEach!==mr)try{br(t,"forEach",mr)}catch(e){t.forEach=mr}};for(var wr in yr)yr[wr]&&Sr(vr[wr]&&vr[wr].prototype);Sr(gr);var kr=gt,Er=wt,Br=function(t){return kr(Er(t))},xr={},Pr=Ot,Lr=Math.max,_r=Math.min,Or=function(t,e){var n=Pr(t);return n<0?Lr(n+e,0):_r(n,e)},Ar=Br,Cr=Or,Vr=Dt,Dr=function(t){return function(e,n,r){var o,i=Ar(e),s=Vr(i),a=Cr(r,s);if(t&&n!=n){for(;s>a;)if((o=i[a++])!=o)return!0}else for(;s>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},Mr={includes:Dr(!0),indexOf:Dr(!1)},Tr={},Ir=Yt,Rr=Br,jr=Mr.indexOf,Nr=Tr,Kr=Y([].push),Fr=function(t,e){var n,r=Rr(t),o=0,i=[];for(n in r)!Ir(Nr,n)&&Ir(r,n)&&Kr(i,n);for(;e.length>o;)Ir(r,n=e[o++])&&(~jr(i,n)||Kr(i,n));return i},Gr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ur=Fr,Hr=Gr,zr=Object.keys||function(t){return Ur(t,Hr)},qr=mn,Wr=kn,Xr=bn,Yr=Pn,Jr=Br,$r=zr;xr.f=qr&&!Wr?Object.defineProperties:function(t,e){Yr(t);for(var n,r=Jr(e),o=$r(e),i=o.length,s=0;i>s;)Xr.f(t,n=o[s++],r[n]);return t};var Qr,Zr=De("document","documentElement"),to=te,eo=qt("keys"),no=function(t){return eo[t]||(eo[t]=to(t))},ro=Pn,oo=xr,io=Gr,so=Tr,ao=Zr,uo=N,lo="prototype",co="script",ho=no("IE_PROTO"),fo=function(){},po=function(t){return"<"+co+">"+t+"</"+co+">"},vo=function(t){t.write(po("")),t.close();var e=t.parentWindow.Object;return t=null,e},yo=function(){try{Qr=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;yo="undefined"!=typeof document?document.domain&&Qr?vo(Qr):(e=uo("iframe"),n="java"+co+":",e.style.display="none",ao.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(po("document.F=Object")),t.close(),t.F):vo(Qr);for(var r=io.length;r--;)delete yo[lo][io[r]];return yo()};so[ho]=!0;var go=Object.create||function(t,e){var n;return null!==t?(fo[lo]=ro(t),n=new fo,fo[lo]=null,n[ho]=t):n=yo(),void 0===e?n:oo.f(n,e)},mo=we,bo=go,So=bn.f,wo=mo("unscopables"),ko=Array.prototype;null==ko[wo]&&So(ko,wo,{configurable:!0,value:bo(null)});var Eo,Bo,xo,Po=function(t){ko[wo][t]=!0},Lo={},_o=V,Oo=L.WeakMap,Ao=_o(Oo)&&/native code/.test(String(Oo)),Co=L,Vo=T,Do=pr,Mo=Yt,To=Gt,Io=no,Ro=Tr,jo="Object already initialized",No=Co.TypeError,Ko=Co.WeakMap;if(Ao||To.state){var Fo=To.state||(To.state=new Ko);Fo.get=Fo.get,Fo.has=Fo.has,Fo.set=Fo.set,Eo=function(t,e){if(Fo.has(t))throw No(jo);return e.facade=t,Fo.set(t,e),e},Bo=function(t){return Fo.get(t)||{}},xo=function(t){return Fo.has(t)}}else{var Go=Io("state");Ro[Go]=!0,Eo=function(t,e){if(Mo(t,Go))throw No(jo);return e.facade=t,Do(t,Go,e),e},Bo=function(t){return Mo(t,Go)?t[Go]:{}},xo=function(t){return Mo(t,Go)}}var Uo={set:Eo,get:Bo,has:xo,enforce:function(t){return xo(t)?Bo(t):Eo(t,{})},getterFor:function(t){return function(e){var n;if(!Vo(e)||(n=Bo(e)).type!==t)throw No("Incompatible receiver, "+t+" required");return n}}},Ho={},zo={},qo={}.propertyIsEnumerable,Wo=Object.getOwnPropertyDescriptor,Xo=Wo&&!qo.call({1:2},1);zo.f=Xo?function(t){var e=Wo(this,t);return!!e&&e.enumerable}:qo;var Yo=mn,Jo=On,$o=zo,Qo=dr,Zo=Br,ti=Zn,ei=Yt,ni=wn,ri=Object.getOwnPropertyDescriptor;Ho.f=Yo?ri:function(t,e){if(t=Zo(t),e=ti(e),ni)try{return ri(t,e)}catch(t){}if(ei(t,e))return Qo(!Jo($o.f,t,e),t[e])};var oi={exports:{}},ii=mn,si=Yt,ai=Function.prototype,ui=ii&&Object.getOwnPropertyDescriptor,li=si(ai,"name"),ci={EXISTS:li,PROPER:li&&"something"===function(){}.name,CONFIGURABLE:li&&(!ii||ii&&ui(ai,"name").configurable)},di=Y,hi=U,fi=V,pi=Yt,vi=mn,yi=ci.CONFIGURABLE,gi=Re,mi=Uo.enforce,bi=Uo.get,Si=String,wi=Object.defineProperty,ki=di("".slice),Ei=di("".replace),Bi=di([].join),xi=vi&&!hi((function(){return 8!==wi((function(){}),"length",{value:8}).length})),Pi=String(String).split("String"),Li=oi.exports=function(t,e,n){"Symbol("===ki(Si(e),0,7)&&(e="["+Ei(Si(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!pi(t,"name")||yi&&t.name!==e)&&(vi?wi(t,"name",{value:e,configurable:!0}):t.name=e),xi&&n&&pi(n,"arity")&&t.length!==n.arity&&wi(t,"length",{value:n.arity});try{n&&pi(n,"constructor")&&n.constructor?vi&&wi(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=mi(t);return pi(r,"source")||(r.source=Bi(Pi,"string"==typeof e?e:"")),t};Function.prototype.toString=Li((function(){return fi(this)&&bi(this).source||gi(this)}),"toString");var _i=oi.exports,Oi=V,Ai=bn,Ci=_i,Vi=Nt,Di=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(Oi(n)&&Ci(n,i,r),r.global)o?t[e]=n:Vi(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Ai.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Mi={},Ti=Fr,Ii=Gr.concat("length","prototype");Mi.f=Object.getOwnPropertyNames||function(t){return Ti(t,Ii)};var Ri={};Ri.f=Object.getOwnPropertySymbols;var ji,Ni,Ki,Fi=De,Gi=Mi,Ui=Ri,Hi=Pn,zi=Y([].concat),qi=Fi("Reflect","ownKeys")||function(t){var e=Gi.f(Hi(t)),n=Ui.f;return n?zi(e,n(t)):e},Wi=Yt,Xi=qi,Yi=Ho,Ji=bn,$i=U,Qi=V,Zi=/#|\.prototype\./,ts=function(t,e){var n=ns[es(t)];return n==os||n!=rs&&(Qi(e)?$i(e):!!e)},es=ts.normalize=function(t){return String(t).replace(Zi,".").toLowerCase()},ns=ts.data={},rs=ts.NATIVE="N",os=ts.POLYFILL="P",is=ts,ss=L,as=Ho.f,us=pr,ls=Di,cs=Nt,ds=function(t,e,n){for(var r=Xi(e),o=Ji.f,i=Yi.f,s=0;s<r.length;s++){var a=r[s];Wi(t,a)||n&&Wi(n,a)||o(t,a,i(e,a))}},hs=is,fs=function(t,e){var n,r,o,i,s,a=t.target,u=t.global,l=t.stat;if(n=u?ss:l?ss[a]||cs(a,{}):(ss[a]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(s=as(n,r))&&s.value:n[r],!hs(u?r:a+(l?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;ds(i,o)}(t.sham||o&&o.sham)&&us(i,"sham",!0),ls(n,r,i,t)}},ps=!U((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),vs=Yt,ys=V,gs=Bt,ms=ps,bs=no("IE_PROTO"),Ss=Object,ws=Ss.prototype,ks=ms?Ss.getPrototypeOf:function(t){var e=gs(t);if(vs(e,bs))return e[bs];var n=e.constructor;return ys(n)&&e instanceof n?n.prototype:e instanceof Ss?ws:null},Es=U,Bs=V,xs=T,Ps=ks,Ls=Di,_s=we("iterator"),Os=!1;[].keys&&("next"in(Ki=[].keys())?(Ni=Ps(Ps(Ki)))!==Object.prototype&&(ji=Ni):Os=!0);var As=!xs(ji)||Es((function(){var t={};return ji[_s].call(t)!==t}));As&&(ji={}),Bs(ji[_s])||Ls(ji,_s,(function(){return this}));var Cs={IteratorPrototype:ji,BUGGY_SAFARI_ITERATORS:Os},Vs=bn.f,Ds=Yt,Ms=we("toStringTag"),Ts=function(t,e,n){t&&!n&&(t=t.prototype),t&&!Ds(t,Ms)&&Vs(t,Ms,{configurable:!0,value:e})},Is=Cs.IteratorPrototype,Rs=go,js=dr,Ns=Ts,Ks=Lo,Fs=function(){return this},Gs=Y,Us=ut,Hs=V,zs=String,qs=TypeError,Ws=function(t,e,n){try{return Gs(Us(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}},Xs=Pn,Ys=function(t){if("object"==typeof t||Hs(t))return t;throw qs("Can't set "+zs(t)+" as a prototype")},Js=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Ws(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Xs(n),Ys(r),e?t(n,r):n.__proto__=r,n}}():void 0),$s=fs,Qs=On,Zs=V,ta=function(t,e,n,r){var o=e+" Iterator";return t.prototype=Rs(Is,{next:js(+!r,n)}),Ns(t,o,!1),Ks[o]=Fs,t},ea=ks,na=Js,ra=Ts,oa=pr,ia=Di,sa=Lo,aa=ci.PROPER,ua=ci.CONFIGURABLE,la=Cs.IteratorPrototype,ca=Cs.BUGGY_SAFARI_ITERATORS,da=we("iterator"),ha="keys",fa="values",pa="entries",va=function(){return this},ya=function(t,e,n,r,o,i,s){ta(n,e,r);var a,u,l,c=function(t){if(t===o&&v)return v;if(!ca&&t in f)return f[t];switch(t){case ha:case fa:case pa:return function(){return new n(this,t)}}return function(){return new n(this)}},d=e+" Iterator",h=!1,f=t.prototype,p=f[da]||f["@@iterator"]||o&&f[o],v=!ca&&p||c(o),y="Array"==e&&f.entries||p;if(y&&(a=ea(y.call(new t)))!==Object.prototype&&a.next&&(ea(a)!==la&&(na?na(a,la):Zs(a[da])||ia(a,da,va)),ra(a,d,!0)),aa&&o==fa&&p&&p.name!==fa&&(ua?oa(f,"name",fa):(h=!0,v=function(){return Qs(p,this)})),o)if(u={values:c(fa),keys:i?v:c(ha),entries:c(pa)},s)for(l in u)(ca||h||!(l in f))&&ia(f,l,u[l]);else $s({target:e,proto:!0,forced:ca||h},u);return f[da]!==v&&ia(f,da,v,{name:o}),sa[e]=v,u},ga=function(t,e){return{value:t,done:e}},ma=Br,ba=Po,Sa=Lo,wa=Uo,ka=bn.f,Ea=ya,Ba=ga,xa=mn,Pa="Array Iterator",La=wa.set,_a=wa.getterFor(Pa),Oa=Ea(Array,"Array",(function(t,e){La(this,{type:Pa,target:ma(t),index:0,kind:e})}),(function(){var t=_a(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,Ba(void 0,!0)):Ba("keys"==n?r:"values"==n?e[r]:[r,e[r]],!1)}),"values"),Aa=Sa.Arguments=Sa.Array;if(ba("keys"),ba("values"),ba("entries"),xa&&"values"!==Aa.name)try{ka(Aa,"name",{value:"values"})}catch(t){}var Ca=L,Va=_,Da=G,Ma=Oa,Ta=pr,Ia=we,Ra=Ia("iterator"),ja=Ia("toStringTag"),Na=Ma.values,Ka=function(t,e){if(t){if(t[Ra]!==Na)try{Ta(t,Ra,Na)}catch(e){t[Ra]=Na}if(t[ja]||Ta(t,ja,e),Va[e])for(var n in Ma)if(t[n]!==Ma[n])try{Ta(t,n,Ma[n])}catch(e){t[n]=Ma[n]}}};for(var Fa in Va)Ka(Ca[Fa]&&Ca[Fa].prototype,Fa);Ka(Da,"DOMTokenList");var Ga=L;function Ua(){Ua=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var i=e&&e.prototype instanceof h?e:h,s=Object.create(i.prototype),a=new x(o||[]);return r(s,"_invoke",{value:w(t,n,a)}),s}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var d={};function h(){}function f(){}function p(){}var v={};u(v,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(P([])));g&&g!==e&&n.call(g,i)&&(v=g);var m=p.prototype=h.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function o(r,i,s,a){var u=c(t[r],t,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,s,a)}),(function(t){o("throw",t,s,a)})):e.resolve(d).then((function(t){l.value=t,s(l)}),(function(t){return o("throw",t,s,a)}))}a(u.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function w(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return L()}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var a=k(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function k(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=c(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function E(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 B(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=p,r(m,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:f,configurable:!0}),f.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(S.prototype),u(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var s=new S(l(e,n,r,o),i);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(m),u(m,a,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=P,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(B),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(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 s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(s)},complete:function(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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),B(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;B(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function Ha(t){return Ha="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},Ha(t)}function za(t,e,n,r,o,i,s){try{var a=t[i](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,o)}function qa(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function s(t){za(i,r,o,s,a,"next",t)}function a(t){za(i,r,o,s,a,"throw",t)}s(void 0)}))}}function Wa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=r.key,i=void 0,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"))?i:String(i)),r)}var o,i}function Ya(t,e,n){return e&&Xa(t.prototype,e),n&&Xa(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ja(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qa(t,e)}function $a(t){return $a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$a(t)}function Qa(t,e){return Qa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qa(t,e)}function Za(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tu(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Za(t)}function eu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=$a(t);if(e){var o=$a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tu(this,n)}}function nu(t){return function(t){if(Array.isArray(t))return ou(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ru(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ru(t,e){if(t){if("string"==typeof t)return ou(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ou(t,e):void 0}}function ou(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function iu(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ru(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}var su=fs,au=Mr.indexOf,uu=vn,lu=nt([].indexOf),cu=!!lu&&1/lu([1],1,-0)<0;su({target:"Array",proto:!0,forced:cu||!uu("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return cu?lu(this,t,e)||0:au(this,t,e)}});var du=TypeError,hu=Zn,fu=bn,pu=dr,vu=function(t,e,n){var r=hu(e);r in t?fu.f(t,r,pu(0,n)):t[r]=n},yu=U,gu=ue,mu=we("species"),bu=function(t){return gu>=51||!yu((function(){var e=[];return(e.constructor={})[mu]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Su=fs,wu=U,ku=Tt,Eu=T,Bu=Bt,xu=Dt,Pu=function(t){if(t>9007199254740991)throw du("Maximum allowed index exceeded");return t},Lu=vu,_u=on,Ou=bu,Au=ue,Cu=we("isConcatSpreadable"),Vu=Au>=51||!wu((function(){var t=[];return t[Cu]=!1,t.concat()[0]!==t})),Du=function(t){if(!Eu(t))return!1;var e=t[Cu];return void 0!==e?!!e:ku(t)};Su({target:"Array",proto:!0,arity:1,forced:!Vu||!Ou("concat")},{concat:function(t){var e,n,r,o,i,s=Bu(this),a=_u(s,0),u=0;for(e=-1,r=arguments.length;e<r;e++)if(Du(i=-1===e?s:arguments[e]))for(o=xu(i),Pu(u+o),n=0;n<o;n++,u++)n in i&&Lu(a,u,i[n]);else Pu(u+1),Lu(a,u++,i);return a.length=u,a}});var Mu=mn,Tu=Y,Iu=On,Ru=U,ju=zr,Nu=Ri,Ku=zo,Fu=Bt,Gu=gt,Uu=Object.assign,Hu=Object.defineProperty,zu=Tu([].concat),qu=!Uu||Ru((function(){if(Mu&&1!==Uu({b:1},Uu(Hu({},"a",{enumerable:!0,get:function(){Hu(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=Uu({},t)[n]||ju(Uu({},e)).join("")!=r}))?function(t,e){for(var n=Fu(t),r=arguments.length,o=1,i=Nu.f,s=Ku.f;r>o;)for(var a,u=Gu(arguments[o++]),l=i?zu(ju(u),i(u)):ju(u),c=l.length,d=0;c>d;)a=l[d++],Mu&&!Iu(s,u,a)||(n[a]=u[a]);return n}:Uu,Wu=qu;fs({target:"Object",stat:!0,arity:2,forced:Object.assign!==Wu},{assign:Wu});var Xu=Ae,Yu=Ee?{}.toString:function(){return"[object "+Xu(this)+"]"};Ee||Di(Object.prototype,"toString",Yu,{unsafe:!0});var Ju,$u,Qu,Zu,tl="undefined"!=typeof process&&"process"==Z(process),el=_i,nl=bn,rl=function(t,e,n){return n.get&&el(n.get,e,{getter:!0}),n.set&&el(n.set,e,{setter:!0}),nl.f(t,e,n)},ol=De,il=rl,sl=mn,al=we("species"),ul=function(t){var e=ol(t);sl&&e&&!e[al]&&il(e,al,{configurable:!0,get:function(){return this}})},ll=An,cl=TypeError,dl=function(t,e){if(ll(e,t))return t;throw cl("Incorrect invocation")},hl=$e,fl=ot,pl=TypeError,vl=Pn,yl=function(t){if(hl(t))return t;throw pl(fl(t)+" is not a constructor")},gl=mt,ml=we("species"),bl=H,Sl=Function.prototype,wl=Sl.apply,kl=Sl.call,El="object"==typeof Reflect&&Reflect.apply||(bl?kl.bind(wl):function(){return kl.apply(wl,arguments)}),Bl=Y([].slice),xl=TypeError,Pl=/(?:ipad|iphone|ipod).*applewebkit/i.test(ee),Ll=L,_l=El,Ol=ht,Al=V,Cl=Yt,Vl=U,Dl=Zr,Ml=Bl,Tl=N,Il=function(t,e){if(t<e)throw xl("Not enough arguments");return t},Rl=Pl,jl=tl,Nl=Ll.setImmediate,Kl=Ll.clearImmediate,Fl=Ll.process,Gl=Ll.Dispatch,Ul=Ll.Function,Hl=Ll.MessageChannel,zl=Ll.String,ql=0,Wl={},Xl="onreadystatechange";Vl((function(){Ju=Ll.location}));var Yl=function(t){if(Cl(Wl,t)){var e=Wl[t];delete Wl[t],e()}},Jl=function(t){return function(){Yl(t)}},$l=function(t){Yl(t.data)},Ql=function(t){Ll.postMessage(zl(t),Ju.protocol+"//"+Ju.host)};Nl&&Kl||(Nl=function(t){Il(arguments.length,1);var e=Al(t)?t:Ul(t),n=Ml(arguments,1);return Wl[++ql]=function(){_l(e,void 0,n)},$u(ql),ql},Kl=function(t){delete Wl[t]},jl?$u=function(t){Fl.nextTick(Jl(t))}:Gl&&Gl.now?$u=function(t){Gl.now(Jl(t))}:Hl&&!Rl?(Zu=(Qu=new Hl).port2,Qu.port1.onmessage=$l,$u=Ol(Zu.postMessage,Zu)):Ll.addEventListener&&Al(Ll.postMessage)&&!Ll.importScripts&&Ju&&"file:"!==Ju.protocol&&!Vl(Ql)?($u=Ql,Ll.addEventListener("message",$l,!1)):$u=Xl in Tl("script")?function(t){Dl.appendChild(Tl("script"))[Xl]=function(){Dl.removeChild(this),Yl(t)}}:function(t){setTimeout(Jl(t),0)});var Zl={set:Nl,clear:Kl},tc=function(){this.head=null,this.tail=null};tc.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var ec,nc,rc,oc,ic,sc=tc,ac=/ipad|iphone|ipod/i.test(ee)&&"undefined"!=typeof Pebble,uc=/web0s(?!.*chrome)/i.test(ee),lc=L,cc=ht,dc=Ho.f,hc=Zl.set,fc=sc,pc=Pl,vc=ac,yc=uc,gc=tl,mc=lc.MutationObserver||lc.WebKitMutationObserver,bc=lc.document,Sc=lc.process,wc=lc.Promise,kc=dc(lc,"queueMicrotask"),Ec=kc&&kc.value;if(!Ec){var Bc=new fc,xc=function(){var t,e;for(gc&&(t=Sc.domain)&&t.exit();e=Bc.get();)try{e()}catch(t){throw Bc.head&&ec(),t}t&&t.enter()};pc||gc||yc||!mc||!bc?!vc&&wc&&wc.resolve?((oc=wc.resolve(void 0)).constructor=wc,ic=cc(oc.then,oc),ec=function(){ic(xc)}):gc?ec=function(){Sc.nextTick(xc)}:(hc=cc(hc,lc),ec=function(){hc(xc)}):(nc=!0,rc=bc.createTextNode(""),new mc(xc).observe(rc,{characterData:!0}),ec=function(){rc.data=nc=!nc}),Ec=function(t){Bc.head||ec(),Bc.add(t)}}var Pc=Ec,Lc=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},_c=L.Promise,Oc="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Ac=!Oc&&!tl&&"object"==typeof window&&"object"==typeof document,Cc=L,Vc=_c,Dc=V,Mc=is,Tc=Re,Ic=we,Rc=Ac,jc=Oc,Nc=ue;Vc&&Vc.prototype;var Kc=Ic("species"),Fc=!1,Gc=Dc(Cc.PromiseRejectionEvent),Uc=Mc("Promise",(function(){var t=Tc(Vc),e=t!==String(Vc);if(!e&&66===Nc)return!0;if(!Nc||Nc<51||!/native code/.test(t)){var n=new Vc((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Kc]=r,!(Fc=n.then((function(){}))instanceof r))return!0}return!e&&(Rc||jc)&&!Gc})),Hc={CONSTRUCTOR:Uc,REJECTION_EVENT:Gc,SUBCLASSING:Fc},zc={},qc=ut,Wc=TypeError,Xc=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw Wc("Bad Promise constructor");e=t,n=r})),this.resolve=qc(e),this.reject=qc(n)};zc.f=function(t){return new Xc(t)};var Yc,Jc,$c,Qc=fs,Zc=tl,td=L,ed=On,nd=Di,rd=Js,od=Ts,id=ul,sd=ut,ad=V,ud=T,ld=dl,cd=function(t,e){var n,r=vl(t).constructor;return void 0===r||gl(n=vl(r)[ml])?e:yl(n)},dd=Zl.set,hd=Pc,fd=function(t,e){try{1==arguments.length?console.error(t):console.error(t,e)}catch(t){}},pd=Lc,vd=sc,yd=Uo,gd=_c,md=zc,bd="Promise",Sd=Hc.CONSTRUCTOR,wd=Hc.REJECTION_EVENT,kd=Hc.SUBCLASSING,Ed=yd.getterFor(bd),Bd=yd.set,xd=gd&&gd.prototype,Pd=gd,Ld=xd,_d=td.TypeError,Od=td.document,Ad=td.process,Cd=md.f,Vd=Cd,Dd=!!(Od&&Od.createEvent&&td.dispatchEvent),Md="unhandledrejection",Td=function(t){var e;return!(!ud(t)||!ad(e=t.then))&&e},Id=function(t,e){var n,r,o,i=e.value,s=1==e.state,a=s?t.ok:t.fail,u=t.resolve,l=t.reject,c=t.domain;try{a?(s||(2===e.rejection&&Fd(e),e.rejection=1),!0===a?n=i:(c&&c.enter(),n=a(i),c&&(c.exit(),o=!0)),n===t.promise?l(_d("Promise-chain cycle")):(r=Td(n))?ed(r,n,u,l):u(n)):l(i)}catch(t){c&&!o&&c.exit(),l(t)}},Rd=function(t,e){t.notified||(t.notified=!0,hd((function(){for(var n,r=t.reactions;n=r.get();)Id(n,t);t.notified=!1,e&&!t.rejection&&Nd(t)})))},jd=function(t,e,n){var r,o;Dd?((r=Od.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),td.dispatchEvent(r)):r={promise:e,reason:n},!wd&&(o=td["on"+t])?o(r):t===Md&&fd("Unhandled promise rejection",n)},Nd=function(t){ed(dd,td,(function(){var e,n=t.facade,r=t.value;if(Kd(t)&&(e=pd((function(){Zc?Ad.emit("unhandledRejection",r,n):jd(Md,n,r)})),t.rejection=Zc||Kd(t)?2:1,e.error))throw e.value}))},Kd=function(t){return 1!==t.rejection&&!t.parent},Fd=function(t){ed(dd,td,(function(){var e=t.facade;Zc?Ad.emit("rejectionHandled",e):jd("rejectionhandled",e,t.value)}))},Gd=function(t,e,n){return function(r){t(e,r,n)}},Ud=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Rd(t,!0))},Hd=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw _d("Promise can't be resolved itself");var r=Td(e);r?hd((function(){var n={done:!1};try{ed(r,e,Gd(Hd,n,t),Gd(Ud,n,t))}catch(e){Ud(n,e,t)}})):(t.value=e,t.state=1,Rd(t,!1))}catch(e){Ud({done:!1},e,t)}}};if(Sd&&(Ld=(Pd=function(t){ld(this,Ld),sd(t),ed(Yc,this);var e=Ed(this);try{t(Gd(Hd,e),Gd(Ud,e))}catch(t){Ud(e,t)}}).prototype,(Yc=function(t){Bd(this,{type:bd,done:!1,notified:!1,parent:!1,reactions:new vd,rejection:!1,state:0,value:void 0})}).prototype=nd(Ld,"then",(function(t,e){var n=Ed(this),r=Cd(cd(this,Pd));return n.parent=!0,r.ok=!ad(t)||t,r.fail=ad(e)&&e,r.domain=Zc?Ad.domain:void 0,0==n.state?n.reactions.add(r):hd((function(){Id(r,n)})),r.promise})),Jc=function(){var t=new Yc,e=Ed(t);this.promise=t,this.resolve=Gd(Hd,e),this.reject=Gd(Ud,e)},md.f=Cd=function(t){return t===Pd||undefined===t?new Jc(t):Vd(t)},ad(gd)&&xd!==Object.prototype)){$c=xd.then,kd||nd(xd,"then",(function(t,e){var n=this;return new Pd((function(t,e){ed($c,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete xd.constructor}catch(t){}rd&&rd(xd,Ld)}Qc({global:!0,constructor:!0,wrap:!0,forced:Sd},{Promise:Pd}),od(Pd,bd,!1),id(bd);var zd=Lo,qd=we("iterator"),Wd=Array.prototype,Xd=Ae,Yd=jn,Jd=mt,$d=Lo,Qd=we("iterator"),Zd=function(t){if(!Jd(t))return Yd(t,Qd)||Yd(t,"@@iterator")||$d[Xd(t)]},th=On,eh=ut,nh=Pn,rh=ot,oh=Zd,ih=TypeError,sh=On,ah=Pn,uh=jn,lh=ht,ch=On,dh=Pn,hh=ot,fh=function(t){return void 0!==t&&(zd.Array===t||Wd[qd]===t)},ph=Dt,vh=An,yh=function(t,e){var n=arguments.length<2?oh(t):e;if(eh(n))return nh(th(n,t));throw ih(rh(t)+" is not iterable")},gh=Zd,mh=function(t,e,n){var r,o;ah(t);try{if(!(r=uh(t,"return"))){if("throw"===e)throw n;return n}r=sh(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return ah(r),n},bh=TypeError,Sh=function(t,e){this.stopped=t,this.result=e},wh=Sh.prototype,kh=function(t,e,n){var r,o,i,s,a,u,l,c=n&&n.that,d=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=lh(e,c),y=function(t){return r&&mh(r,"normal",t),new Sh(!0,t)},g=function(t){return d?(dh(t),p?v(t[0],t[1],y):v(t[0],t[1])):p?v(t,y):v(t)};if(h)r=t.iterator;else if(f)r=t;else{if(!(o=gh(t)))throw bh(hh(t)+" is not iterable");if(fh(o)){for(i=0,s=ph(t);s>i;i++)if((a=g(t[i]))&&vh(wh,a))return a;return new Sh(!1)}r=yh(t,o)}for(u=h?t.next:r.next;!(l=ch(u,r)).done;){try{a=g(l.value)}catch(t){mh(r,"throw",t)}if("object"==typeof a&&a&&vh(wh,a))return a}return new Sh(!1)},Eh=we("iterator"),Bh=!1;try{var xh=0,Ph={next:function(){return{done:!!xh++}},return:function(){Bh=!0}};Ph[Eh]=function(){return this},Array.from(Ph,(function(){throw 2}))}catch(t){}var Lh=function(t,e){if(!e&&!Bh)return!1;var n=!1;try{var r={};r[Eh]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},_h=_c,Oh=Hc.CONSTRUCTOR||!Lh((function(t){_h.all(t).then(void 0,(function(){}))})),Ah=On,Ch=ut,Vh=zc,Dh=Lc,Mh=kh;fs({target:"Promise",stat:!0,forced:Oh},{all:function(t){var e=this,n=Vh.f(e),r=n.resolve,o=n.reject,i=Dh((function(){var n=Ch(e.resolve),i=[],s=0,a=1;Mh(t,(function(t){var u=s++,l=!1;a++,Ah(n,e,t).then((function(t){l||(l=!0,i[u]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise}});var Th=fs,Ih=Hc.CONSTRUCTOR,Rh=_c,jh=De,Nh=V,Kh=Di,Fh=Rh&&Rh.prototype;if(Th({target:"Promise",proto:!0,forced:Ih,real:!0},{catch:function(t){return this.then(void 0,t)}}),Nh(Rh)){var Gh=jh("Promise").prototype.catch;Fh.catch!==Gh&&Kh(Fh,"catch",Gh,{unsafe:!0})}var Uh=On,Hh=ut,zh=zc,qh=Lc,Wh=kh;fs({target:"Promise",stat:!0,forced:Oh},{race:function(t){var e=this,n=zh.f(e),r=n.reject,o=qh((function(){var o=Hh(e.resolve);Wh(t,(function(t){Uh(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var Xh=On,Yh=zc;fs({target:"Promise",stat:!0,forced:Hc.CONSTRUCTOR},{reject:function(t){var e=Yh.f(this);return Xh(e.reject,void 0,t),e.promise}});var Jh=Pn,$h=T,Qh=zc,Zh=fs,tf=Hc.CONSTRUCTOR,ef=function(t,e){if(Jh(t),$h(e)&&e.constructor===t)return e;var n=Qh.f(t);return(0,n.resolve)(e),n.promise};De("Promise"),Zh({target:"Promise",stat:!0,forced:tf},{resolve:function(t){return ef(this,t)}});var nf,rf,of=Ae,sf=String,af=function(t){if("Symbol"===of(t))throw TypeError("Cannot convert a Symbol value to a string");return sf(t)},uf=Pn,lf=function(){var t=uf(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},cf=U,df=L.RegExp,hf=cf((function(){var t=df("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),ff=hf||cf((function(){return!df("a","y").sticky})),pf={BROKEN_CARET:hf||cf((function(){var t=df("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:ff,UNSUPPORTED_Y:hf},vf=U,yf=L.RegExp,gf=vf((function(){var t=yf(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),mf=U,bf=L.RegExp,Sf=mf((function(){var t=bf("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),wf=On,kf=Y,Ef=af,Bf=lf,xf=pf,Pf=go,Lf=Uo.get,_f=gf,Of=Sf,Af=qt("native-string-replace",String.prototype.replace),Cf=RegExp.prototype.exec,Vf=Cf,Df=kf("".charAt),Mf=kf("".indexOf),Tf=kf("".replace),If=kf("".slice),Rf=(rf=/b*/g,wf