@ledgerhq/connect-kit 1.1.2 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
package/dist/umd/index.js CHANGED
@@ -170,7 +170,7 @@ t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?i-1:0,h=
170
170
  color: #BBB0FF;
171
171
  cursor: pointer;
172
172
  `;var gt=function(e,t){return gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},gt(e,t)};function yt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}gt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var vt=function(){return vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vt.apply(this,arguments)};function mt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function _t(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function bt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var wt=function(){function e(){this.callbacks={}}return e.prototype.on=function(e,t){return this.callbacks[e]?this.callbacks[e].push(t):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(e,r),t.apply(n,i)};return this.on(e,r),this},e.prototype.off=function(e,t){var n,r=(null!==(n=this.callbacks[e])&&void 0!==n?n:[]).filter((function(e){return e!==t}));return this.callbacks[e]=r,this},e.prototype.emit=function(e){for(var t,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(null!==(t=this.callbacks[e])&&void 0!==t?t:[]).forEach((function(e){e.apply(n,r)})),this},e}(),Et=function(e,t){return Et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Et(e,t)};function St(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Et(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ot=function(){return Ot=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ot.apply(this,arguments)};function xt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function It(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function Rt(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function kt(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,s=t.length,a=e;o<s&&"__proto__"!==(i=t[o++])&&"constructor"!==i&&"prototype"!==i;)a=a[i]=o===s?n:typeof(r=a[i])==typeof t?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}"function"==typeof SuppressedError&&SuppressedError;var Ct=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return St(t,e),t}(Error);function Pt(e){return"string"==typeof e}function At(e){return"number"==typeof e}function Nt(e){return"function"==typeof e}function Tt(e){return null!=e}function Mt(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var Lt="is not a string",jt="is not an object",Ut="is nil";function Dt(e,t){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),t);e.then((function(e){return clearTimeout(i),n(e)})).catch(r)}))}function zt(e,t,n){var r;return(r=n,new Promise((function(e){return setTimeout(e,r)}))).then((function(){return Dt(function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}}(),1e3)})).catch((function(t){null==e||e.log("warn","Callback Error",{error:t}),null==e||e.stats.increment("callback_error")})).then((function(){return e}))}for(var Ft,Bt="onRemoveFromFuture",Ht=function(e){function t(t,n,r){var i=e.call(this)||this;return i.future=[],i.maxAttempts=t,i.queue=n,i.seen=null!=r?r:{},i}return St(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.map((function(t){return!(e.updateAttempts(t)>e.maxAttempts||e.includes(t))&&(e.queue.push(t),!0)}));return this.queue=this.queue.sort((function(t,n){return e.getAttempts(t)-e.getAttempts(n)})),r},t.prototype.pushWithBackoff=function(e){var t=this;if(0===this.getAttempts(e))return this.push(e)[0];var n=this.updateAttempts(e);if(n>this.maxAttempts||this.includes(e))return!1;var r=function(e){var t=Math.random()+1,n=e.minTimeout,r=void 0===n?500:n,i=e.factor,o=void 0===i?2:i,s=e.attempt,a=e.maxTimeout,u=void 0===a?1/0:a;return Math.min(t*r*Math.pow(o,s),u)}({attempt:n-1});return setTimeout((function(){t.queue.push(e),t.future=t.future.filter((function(t){return t.id!==e.id})),t.emit(Bt)}),r),this.future.push(e),!0},t.prototype.getAttempts=function(e){var t;return null!==(t=this.seen[e.id])&&void 0!==t?t:0},t.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},t.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||Boolean(this.queue.find((function(t){return t.id===e.id})))||Boolean(this.future.find((function(t){return t.id===e.id})))},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(wt),qt=256,Vt=[];qt--;)Vt[qt]=(qt+256).toString(16).substring(1);function $t(){var e,t=0,n="";if(!Ft||qt+16>256){for(Ft=Array(t=256);t--;)Ft[t]=256*Math.random()|0;t=qt=0}for(;t<16;t++)e=Ft[qt+t],n+=6==t?Vt[15&e|64]:8==t?Vt[63&e|128]:Vt[e],1&t&&t>1&&t<11&&(n+="-");return qt++,n}var Wt=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce((function(e,t){var n,r,i,o=Ot(Ot({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete o.time;var s=null!==(i=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return e[s]&&(s="".concat(s,"-").concat(Math.random())),Ot(Ot({},e),((n={})[s]=o,n))}),{});console.table?console.table(e):console.log(e)}else this.logs.forEach((function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!=r?r:""):console[t](n,null!=r?r:"")}));this._logs=[]},e}(),Kt=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map((function(e){return Ot(Ot({},e),{tags:e.tags.join(",")})}));console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map((function(e){return{m:e.metric,v:e.value,t:e.tags,k:(t=e.type,{gauge:"g",counter:"c"}[t]),e:e.timestamp};var t}))},e}(),Gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return St(t,e),t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(Kt),Yt=function(e){var t,n,r;this.retry=null===(t=e.retry)||void 0===t||t,this.type=null!==(n=e.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=e.reason)&&void 0!==r?r:""},Qt=function(){function e(e,t,n,r){void 0===t&&(t=$t()),void 0===n&&(n=new Gt),void 0===r&&(r=new Wt),this.attempts=0,this.event=e,this._id=t,this.logger=r,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new Yt({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return kt(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}();function Jt(e,t){e.log("debug","plugin",{plugin:t.name});var n=(new Date).getTime(),r=t[e.event.type];if(void 0===r)return Promise.resolve(e);var i=function(e){return xt(this,void 0,void 0,(function(){var t;return It(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return[2,n.sent()];case 2:return t=n.sent(),[2,Promise.reject(t)];case 3:return[2]}}))}))}((function(){return r.apply(t,[e])})).then((function(e){var r=(new Date).getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e})).catch((function(n){if(n instanceof Yt&&"middleware_cancellation"===n.type)throw n;return n instanceof Yt?(e.log("warn",n.type,{plugin:t.name,error:n}),n):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),n)}));return i}function Xt(e,t){return Jt(e,t).then((function(t){if(t instanceof Qt)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)}))}var Zt=function(e){function t(t){var n,r,i,o=e.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(e){var t,o=e();return"object"==typeof(t=o)&&null!==t&&"then"in t&&"function"==typeof t.then&&(1==++i&&(n=new Promise((function(e){return r=e}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=t,o.queue.on(Bt,(function(){o.scheduleFlush(0)})),o}return St(t,e),t.prototype.register=function(e,t,n){return xt(this,void 0,void 0,(function(){var r=this;return It(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve(t.load(e,n)).then((function(){r.plugins.push(t)})).catch((function(n){if("destination"===t.type)return r.failedInitializations.push(t.name),console.warn(t.name,n),void e.log("warn","Failed to load destination",{plugin:t.name,error:n});throw n}))];case 1:return i.sent(),[2]}}))}))},t.prototype.deregister=function(e,t,n){return xt(this,void 0,void 0,(function(){var r;return It(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter((function(e){return e.name!==t.name})),[3,4];case 3:return r=i.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}}))}))},t.prototype.dispatch=function(e){return xt(this,void 0,void 0,(function(){var t;return It(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]}))}))},t.prototype.subscribeToDelivery=function(e){return xt(this,void 0,void 0,(function(){var t=this;return It(this,(function(n){return[2,new Promise((function(n){var r=function(i,o){i.isSame(e)&&(t.off("flush",r),n(i))};t.on("flush",r)}))]}))}))},t.prototype.dispatchSingle=function(e){return xt(this,void 0,void 0,(function(){var t=this;return It(this,(function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch((function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)}))]}))}))},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout((function(){t.flush().then((function(){setTimeout((function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)}),0)}))}),e))},t.prototype.deliver=function(e){return xt(this,void 0,void 0,(function(){var t,n,r,i;return It(this,(function(o){switch(o.label){case 0:return[4,this.criticalTasks.done()];case 1:o.sent(),t=Date.now(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=o.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw r=o.sent(),i=r,e.log("error","Failed to deliver",i),this.emit("delivery_failure",e,i),e.stats.increment("delivery_failed"),r;case 5:return[2]}}))}))},t.prototype.enqueuRetry=function(e,t){return!(e instanceof Yt&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return xt(this,void 0,void 0,(function(){var e,t;return It(this,(function(n){switch(n.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=n.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=n.sent(),this.enqueuRetry(t,e)||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}}))}))},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t,n,r=this.plugins.filter((function(t){var n,r,i;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var o=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach((function(t){void 0!==e[t]&&(o=e[t])})),null!==(i=null!==(r=e[t.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===t.name||e.All)})),i=(t="type",n={},r.forEach((function(e){var r,i=void 0;if("string"==typeof t){var o=e[t];i="string"!=typeof o?JSON.stringify(o):o}else t instanceof Function&&(i=t(e));void 0!==i&&(n[i]=Rt(Rt([],null!==(r=n[i])&&void 0!==r?r:[],!0),[e],!1))})),n),o=i.before,s=void 0===o?[]:o,a=i.enrichment,u=void 0===a?[]:a,c=i.destination,l=void 0===c?[]:c,f=i.after;return{before:s,enrichment:u,destinations:l,after:void 0===f?[]:f}},t.prototype.flushOne=function(e){var t,n;return xt(this,void 0,void 0,(function(){var r,i,o,s,a,u,c,l,f,h,d,p,g,y;return It(this,(function(v){switch(v.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),r=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{}),i=r.before,o=r.enrichment,s=0,a=i,v.label=1;case 1:return s<a.length?(u=a[s],[4,Xt(e,u)]):[3,4];case 2:(h=v.sent())instanceof Qt&&(e=h),this.emit("message_enriched",e,u),v.label=3;case 3:return s++,[3,1];case 4:c=0,l=o,v.label=5;case 5:return c<l.length?(f=l[c],[4,Jt(e,f)]):[3,8];case 6:(h=v.sent())instanceof Qt&&(e=h),this.emit("message_enriched",e,f),v.label=7;case 7:return c++,[3,5];case 8:return d=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),p=d.destinations,g=d.after,[4,new Promise((function(t,n){setTimeout((function(){var r=p.map((function(t){return Jt(e,t)}));Promise.all(r).then(t).catch(n)}),0)}))];case 9:return v.sent(),e.stats.increment("message_delivered"),this.emit("message_delivered",e),y=g.map((function(t){return Jt(e,t)})),[4,Promise.all(y)];case 10:return v.sent(),[2,e]}}))}))},t}(wt);function en(e,t,n,r){return xt(this,void 0,void 0,(function(){var i,o;return It(this,(function(s){switch(s.label){case 0:return n.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return o=s.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:o=s.sent(),s.label=4;case 4:return(null==r?void 0:r.callback)?[4,zt(o,r.callback,(a=i,u=r.timeout,c=Date.now()-a,Math.max((null!=u?u:300)-c,0)))]:[3,6];case 5:o=s.sent(),s.label=6;case 6:return(null==r?void 0:r.debug)&&o.flush(),[2,o]}var a,u,c}))}))}function tn(e,t,n,r){var i,o=[e,t,n,r],s=Mt(e)?e.event:e;if(!s||!Pt(s))throw new Error("Event missing");var a=Mt(e)?null!==(i=e.properties)&&void 0!==i?i:{}:Mt(t)?t:{},u={};return Nt(n)||(u=null!=n?n:{}),Mt(e)&&!Nt(t)&&(u=null!=t?t:{}),[s,a,u,o.find(Nt)]}function nn(e,t,n,r,i){var o,s,a=null,u=null,c=[e,t,n,r,i],l=c.filter(Pt);void 0!==l[0]&&void 0!==l[1]&&(a=l[0],u=l[1]),1===l.length&&(a=null,u=l[0]);var f=c.find(Nt),h=c.filter((function(e){return null===u?Mt(e):Mt(e)||null===e})),d=null!==(o=h[0])&&void 0!==o?o:{},p=null!==(s=h[1])&&void 0!==s?s:{};return[a,u,d,p,f]}var rn=function(e){return function(){for(var t,n,r,i,o,s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var u;u=null!==(r=null!==(t=s.find(Pt))&&void 0!==t?t:null===(n=s.find(At))||void 0===n?void 0:n.toString())&&void 0!==r?r:e.id();var c=s.filter((function(e){return null===u?Mt(e):Mt(e)||null===e})),l=null!==(i=c[0])&&void 0!==i?i:{},f=null!==(o=c[1])&&void 0!==o?o:{},h=s.find(Nt);return[u,l,f,h]}};function on(e,t,n,r){At(e)&&(e=e.toString()),At(t)&&(t=t.toString());var i=[e,t,n,r],o=i.filter(Pt),s=o[0],a=void 0===s?e:s,u=o[1],c=void 0===u?null:u,l=i.filter(Mt)[0];return[a,c,void 0===l?{}:l,i.find(Nt)]}function sn(){return"undefined"!=typeof window}function an(){return!sn()}function un(){return!sn()||window.navigator.onLine}function cn(){return!un()}function ln(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),s.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)}))}var fn=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},hn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=fn();return(n&&n.fetch||ln).apply(void 0,e)},dn="1.53.3";/*! js-cookie v3.0.1 | MIT */
173
- function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var gn=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=pn({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var s in i)i[s]&&(o+="; "+s,!0!==i[s]&&(o+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(r[a]=t.read(s,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",pn({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,pn({},this.attributes,t))},withConverter:function(t){return e(pn({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function yn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function vn(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",o=n[r],s={domain:"."+o};try{if(gn.set(i,"1",s),gn.get(i))return gn.remove(i,s),o}catch(e){return}}}function mn(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}var _n={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},bn=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},Object.defineProperty(e.prototype,"type",{get:function(){return"memory"},enumerable:!1,configurable:!0}),e}(),wn=function(e){function t(n){void 0===n&&(n=t.defaults);var r=e.call(this)||this;return r.options=vt(vt({},t.defaults),n),r}return yt(t,e),t.available=function(){try{var e="ajs_cookies_check";gn.set(e,"test");var t=document.cookie.includes(e);return gn.remove(e),t}catch(e){return!1}},Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:vn(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(e){try{var t=gn.get(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(e){return null}},t.prototype.set=function(e,t){"string"==typeof t?gn.set(e,t,this.opts()):null===t?gn.remove(e,this.opts()):gn.set(e,JSON.stringify(t),this.opts())},t.prototype.remove=function(e){return gn.remove(e,this.opts())},Object.defineProperty(t.prototype,"type",{get:function(){return"cookie"},enumerable:!1,configurable:!0}),t}(bn),En=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},Sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.available=function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}},t.prototype.get=function(e){try{var t=localStorage.getItem(e);if(null===t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(t){return En(e,"unavailable"),null}},t.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){En(e,"full")}},t.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){En(e,"unavailable")}},Object.defineProperty(t.prototype,"type",{get:function(){return"localStorage"},enumerable:!1,configurable:!0}),t}(bn),On=function(){function e(e,t){this.storageOptions=t,this.enabledStores=e}return e.prototype.getStores=function(e){var t=this,n=[];return this.enabledStores.filter((function(t){return!e||(null==e?void 0:e.includes(t))})).forEach((function(e){var r=t.storageOptions[e];void 0!==r&&n.push(r)})),n},e.prototype.getAndSync=function(e,t){var n=this.get(e,t),r="number"==typeof n?n.toString():n;return this.set(e,r,t),r},e.prototype.get=function(e,t){for(var n=null,r=0,i=this.getStores(t);r<i.length;r++){if(n=i[r].get(e))return n}return null},e.prototype.set=function(e,t,n){for(var r=0,i=this.getStores(n);r<i.length;r++){i[r].set(e,t)}},e.prototype.clear=function(e,t){for(var n=0,r=this.getStores(t);n<r.length;n++){r[n].remove(e)}},e}();function xn(e){return{cookie:wn.available()?new wn(e):void 0,localStorage:Sn.available()?new Sn:void 0,memory:new bn}}var In,Rn=function(){function e(e,t){void 0===e&&(e=_n);var n,r,i,o,s=this;this.options={},this.id=function(e){if(s.options.disable)return null;var t=s.identityStore.getAndSync(s.idKey);void 0!==e&&(s.identityStore.set(s.idKey,e),e!==t&&null!==t&&null!==e&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(_n.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(s.options.disable)return null;if(void 0===e){var r=null!==(t=s.identityStore.getAndSync(s.anonKey))&&void 0!==t?t:null===(n=s.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(s.identityStore.set(s.anonKey,null),s.identityStore.getAndSync(s.anonKey)):(s.identityStore.set(s.anonKey,null!=e?e:$t()),s.identityStore.getAndSync(s.anonKey))},this.traits=function(e){var t;if(!s.options.disable)return null===e&&(e={}),e&&s.traitsStore.set(s.traitsKey,null!=e?e:{}),null!==(t=s.traitsStore.get(s.traitsKey))&&void 0!==t?t:{}},this.options=e,this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:_n.cookie.key,this.traitsKey=null!==(o=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:_n.localStorage.key,this.anonKey="ajs_anonymous_id";var a=!0===e.disable,u=!1!==e.persist,c=a?[]:u?["localStorage","cookie","memory"]:["memory"],l=xn(t);e.localStorageFallbackDisabled&&(c=c.filter((function(e){return"localStorage"!==e}))),this.identityStore=new On(c,l),this.legacyUserStore=new On(c.filter((function(e){return"localStorage"!==e&&"memory"!==e})),l),this.traitsStore=new On(c.filter((function(e){return"cookie"!==e})),l);var f=this.legacyUserStore.get(_n.cookie.oldKey);f&&"object"==typeof f&&(f.id&&this.id(f.id),f.traits&&this.traits(f.traits)),mn(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=vt(vt({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.defaults=_n,e}(),kn={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Cn=function(e){function t(t,n){void 0===t&&(t=kn);var r=e.call(this,t,n)||this;return r.anonymousId=function(e){},mn(r),r}return yt(t,e),t}(Rn);var Pn="npm";function An(){return Pn}function Nn(e,t,n){var r=new On(n?[]:["cookie"],xn(function(){if(In)return In;var e=vn(window.location.href);return In={expires:31536e6,secure:!1,path:"/"},e&&(In.domain=e),In}())),i=r.get("s:context.referrer"),o=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],s=i[1];if(t[o])return{id:s,type:t[o]}}}(e);(o=null!=o?o:i)&&(t&&(t.referrer=vt(vt({},t.referrer),o)),r.set("s:context.referrer",o))}function Tn(e,t,n,r){var i,o,s,a,u,c,l=e.user();t.context=null!==(o=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==o?o:{};var f=t.context,h="string"==typeof(null===(s=f.page)||void 0===s?void 0:s.search)?null===(a=f.page)||void 0===a?void 0:a.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,f.userAgent=navigator.userAgent;var d=navigator.userLanguage||navigator.language;if(void 0===f.locale&&void 0!==d&&(f.locale=d),!f.library){var p=An();f.library="web"===p?{name:"analytics.js",version:"next-".concat(dn)}:{name:"analytics.js",version:"npm:next-".concat(dn)}}h&&!f.campaign&&(f.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var s=r.substr(4);"campaign"===s&&(s="name"),e[s]=yn(o)}return e}),{})}(h)),Nn(h,f,null!==(u=e.options.disableClientPersistence)&&void 0!==u&&u),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var g=e.queue.failedInitializations||[];g.length>0&&(t._metadata={failedInitializations:g});var y=[],v=[];for(var m in r){var _=r[m];"Segment.io"===m&&y.push(m),"bundled"===_.bundlingStatus&&y.push(m),"unbundled"===_.bundlingStatus&&v.push(m)}for(var b=0,w=(null==n?void 0:n.unbundledIntegrations)||[];b<w.length;b++){var E=w[b];v.includes(E)||v.push(E)}var S=null!==(c=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==c?c:{},O=[];y.sort().forEach((function(e){var t;(null!==(t=S[e])&&void 0!==t?t:[]).forEach((function(e){O.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=vt(vt({},t._metadata),{bundled:y.sort(),unbundled:v.sort(),bundledIds:O}));var x=function(){var e=gn.get("_ga");if(e&&e.startsWith("amp"))return e}();return x&&(f.amp={id:x}),t}var Mn="api.segment.io/v1";function Ln(e){console.error("Error sending segment performance metrics",e)}var jn,Un=function(){function e(e){var t,n,r,i,o=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:Mn,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var s=!1,a=function(){s||(s=!0,o.flush().catch(Ln),s=!1,setTimeout(a,o.flushTimer))};a()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:vt(vt({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(dn):"npm:next-".concat(dn)})}}(e,t,An());this.queue.push(n),e.includes("error")&&this.flush().catch(Ln)}},e.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var e=this;return _t(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){Ln(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return mt(this,void 0,void 0,(function(){var e,t,n;return _t(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,hn(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.initRemoteMetrics=function(e){jn=new Un(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==jn||jn.increment(t,null!=r?r:[])},t}(Kt),zn=function(e){function t(t,n){return e.call(this,t,n,new Dn)||this}return yt(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(Qt),Fn={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function s(e){var t,r,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function a(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}function f(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function h(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function d(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,u=this.byteLength,c=t(n,u),l=u;return r!==e&&(l=t(r,u)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,c,i),s.set(a),o)}}(),p.prototype.append=function(e){return this.appendBinary(c(e)),this},p.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},p.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,i,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(c(e),t)},p.hashBinary=function(e,t){var n=u(o(e));return t?d(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=h(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=f(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=u(s(new Uint8Array(e)));return t?d(n):n},p}()}(Fn);var Bn=Fn.exports,Hn=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{event:e,type:"track",properties:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.page=function(e,t,n,r,i){var o,s={type:"page",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(s.category=e,s.properties=null!==(o=s.properties)&&void 0!==o?o:{},s.properties.category=e),null!==t&&(s.name=t),this.normalize(vt(vt({},this.baseEvent()),s))},e.prototype.screen=function(e,t,n,r,i){var o={type:"screen",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(o.category=e),null!==t&&(o.name=t),this.normalize(vt(vt({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"group",traits:t,options:vt({},n),integrations:vt({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:vt({},n),integrations:vt({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(vt(vt({},i),this.baseEvent())):this.normalize(vt(vt({},this.baseEvent()),i))},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(t=e.options)&&void 0!==t?t:{};delete o.integrations;var s=Object.keys(o),a=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},u={};return s.forEach((function(e){"context"!==e&&(i.includes(e)?kt(u,e,o[e]):kt(a,e,o[e]))})),[a,u]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return vt(vt({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),o=vt(vt({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),s=this.context(e),a=s[0],u=s[1];e.options;var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["options"]),l=vt(vt(vt({timestamp:new Date},c),{context:a,integrations:o}),u),f="ajs-next-"+Bn.hash(JSON.stringify(l)+$t());return vt(vt({},l),{messageId:f})},e}(),qn={getItem:function(){},setItem:function(){},removeItem:function(){}};try{qn=sn()&&window.localStorage?window.localStorage:qn}catch(e){console.warn("Unable to access localStorage",e)}function Vn(e){var t=qn.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new zn(e.event,e.id)}))}function $n(e){var t=qn.getItem(e);return t?JSON.parse(t):{}}function Wn(e){qn.removeItem(e)}function Kn(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=qn.getItem(r),o=i?JSON.parse(i):null,s=null===o||function(e){return(new Date).getTime()>e}(o);if(s)return qn.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void qn.removeItem(r);!s&&n<3?setTimeout((function(){Kn(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var Gn=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),s=[],a={};return Kn(n,(function(){try{s=Vn(i),a=$n(o),Wn(i),Wn(o),r.queue=bt(bt([],s,!0),r.queue,!0),r.seen=vt(vt({},a),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=bt(bt([],r.queue,!0),r.future,!0);try{Kn(n,(function(){!function(e,t){var n=Vn(e),r=bt(bt([],t,!0),n,!0).reduce((function(e,t){var n;return vt(vt({},e),((n={})[t.id]=t,n))}),{});qn.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=$n(e);qn.setItem(e,JSON.stringify(vt(vt({},n),t)))}(o,r.seen)}))}catch(e){console.error(e)}}})),r}return yt(t,e),t}(Ht),Yn=function(e){function t(t){return e.call(this,"string"==typeof t?new Gn(4,t):t)||this}return yt(t,e),t.prototype.flush=function(){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return cn()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(Zt),Qn="This is being deprecated and will be not be available in future releases of Analytics JS",Jn=fn(),Xn=null==Jn?void 0:Jn.analytics;function Zn(){console.warn(Qn)}var er=function(e){function t(t,n,r,i,o){var s,a,u,c=this;(c=e.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=Zn,c.addIntegrationMiddleware=Zn,c.listeners=Zn,c.addEventListener=Zn,c.removeAllListeners=Zn,c.removeListener=Zn,c.removeEventListener=Zn,c.hasListeners=Zn,c.add=Zn,c.addIntegration=Zn;var l=null==n?void 0:n.cookie,f=null!==(s=null==n?void 0:n.disableClientPersistence)&&void 0!==s&&s;return c.settings=t,c.settings.timeout=null!==(a=c.settings.timeout)&&void 0!==a?a:300,c.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?4:1,i=n?new Ht(r,[]):new Gn(r,e);return new Yn(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,f),c._universalStorage=new On(f?["memory"]:["localStorage","cookie","memory"],xn(l)),c._user=null!=i?i:new Rn(f?vt(vt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Cn(f?vt(vt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new Hn(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},mn(c),c}return yt(t,e),Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=tn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("track",n,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.page(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("page",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=rn(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],this._user.identify(n,r),s=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return this._group;var r=rn(this._group).apply(void 0,t),i=r[0],o=r[1],s=r[2],a=r[3];this._group.identify(i,o);var u=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(u,c,s,this.integrations);return this._dispatch(l,a).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=on.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("screen",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return sl}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return mt(this,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=new zn(e),cn()&&!this.options.retryQueue?[2,n]:[2,en(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return mt(this,void 0,void 0,(function(){var t=this;return _t(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return mt(t,void 0,void 0,(function(){var t,n,r;return _t(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return Ji}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()})).forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return ul}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){return console.warn(Qn),window.analytics=null!=Xn?Xn:this,this},t.prototype.normalize=function(e){return console.warn(Qn),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Qn),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return dn},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(e){return console.warn(Qn),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return console.warn(Qn),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Qn),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Qn);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(wt);function tr(){return"undefined"!=typeof process&&process.env?process.env:{}}try{window.analyticsWriteKey="__WRITE_KEY__"}catch(J){}var nr,rr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ir=function(){var e=function(){var e;return null!=nr?nr:null===(e=window.analytics)||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=rr.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},or=function(){var e=ir();return"".concat(e,"/next-integrations")};function sr(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],o=t[1];return vt(vt({},e),"object"==typeof o?((n={})[i]=o,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],o=t[1];return vt(vt({},e),((n={})[i]=vt(vt({},o),r[i]),n))}),{})}function ar(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function ur(){var e=ar();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function cr(e){void 0===e&&(e="");var t=ar();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function lr(e){var t=e.event;t.context=t.context||{};var n,r,i={path:ur(),referrer:document.referrer,search:location.search,title:document.title,url:cr(location.search)},o=void 0;return"page"===t.type&&(o=t.properties&&(n=t.properties,r=Object.keys(i),Object.assign.apply(Object,bt([{}],r.map((function(e){var t;if(n&&Object.prototype.hasOwnProperty.call(n,e))return(t={})[e]=n[e],t})),!1))),t.properties=vt(vt(vt({},i),t.properties),t.name?{name:t.name}:{})),t.context.page=vt(vt(vt({},i),o),t.context.page),e}var fr={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:lr,alias:lr,track:lr,identify:lr,group:lr};function hr(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function dr(e,t){var n=hr(e);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var s=0,a=Object.entries(null!=t?t:{});s<a.length;s++){var u=a[s],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(e)))};var f=window.document.getElementsByTagName("script")[0];null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f)}))}function pr(e){var t=hr(e);return void 0!==t&&t.remove(),Promise.resolve()}var gr={},yr={},vr={},mr={exports:{}};!function(e){function t(e){return function(t,n,r,o){var s,a=o&&function(e){return"function"==typeof e}(o.normalizer)?o.normalizer:i;n=a(n);for(var u=!1;!u;)c();function c(){for(s in t){var e=a(s);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[s];return null==i?void(u=!0):n.length?void(t=i):void(u=!0)}}}s=void 0,u=!0}if(s)return null==t?t:e(t,s,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,o){return t(r).call(this,e,n,i,o),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(mr);var _r=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});var br=_r(mr.exports);function wr(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return br.default(n,"address."+e)||br.default(n,e)||(t?br.default(n,"address."+t):null)||(t?br.default(n,t):null)||br.default(r,"address."+e)||br.default(r,e)||(t?br.default(r,"address."+t):null)||(t?br.default(r,t):null)}}vr.default=function(e){e.zip=wr("postalCode","zip"),e.country=wr("country"),e.street=wr("street"),e.state=wr("state"),e.city=wr("city"),e.region=wr("region")};var Er={};Object.defineProperty(Er,"__esModule",{value:!0}),Er.clone=void 0,Er.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});var Or={Salesforce:!0};Sr.default=function(e){return!Or[e]};var xr={},Ir=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;xr.parse=function(e){var t=[1,5,6,7,11,12],n=Ir.exec(e),r=0;if(!n)return new Date(e);for(var i,o=0;i=t[o];o++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var s=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(s)},xr.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&Ir.test(e))};var Rr={},kr=/\d{13}/;Rr.is=function(e){return kr.test(e)},Rr.parse=function(e){return e=parseInt(e,10),new Date(e)};var Cr={},Pr=/\d{10}/;Cr.is=function(e){return Pr.test(e)},Cr.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var Ar=xr,Nr=Rr,Tr=Cr,Mr=Object.prototype.toString;var Lr=function(e){return t=e,"[object Date]"===Mr.call(t)?e:function(e){return"[object Number]"===Mr.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):Ar.is(e)?Ar.parse(e):Nr.is(e)?Nr.parse(e):Tr.is(e)?Tr.parse(e):new Date(e);var t,n};var jr=xr,Ur=Dr;function Dr(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=Dr(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=Dr(n,t)})),e}(e,t):jr.is(e,t)?jr.parse(e):e}var zr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.Facade=void 0;var Fr=zr(vr),Br=Er,Hr=zr(Sr),qr=zr(Lr),Vr=zr(mr.exports),$r=zr(Ur);function Wr(e,t){t=t||{},this.raw=Br.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Br.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?qr.default(e.timestamp):new Date,t.traverse&&$r.default(e),this.opts=t,this.obj=e}yr.Facade=Wr;var Kr=Wr.prototype;function Gr(e){return Br.clone(e)}Kr.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=Vr.default(n,t.join("."))),this.opts.clone?Gr(n):n):n},Kr.field=function(e){var t=this.obj[e];return this.opts.clone?Gr(t):t},Wr.proxy=function(e){return function(){return this.proxy(e)}},Wr.field=function(e){return function(){return this.field(e)}},Wr.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?Br.clone(n):n]),n||[]}},Wr.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},Kr.json=function(){var e=this.opts.clone?Br.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},Kr.rawEvent=function(){return this.raw},Kr.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?Br.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||Vr.default(r,e);return"object"!=typeof i&&(i=Vr.default(this.options(),e)),"object"==typeof i?i:{}}},Kr.context=Kr.options,Kr.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&Hr.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},Kr.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},Kr.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},Kr.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},Kr.sessionId=Kr.anonymousId,Kr.groupId=Wr.proxy("options.groupId"),Kr.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},Kr.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},Kr.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},Kr.userAgent=Wr.proxy("context.userAgent"),Kr.timezone=Wr.proxy("context.timezone"),Kr.timestamp=Wr.field("timestamp"),Kr.channel=Wr.field("channel"),Kr.ip=Wr.proxy("context.ip"),Kr.userId=Wr.field("userId"),Fr.default(Kr);var Yr={},Qr={exports:{}};"function"==typeof Object.create?Qr.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Qr.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Jr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.Alias=void 0;var Xr=Jr(Qr.exports),Zr=yr;function ei(e,t){Zr.Facade.call(this,e,t)}Yr.Alias=ei,Xr.default(ei,Zr.Facade),ei.prototype.action=function(){return"alias"},ei.prototype.type=ei.prototype.action,ei.prototype.previousId=function(){return this.field("previousId")||this.field("from")},ei.prototype.from=ei.prototype.previousId,ei.prototype.userId=function(){return this.field("userId")||this.field("to")},ei.prototype.to=ei.prototype.userId;var ti={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});var ri=/.+\@.+\..+/;ni.default=function(e){return ri.test(e)};var ii=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0}),ti.Group=void 0;var oi=ii(Qr.exports),si=ii(ni),ai=ii(Lr),ui=yr;function ci(e,t){ui.Facade.call(this,e,t)}ti.Group=ci,oi.default(ci,ui.Facade);var li=ci.prototype;li.action=function(){return"group"},li.type=li.action,li.groupId=ui.Facade.field("groupId"),li.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return ai.default(e)},li.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return si.default(t)?t:void 0},li.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},li.name=ui.Facade.proxy("traits.name"),li.industry=ui.Facade.proxy("traits.industry"),li.employees=ui.Facade.proxy("traits.employees"),li.properties=function(){return this.field("traits")||this.field("properties")||{}};var fi={},hi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.Identify=void 0;var di=yr,pi=hi(mr.exports),gi=hi(Qr.exports),yi=hi(ni),vi=hi(Lr),mi=function(e){return e.trim()};function _i(e,t){di.Facade.call(this,e,t)}fi.Identify=_i,gi.default(_i,di.Facade);var bi=_i.prototype;bi.action=function(){return"identify"},bi.type=bi.action,bi.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},bi.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return yi.default(t)?t:void 0},bi.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return vi.default(e)},bi.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return vi.default(e)},bi.companyName=function(){return this.proxy("traits.company.name")},bi.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return mi(e);var t=this.firstName(),n=this.lastName();return t&&n?mi(t+" "+n):void 0},bi.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");return"string"==typeof t?mi(t).split(" ")[0]:void 0},bi.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=mi(t).indexOf(" ");if(-1!==n)return mi(t.substr(n+1))}},bi.uid=function(){return this.userId()||this.username()||this.email()},bi.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},bi.age=function(){var e=this.birthday(),t=pi.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},bi.avatar=function(){var e=this.traits();return pi.default(e,"avatar")||pi.default(e,"photoUrl")||pi.default(e,"avatarUrl")},bi.position=function(){var e=this.traits();return pi.default(e,"position")||pi.default(e,"jobTitle")},bi.username=di.Facade.proxy("traits.username"),bi.website=di.Facade.one("traits.website"),bi.websites=di.Facade.multi("traits.website"),bi.phone=di.Facade.one("traits.phone"),bi.phones=di.Facade.multi("traits.phone"),bi.address=di.Facade.proxy("traits.address"),bi.gender=di.Facade.proxy("traits.gender"),bi.birthday=di.Facade.proxy("traits.birthday");var wi={},Ei=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wi,"__esModule",{value:!0}),wi.Track=void 0;var Si=Ei(Qr.exports),Oi=yr,xi=fi,Ii=Ei(ni),Ri=Ei(mr.exports);function ki(e,t){Oi.Facade.call(this,e,t)}wi.Track=ki,Si.default(ki,Oi.Facade);var Ci=ki.prototype;Ci.action=function(){return"track"},Ci.type=Ci.action,Ci.event=Oi.Facade.field("event"),Ci.value=Oi.Facade.proxy("properties.value"),Ci.category=Oi.Facade.proxy("properties.category"),Ci.id=Oi.Facade.proxy("properties.id"),Ci.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},Ci.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},Ci.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},Ci.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},Ci.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},Ci.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},Ci.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},Ci.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},Ci.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},Ci.sku=Oi.Facade.proxy("properties.sku"),Ci.tax=Oi.Facade.proxy("properties.tax"),Ci.name=Oi.Facade.proxy("properties.name"),Ci.price=Oi.Facade.proxy("properties.price"),Ci.total=Oi.Facade.proxy("properties.total"),Ci.repeat=Oi.Facade.proxy("properties.repeat"),Ci.coupon=Oi.Facade.proxy("properties.coupon"),Ci.shipping=Oi.Facade.proxy("properties.shipping"),Ci.discount=Oi.Facade.proxy("properties.discount"),Ci.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},Ci.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},Ci.description=Oi.Facade.proxy("properties.description"),Ci.plan=Oi.Facade.proxy("properties.plan"),Ci.subtotal=function(){var e=Ri.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},Ci.products=function(){var e=this.properties(),t=Ri.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},Ci.quantity=function(){return(this.obj.properties||{}).quantity||1},Ci.currency=function(){return(this.obj.properties||{}).currency||"USD"},Ci.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ci.query=Oi.Facade.proxy("options.query"),Ci.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},Ci.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},Ci.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return Ii.default(t)?t:void 0},Ci.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(!e)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},Ci.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},Ci.identify=function(){var e=this.json();return e.traits=this.traits(),new xi.Identify(e,this.opts)};var Pi={},Ai=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Page=void 0;var Ni=Ai(Qr.exports),Ti=yr,Mi=wi,Li=Ai(ni);function ji(e,t){Ti.Facade.call(this,e,t)}Pi.Page=ji,Ni.default(ji,Ti.Facade);var Ui=ji.prototype;Ui.action=function(){return"page"},Ui.type=Ui.action,Ui.category=Ti.Facade.field("category"),Ui.name=Ti.Facade.field("name"),Ui.title=Ti.Facade.proxy("properties.title"),Ui.path=Ti.Facade.proxy("properties.path"),Ui.url=Ti.Facade.proxy("properties.url"),Ui.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ui.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},Ui.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return Li.default(t)?t:void 0},Ui.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},Ui.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},Ui.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Mi.Track(t,this.opts)};var Di={},zi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0}),Di.Screen=void 0;var Fi=zi(Qr.exports),Bi=Pi,Hi=wi;function qi(e,t){Bi.Page.call(this,e,t)}Di.Screen=qi,Fi.default(qi,Bi.Page),qi.prototype.action=function(){return"screen"},qi.prototype.type=qi.prototype.action,qi.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},qi.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Hi.Track(t,this.opts)};var Vi={},$i=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.Delete=void 0;var Wi=$i(Qr.exports),Ki=yr;function Gi(e,t){Ki.Facade.call(this,e,t)}function Yi(e,t){var n=new gr.Facade(e,t);return"track"===e.type&&(n=new gr.Track(e,t)),"identify"===e.type&&(n=new gr.Identify(e,t)),"page"===e.type&&(n=new gr.Page(e,t)),"alias"===e.type&&(n=new gr.Alias(e,t)),"group"===e.type&&(n=new gr.Group(e,t)),"screen"===e.type&&(n=new gr.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function Qi(e,t,n){return mt(this,void 0,void 0,(function(){function r(t,n){return mt(this,void 0,void 0,(function(){var r,i,o;return _t(this,(function(s){switch(s.label){case 0:return r=!1,i=null,[4,n({payload:Yi(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return s.sent(),r||null===i||(i.integrations=vt(vt({},t.integrations),((o={})[e]=!1,o))),[2,i]}}))}))}var i,o,s,a,u;return _t(this,(function(e){switch(e.label){case 0:i=Yi(t,{clone:!0,traverse:!1}).rawEvent(),o=0,s=n,e.label=1;case 1:return o<s.length?(a=s[o],[4,r(i,a)]):[3,4];case 2:if(null===(u=e.sent()))return[2,null];i=u,e.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}Vi.Delete=Gi,Wi.default(Gi,Ki.Facade),Gi.prototype.type=function(){return"delete"},function(e){var t=l&&l.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=yr;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Yr;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=ti;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=fi;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var s=wi;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return s.Track}});var a=Pi;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return a.Page}});var u=Di;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=Vi;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return c.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:s.Track,Page:a.Page,Screen:u.Screen,Delete:c.Delete})}(gr);var Ji=Object.freeze({__proto__:null,applyDestinationMiddleware:Qi,sourceMiddlewarePlugin:function(e,t){function n(n){return mt(this,void 0,void 0,(function(){var r;return _t(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:Yi(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new Yt({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}}),Xi=function(){function e(e,t){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return[4,Qi(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new Yt({retry:!1,reason:"dropped by destination middleware"})),[2,new zn(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return mt(t,void 0,void 0,(function(){var t;return _t(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return this.action.load(e,t)},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function Zi(e,t,n,r,i){var o,s,a;return mt(this,void 0,void 0,(function(){var u,c,l,f,h=this;return _t(this,(function(d){switch(d.label){case 0:return u=[],c=ir(),l=null!==(s=null===(o=e.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==s?s:[],f=(null!==(a=e.remotePlugins)&&void 0!==a?a:[]).map((function(e){return mt(h,void 0,void 0,(function(){var o,s,a,f,h,d,p,g,y;return _t(this,(function(v){switch(v.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];v.label=1;case 1:if(v.trys.push([1,12,,13]),o=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];s=e.url.split("/"),a=s[s.length-2],f=e.url.replace(a,btoa(a).replace(/=/g,"")),v.label=2;case 2:return v.trys.push([2,4,,6]),[4,dr(f.replace(o,c))];case 3:return v.sent(),[3,6];case 4:return v.sent(),[4,dr(e.url.replace(o,c))];case 5:return v.sent(),[3,6];case 6:return[3,9];case 7:return[4,dr(e.url.replace(o,c))];case 8:v.sent(),v.label=9;case 9:return h=e.libraryName,"function"!=typeof window[h]?[3,11]:[4,(0,window[h])(vt(vt({},e.settings),n[e.name]))];case 10:d=v.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(p=Array.isArray(d)?d:[d]),g=l.filter((function(t){return t.destinationName===e.creationName})),p.forEach((function(t){var n=new Xi(e.creationName,t);g.length&&i&&"destination"===t.type&&n.addMiddleware(i),u.push(n)})),v.label=11;case 11:return[3,13];case 12:return y=v.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(f)];case 1:return d.sent(),[2,u.filter(Boolean)]}}))}))}var eo=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||e(t=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)}))},to=500;function no(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function ro(e,t){var n,r,i,o=[],s=!1,a=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,u=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function c(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey;return hn("https://".concat(e,"/b"),{keepalive:s,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:t,writeKey:r})})}}function l(){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(t){return o.length?(e=o,o=[],[2,c(e)]):[2]}))}))}return eo((function(e){if((s=e)&&o.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){no(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(o).map(c);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(n){return o.push(t),e=o.length>=a||function(e){return no(e)>=to-50}(o),[2,e||s?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),u)))]}))}))}}}var io=function(e,t){return mt(void 0,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=function(r){return mt(void 0,void 0,void 0,(function(){var i;return _t(this,(function(o){switch(o.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function oo(e,t){return mt(this,void 0,void 0,(function(){var n,r=this;return _t(this,(function(i){switch(i.label){case 0:return n=[],cn()?[2,t]:[4,io((function(){return t.length>0&&!cn()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return _t(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,Jt(r,e)]:[2];case 1:return i=o.sent(),i instanceof zn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function so(e,t,n,r){var i=this;e||setTimeout((function(){return mt(i,void 0,void 0,(function(){var e,i;return _t(this,(function(o){switch(o.label){case 0:return e=!0,[4,oo(n,t)];case 1:return i=o.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function ao(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function uo(e,t,n){var r,i,o;return mt(this,void 0,void 0,(function(){function s(r){return mt(this,void 0,void 0,(function(){var i,o;return _t(this,(function(s){return cn()?(u.push(r),so(l,u,v,so),[2,r]):(c.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),o=Yi(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(e,t){var n,r,i,o,s=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:s.id())&&void 0!==i?i:s.anonymousId(),t.userId=null!==(o=t.userId)&&void 0!==o?o:t.to,delete t.from,delete t.to,t}(e,o)),[2,g.dispatch("".concat(d,"/").concat(i),Tn(e,o,t,n)).then((function(){return r})).catch((function(){return u.pushWithBackoff(r),so(l,u,v,so),r})).finally((function(){c.delete(r)}))])}))}))}var a,u,c,l,f,h,d,p,g,y,v;return _t(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){u.push.apply(u,Array.from(c)),c.clear()})),a=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",u=e.options.disableClientPersistence?new Ht(e.queue.queue.maxAttempts,[]):new Gn(e.queue.queue.maxAttempts,"".concat(a,":dest-Segment.io")),c=new Set,l=!1,f=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:Mn,h=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",d="".concat(h,"://").concat(f),p=null==t?void 0:t.deliveryStrategy,g="batching"===(null==p?void 0:p.strategy)?ro(f,p.config):(m=null==p?void 0:p.config,{dispatch:function(e,t){return hn(e,{keepalive:null==m?void 0:m.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,ao(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return v={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:s,identify:s,page:s,alias:s,group:s,screen:s},u.todo&&so(l,u,v,so),[2,v]}var m}))}))}function co(e){var t,n=e.event;!function(e){if(!Tt(e))throw new Ct("Event",Ut);if("object"!=typeof e)throw new Ct("Event",jt)}(n),function(e){if(!Pt(e.type))throw new Ct(".type",Lt)}(n),"track"===n.type&&function(e){if(!Pt(e.event))throw new Ct(".event",Lt)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!Mt(r))throw new Ct(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!Tt(n))throw new Ct(t,Ut);if(!Pt(n))throw new Ct(t,Lt)}(n),e}var lo={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:co,identify:co,page:co,alias:co,group:co,screen:co},fo=function(e,t,n){n.getCalls(e).forEach((function(e){mo(t,e).catch(console.error)}))},ho=function(e,t){return mt(void 0,void 0,void 0,(function(){var n,r,i;return _t(this,(function(o){switch(o.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,mo(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},po=fo.bind(void 0,"on"),go=fo.bind(void 0,"setAnonymousId"),yo=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){mo(e,t).catch(console.error)}),0)}))},vo=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function mo(e,t){return mt(this,void 0,void 0,(function(){var n,r;return _t(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(o=n)&&null!==o&&"then"in o&&"function"==typeof o.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var o}))}))}var _o=function(){function e(e){var t=this;this._preInitBuffer=new vo,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=dn,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var o=(n=t.instance)[e].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){t._preInitBuffer.push({method:e,args:r,resolve:n,reject:i,called:!1})}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function bo(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var wo,Eo,So=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(bo)},Oo=null!==(wo=(Eo=fn()).__SEGMENT_INSPECTOR__)&&void 0!==wo?wo:Eo.__SEGMENT_INSPECTOR__={};function xo(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(n){switch(n.label){case 0:return t.push.apply(t,So()),[4,ho(e,t)];case 1:return n.sent(),t.push.apply(t,So()),yo(e,t),t.clear(),[2]}}))}))}function Io(e,t,n,r,i,o,s){var a,u,c;return mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b,w,E=this;return _t(this,(function(S){switch(S.label){case 0:return function(e){var t,n,r;return"test"!==tr().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return pd})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return f=S.sent(),[3,3];case 2:f=void 0,S.label=3;case 3:return l=f,O=t,"test"!==tr().NODE_ENV&&Object.keys(O.integrations).length>1||s.length>0?[4,Promise.resolve().then((function(){return wd})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,s)}))]:[3,5];case 4:return d=S.sent(),[3,6];case 5:d=[],S.label=6;case 6:return h=d,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return Ed})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:S.sent(),S.label=8;case 8:return(null===(a=r.plan)||void 0===a?void 0:a.track)?[4,Promise.resolve().then((function(){return Sd})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return g=S.sent(),[3,11];case 10:g=void 0,S.label=11;case 11:return p=g,y=sr(t,i),[4,Zi(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return v=S.sent(),m=bt(bt(bt([lo,fr],o,!0),h,!0),v,!0),p&&m.push(p),!1===(null===(u=r.integrations)||void 0===u?void 0:u.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(b=(_=m).push,[4,uo(n,y["Segment.io"],t.integrations)]);case 13:b.apply(_,[S.sent()]),S.label=14;case 14:return[4,n.register.apply(n,m)];case 15:return w=S.sent(),Object.entries(null!==(c=t.enabledMiddleware)&&void 0!==c?c:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return Od})).then((function(e){var r=e.remoteMiddlewares;return mt(E,void 0,void 0,(function(){var e,o;return _t(this,(function(s){switch(s.label){case 0:return[4,r(w,t,i.obfuscate)];case 1:return e=s.sent(),o=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(o)]}}))}))}))]:[3,17];case 16:S.sent(),S.label=17;case 17:return[2,w]}var O}))}))}function Ro(e,t,n){var r,i,o,s,a,u,c;return void 0===t&&(t={}),mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b;return _t(this,(function(w){switch(w.label){case 0:return e.cdnURL&&(x=e.cdnURL,window.analytics&&(window.analytics._cdn=x),nr=x),null===(r=e.cdnSettings)||void 0===r?[3,1]:(f=r,[3,3]);case 1:return[4,(E=e.writeKey,S=e.cdnURL,O=null!=S?S:ir(),hn("".concat(O,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:f=w.sent(),w.label=3;case 3:return l=f,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),h=null===(o=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,d=vt({retryQueue:h},t),function(e){var t;null===(t=Oo.attach)||void 0===t||t.call(Oo,e)}(p=new er(e,d)),g=null!==(s=e.plugins)&&void 0!==s?s:[],y=null!==(a=e.classicIntegrations)&&void 0!==a?a:[],Dn.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,So()),go(e,t),po(e,t)}(p,n),[4,Io(e.writeKey,l,p,d,t,g,y)];case 4:return v=w.sent(),m=null!==(u=window.location.search)&&void 0!==u?u:"",_=null!==(c=window.location.hash)&&void 0!==c?c:"",(b=m.length?m:_.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,p.queryString(b).catch(console.error)]:[3,6];case 5:w.sent(),w.label=6;case 6:return p.initialized=!0,p.emit("initialize",e,t),t.initialPageview&&p.page().catch(console.error),[4,xo(p,n)];case 7:return w.sent(),[2,[p,v]]}var E,S,O,x}))}))}var ko=function(e){function t(){var t,n,r,i=this,o=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),s=o.promise,a=o.resolve;return i=e.call(this,(function(e){return s.then((function(t){return Ro(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return a([e,t])},i}return yt(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(_o);let Co;const Po=new Uint8Array(16);function Ao(){if(!Co&&(Co="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Co(Po)}var No=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const To=[];for(let e=0;e<256;++e)To.push((e+256).toString(16).slice(1));function Mo(e,t=0){return(To[e[t+0]]+To[e[t+1]]+To[e[t+2]]+To[e[t+3]]+"-"+To[e[t+4]]+To[e[t+5]]+"-"+To[e[t+6]]+To[e[t+7]]+"-"+To[e[t+8]]+To[e[t+9]]+"-"+To[e[t+10]]+To[e[t+11]]+To[e[t+12]]+To[e[t+13]]+To[e[t+14]]+To[e[t+15]]).toLowerCase()}function Lo(e){if(!function(e){return"string"==typeof e&&No.test(e)}(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function jo(e,t,n){function r(e,r,i,o){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Lo(r)),16!==(null===(s=r)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=n(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(let e=0;e<16;++e)i[o+e]=a[e];return i}return Mo(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Uo(e){return 14+(e+64>>>9<<4)+1}function Do(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function zo(e,t,n,r,i,o){return Do((s=Do(Do(t,e),Do(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Fo(e,t,n,r,i,o,s){return zo(t&n|~t&r,e,t,i,o,s)}function Bo(e,t,n,r,i,o,s){return zo(t&r|n&~r,e,t,i,o,s)}function Ho(e,t,n,r,i,o,s){return zo(t^n^r,e,t,i,o,s)}function qo(e,t,n,r,i,o,s){return zo(n^(t|~r),e,t,i,o,s)}jo("v3",48,(function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){const t=[],n=32*e.length,r="0123456789abcdef";for(let i=0;i<n;i+=8){const n=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Uo(t)-1]=t;let n=1732584193,r=-271733879,i=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const s=n,a=r,u=i,c=o;n=Fo(n,r,i,o,e[t],7,-680876936),o=Fo(o,n,r,i,e[t+1],12,-389564586),i=Fo(i,o,n,r,e[t+2],17,606105819),r=Fo(r,i,o,n,e[t+3],22,-1044525330),n=Fo(n,r,i,o,e[t+4],7,-176418897),o=Fo(o,n,r,i,e[t+5],12,1200080426),i=Fo(i,o,n,r,e[t+6],17,-1473231341),r=Fo(r,i,o,n,e[t+7],22,-45705983),n=Fo(n,r,i,o,e[t+8],7,1770035416),o=Fo(o,n,r,i,e[t+9],12,-1958414417),i=Fo(i,o,n,r,e[t+10],17,-42063),r=Fo(r,i,o,n,e[t+11],22,-1990404162),n=Fo(n,r,i,o,e[t+12],7,1804603682),o=Fo(o,n,r,i,e[t+13],12,-40341101),i=Fo(i,o,n,r,e[t+14],17,-1502002290),r=Fo(r,i,o,n,e[t+15],22,1236535329),n=Bo(n,r,i,o,e[t+1],5,-165796510),o=Bo(o,n,r,i,e[t+6],9,-1069501632),i=Bo(i,o,n,r,e[t+11],14,643717713),r=Bo(r,i,o,n,e[t],20,-373897302),n=Bo(n,r,i,o,e[t+5],5,-701558691),o=Bo(o,n,r,i,e[t+10],9,38016083),i=Bo(i,o,n,r,e[t+15],14,-660478335),r=Bo(r,i,o,n,e[t+4],20,-405537848),n=Bo(n,r,i,o,e[t+9],5,568446438),o=Bo(o,n,r,i,e[t+14],9,-1019803690),i=Bo(i,o,n,r,e[t+3],14,-187363961),r=Bo(r,i,o,n,e[t+8],20,1163531501),n=Bo(n,r,i,o,e[t+13],5,-1444681467),o=Bo(o,n,r,i,e[t+2],9,-51403784),i=Bo(i,o,n,r,e[t+7],14,1735328473),r=Bo(r,i,o,n,e[t+12],20,-1926607734),n=Ho(n,r,i,o,e[t+5],4,-378558),o=Ho(o,n,r,i,e[t+8],11,-2022574463),i=Ho(i,o,n,r,e[t+11],16,1839030562),r=Ho(r,i,o,n,e[t+14],23,-35309556),n=Ho(n,r,i,o,e[t+1],4,-1530992060),o=Ho(o,n,r,i,e[t+4],11,1272893353),i=Ho(i,o,n,r,e[t+7],16,-155497632),r=Ho(r,i,o,n,e[t+10],23,-1094730640),n=Ho(n,r,i,o,e[t+13],4,681279174),o=Ho(o,n,r,i,e[t],11,-358537222),i=Ho(i,o,n,r,e[t+3],16,-722521979),r=Ho(r,i,o,n,e[t+6],23,76029189),n=Ho(n,r,i,o,e[t+9],4,-640364487),o=Ho(o,n,r,i,e[t+12],11,-421815835),i=Ho(i,o,n,r,e[t+15],16,530742520),r=Ho(r,i,o,n,e[t+2],23,-995338651),n=qo(n,r,i,o,e[t],6,-198630844),o=qo(o,n,r,i,e[t+7],10,1126891415),i=qo(i,o,n,r,e[t+14],15,-1416354905),r=qo(r,i,o,n,e[t+5],21,-57434055),n=qo(n,r,i,o,e[t+12],6,1700485571),o=qo(o,n,r,i,e[t+3],10,-1894986606),i=qo(i,o,n,r,e[t+10],15,-1051523),r=qo(r,i,o,n,e[t+1],21,-2054922799),n=qo(n,r,i,o,e[t+8],6,1873313359),o=qo(o,n,r,i,e[t+15],10,-30611744),i=qo(i,o,n,r,e[t+6],15,-1560198380),r=qo(r,i,o,n,e[t+13],21,1309151649),n=qo(n,r,i,o,e[t+4],6,-145523070),o=qo(o,n,r,i,e[t+11],10,-1120210379),i=qo(i,o,n,r,e[t+2],15,718787259),r=qo(r,i,o,n,e[t+9],21,-343485551),n=Do(n,s),r=Do(r,a),i=Do(i,u),o=Do(o,c)}return[n,r,i,o]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(Uo(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))}));var Vo={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function $o(e,t,n){if(Vo.randomUUID&&!t&&!e)return Vo.randomUUID();const r=(e=e||{}).random||(e.rng||Ao)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Mo(r)}function Wo(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Ko(e,t){return e<<t|e>>>32-t}jo("v5",80,(function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,i=Math.ceil(r/16),o=new Array(i);for(let t=0;t<i;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];o[t]=n}o[i-1][14]=8*(e.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=Ko(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let i=n[0],s=n[1],a=n[2],u=n[3],c=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),o=Ko(i,5)+Wo(n,s,a,u)+c+t[n]+r[e]>>>0;c=u,u=a,a=Ko(s,30)>>>0,s=i,i=o}n[0]=n[0]+i>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+a>>>0,n[3]=n[3]+u>>>0,n[4]=n[4]+c>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));let Go=null;const Yo={};function Qo(){const e=m.exports.useCallback(((e={},t={})=>c(this,void 0,void 0,(function*(){if(Go)return;{const n=ko.load({writeKey:"q3dbZMDYOGQbk5GPl7eY7zWaAmNS5wk9"});yield n.identify($o()),Go={analytics:n,globalOptions:t,globalProperties:e}}}))),[]),t=m.exports.useCallback((e=>c(this,void 0,void 0,(function*(){Go&&(Yo[Object.keys(Yo).length]=e)}))),[]),n=m.exports.useCallback((()=>c(this,void 0,void 0,(function*(){0!=Object.keys(Yo).length&&Go&&(yield Go.analytics.track("userFlow",Yo))}))),[]);return{init:e,track:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.track(e,n,Go.globalOptions)}))),[]),page:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.page(e,n,Go.globalOptions)}))),[]),addStepToFlow:t,sendUserFlow:n}}let Jo=e=>{};const Xo=({onClose:e,children:t})=>{const{sendUserFlow:n,addStepToFlow:r}=Qo(),[i,o]=m.exports.useState(!0);Jo=o;const s=()=>{Jo(!1),r("Close"),n(),e&&e()},a=e=>{var t;"ModalWrapper"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)&&s()};return i?y.exports.jsxs(y.exports.Fragment,{children:[y.exports.jsx(tt,{}),y.exports.jsx(ot,Object.assign({id:"ModalWrapper",onClick:a},{children:y.exports.jsxs(st,{children:[y.exports.jsxs(ct,{children:[y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='72' height='24' viewBox='0 0 72 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M61.3616 22.4887V23.9996H71.7318V17.1853H70.2208V22.4887H61.3616ZM61.3616 0V1.51096H70.2208V6.81473H71.7318V0H61.3616ZM56.0137 11.689V8.17796H58.3842C59.5398 8.17796 59.9546 8.56305 59.9546 9.61506V10.2372C59.9546 11.3186 59.5545 11.689 58.3842 11.689H56.0137ZM59.7764 12.311C60.8578 12.0296 61.6133 11.022 61.6133 9.82231C61.6133 9.06683 61.3172 8.38521 60.7542 7.83698C60.0432 7.15536 59.0948 6.81473 57.8653 6.81473H54.5322V17.1849H56.0137V13.0518H58.2361C59.3767 13.0518 59.836 13.5258 59.836 14.7112V17.1853H61.3469V14.9482C61.3469 13.3186 60.9618 12.6965 59.7764 12.5187V12.311ZM47.303 12.6517H51.866V11.2888H47.303V8.17761H52.3102V6.81473H45.7916V17.1849H52.5325V15.822H47.303V12.6517ZM42.3398 13.1999V13.9109C42.3398 15.4072 41.7916 15.8963 40.414 15.8963H40.0881C38.7102 15.8963 38.0436 15.4516 38.0436 13.3925V10.6072C38.0436 8.53329 38.7399 8.10338 40.1175 8.10338H40.4137C41.7618 8.10338 42.1914 8.60716 42.2061 9.99979H43.8357C43.6876 7.9553 42.3248 6.66665 40.2803 6.66665C39.2878 6.66665 38.4581 6.97787 37.836 7.57021C36.9027 8.44437 36.3842 9.92593 36.3842 11.9998C36.3842 13.9999 36.8288 15.4814 37.7471 16.3997C38.3692 17.0071 39.2286 17.333 40.073 17.333C40.9619 17.333 41.7769 16.9773 42.1914 16.2071H42.3986V17.1849H43.7615V11.837H39.7467V13.1999H42.3398ZM29.2737 8.17761H30.8886C32.4146 8.17761 33.2443 8.5627 33.2443 10.6369V13.3627C33.2443 15.4366 32.4146 15.822 30.8886 15.822H29.2737V8.17761ZM31.0216 17.1853C33.8513 17.1853 34.903 15.0372 34.903 12.0002C34.903 8.91874 33.7771 6.81509 30.9919 6.81509H27.7917V17.1853H31.0216ZM20.6367 12.6517H25.1997V11.2888H20.6367V8.17761H25.644V6.81473H19.1254V17.1849H25.8663V15.822H20.6367V12.6517ZM11.8962 6.81473H10.3852V17.1849H17.2V15.822H11.8962V6.81473ZM0 17.1853V24H10.3702V22.4887H1.51096V17.1853H0ZM0 0V6.81473H1.51096V1.51096H10.3702V0H0Z' fill='white'/%3e%3c/svg%3e"}),y.exports.jsx(at,Object.assign({onClick:s},{children:y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M22 2L2 22' stroke='white' stroke-width='3'/%3e%3cpath d='M2 2L22 22' stroke='white' stroke-width='3'/%3e%3c/svg%3e"})}))]}),y.exports.jsx(y.exports.Fragment,{children:t})]})}))]}):null};var Zo,es,ts,ns,rs={exports:{}},is={},os={exports:{}},ss={};function as(){return es||(es=1,function(e){e.exports=(Zo||(Zo=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,u=e[a],c=a+1,l=e[c];if(0>i(u,n))c<o&&0>i(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[a]=n,r=a);else{if(!(c<o&&0>i(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],l=1,f=null,h=3,d=!1,p=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(u,i)}i=n(c)}}function b(e){if(g=!1,_(e),!p)if(null!==n(u))p=!0,N(w);else{var t=n(c);null!==t&&T(b,t.startTime-e)}}function w(t,i){p=!1,g&&(g=!1,v(x),x=-1),d=!0;var o=h;try{for(_(i),f=n(u);null!==f&&(!(f.expirationTime>i)||t&&!k());){var s=f.callback;if("function"==typeof s){f.callback=null,h=f.priorityLevel;var a=s(f.expirationTime<=i);i=e.unstable_now(),"function"==typeof a?f.callback=a:f===n(u)&&r(u),_(i)}else r(u);f=n(u)}if(null!==f)var l=!0;else{var y=n(c);null!==y&&T(b,y.startTime-i),l=!1}return l}finally{f=null,h=o,d=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,O=null,x=-1,I=5,R=-1;function k(){return!(e.unstable_now()-R<I)}function C(){if(null!==O){var t=e.unstable_now();R=t;var n=!0;try{n=O(!0,t)}finally{n?E():(S=!1,O=null)}}else S=!1}if("function"==typeof m)E=function(){m(C)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,A=P.port2;P.port1.onmessage=C,E=function(){A.postMessage(null)}}else E=function(){y(C,0)};function N(e){O=e,S||(S=!0,E())}function T(t,n){x=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||d||(p=!0,N(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,o){var s=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:l++,callback:i,priorityLevel:r,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(r.sortIndex=o,t(c,r),null===n(u)&&r===n(c)&&(g?(v(x),x=-1):g=!0,T(b,o-s))):(r.sortIndex=a,t(u,r),p||d||(p=!0,N(w))),r},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(ss)),ss)}(os)),os.exports}
173
+ function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var gn=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=pn({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var s in i)i[s]&&(o+="; "+s,!0!==i[s]&&(o+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),s=o.slice(1).join("=");try{var a=decodeURIComponent(o[0]);if(r[a]=t.read(s,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",pn({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,pn({},this.attributes,t))},withConverter:function(t){return e(pn({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function yn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function vn(e){var t=function(e){try{return new URL(e)}catch(e){return}}(e);if(t)for(var n=function(e){var t=e.hostname.split("."),n=t[t.length-1],r=[];if(4===t.length&&parseInt(n,10)>0)return r;if(t.length<=1)return r;for(var i=t.length-2;i>=0;--i)r.push(t.slice(i).join("."));return r}(t),r=0;r<n.length;++r){var i="__tld__",o=n[r],s={domain:"."+o};try{if(gn.set(i,"1",s),gn.get(i))return gn.remove(i,s),o}catch(e){return}}}function mn(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}var _n={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},bn=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},Object.defineProperty(e.prototype,"type",{get:function(){return"memory"},enumerable:!1,configurable:!0}),e}(),wn=function(e){function t(n){void 0===n&&(n=t.defaults);var r=e.call(this)||this;return r.options=vt(vt({},t.defaults),n),r}return yt(t,e),t.available=function(){try{var e="ajs_cookies_check";gn.set(e,"test");var t=document.cookie.includes(e);return gn.remove(e),t}catch(e){return!1}},Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:vn(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(e){try{var t=gn.get(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(e){return null}},t.prototype.set=function(e,t){"string"==typeof t?gn.set(e,t,this.opts()):null===t?gn.remove(e,this.opts()):gn.set(e,JSON.stringify(t),this.opts())},t.prototype.remove=function(e){return gn.remove(e,this.opts())},Object.defineProperty(t.prototype,"type",{get:function(){return"cookie"},enumerable:!1,configurable:!0}),t}(bn),En=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},Sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.available=function(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}},t.prototype.get=function(e){try{var t=localStorage.getItem(e);if(null===t)return null;try{return JSON.parse(t)}catch(e){return t}}catch(t){return En(e,"unavailable"),null}},t.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){En(e,"full")}},t.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){En(e,"unavailable")}},Object.defineProperty(t.prototype,"type",{get:function(){return"localStorage"},enumerable:!1,configurable:!0}),t}(bn),On=function(){function e(e,t){this.storageOptions=t,this.enabledStores=e}return e.prototype.getStores=function(e){var t=this,n=[];return this.enabledStores.filter((function(t){return!e||(null==e?void 0:e.includes(t))})).forEach((function(e){var r=t.storageOptions[e];void 0!==r&&n.push(r)})),n},e.prototype.getAndSync=function(e,t){var n=this.get(e,t),r="number"==typeof n?n.toString():n;return this.set(e,r,t),r},e.prototype.get=function(e,t){for(var n=null,r=0,i=this.getStores(t);r<i.length;r++){if(n=i[r].get(e))return n}return null},e.prototype.set=function(e,t,n){for(var r=0,i=this.getStores(n);r<i.length;r++){i[r].set(e,t)}},e.prototype.clear=function(e,t){for(var n=0,r=this.getStores(t);n<r.length;n++){r[n].remove(e)}},e}();function xn(e){return{cookie:wn.available()?new wn(e):void 0,localStorage:Sn.available()?new Sn:void 0,memory:new bn}}var In,Rn=function(){function e(e,t){void 0===e&&(e=_n);var n,r,i,o,s=this;this.options={},this.id=function(e){if(s.options.disable)return null;var t=s.identityStore.getAndSync(s.idKey);void 0!==e&&(s.identityStore.set(s.idKey,e),e!==t&&null!==t&&null!==e&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(_n.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(e){var t,n;if(s.options.disable)return null;if(void 0===e){var r=null!==(t=s.identityStore.getAndSync(s.anonKey))&&void 0!==t?t:null===(n=s.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(s.identityStore.set(s.anonKey,null),s.identityStore.getAndSync(s.anonKey)):(s.identityStore.set(s.anonKey,null!=e?e:$t()),s.identityStore.getAndSync(s.anonKey))},this.traits=function(e){var t;if(!s.options.disable)return null===e&&(e={}),e&&s.traitsStore.set(s.traitsKey,null!=e?e:{}),null!==(t=s.traitsStore.get(s.traitsKey))&&void 0!==t?t:{}},this.options=e,this.cookieOptions=t,this.idKey=null!==(r=null===(n=e.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:_n.cookie.key,this.traitsKey=null!==(o=null===(i=e.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:_n.localStorage.key,this.anonKey="ajs_anonymous_id";var a=!0===e.disable,u=!1!==e.persist,c=a?[]:u?["localStorage","cookie","memory"]:["memory"],l=xn(t);e.localStorageFallbackDisabled&&(c=c.filter((function(e){return"localStorage"!==e}))),this.identityStore=new On(c,l),this.legacyUserStore=new On(c.filter((function(e){return"localStorage"!==e&&"memory"!==e})),l),this.traitsStore=new On(c.filter((function(e){return"cookie"!==e})),l);var f=this.legacyUserStore.get(_n.cookie.oldKey);f&&"object"==typeof f&&(f.id&&this.id(f.id),f.traits&&this.traits(f.traits)),mn(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!=t?t:{};var n=this.id();null!==n&&n!==e||(t=vt(vt({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.defaults=_n,e}(),kn={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Cn=function(e){function t(t,n){void 0===t&&(t=kn);var r=e.call(this,t,n)||this;return r.anonymousId=function(e){},mn(r),r}return yt(t,e),t}(Rn);var Pn="npm";function An(){return Pn}function Nn(e,t,n){var r=new On(n?[]:["cookie"],xn(function(){if(In)return In;var e=vn(window.location.href);return In={expires:31536e6,secure:!1,path:"/"},e&&(In.domain=e),In}())),i=r.get("s:context.referrer"),o=function(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1));for(var n=0,r=(e=e.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],s=i[1];if(t[o])return{id:s,type:t[o]}}}(e);(o=null!=o?o:i)&&(t&&(t.referrer=vt(vt({},t.referrer),o)),r.set("s:context.referrer",o))}function Tn(e,t,n,r){var i,o,s,a,u,c,l=e.user();t.context=null!==(o=null!==(i=t.context)&&void 0!==i?i:t.options)&&void 0!==o?o:{};var f=t.context,h="string"==typeof(null===(s=f.page)||void 0===s?void 0:s.search)?null===(a=f.page)||void 0===a?void 0:a.search:"";delete t.options,t.writeKey=null==n?void 0:n.apiKey,f.userAgent=navigator.userAgent;var d=navigator.userLanguage||navigator.language;if(void 0===f.locale&&void 0!==d&&(f.locale=d),!f.library){var p=An();f.library="web"===p?{name:"analytics.js",version:"next-".concat(dn)}:{name:"analytics.js",version:"npm:next-".concat(dn)}}h&&!f.campaign&&(f.campaign=function(e){return e.startsWith("?")&&(e=e.substring(1)),(e=e.replace(/\?/g,"&")).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var s=r.substr(4);"campaign"===s&&(s="name"),e[s]=yn(o)}return e}),{})}(h)),Nn(h,f,null!==(u=e.options.disableClientPersistence)&&void 0!==u&&u),t.userId=t.userId||l.id(),t.anonymousId=t.anonymousId||l.anonymousId(),t.sentAt=new Date;var g=e.queue.failedInitializations||[];g.length>0&&(t._metadata={failedInitializations:g});var y=[],v=[];for(var m in r){var _=r[m];"Segment.io"===m&&y.push(m),"bundled"===_.bundlingStatus&&y.push(m),"unbundled"===_.bundlingStatus&&v.push(m)}for(var b=0,w=(null==n?void 0:n.unbundledIntegrations)||[];b<w.length;b++){var E=w[b];v.includes(E)||v.push(E)}var S=null!==(c=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==c?c:{},O=[];y.sort().forEach((function(e){var t;(null!==(t=S[e])&&void 0!==t?t:[]).forEach((function(e){O.push(e)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(t._metadata=vt(vt({},t._metadata),{bundled:y.sort(),unbundled:v.sort(),bundledIds:O}));var x=function(){var e=gn.get("_ga");if(e&&e.startsWith("amp"))return e}();return x&&(f.amp={id:x}),t}var Mn="api.segment.io/v1";function Ln(e){console.error("Error sending segment performance metrics",e)}var jn,Un=function(){function e(e){var t,n,r,i,o=this;if(this.host=null!==(t=null==e?void 0:e.host)&&void 0!==t?t:Mn,this.sampleRate=null!==(n=null==e?void 0:e.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==e?void 0:e.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==e?void 0:e.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var s=!1,a=function(){s||(s=!0,o.flush().catch(Ln),s=!1,setTimeout(a,o.flushTimer))};a()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(e,t,n){var r=t.reduce((function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e}),{});return{type:"Counter",metric:e,value:1,tags:vt(vt({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(dn):"npm:next-".concat(dn)})}}(e,t,An());this.queue.push(n),e.includes("error")&&this.flush().catch(Ln)}},e.prototype.flush=function(){return mt(this,void 0,void 0,(function(){var e=this;return _t(this,(function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(t){Ln(t),e.sampleRate=0}))];case 1:return t.sent(),[2]}}))}))},e.prototype.send=function(){return mt(this,void 0,void 0,(function(){var e,t,n;return _t(this,(function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,hn(n,{headers:t,body:JSON.stringify(e),method:"POST"})]}))}))},e}(),Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yt(t,e),t.initRemoteMetrics=function(e){jn=new Un(e)},t.prototype.increment=function(t,n,r){e.prototype.increment.call(this,t,n,r),null==jn||jn.increment(t,null!=r?r:[])},t}(Kt),zn=function(e){function t(t,n){return e.call(this,t,n,new Dn)||this}return yt(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(Qt),Fn={exports:{}};!function(e,t){e.exports=function(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],r=e[1],i=e[2],o=e[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+t[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+t[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+t[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+t[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+t[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=o+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,i,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function s(e){var t,r,o,s,a,u,c=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=c;t+=64)n(l,i(e.subarray(t-64,t)));for(r=(e=t-64<c?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(l,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*c).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),u=parseInt(s[1],16)||0,o[14]=a,o[15]=u,n(l,o),l}function a(e){var n,r="";for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=a(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e,t){var n,r=e.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=e.charCodeAt(n);return t?o:i}function f(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function h(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function d(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function p(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i,o,s,a,u=this.byteLength,c=t(n,u),l=u;return r!==e&&(l=t(r,u)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,c,i),s.set(a),o)}}(),p.prototype.append=function(e){return this.appendBinary(c(e)),this},p.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},p.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(e,t){var r,i,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,e[14]=i,e[15]=o,n(this._hash,e)},p.hash=function(e,t){return p.hashBinary(c(e),t)},p.hashBinary=function(e,t){var n=u(o(e));return t?d(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(e){var t,r=h(this._buff.buffer,e,!0),o=r.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,i(r.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,i),n=u(this._hash),e&&(n=d(n)),this.reset(),n},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var e=p.prototype.getState.call(this);return e.buff=f(e.buff),e},p.ArrayBuffer.prototype.setState=function(e){return e.buff=l(e.buff,!0),p.prototype.setState.call(this,e)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(e,t){var n=u(s(new Uint8Array(e)));return t?d(n):n},p}()}(Fn);var Bn=Fn.exports,Hn=function(){function e(e){this.user=e}return e.prototype.track=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{event:e,type:"track",properties:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.page=function(e,t,n,r,i){var o,s={type:"page",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(s.category=e,s.properties=null!==(o=s.properties)&&void 0!==o?o:{},s.properties.category=e),null!==t&&(s.name=t),this.normalize(vt(vt({},this.baseEvent()),s))},e.prototype.screen=function(e,t,n,r,i){var o={type:"screen",properties:vt({},n),options:vt({},r),integrations:vt({},i)};return null!==e&&(o.category=e),null!==t&&(o.name=t),this.normalize(vt(vt({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"identify",userId:e,traits:t,options:vt({},n),integrations:vt({},r)}))},e.prototype.group=function(e,t,n,r){return this.normalize(vt(vt({},this.baseEvent()),{type:"group",traits:t,options:vt({},n),integrations:vt({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){var i={userId:e,type:"alias",options:vt({},n),integrations:vt({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(vt(vt({},i),this.baseEvent())):this.normalize(vt(vt({},this.baseEvent()),i))},e.prototype.baseEvent=function(){var e={integrations:{},options:{}},t=this.user;return t.id()&&(e.userId=t.id()),t.anonymousId()&&(e.anonymousId=t.anonymousId()),e},e.prototype.context=function(e){var t,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(t=e.options)&&void 0!==t?t:{};delete o.integrations;var s=Object.keys(o),a=null!==(r=null===(n=e.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},u={};return s.forEach((function(e){"context"!==e&&(i.includes(e)?kt(u,e,o[e]):kt(a,e,o[e]))})),[a,u]},e.prototype.normalize=function(e){var t,n,r;(null===(t=e.options)||void 0===t?void 0:t.anonymousId)&&this.user.anonymousId(e.options.anonymousId);var i=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,n){var r,i;return vt(vt({},t),((r={})[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))}),{}),o=vt(vt({},i),null===(r=e.options)||void 0===r?void 0:r.integrations),s=this.context(e),a=s[0],u=s[1];e.options;var c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["options"]),l=vt(vt(vt({timestamp:new Date},c),{context:a,integrations:o}),u),f="ajs-next-"+Bn.hash(JSON.stringify(l)+$t());return vt(vt({},l),{messageId:f})},e}(),qn={getItem:function(){},setItem:function(){},removeItem:function(){}};try{qn=sn()&&window.localStorage?window.localStorage:qn}catch(e){console.warn("Unable to access localStorage",e)}function Vn(e){var t=qn.getItem(e);return(t?JSON.parse(t):[]).map((function(e){return new zn(e.event,e.id)}))}function $n(e){var t=qn.getItem(e);return t?JSON.parse(t):{}}function Wn(e){qn.removeItem(e)}function Kn(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=qn.getItem(r),o=i?JSON.parse(i):null,s=null===o||function(e){return(new Date).getTime()>e}(o);if(s)return qn.setItem(r,JSON.stringify((new Date).getTime()+50)),t(),void qn.removeItem(r);!s&&n<3?setTimeout((function(){Kn(e,t,n+1)}),50):console.error("Unable to retrieve lock")}var Gn=function(e){function t(t,n){var r=e.call(this,t,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),s=[],a={};return Kn(n,(function(){try{s=Vn(i),a=$n(o),Wn(i),Wn(o),r.queue=bt(bt([],s,!0),r.queue,!0),r.seen=vt(vt({},a),r.seen)}catch(e){console.error(e)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var e=bt(bt([],r.queue,!0),r.future,!0);try{Kn(n,(function(){!function(e,t){var n=Vn(e),r=bt(bt([],t,!0),n,!0).reduce((function(e,t){var n;return vt(vt({},e),((n={})[t.id]=t,n))}),{});qn.setItem(e,JSON.stringify(Object.values(r)))}(i,e),function(e,t){var n=$n(e);qn.setItem(e,JSON.stringify(vt(vt({},n),t)))}(o,r.seen)}))}catch(e){console.error(e)}}})),r}return yt(t,e),t}(Ht),Yn=function(e){function t(t){return e.call(this,"string"==typeof t?new Gn(4,t):t)||this}return yt(t,e),t.prototype.flush=function(){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return cn()?[2,[]]:[2,e.prototype.flush.call(this)]}))}))},t}(Zt),Qn="This is being deprecated and will be not be available in future releases of Analytics JS",Jn=fn(),Xn=null==Jn?void 0:Jn.analytics;function Zn(){console.warn(Qn)}var er=function(e){function t(t,n,r,i,o){var s,a,u,c=this;(c=e.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=Zn,c.addIntegrationMiddleware=Zn,c.listeners=Zn,c.addEventListener=Zn,c.removeAllListeners=Zn,c.removeListener=Zn,c.removeEventListener=Zn,c.hasListeners=Zn,c.add=Zn,c.addIntegration=Zn;var l=null==n?void 0:n.cookie,f=null!==(s=null==n?void 0:n.disableClientPersistence)&&void 0!==s&&s;return c.settings=t,c.settings.timeout=null!==(a=c.settings.timeout)&&void 0!==a?a:300,c.queue=null!=r?r:function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?4:1,i=n?new Ht(r,[]):new Gn(r,e);return new Yn(i)}("".concat(t.writeKey,":event-queue"),null==n?void 0:n.retryQueue,f),c._universalStorage=new On(f?["memory"]:["localStorage","cookie","memory"],xn(l)),c._user=null!=i?i:new Rn(f?vt(vt({},null==n?void 0:n.user),{persist:!1}):null==n?void 0:n.user,l).load(),c._group=null!=o?o:new Cn(f?vt(vt({},null==n?void 0:n.group),{persist:!1}):null==n?void 0:n.group,l).load(),c.eventFactory=new Hn(c._user),c.integrations=null!==(u=null==n?void 0:n.integrations)&&void 0!==u?u:{},c.options=null!=n?n:{},mn(c),c}return yt(t,e),Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=tn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.track(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("track",n,e.event.properties,e.event.options),e}))]}))}))},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.page(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("page",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=rn(this._user).apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],this._user.identify(n,r),s=this.eventFactory.identify(this._user.id(),this._user.traits(),i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("identify",e.event.userId,e.event.traits,e.event.options),e}))]}))}))},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)return this._group;var r=rn(this._group).apply(void 0,t),i=r[0],o=r[1],s=r[2],a=r[3];this._group.identify(i,o);var u=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(u,c,s,this.integrations);return this._dispatch(l,a).then((function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t}))},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a=this;return _t(this,(function(u){return t=on.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=this.eventFactory.alias(n,r,i,this.integrations),[2,this._dispatch(s,o).then((function(e){return a.emit("alias",n,r,e.event.options),e}))]}))}))},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u=this;return _t(this,(function(c){return t=nn.apply(void 0,e),n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=this.eventFactory.screen(n,r,i,o,this.integrations),[2,this._dispatch(a,s).then((function(e){return u.emit("screen",n,r,e.event.properties,e.event.options),e}))]}))}))},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n;return _t(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve().then((function(){return il}))];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,bt([this],e,!1))]}}))}))},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){return r.queue.register(t,e,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mt(this,void 0,void 0,(function(){var t,n,r=this;return _t(this,(function(i){switch(i.label){case 0:return t=zn.system(),n=e.map((function(e){var n=r.queue.plugins.find((function(t){return t.name===e}));if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}}))}))},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return mt(this,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=new zn(e),cn()&&!this.options.retryQueue?[2,n]:[2,en(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]}))}))},t.prototype.addSourceMiddleware=function(e){return mt(this,void 0,void 0,(function(){var t=this;return _t(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return mt(t,void 0,void 0,(function(){var t,n,r;return _t(this,(function(i){switch(i.label){case 0:return[4,Promise.resolve().then((function(){return Ji}))];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(e){if("destination"===e.type)return n[e.name]=!0})),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.queue.plugins.filter((function(t){return t.name.toLowerCase()===e.toLowerCase()})).forEach((function(e){e.addMiddleware.apply(e,t)})),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then((function(){return sl}))];case 1:return[2,(0,t.sent().queryString)(this,e)]}}))}))},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,Promise.all(this.queue.plugins.map((function(e){return e.ready?e.ready():Promise.resolve()}))).then((function(t){return e(t),t}))]}))}))},t.prototype.noConflict=function(){return console.warn(Qn),window.analytics=null!=Xn?Xn:this,this},t.prototype.normalize=function(e){return console.warn(Qn),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Qn),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return dn},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(e){return console.warn(Qn),[2,Promise.resolve(this)]}))}))},t.prototype.pageview=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return console.warn(Qn),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}}))}))},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(Qn),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Qn);var e=this.queue.plugins.filter((function(e){return"destination"===e.type})).reduce((function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)}),{});return e},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=e.shift();t&&!this[t]||this[t].apply(this,e)},t}(wt);function tr(){return"undefined"!=typeof process&&process.env?process.env:{}}try{window.analyticsWriteKey="__WRITE_KEY__"}catch(J){}var nr,rr=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,ir=function(){var e=function(){var e;return null!=nr?nr:null===(e=window.analytics)||void 0===e?void 0:e._cdn}();if(e)return e;var t,n=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(e){var n,r=null!==(n=e.getAttribute("src"))&&void 0!==n?n:"",i=rr.exec(r);i&&i[1]&&(t=i[1])})),t);return n||"https://cdn.segment.com"},or=function(){var e=ir();return"".concat(e,"/next-integrations")};function sr(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce((function(e,t){var n,r,i=t[0],o=t[1];return vt(vt({},e),"object"==typeof o?((n={})[i]=o,n):((r={})[i]={},r))}),{});return Object.entries(e.integrations).reduce((function(e,t){var n,i=t[0],o=t[1];return vt(vt({},e),((n={})[i]=vt(vt({},o),r[i]),n))}),{})}function ar(){var e=document.querySelector("link[rel='canonical']");if(e)return e.getAttribute("href")||void 0}function ur(){var e=ar();if(!e)return window.location.pathname;var t=document.createElement("a");return t.href=e,t.pathname.startsWith("/")?t.pathname:"/"+t.pathname}function cr(e){void 0===e&&(e="");var t=ar();if(t)return t.includes("?")?t:"".concat(t).concat(e);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function lr(e){var t=e.event;t.context=t.context||{};var n,r,i={path:ur(),referrer:document.referrer,search:location.search,title:document.title,url:cr(location.search)},o=void 0;return"page"===t.type&&(o=t.properties&&(n=t.properties,r=Object.keys(i),Object.assign.apply(Object,bt([{}],r.map((function(e){var t;if(n&&Object.prototype.hasOwnProperty.call(n,e))return(t={})[e]=n[e],t})),!1))),t.properties=vt(vt(vt({},i),t.properties),t.name?{name:t.name}:{})),t.context.page=vt(vt(vt({},i),o),t.context.page),e}var fr={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:lr,alias:lr,track:lr,identify:lr,group:lr};function hr(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(t){return t.src===e}))}function dr(e,t){var n=hr(e);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(e,t){n.addEventListener("load",(function(){return e(n)})),n.addEventListener("error",(function(e){return t(e)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var s=0,a=Object.entries(null!=t?t:{});s<a.length;s++){var u=a[s],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(e)))};var f=window.document.getElementsByTagName("script")[0];null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f)}))}function pr(e){var t=hr(e);return void 0!==t&&t.remove(),Promise.resolve()}var gr={},yr={},vr={},mr={exports:{}};!function(e){function t(e){return function(t,n,r,o){var s,a=o&&function(e){return"function"==typeof e}(o.normalizer)?o.normalizer:i;n=a(n);for(var u=!1;!u;)c();function c(){for(s in t){var e=a(s);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[s];return null==i?void(u=!0):n.length?void(t=i):void(u=!0)}}}s=void 0,u=!0}if(s)return null==t?t:e(t,s,r)}}function n(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function r(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function i(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}e.exports=t((function(e,t){if(e.hasOwnProperty(t))return e[t]})),e.exports.find=e.exports,e.exports.replace=function(e,n,i,o){return t(r).call(this,e,n,i,o),e},e.exports.del=function(e,r,i){return t(n).call(this,e,r,null,i),e}}(mr);var _r=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});var br=_r(mr.exports);function wr(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return br.default(n,"address."+e)||br.default(n,e)||(t?br.default(n,"address."+t):null)||(t?br.default(n,t):null)||br.default(r,"address."+e)||br.default(r,e)||(t?br.default(r,"address."+t):null)||(t?br.default(r,t):null)}}vr.default=function(e){e.zip=wr("postalCode","zip"),e.country=wr("country"),e.street=wr("street"),e.state=wr("state"),e.city=wr("city"),e.region=wr("region")};var Er={};Object.defineProperty(Er,"__esModule",{value:!0}),Er.clone=void 0,Er.clone=function e(t){if("object"!=typeof t)return t;if("[object Object]"===Object.prototype.toString.call(t)){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=e(t[r]));return n}return Array.isArray(t)?t.map(e):t};var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});var Or={Salesforce:!0};Sr.default=function(e){return!Or[e]};var xr={},Ir=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;xr.parse=function(e){var t=[1,5,6,7,11,12],n=Ir.exec(e),r=0;if(!n)return new Date(e);for(var i,o=0;i=t[o];o++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var s=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(s)},xr.is=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&Ir.test(e))};var Rr={},kr=/\d{13}/;Rr.is=function(e){return kr.test(e)},Rr.parse=function(e){return e=parseInt(e,10),new Date(e)};var Cr={},Pr=/\d{10}/;Cr.is=function(e){return Pr.test(e)},Cr.parse=function(e){var t=1e3*parseInt(e,10);return new Date(t)};var Ar=xr,Nr=Rr,Tr=Cr,Mr=Object.prototype.toString;var Lr=function(e){return t=e,"[object Date]"===Mr.call(t)?e:function(e){return"[object Number]"===Mr.call(e)}(e)?new Date((n=e)<315576e5?1e3*n:n):Ar.is(e)?Ar.parse(e):Nr.is(e)?Nr.parse(e):Tr.is(e)?Tr.parse(e):new Date(e);var t,n};var jr=xr,Ur=Dr;function Dr(e,t){return void 0===t&&(t=!0),e&&"object"==typeof e?function(e,t){return Object.keys(e).forEach((function(n){e[n]=Dr(e[n],t)})),e}(e,t):Array.isArray(e)?function(e,t){return e.forEach((function(n,r){e[r]=Dr(n,t)})),e}(e,t):jr.is(e,t)?jr.parse(e):e}var zr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.Facade=void 0;var Fr=zr(vr),Br=Er,Hr=zr(Sr),qr=zr(Lr),Vr=zr(mr.exports),$r=zr(Ur);function Wr(e,t){t=t||{},this.raw=Br.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Br.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?qr.default(e.timestamp):new Date,t.traverse&&$r.default(e),this.opts=t,this.obj=e}yr.Facade=Wr;var Kr=Wr.prototype;function Gr(e){return Br.clone(e)}Kr.proxy=function(e){var t=e.split("."),n=this[e=t.shift()]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length||(n=Vr.default(n,t.join("."))),this.opts.clone?Gr(n):n):n},Kr.field=function(e){var t=this.obj[e];return this.opts.clone?Gr(t):t},Wr.proxy=function(e){return function(){return this.proxy(e)}},Wr.field=function(e){return function(){return this.field(e)}},Wr.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?Br.clone(n):n]),n||[]}},Wr.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},Kr.json=function(){var e=this.opts.clone?Br.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},Kr.rawEvent=function(){return this.raw},Kr.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?Br.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||Vr.default(r,e);return"object"!=typeof i&&(i=Vr.default(this.options(),e)),"object"==typeof i?i:{}}},Kr.context=Kr.options,Kr.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&Hr.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},Kr.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},Kr.active=function(){var e=this.proxy("options.active");return null==e&&(e=!0),e},Kr.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},Kr.sessionId=Kr.anonymousId,Kr.groupId=Wr.proxy("options.groupId"),Kr.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},Kr.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},Kr.device=function(){var e=this.proxy("context.device");"object"==typeof e&&null!==e||(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e},Kr.userAgent=Wr.proxy("context.userAgent"),Kr.timezone=Wr.proxy("context.timezone"),Kr.timestamp=Wr.field("timestamp"),Kr.channel=Wr.field("channel"),Kr.ip=Wr.proxy("context.ip"),Kr.userId=Wr.field("userId"),Fr.default(Kr);var Yr={},Qr={exports:{}};"function"==typeof Object.create?Qr.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Qr.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}};var Jr=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.Alias=void 0;var Xr=Jr(Qr.exports),Zr=yr;function ei(e,t){Zr.Facade.call(this,e,t)}Yr.Alias=ei,Xr.default(ei,Zr.Facade),ei.prototype.action=function(){return"alias"},ei.prototype.type=ei.prototype.action,ei.prototype.previousId=function(){return this.field("previousId")||this.field("from")},ei.prototype.from=ei.prototype.previousId,ei.prototype.userId=function(){return this.field("userId")||this.field("to")},ei.prototype.to=ei.prototype.userId;var ti={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});var ri=/.+\@.+\..+/;ni.default=function(e){return ri.test(e)};var ii=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0}),ti.Group=void 0;var oi=ii(Qr.exports),si=ii(ni),ai=ii(Lr),ui=yr;function ci(e,t){ui.Facade.call(this,e,t)}ti.Group=ci,oi.default(ci,ui.Facade);var li=ci.prototype;li.action=function(){return"group"},li.type=li.action,li.groupId=ui.Facade.field("groupId"),li.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return ai.default(e)},li.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return si.default(t)?t:void 0},li.traits=function(e){var t=this.properties(),n=this.groupId();for(var r in e=e||{},n&&(t.id=n),e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},li.name=ui.Facade.proxy("traits.name"),li.industry=ui.Facade.proxy("traits.industry"),li.employees=ui.Facade.proxy("traits.employees"),li.properties=function(){return this.field("traits")||this.field("properties")||{}};var fi={},hi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0}),fi.Identify=void 0;var di=yr,pi=hi(mr.exports),gi=hi(Qr.exports),yi=hi(ni),vi=hi(Lr),mi=function(e){return e.trim()};function _i(e,t){di.Facade.call(this,e,t)}fi.Identify=_i,gi.default(_i,di.Facade);var bi=_i.prototype;bi.action=function(){return"identify"},bi.type=bi.action,bi.traits=function(e){var t=this.field("traits")||{},n=this.userId();for(var r in e=e||{},n&&(t.id=n),e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},bi.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return yi.default(t)?t:void 0},bi.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return vi.default(e)},bi.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return vi.default(e)},bi.companyName=function(){return this.proxy("traits.company.name")},bi.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return mi(e);var t=this.firstName(),n=this.lastName();return t&&n?mi(t+" "+n):void 0},bi.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");return"string"==typeof t?mi(t).split(" ")[0]:void 0},bi.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return mi(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=mi(t).indexOf(" ");if(-1!==n)return mi(t.substr(n+1))}},bi.uid=function(){return this.userId()||this.username()||this.email()},bi.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},bi.age=function(){var e=this.birthday(),t=pi.default(this.traits(),"age");return null!=t?t:e instanceof Date?(new Date).getFullYear()-e.getFullYear():void 0},bi.avatar=function(){var e=this.traits();return pi.default(e,"avatar")||pi.default(e,"photoUrl")||pi.default(e,"avatarUrl")},bi.position=function(){var e=this.traits();return pi.default(e,"position")||pi.default(e,"jobTitle")},bi.username=di.Facade.proxy("traits.username"),bi.website=di.Facade.one("traits.website"),bi.websites=di.Facade.multi("traits.website"),bi.phone=di.Facade.one("traits.phone"),bi.phones=di.Facade.multi("traits.phone"),bi.address=di.Facade.proxy("traits.address"),bi.gender=di.Facade.proxy("traits.gender"),bi.birthday=di.Facade.proxy("traits.birthday");var wi={},Ei=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wi,"__esModule",{value:!0}),wi.Track=void 0;var Si=Ei(Qr.exports),Oi=yr,xi=fi,Ii=Ei(ni),Ri=Ei(mr.exports);function ki(e,t){Oi.Facade.call(this,e,t)}wi.Track=ki,Si.default(ki,Oi.Facade);var Ci=ki.prototype;Ci.action=function(){return"track"},Ci.type=Ci.action,Ci.event=Oi.Facade.field("event"),Ci.value=Oi.Facade.proxy("properties.value"),Ci.category=Oi.Facade.proxy("properties.category"),Ci.id=Oi.Facade.proxy("properties.id"),Ci.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},Ci.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},Ci.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},Ci.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},Ci.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},Ci.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},Ci.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},Ci.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},Ci.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},Ci.sku=Oi.Facade.proxy("properties.sku"),Ci.tax=Oi.Facade.proxy("properties.tax"),Ci.name=Oi.Facade.proxy("properties.name"),Ci.price=Oi.Facade.proxy("properties.price"),Ci.total=Oi.Facade.proxy("properties.total"),Ci.repeat=Oi.Facade.proxy("properties.repeat"),Ci.coupon=Oi.Facade.proxy("properties.coupon"),Ci.shipping=Oi.Facade.proxy("properties.shipping"),Ci.discount=Oi.Facade.proxy("properties.discount"),Ci.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},Ci.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},Ci.description=Oi.Facade.proxy("properties.description"),Ci.plan=Oi.Facade.proxy("properties.plan"),Ci.subtotal=function(){var e=Ri.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),(n=this.shipping())&&(t-=n),(n=this.discount())&&(t+=n)}return t},Ci.products=function(){var e=this.properties(),t=Ri.default(e,"products");return Array.isArray(t)?t.filter((function(e){return null!==e})):[]},Ci.quantity=function(){return(this.obj.properties||{}).quantity||1},Ci.currency=function(){return(this.obj.properties||{}).currency||"USD"},Ci.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ci.query=Oi.Facade.proxy("options.query"),Ci.properties=function(e){var t=this.field("properties")||{};for(var n in e=e||{})if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},Ci.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},Ci.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return Ii.default(t)?t:void 0},Ci.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event();return!e&&t&&t.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(e=this.proxy("properties.total")),function(e){if(!e)return;if("number"==typeof e)return e;if("string"!=typeof e)return;if(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e))return e}(e)},Ci.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},Ci.identify=function(){var e=this.json();return e.traits=this.traits(),new xi.Identify(e,this.opts)};var Pi={},Ai=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Page=void 0;var Ni=Ai(Qr.exports),Ti=yr,Mi=wi,Li=Ai(ni);function ji(e,t){Ti.Facade.call(this,e,t)}Pi.Page=ji,Ni.default(ji,Ti.Facade);var Ui=ji.prototype;Ui.action=function(){return"page"},Ui.type=Ui.action,Ui.category=Ti.Facade.field("category"),Ui.name=Ti.Facade.field("name"),Ui.title=Ti.Facade.proxy("properties.title"),Ui.path=Ti.Facade.proxy("properties.path"),Ui.url=Ti.Facade.proxy("properties.url"),Ui.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},Ui.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();for(var i in e=e||{},n&&(t.category=n),r&&(t.name=r),e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},Ui.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return Li.default(t)?t:void 0},Ui.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},Ui.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},Ui.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Mi.Track(t,this.opts)};var Di={},zi=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0}),Di.Screen=void 0;var Fi=zi(Qr.exports),Bi=Pi,Hi=wi;function qi(e,t){Bi.Page.call(this,e,t)}Di.Screen=qi,Fi.default(qi,Bi.Page),qi.prototype.action=function(){return"screen"},qi.prototype.type=qi.prototype.action,qi.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},qi.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Hi.Track(t,this.opts)};var Vi={},$i=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.Delete=void 0;var Wi=$i(Qr.exports),Ki=yr;function Gi(e,t){Ki.Facade.call(this,e,t)}function Yi(e,t){var n=new gr.Facade(e,t);return"track"===e.type&&(n=new gr.Track(e,t)),"identify"===e.type&&(n=new gr.Identify(e,t)),"page"===e.type&&(n=new gr.Page(e,t)),"alias"===e.type&&(n=new gr.Alias(e,t)),"group"===e.type&&(n=new gr.Group(e,t)),"screen"===e.type&&(n=new gr.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}function Qi(e,t,n){return mt(this,void 0,void 0,(function(){function r(t,n){return mt(this,void 0,void 0,(function(){var r,i,o;return _t(this,(function(s){switch(s.label){case 0:return r=!1,i=null,[4,n({payload:Yi(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return s.sent(),r||null===i||(i.integrations=vt(vt({},t.integrations),((o={})[e]=!1,o))),[2,i]}}))}))}var i,o,s,a,u;return _t(this,(function(e){switch(e.label){case 0:i=Yi(t,{clone:!0,traverse:!1}).rawEvent(),o=0,s=n,e.label=1;case 1:return o<s.length?(a=s[o],[4,r(i,a)]):[3,4];case 2:if(null===(u=e.sent()))return[2,null];i=u,e.label=3;case 3:return o++,[3,1];case 4:return[2,i]}}))}))}Vi.Delete=Gi,Wi.default(Gi,Ki.Facade),Gi.prototype.type=function(){return"delete"},function(e){var t=l&&l.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var n=yr;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return n.Facade}});var r=Yr;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return r.Alias}});var i=ti;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=fi;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var s=wi;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return s.Track}});var a=Pi;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return a.Page}});var u=Di;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var c=Vi;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return c.Delete}}),e.default=t(t({},n.Facade),{Alias:r.Alias,Group:i.Group,Identify:o.Identify,Track:s.Track,Page:a.Page,Screen:u.Screen,Delete:c.Delete})}(gr);var Ji=Object.freeze({__proto__:null,applyDestinationMiddleware:Qi,sourceMiddlewarePlugin:function(e,t){function n(n){return mt(this,void 0,void 0,(function(){var r;return _t(this,(function(i){switch(i.label){case 0:return r=!1,[4,e({payload:Yi(n.event,{clone:!0,traverse:!1}),integrations:null!=t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new Yt({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}}),Xi=function(){function e(e,t){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return[4,Qi(this.name,e.event,this.middleware)];case 1:return null===(t=n.sent())&&e.cancel(new Yt({retry:!1,reason:"dropped by destination middleware"})),[2,new zn(t)]}}))}))},e.prototype._createMethod=function(e){var t=this;return function(n){return mt(t,void 0,void 0,(function(){var t;return _t(this,(function(r){switch(r.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=r.sent(),r.label=2;case 2:return[4,this.action[e](t)];case 3:return r.sent(),[2,n]}}))}))}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(e,t){return this.action.load(e,t)},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();function Zi(e,t,n,r,i){var o,s,a;return mt(this,void 0,void 0,(function(){var u,c,l,f,h=this;return _t(this,(function(d){switch(d.label){case 0:return u=[],c=ir(),l=null!==(s=null===(o=e.middlewareSettings)||void 0===o?void 0:o.routingRules)&&void 0!==s?s:[],f=(null!==(a=e.remotePlugins)&&void 0!==a?a:[]).map((function(e){return mt(h,void 0,void 0,(function(){var o,s,a,f,h,d,p,g,y;return _t(this,(function(v){switch(v.label){case 0:if(function(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||!1===n||!1===r}(t,e))return[2];v.label=1;case 1:if(v.trys.push([1,12,,13]),o=new RegExp("https://cdn.segment.(com|build)"),!r)return[3,7];s=e.url.split("/"),a=s[s.length-2],f=e.url.replace(a,btoa(a).replace(/=/g,"")),v.label=2;case 2:return v.trys.push([2,4,,6]),[4,dr(f.replace(o,c))];case 3:return v.sent(),[3,6];case 4:return v.sent(),[4,dr(e.url.replace(o,c))];case 5:return v.sent(),[3,6];case 6:return[3,9];case 7:return[4,dr(e.url.replace(o,c))];case 8:v.sent(),v.label=9;case 9:return h=e.libraryName,"function"!=typeof window[h]?[3,11]:[4,(0,window[h])(vt(vt({},e.settings),n[e.name]))];case 10:d=v.sent(),function(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];e.forEach((function(e){t.forEach((function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))}))}))}(p=Array.isArray(d)?d:[d]),g=l.filter((function(t){return t.destinationName===e.creationName})),p.forEach((function(t){var n=new Xi(e.creationName,t);g.length&&i&&"destination"===t.type&&n.addMiddleware(i),u.push(n)})),v.label=11;case 11:return[3,13];case 12:return y=v.sent(),console.warn("Failed to load Remote Plugin",y),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(f)];case 1:return d.sent(),[2,u.filter(Boolean)]}}))}))}var eo=function(e){var t=!1;window.addEventListener("pagehide",(function(){t||e(t=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)}))},to=500;function no(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function ro(e,t){var n,r,i,o=[],s=!1,a=null!==(n=null==t?void 0:t.size)&&void 0!==n?n:10,u=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:5e3;function c(t){var n;if(0!==t.length){var r=null===(n=t[0])||void 0===n?void 0:n.writeKey;return hn("https://".concat(e,"/b"),{keepalive:s,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:t,writeKey:r})})}}function l(){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(t){return o.length?(e=o,o=[],[2,c(e)]):[2]}))}))}return eo((function(e){if((s=e)&&o.length){var t=function(e){var t=[],n=0;return e.forEach((function(e){no(t[n])>=64&&n++,t[n]?t[n].push(e):t[n]=[e]})),t}(o).map(c);Promise.all(t).catch(console.error)}})),{dispatch:function(e,t){return mt(this,void 0,void 0,(function(){var e;return _t(this,(function(n){return o.push(t),e=o.length>=a||function(e){return no(e)>=to-50}(o),[2,e||s?l():void(i||(i=setTimeout((function(){i=void 0,l().catch(console.error)}),u)))]}))}))}}}var io=function(e,t){return mt(void 0,void 0,void 0,(function(){var n;return _t(this,(function(r){return n=function(r){return mt(void 0,void 0,void 0,(function(){var i;return _t(this,(function(o){switch(o.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))};function oo(e,t){return mt(this,void 0,void 0,(function(){var n,r=this;return _t(this,(function(i){switch(i.label){case 0:return n=[],cn()?[2,t]:[4,io((function(){return t.length>0&&!cn()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return _t(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,Jt(r,e)]:[2];case 1:return i=o.sent(),i instanceof zn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}function so(e,t,n,r){var i=this;e||setTimeout((function(){return mt(i,void 0,void 0,(function(){var e,i;return _t(this,(function(o){switch(o.label){case 0:return e=!0,[4,oo(n,t)];case 1:return i=o.sent(),e=!1,t.todo>0&&r(e,i,n,r),[2]}}))}))}),5e3*Math.random())}function ao(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){return(t=navigator.userAgentData)?e?[2,t.getHighEntropyValues(e).catch((function(){return t.toJSON()}))]:[2,t.toJSON()]:[2,void 0]}))}))}function uo(e,t,n){var r,i,o;return mt(this,void 0,void 0,(function(){function s(r){return mt(this,void 0,void 0,(function(){var i,o;return _t(this,(function(s){return cn()?(u.push(r),so(l,u,v,so),[2,r]):(c.add(r),i=r.event.type.charAt(0),y&&r.event.context&&(r.event.context.userAgentData=y),o=Yi(r.event).json(),"track"===r.event.type&&delete o.traits,"alias"===r.event.type&&(o=function(e,t){var n,r,i,o,s=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:s.id())&&void 0!==i?i:s.anonymousId(),t.userId=null!==(o=t.userId)&&void 0!==o?o:t.to,delete t.from,delete t.to,t}(e,o)),[2,g.dispatch("".concat(d,"/").concat(i),Tn(e,o,t,n)).then((function(){return r})).catch((function(){return u.pushWithBackoff(r),so(l,u,v,so),r})).finally((function(){c.delete(r)}))])}))}))}var a,u,c,l,f,h,d,p,g,y,v;return _t(this,(function(n){switch(n.label){case 0:window.addEventListener("pagehide",(function(){u.push.apply(u,Array.from(c)),c.clear()})),a=null!==(r=null==t?void 0:t.apiKey)&&void 0!==r?r:"",u=e.options.disableClientPersistence?new Ht(e.queue.queue.maxAttempts,[]):new Gn(e.queue.queue.maxAttempts,"".concat(a,":dest-Segment.io")),c=new Set,l=!1,f=null!==(i=null==t?void 0:t.apiHost)&&void 0!==i?i:Mn,h=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",d="".concat(h,"://").concat(f),p=null==t?void 0:t.deliveryStrategy,g="batching"===(null==p?void 0:p.strategy)?ro(f,p.config):(m=null==p?void 0:p.config,{dispatch:function(e,t){return hn(e,{keepalive:null==m?void 0:m.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(t)})}}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,ao(e.options.highEntropyValuesClientHints)];case 2:return y=n.sent(),[3,4];case 3:return n.sent(),y=void 0,[3,4];case 4:return v={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:s,identify:s,page:s,alias:s,group:s,screen:s},u.todo&&so(l,u,v,so),[2,v]}var m}))}))}function co(e){var t,n=e.event;!function(e){if(!Tt(e))throw new Ct("Event",Ut);if("object"!=typeof e)throw new Ct("Event",jt)}(n),function(e){if(!Pt(e.type))throw new Ct(".type",Lt)}(n),"track"===n.type&&function(e){if(!Pt(e.event))throw new Ct(".event",Lt)}(n);var r=null!==(t=n.properties)&&void 0!==t?t:n.traits;if("alias"!==n.type&&!Mt(r))throw new Ct(".properties","is not an object");return function(e){var t=".userId/anonymousId/previousId/groupId",n=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!Tt(n))throw new Ct(t,Ut);if(!Pt(n))throw new Ct(t,Lt)}(n),e}var lo={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:co,identify:co,page:co,alias:co,group:co,screen:co},fo=function(e,t,n){n.getCalls(e).forEach((function(e){mo(t,e).catch(console.error)}))},ho=function(e,t){return mt(void 0,void 0,void 0,(function(){var n,r,i;return _t(this,(function(o){switch(o.label){case 0:n=0,r=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,mo(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},po=fo.bind(void 0,"on"),go=fo.bind(void 0,"setAnonymousId"),yo=function(e,t){t.toArray().forEach((function(t){setTimeout((function(){mo(e,t).catch(console.error)}),0)}))},vo=function(){function e(){this._value={}}return e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this._value))},e.prototype.getCalls=function(e){var t;return null!==(t=this._value[e])&&void 0!==t?t:[]},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){e._value[t.method]?e._value[t.method].push(t):e._value[t.method]=[t]})),this},e.prototype.clear=function(){return this._value={},this},e}();function mo(e,t){return mt(this,void 0,void 0,(function(){var n,r;return _t(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),"object"==typeof(o=n)&&null!==o&&"then"in o&&"function"==typeof o.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}var o}))}))}var _o=function(){function e(e){var t=this;this._preInitBuffer=new vo,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=dn,this._promise=e(this._preInitBuffer),this._promise.then((function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r})).catch((function(){}))}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var o=(n=t.instance)[e].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){t._preInitBuffer.push({method:e,args:r,resolve:n,reject:i,called:!1})}))}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.push({method:e,args:r,resolve:function(){},reject:console.error,called:!1}),t)}},e}();function bo(e){var t=e[0],n=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:n,called:!1}}var wo,Eo,So=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return t.map(bo)},Oo=null!==(wo=(Eo=fn()).__SEGMENT_INSPECTOR__)&&void 0!==wo?wo:Eo.__SEGMENT_INSPECTOR__={};function xo(e,t){return mt(this,void 0,void 0,(function(){return _t(this,(function(n){switch(n.label){case 0:return t.push.apply(t,So()),[4,ho(e,t)];case 1:return n.sent(),t.push.apply(t,So()),yo(e,t),t.clear(),[2]}}))}))}function Io(e,t,n,r,i,o,s){var a,u,c;return mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b,w,E=this;return _t(this,(function(S){switch(S.label){case 0:return function(e){var t,n,r;return"test"!==tr().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(t)?[4,Promise.resolve().then((function(){return hd})).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return f=S.sent(),[3,3];case 2:f=void 0,S.label=3;case 3:return l=f,O=t,"test"!==tr().NODE_ENV&&Object.keys(O.integrations).length>1||s.length>0?[4,Promise.resolve().then((function(){return _d})).then((function(i){return i.ajsDestinations(e,t,n.integrations,r,l,s)}))]:[3,5];case 4:return d=S.sent(),[3,6];case 5:d=[],S.label=6;case 6:return h=d,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then((function(){return bd})).then((function(e){return e.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:S.sent(),S.label=8;case 8:return(null===(a=r.plan)||void 0===a?void 0:a.track)?[4,Promise.resolve().then((function(){return wd})).then((function(e){var n;return e.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return g=S.sent(),[3,11];case 10:g=void 0,S.label=11;case 11:return p=g,y=sr(t,i),[4,Zi(t,n.integrations,y,i.obfuscate,l).catch((function(){return[]}))];case 12:return v=S.sent(),m=bt(bt(bt([lo,fr],o,!0),h,!0),v,!0),p&&m.push(p),!1===(null===(u=r.integrations)||void 0===u?void 0:u.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(b=(_=m).push,[4,uo(n,y["Segment.io"],t.integrations)]);case 13:b.apply(_,[S.sent()]),S.label=14;case 14:return[4,n.register.apply(n,m)];case 15:return w=S.sent(),Object.entries(null!==(c=t.enabledMiddleware)&&void 0!==c?c:{}).some((function(e){return e[1]}))?[4,Promise.resolve().then((function(){return Ed})).then((function(e){var r=e.remoteMiddlewares;return mt(E,void 0,void 0,(function(){var e,o;return _t(this,(function(s){switch(s.label){case 0:return[4,r(w,t,i.obfuscate)];case 1:return e=s.sent(),o=e.map((function(e){return n.addSourceMiddleware(e)})),[2,Promise.all(o)]}}))}))}))]:[3,17];case 16:S.sent(),S.label=17;case 17:return[2,w]}var O}))}))}function Ro(e,t,n){var r,i,o,s,a,u,c;return void 0===t&&(t={}),mt(this,void 0,void 0,(function(){var l,f,h,d,p,g,y,v,m,_,b;return _t(this,(function(w){switch(w.label){case 0:return e.cdnURL&&(x=e.cdnURL,window.analytics&&(window.analytics._cdn=x),nr=x),null===(r=e.cdnSettings)||void 0===r?[3,1]:(f=r,[3,3]);case 1:return[4,(E=e.writeKey,S=e.cdnURL,O=null!=S?S:ir(),hn("".concat(O,"/v1/projects/").concat(E,"/settings")).then((function(e){return e.ok?e.json():e.text().then((function(e){throw new Error(e)}))})).catch((function(e){throw console.error(e.message),e})))];case 2:f=w.sent(),w.label=3;case 3:return l=f,t.updateCDNSettings&&(l=t.updateCDNSettings(l)),h=null===(o=null===(i=l.integrations["Segment.io"])||void 0===i?void 0:i.retryQueue)||void 0===o||o,d=vt({retryQueue:h},t),function(e){var t;null===(t=Oo.attach)||void 0===t||t.call(Oo,e)}(p=new er(e,d)),g=null!==(s=e.plugins)&&void 0!==s?s:[],y=null!==(a=e.classicIntegrations)&&void 0!==a?a:[],Dn.initRemoteMetrics(l.metrics),function(e,t){t.push.apply(t,So()),go(e,t),po(e,t)}(p,n),[4,Io(e.writeKey,l,p,d,t,g,y)];case 4:return v=w.sent(),m=null!==(u=window.location.search)&&void 0!==u?u:"",_=null!==(c=window.location.hash)&&void 0!==c?c:"",(b=m.length?m:_.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,p.queryString(b).catch(console.error)]:[3,6];case 5:w.sent(),w.label=6;case 6:return p.initialized=!0,p.emit("initialize",e,t),t.initialPageview&&p.page().catch(console.error),[4,xo(p,n)];case 7:return w.sent(),[2,[p,v]]}var E,S,O,x}))}))}var ko=function(e){function t(){var t,n,r,i=this,o=(r=new Promise((function(e,r){t=e,n=r})),{resolve:t,reject:n,promise:r}),s=o.promise,a=o.resolve;return i=e.call(this,(function(e){return s.then((function(t){return Ro(t[0],t[1],e)}))}))||this,i._resolveLoadStart=function(e,t){return a([e,t])},i}return yt(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then((function(e){return e[0]}))},t}(_o);let Co;const Po=new Uint8Array(16);function Ao(){if(!Co&&(Co="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Co))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Co(Po)}var No=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const To=[];for(let e=0;e<256;++e)To.push((e+256).toString(16).slice(1));function Mo(e,t=0){return(To[e[t+0]]+To[e[t+1]]+To[e[t+2]]+To[e[t+3]]+"-"+To[e[t+4]]+To[e[t+5]]+"-"+To[e[t+6]]+To[e[t+7]]+"-"+To[e[t+8]]+To[e[t+9]]+"-"+To[e[t+10]]+To[e[t+11]]+To[e[t+12]]+To[e[t+13]]+To[e[t+14]]+To[e[t+15]]).toLowerCase()}function Lo(e){if(!function(e){return"string"==typeof e&&No.test(e)}(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function jo(e,t,n){function r(e,r,i,o){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Lo(r)),16!==(null===(s=r)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=n(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(let e=0;e<16;++e)i[o+e]=a[e];return i}return Mo(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Uo(e){return 14+(e+64>>>9<<4)+1}function Do(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function zo(e,t,n,r,i,o){return Do((s=Do(Do(t,e),Do(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function Fo(e,t,n,r,i,o,s){return zo(t&n|~t&r,e,t,i,o,s)}function Bo(e,t,n,r,i,o,s){return zo(t&r|n&~r,e,t,i,o,s)}function Ho(e,t,n,r,i,o,s){return zo(t^n^r,e,t,i,o,s)}function qo(e,t,n,r,i,o,s){return zo(n^(t|~r),e,t,i,o,s)}jo("v3",48,(function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){const t=[],n=32*e.length,r="0123456789abcdef";for(let i=0;i<n;i+=8){const n=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Uo(t)-1]=t;let n=1732584193,r=-271733879,i=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const s=n,a=r,u=i,c=o;n=Fo(n,r,i,o,e[t],7,-680876936),o=Fo(o,n,r,i,e[t+1],12,-389564586),i=Fo(i,o,n,r,e[t+2],17,606105819),r=Fo(r,i,o,n,e[t+3],22,-1044525330),n=Fo(n,r,i,o,e[t+4],7,-176418897),o=Fo(o,n,r,i,e[t+5],12,1200080426),i=Fo(i,o,n,r,e[t+6],17,-1473231341),r=Fo(r,i,o,n,e[t+7],22,-45705983),n=Fo(n,r,i,o,e[t+8],7,1770035416),o=Fo(o,n,r,i,e[t+9],12,-1958414417),i=Fo(i,o,n,r,e[t+10],17,-42063),r=Fo(r,i,o,n,e[t+11],22,-1990404162),n=Fo(n,r,i,o,e[t+12],7,1804603682),o=Fo(o,n,r,i,e[t+13],12,-40341101),i=Fo(i,o,n,r,e[t+14],17,-1502002290),r=Fo(r,i,o,n,e[t+15],22,1236535329),n=Bo(n,r,i,o,e[t+1],5,-165796510),o=Bo(o,n,r,i,e[t+6],9,-1069501632),i=Bo(i,o,n,r,e[t+11],14,643717713),r=Bo(r,i,o,n,e[t],20,-373897302),n=Bo(n,r,i,o,e[t+5],5,-701558691),o=Bo(o,n,r,i,e[t+10],9,38016083),i=Bo(i,o,n,r,e[t+15],14,-660478335),r=Bo(r,i,o,n,e[t+4],20,-405537848),n=Bo(n,r,i,o,e[t+9],5,568446438),o=Bo(o,n,r,i,e[t+14],9,-1019803690),i=Bo(i,o,n,r,e[t+3],14,-187363961),r=Bo(r,i,o,n,e[t+8],20,1163531501),n=Bo(n,r,i,o,e[t+13],5,-1444681467),o=Bo(o,n,r,i,e[t+2],9,-51403784),i=Bo(i,o,n,r,e[t+7],14,1735328473),r=Bo(r,i,o,n,e[t+12],20,-1926607734),n=Ho(n,r,i,o,e[t+5],4,-378558),o=Ho(o,n,r,i,e[t+8],11,-2022574463),i=Ho(i,o,n,r,e[t+11],16,1839030562),r=Ho(r,i,o,n,e[t+14],23,-35309556),n=Ho(n,r,i,o,e[t+1],4,-1530992060),o=Ho(o,n,r,i,e[t+4],11,1272893353),i=Ho(i,o,n,r,e[t+7],16,-155497632),r=Ho(r,i,o,n,e[t+10],23,-1094730640),n=Ho(n,r,i,o,e[t+13],4,681279174),o=Ho(o,n,r,i,e[t],11,-358537222),i=Ho(i,o,n,r,e[t+3],16,-722521979),r=Ho(r,i,o,n,e[t+6],23,76029189),n=Ho(n,r,i,o,e[t+9],4,-640364487),o=Ho(o,n,r,i,e[t+12],11,-421815835),i=Ho(i,o,n,r,e[t+15],16,530742520),r=Ho(r,i,o,n,e[t+2],23,-995338651),n=qo(n,r,i,o,e[t],6,-198630844),o=qo(o,n,r,i,e[t+7],10,1126891415),i=qo(i,o,n,r,e[t+14],15,-1416354905),r=qo(r,i,o,n,e[t+5],21,-57434055),n=qo(n,r,i,o,e[t+12],6,1700485571),o=qo(o,n,r,i,e[t+3],10,-1894986606),i=qo(i,o,n,r,e[t+10],15,-1051523),r=qo(r,i,o,n,e[t+1],21,-2054922799),n=qo(n,r,i,o,e[t+8],6,1873313359),o=qo(o,n,r,i,e[t+15],10,-30611744),i=qo(i,o,n,r,e[t+6],15,-1560198380),r=qo(r,i,o,n,e[t+13],21,1309151649),n=qo(n,r,i,o,e[t+4],6,-145523070),o=qo(o,n,r,i,e[t+11],10,-1120210379),i=qo(i,o,n,r,e[t+2],15,718787259),r=qo(r,i,o,n,e[t+9],21,-343485551),n=Do(n,s),r=Do(r,a),i=Do(i,u),o=Do(o,c)}return[n,r,i,o]}(function(e){if(0===e.length)return[];const t=8*e.length,n=new Uint32Array(Uo(t));for(let r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))}));var Vo={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function $o(e,t,n){if(Vo.randomUUID&&!t&&!e)return Vo.randomUUID();const r=(e=e||{}).random||(e.rng||Ao)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Mo(r)}function Wo(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function Ko(e,t){return e<<t|e>>>32-t}jo("v5",80,(function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const r=e.length/4+2,i=Math.ceil(r/16),o=new Array(i);for(let t=0;t<i;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];o[t]=n}o[i-1][14]=8*(e.length-1)/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<i;++e){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=Ko(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let i=n[0],s=n[1],a=n[2],u=n[3],c=n[4];for(let e=0;e<80;++e){const n=Math.floor(e/20),o=Ko(i,5)+Wo(n,s,a,u)+c+t[n]+r[e]>>>0;c=u,u=a,a=Ko(s,30)>>>0,s=i,i=o}n[0]=n[0]+i>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+a>>>0,n[3]=n[3]+u>>>0,n[4]=n[4]+c>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));let Go=null;const Yo={};function Qo(){const e=m.exports.useCallback(((e={},t={})=>c(this,void 0,void 0,(function*(){if(Go)return;{const n=ko.load({writeKey:"q3dbZMDYOGQbk5GPl7eY7zWaAmNS5wk9",cdnURL:"https://proxyseg.api.live.ledger.com/"});yield n.identify($o()),Go={analytics:n,globalOptions:t,globalProperties:e}}}))),[]),t=m.exports.useCallback((e=>c(this,void 0,void 0,(function*(){Go&&(Yo[Object.keys(Yo).length]=e)}))),[]),n=m.exports.useCallback((()=>c(this,void 0,void 0,(function*(){0!=Object.keys(Yo).length&&Go&&(yield Go.analytics.track("userFlow",Yo))}))),[]);return{init:e,track:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.track(e,n,Go.globalOptions)}))),[]),page:m.exports.useCallback(((e,t={})=>c(this,void 0,void 0,(function*(){if(!Go)return;const n=Object.assign(Object.assign({},Go.globalProperties),t);yield Go.analytics.page(e,n,Go.globalOptions)}))),[]),addStepToFlow:t,sendUserFlow:n}}let Jo=e=>{};const Xo=({onClose:e,children:t})=>{const{sendUserFlow:n,addStepToFlow:r}=Qo(),[i,o]=m.exports.useState(!0);Jo=o;const s=()=>{Jo(!1),r("Close"),n(),e&&e()},a=e=>{var t;"ModalWrapper"===(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)&&s()};return i?y.exports.jsxs(y.exports.Fragment,{children:[y.exports.jsx(tt,{}),y.exports.jsx(ot,Object.assign({id:"ModalWrapper",onClick:a},{children:y.exports.jsxs(st,{children:[y.exports.jsxs(ct,{children:[y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='72' height='24' viewBox='0 0 72 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M61.3616 22.4887V23.9996H71.7318V17.1853H70.2208V22.4887H61.3616ZM61.3616 0V1.51096H70.2208V6.81473H71.7318V0H61.3616ZM56.0137 11.689V8.17796H58.3842C59.5398 8.17796 59.9546 8.56305 59.9546 9.61506V10.2372C59.9546 11.3186 59.5545 11.689 58.3842 11.689H56.0137ZM59.7764 12.311C60.8578 12.0296 61.6133 11.022 61.6133 9.82231C61.6133 9.06683 61.3172 8.38521 60.7542 7.83698C60.0432 7.15536 59.0948 6.81473 57.8653 6.81473H54.5322V17.1849H56.0137V13.0518H58.2361C59.3767 13.0518 59.836 13.5258 59.836 14.7112V17.1853H61.3469V14.9482C61.3469 13.3186 60.9618 12.6965 59.7764 12.5187V12.311ZM47.303 12.6517H51.866V11.2888H47.303V8.17761H52.3102V6.81473H45.7916V17.1849H52.5325V15.822H47.303V12.6517ZM42.3398 13.1999V13.9109C42.3398 15.4072 41.7916 15.8963 40.414 15.8963H40.0881C38.7102 15.8963 38.0436 15.4516 38.0436 13.3925V10.6072C38.0436 8.53329 38.7399 8.10338 40.1175 8.10338H40.4137C41.7618 8.10338 42.1914 8.60716 42.2061 9.99979H43.8357C43.6876 7.9553 42.3248 6.66665 40.2803 6.66665C39.2878 6.66665 38.4581 6.97787 37.836 7.57021C36.9027 8.44437 36.3842 9.92593 36.3842 11.9998C36.3842 13.9999 36.8288 15.4814 37.7471 16.3997C38.3692 17.0071 39.2286 17.333 40.073 17.333C40.9619 17.333 41.7769 16.9773 42.1914 16.2071H42.3986V17.1849H43.7615V11.837H39.7467V13.1999H42.3398ZM29.2737 8.17761H30.8886C32.4146 8.17761 33.2443 8.5627 33.2443 10.6369V13.3627C33.2443 15.4366 32.4146 15.822 30.8886 15.822H29.2737V8.17761ZM31.0216 17.1853C33.8513 17.1853 34.903 15.0372 34.903 12.0002C34.903 8.91874 33.7771 6.81509 30.9919 6.81509H27.7917V17.1853H31.0216ZM20.6367 12.6517H25.1997V11.2888H20.6367V8.17761H25.644V6.81473H19.1254V17.1849H25.8663V15.822H20.6367V12.6517ZM11.8962 6.81473H10.3852V17.1849H17.2V15.822H11.8962V6.81473ZM0 17.1853V24H10.3702V22.4887H1.51096V17.1853H0ZM0 0V6.81473H1.51096V1.51096H10.3702V0H0Z' fill='white'/%3e%3c/svg%3e"}),y.exports.jsx(at,Object.assign({onClick:s},{children:y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M22 2L2 22' stroke='white' stroke-width='3'/%3e%3cpath d='M2 2L22 22' stroke='white' stroke-width='3'/%3e%3c/svg%3e"})}))]}),y.exports.jsx(y.exports.Fragment,{children:t})]})}))]}):null};var Zo,es,ts,ns,rs={exports:{}},is={},os={exports:{}},ss={};function as(){return es||(es=1,function(e){e.exports=(Zo||(Zo=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,u=e[a],c=a+1,l=e[c];if(0>i(u,n))c<o&&0>i(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[a]=n,r=a);else{if(!(c<o&&0>i(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],l=1,f=null,h=3,d=!1,p=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(u,i)}i=n(c)}}function b(e){if(g=!1,_(e),!p)if(null!==n(u))p=!0,N(w);else{var t=n(c);null!==t&&T(b,t.startTime-e)}}function w(t,i){p=!1,g&&(g=!1,v(x),x=-1),d=!0;var o=h;try{for(_(i),f=n(u);null!==f&&(!(f.expirationTime>i)||t&&!k());){var s=f.callback;if("function"==typeof s){f.callback=null,h=f.priorityLevel;var a=s(f.expirationTime<=i);i=e.unstable_now(),"function"==typeof a?f.callback=a:f===n(u)&&r(u),_(i)}else r(u);f=n(u)}if(null!==f)var l=!0;else{var y=n(c);null!==y&&T(b,y.startTime-i),l=!1}return l}finally{f=null,h=o,d=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,S=!1,O=null,x=-1,I=5,R=-1;function k(){return!(e.unstable_now()-R<I)}function C(){if(null!==O){var t=e.unstable_now();R=t;var n=!0;try{n=O(!0,t)}finally{n?E():(S=!1,O=null)}}else S=!1}if("function"==typeof m)E=function(){m(C)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,A=P.port2;P.port1.onmessage=C,E=function(){A.postMessage(null)}}else E=function(){y(C,0)};function N(e){O=e,S||(S=!0,E())}function T(t,n){x=y((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||d||(p=!0,N(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,o){var s=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:l++,callback:i,priorityLevel:r,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(r.sortIndex=o,t(c,r),null===n(u)&&r===n(c)&&(g?(v(x),x=-1):g=!0,T(b,o-s))):(r.sortIndex=a,t(u,r),p||d||(p=!0,N(w))),r},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(ss)),ss)}(os)),os.exports}
174
174
  /**
175
175
  * @license React
176
176
  * react-dom.production.min.js
@@ -234,7 +234,7 @@ function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r
234
234
  height: 24px;
235
235
  margin-right: 8px;
236
236
  }
237
- `;const Us=r("PlatformNotSupportedModal"),Ds=()=>(Us("initializing"),y.exports.jsx(Xo,{children:y.exports.jsx(y.exports.Fragment,{children:y.exports.jsxs(lt,{children:[y.exports.jsx(ft,{children:"Sorry, we don't support this platform just yet."}),y.exports.jsxs(ht,{children:["We're working hard to expand our coverage.",y.exports.jsx("br",{}),"Until we get there, you can try Ledger Connect on:"]}),y.exports.jsx(Ls,{children:y.exports.jsxs(js,{children:[y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='250.076' height='248.707' viewBox='0 0 66.166 65.804'%3e%3cdefs%3e%3clinearGradient id='b'%3e%3cstop style='stop-color:%2306c2e7%3bstop-opacity:1' offset='0'/%3e%3cstop offset='.25' style='stop-color:%230db8ec%3bstop-opacity:1'/%3e%3cstop offset='.5' style='stop-color:%2312aef1%3bstop-opacity:1'/%3e%3cstop style='stop-color:%231f86f9%3bstop-opacity:1' offset='.75'/%3e%3cstop style='stop-color:%23107ddd%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient id='a'%3e%3cstop style='stop-color:%23bdbdbd%3bstop-opacity:1' offset='0'/%3e%3cstop style='stop-color:white%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23a' id='d' x1='412.975' y1='237.608' x2='412.975' y2='59.392' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.35154 0 0 .35154 206.79 159.773)'/%3e%3cfilter style='color-interpolation-filters:sRGB' id='f' x='-.021' width='1.042' y='-.022' height='1.045'%3e%3cfeGaussianBlur stdDeviation='.958'/%3e%3c/filter%3e%3cfilter style='color-interpolation-filters:sRGB' id='c' x='-.048' width='1.096' y='-.048' height='1.096'%3e%3cfeGaussianBlur stdDeviation='3.564'/%3e%3c/filter%3e%3cradialGradient xlink:href='%23b' id='e' cx='413.061' cy='136.818' fx='413.061' fy='136.818' r='82.125' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.38143 0 0 .38143 194.545 155.58)'/%3e%3c/defs%3e%3cpath transform='matrix(.33865 0 0 .3261 -106.77 -14.478)' style='opacity:.52999998%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:2.93077397%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23c)' d='M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z'/%3e%3cpath d='M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z' style='opacity:1%3bfill:url(%23d)%3bfill-opacity:1%3bstroke:%23cdcdcd%3bstroke-width:.09301235%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z' style='opacity:1%3bfill:url(%23e)%3bfill-opacity:1%3bstroke:none%3bstroke-width:.94955933%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M351.969 184.612a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.526.002a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zm-8.355.408a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.174l-1.006-4.75a.42.42 0 0 0-.414-.334zm11.184.004a.42.42 0 0 0-.414.333l-1.01 4.75a.42.42 0 1 0 .824.175l1.01-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.631 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.364-.29zm16.567.001a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm-19.237.976a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm21.937.015a.42.42 0 0 0-.393.25l-1.978 4.434a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.593zm-24.415 1.296a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.421l-1.022-1.769a.42.42 0 0 0-.335-.21zm26.859 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .729.42l1.021-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm31.701.022a.42.42 0 0 0-.355.174l-2.856 3.926a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.14zm35.976.003a.421.421 0 0 0-.291.139l-1.366 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.609 3.249a.42.42 0 1 0 .563-.626l-3.608-3.248a.42.42 0 0 0-.304-.108zm40.108.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm-41.822 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.681l1.653-1.2a.42.42 0 0 0-.261-.76zm-45.137 2.336a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm46.727 0a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm-47.938 2.506a.42.42 0 0 0-.18.805l1.865.833a.42.42 0 1 0 .343-.77l-1.865-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.866.83a.42.42 0 1 0 .343.77l1.866-.831a.42.42 0 0 0-.18-.806zm-50.238 2.602a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zm51.315.018a.408.408 0 0 0-.166.02l-4.618 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm-51.987 2.732a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.823l-1.997-.425a.413.413 0 0 0-.085-.009zm52.654.004a.518.518 0 0 0-.084.009l-1.998.424a.42.42 0 1 0 .175.823l1.997-.424a.42.42 0 0 0-.09-.833zm-53.163 2.761a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .088-.837l-4.828-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.086 0l-4.828.504a.42.42 0 1 0 .087.837l4.829-.504a.42.42 0 0 0-.002-.837zm-53.758 2.794a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.086 0l-4.829.504a.42.42 0 1 0 .088.838l4.829-.504a.42.42 0 0 0-.002-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.434.434 0 0 0-.085-.001zm-46.26 2.844a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.669.004a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zm-45.305 1.657a.408.408 0 0 0-.167.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm-43.7 3.273a.42.42 0 0 0-.163.036l-1.865.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.18-.806zm45.46.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.768l-1.865-.833a.42.42 0 0 0-.163-.036zm-41.827.912a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .421-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.248 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.682l1.653-1.2a.42.42 0 0 0-.261-.762zm40.287.015a.42.42 0 0 0-.262.762l1.653 1.2a.42.42 0 1 0 .495-.681l-1.653-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.303.108l-3.611 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm32.8.011a.421.421 0 0 0-.259.734l3.608 3.248a.42.42 0 1 0 .564-.625l-3.609-3.249a.42.42 0 0 0-.303-.107zm-29.374 3.084a.42.42 0 0 0-.355.173l-2.857 3.927a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm25.936.018a.421.421 0 0 0-.327.668l2.851 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.291.14l-1.366 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.33.002a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.139zm-25.655 1.684a.419.419 0 0 0-.392.25l-1.978 4.433a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.592zm17.956.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm-21.432 1.359a.419.419 0 0 0-.335.21l-1.02 1.768a.42.42 0 1 0 .728.421l1.021-1.769a.42.42 0 0 0-.394-.63zm24.935 0a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.422l-1.021-1.769a.42.42 0 0 0-.335-.21zm-17.055.063a.42.42 0 0 0-.414.334l-1.009 4.749a.42.42 0 1 0 .823.175l1.01-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.572.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .801.26l.631-1.942a.42.42 0 0 0-.436-.55zm15.45 0a.42.42 0 0 0-.437.55l.631 1.943a.42.42 0 1 0 .801-.26l-.631-1.942a.42.42 0 0 0-.364-.29zm-10.366 1.083a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.088l.213-2.03a.42.42 0 0 0-.46-.463zm5.268.002a.42.42 0 0 0-.46.463l.211 2.03a.42.42 0 1 0 .837-.088l-.211-2.03a.42.42 0 0 0-.377-.375z' style='opacity:1%3bfill:%23f4f2f3%3bfill-opacity:1%3bstroke:none%3bstroke-width:.38088897%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath transform='matrix(.35154 0 0 .35154 -112.095 -20.822)' d='m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z' style='opacity:.40900005%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.5614785%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23f)'/%3e%3cpath style='opacity:1%3bfill:%23ff5150%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' d='m129.839 160.803-23.014-23.015 31.437-8.423z' transform='matrix(.64804 -.3317 -.36122 .63206 10.328 -23.732)'/%3e%3cpath transform='matrix(-.36122 .63206 .64804 -.3317 -20.923 6.11)' d='m129.839 160.803-23.014-23.015 31.437-8.423z' style='opacity:1%3bfill:%23f1f1f1%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill'/%3e%3cpath style='opacity:.243%3bfill:black%3bstroke:none%3bstroke-width:.09301235px%3bstroke-linecap:butt%3bstroke-linejoin:miter%3bstroke-opacity:1' d='m331.853 231.185 23.416-15.752 16.815-22.665z' transform='translate(-318.886 -180.595)'/%3e%3c/svg%3e"}),"Safari on iOS"]})})]})})}));var zs={exports:{}};!function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,u=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(u[0][s]>u[1][s])return 1;if(u[0][s]===u[1][s]){if(s===a)return 0;s-=1}else if(u[0][s]<u[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=u(n(92)),i=u(n(93)),o=u(n(94)),s=u(n(95)),a=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)})),r>0){var s=Object.keys(n),u=a.default.find(s,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var l=a.default.find(s,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}(zs);var Fs=f(zs.exports);function Bs(){const e=Fs.getParser(window.navigator.userAgent),t=e.getOS(),n=e.getBrowser(),{type:r}=e.getPlatform();return function(){var e,t;return"isBrave"===(null===(t=null===(e=window.navigator.brave)||void 0===e?void 0:e.isBrave)||void 0===t?void 0:t.name)}()&&(n.name="Brave"),{type:r,os:t,browser:n}}let Hs=null;function qs(e,t){if(!Hs){const e=document.body,t=document.createElement("div");t.className="ledger-ck-modal",e.appendChild(t),Hs=ns(t)}if(Hs&&e){let n;switch(e){case"UseLedgerLiveModal":n=y.exports.jsx(Ms,Object.assign({},t));break;case"PlatformNotSupportedModal":n=y.exports.jsx(Ds,{});break;case"ExtensionInstallModal":n=y.exports.jsx(hs,Object.assign({},t))}Hs.render(n)}Jo(!0)}function Vs(e){const t=Bs(),n=(il("getSupportResult"),ol);Yc(),!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))&&n.isLedgerConnectSupported&&n.isChainIdSupported?qs("ExtensionInstallModal",{onClose:e.onClose}):qs("UseLedgerLiveModal",{isDesktop:"desktop"===t.type,uri:e.uri,onClose:e.onClose})}const $s=r("WalletConnectLegacy"),Ws=i("WalletConnectLegacy");function Ks(){return c(this,void 0,void 0,(function*(){$s("getWalletConnectLegacyProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){$s("initWalletConnectLegacyProvider");const e=Yc();return $s("walletConnectProviderOptions is",e),$s("created a new legacy provider instance"),new g({chainId:e.chainId,bridge:e.bridge,infuraId:e.infuraId,rpc:e.rpc,qrcode:!1})}))}();return function(e){function t(e){$s("connectHandler",e),Jo(!1)}function n(t,r){$s("disconnectHandler",t,r),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect"),e.removeListener("disconnect",n)}$s("assignWalletConnectLegacyProviderEvents"),e.on("connect",t),e.on("disconnect",n)}(e),e.request=function(e){$s("patchWalletConnectLegacyProviderRequest");const t=e.request.bind(e),n=Yc();return function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?($s("calling patched",r,i),new Promise(((o,s)=>c(this,void 0,void 0,(function*(){try{if(!e.connected)return yield e.connector.createSession({chainId:n.chainId}),$s("created a new session"),Vs({uri:e.connector.uri,onClose:()=>{Ws("user rejected"),s(new a)}}),o(yield t({method:r,params:i}));$s("reusing existing session"),o(yield t({method:r,params:i}))}catch(e){return Ws("error",e),s(e)}}))))):($s("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw Ws("error",t),t}}))}var Gs,Ys={exports:{}},Qs="object"==typeof Reflect?Reflect:null,Js=Qs&&"function"==typeof Qs.apply?Qs.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};Gs=Qs&&"function"==typeof Qs.ownKeys?Qs.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Xs=Number.isNaN||function(e){return e!=e};function Zs(){Zs.init.call(this)}Ys.exports=Zs,Ys.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}ca(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&ca(e,"error",t,n)}(e,i,{once:!0})}))},Zs.EventEmitter=Zs,Zs.prototype._events=void 0,Zs.prototype._eventsCount=0,Zs.prototype._maxListeners=void 0;var ea=10;function ta(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function na(e){return void 0===e._maxListeners?Zs.defaultMaxListeners:e._maxListeners}function ra(e,t,n,r){var i,o,s,a;if(ta(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=na(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function ia(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function oa(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=ia.bind(r);return i.listener=n,r.wrapFn=i,i}function sa(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):ua(i,i.length)}function aa(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function ua(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function ca(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(Zs,"defaultMaxListeners",{enumerable:!0,get:function(){return ea},set:function(e){if("number"!=typeof e||e<0||Xs(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ea=e}}),Zs.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Zs.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Xs(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Zs.prototype.getMaxListeners=function(){return na(this)},Zs.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)Js(a,this,t);else{var u=a.length,c=ua(a,u);for(n=0;n<u;++n)Js(c[n],this,t)}return!0},Zs.prototype.addListener=function(e,t){return ra(this,e,t,!1)},Zs.prototype.on=Zs.prototype.addListener,Zs.prototype.prependListener=function(e,t){return ra(this,e,t,!0)},Zs.prototype.once=function(e,t){return ta(t),this.on(e,oa(this,e,t)),this},Zs.prototype.prependOnceListener=function(e,t){return ta(t),this.prependListener(e,oa(this,e,t)),this},Zs.prototype.removeListener=function(e,t){var n,r,i,o,s;if(ta(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},Zs.prototype.off=Zs.prototype.removeListener,Zs.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},Zs.prototype.listeners=function(e){return sa(this,e,!0)},Zs.prototype.rawListeners=function(e){return sa(this,e,!1)},Zs.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):aa.call(e,t)},Zs.prototype.listenerCount=aa,Zs.prototype.eventNames=function(){return this._eventsCount>0?Gs(this._events):[]};var la={},fa={},ha={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(ha),Object.defineProperty(fa,"__esModule",{value:!0});var da=ha;function pa(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function ga(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function ya(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function va(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function ma(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function _a(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function ba(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function wa(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function Ea(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),ba(e/4294967296>>>0,t,n),ba(e>>>0,t,n+4),t}function Sa(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),wa(e>>>0,t,n),wa(e/4294967296>>>0,t,n+4),t}fa.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},fa.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},fa.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},fa.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},fa.writeUint16BE=pa,fa.writeInt16BE=pa,fa.writeUint16LE=ga,fa.writeInt16LE=ga,fa.readInt32BE=ya,fa.readUint32BE=va,fa.readInt32LE=ma,fa.readUint32LE=_a,fa.writeUint32BE=ba,fa.writeInt32BE=ba,fa.writeUint32LE=wa,fa.writeInt32LE=wa,fa.readInt64BE=function(e,t){void 0===t&&(t=0);var n=ya(e,t),r=ya(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},fa.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*va(e,t)+va(e,t+4)},fa.readInt64LE=function(e,t){void 0===t&&(t=0);var n=ma(e,t);return 4294967296*ma(e,t+4)+n-4294967296*(n>>31)},fa.readUint64LE=function(e,t){void 0===t&&(t=0);var n=_a(e,t);return 4294967296*_a(e,t+4)+n},fa.writeUint64BE=Ea,fa.writeInt64BE=Ea,fa.writeUint64LE=Sa,fa.writeInt64LE=Sa,fa.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},fa.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},fa.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!da.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=e/8+r-1;o>=r;o--)n[o]=t/i&255,i*=256;return n},fa.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!da.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+e/8;o++)n[o]=t/i&255,i*=256;return n},fa.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},fa.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},fa.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},fa.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},fa.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},fa.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},fa.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},fa.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t};var Oa={};Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(la,"__esModule",{value:!0});var xa=fa,Ia=Oa,Ra=20;function ka(e,t,n){for(var r=1634760805,i=857760878,o=2036477234,s=1797285236,a=n[3]<<24|n[2]<<16|n[1]<<8|n[0],u=n[7]<<24|n[6]<<16|n[5]<<8|n[4],c=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],f=n[19]<<24|n[18]<<16|n[17]<<8|n[16],h=n[23]<<24|n[22]<<16|n[21]<<8|n[20],d=n[27]<<24|n[26]<<16|n[25]<<8|n[24],p=n[31]<<24|n[30]<<16|n[29]<<8|n[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],v=t[11]<<24|t[10]<<16|t[9]<<8|t[8],m=t[15]<<24|t[14]<<16|t[13]<<8|t[12],_=r,b=i,w=o,E=s,S=a,O=u,x=c,I=l,R=f,k=h,C=d,P=p,A=g,N=y,T=v,M=m,L=0;L<Ra;L+=2)S=(S^=R=R+(A=(A^=_=_+S|0)>>>16|A<<16)|0)>>>20|S<<12,O=(O^=k=k+(N=(N^=b=b+O|0)>>>16|N<<16)|0)>>>20|O<<12,x=(x^=C=C+(T=(T^=w=w+x|0)>>>16|T<<16)|0)>>>20|x<<12,I=(I^=P=P+(M=(M^=E=E+I|0)>>>16|M<<16)|0)>>>20|I<<12,x=(x^=C=C+(T=(T^=w=w+x|0)>>>24|T<<8)|0)>>>25|x<<7,I=(I^=P=P+(M=(M^=E=E+I|0)>>>24|M<<8)|0)>>>25|I<<7,O=(O^=k=k+(N=(N^=b=b+O|0)>>>24|N<<8)|0)>>>25|O<<7,S=(S^=R=R+(A=(A^=_=_+S|0)>>>24|A<<8)|0)>>>25|S<<7,O=(O^=C=C+(M=(M^=_=_+O|0)>>>16|M<<16)|0)>>>20|O<<12,x=(x^=P=P+(A=(A^=b=b+x|0)>>>16|A<<16)|0)>>>20|x<<12,I=(I^=R=R+(N=(N^=w=w+I|0)>>>16|N<<16)|0)>>>20|I<<12,S=(S^=k=k+(T=(T^=E=E+S|0)>>>16|T<<16)|0)>>>20|S<<12,I=(I^=R=R+(N=(N^=w=w+I|0)>>>24|N<<8)|0)>>>25|I<<7,S=(S^=k=k+(T=(T^=E=E+S|0)>>>24|T<<8)|0)>>>25|S<<7,x=(x^=P=P+(A=(A^=b=b+x|0)>>>24|A<<8)|0)>>>25|x<<7,O=(O^=C=C+(M=(M^=_=_+O|0)>>>24|M<<8)|0)>>>25|O<<7;xa.writeUint32LE(_+r|0,e,0),xa.writeUint32LE(b+i|0,e,4),xa.writeUint32LE(w+o|0,e,8),xa.writeUint32LE(E+s|0,e,12),xa.writeUint32LE(S+a|0,e,16),xa.writeUint32LE(O+u|0,e,20),xa.writeUint32LE(x+c|0,e,24),xa.writeUint32LE(I+l|0,e,28),xa.writeUint32LE(R+f|0,e,32),xa.writeUint32LE(k+h|0,e,36),xa.writeUint32LE(C+d|0,e,40),xa.writeUint32LE(P+p|0,e,44),xa.writeUint32LE(A+g|0,e,48),xa.writeUint32LE(N+y|0,e,52),xa.writeUint32LE(T+v|0,e,56),xa.writeUint32LE(M+m|0,e,60)}function Ca(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var o,s;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=(o=new Uint8Array(16)).length-t.length,o.set(t,s)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");o=t,s=i}for(var a=new Uint8Array(64),u=0;u<n.length;u+=64){ka(a,o,e);for(var c=u;c<u+64&&c<n.length;c++)r[c]=n[c]^a[c-u];Pa(o,0,s)}return Ia.wipe(a),0===i&&Ia.wipe(o),r}function Pa(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}la.streamXOR=Ca,la.stream=function(e,t,n,r){return void 0===r&&(r=0),Ia.wipe(n),Ca(e,t,n,n,r)};var Aa={},Na={};function Ta(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(Na,"__esModule",{value:!0}),Na.select=function(e,t,n){return~(e-1)&t|e-1&n},Na.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},Na.compare=Ta,Na.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==Ta(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Na,n=Oa;e.DIGEST_LENGTH=16;var r=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=t[10]|t[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var u=t[12]|t[13]<<8;this._r[7]=8065&(a>>>11|u<<5);var c=t[14]|t[15]<<8;this._r[8]=8191&(u>>>8|c<<8),this._r[9]=c>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],u=this._h[4],c=this._h[5],l=this._h[6],f=this._h[7],h=this._h[8],d=this._h[9],p=this._r[0],g=this._r[1],y=this._r[2],v=this._r[3],m=this._r[4],_=this._r[5],b=this._r[6],w=this._r[7],E=this._r[8],S=this._r[9];n>=16;){var O=e[t+0]|e[t+1]<<8;i+=8191&O;var x=e[t+2]|e[t+3]<<8;o+=8191&(O>>>13|x<<3);var I=e[t+4]|e[t+5]<<8;s+=8191&(x>>>10|I<<6);var R=e[t+6]|e[t+7]<<8;a+=8191&(I>>>7|R<<9);var k=e[t+8]|e[t+9]<<8;u+=8191&(R>>>4|k<<12),c+=k>>>1&8191;var C=e[t+10]|e[t+11]<<8;l+=8191&(k>>>14|C<<2);var P=e[t+12]|e[t+13]<<8;f+=8191&(C>>>11|P<<5);var A=e[t+14]|e[t+15]<<8,N=0,T=N;T+=i*p,T+=o*(5*S),T+=s*(5*E),T+=a*(5*w),N=(T+=u*(5*b))>>>13,T&=8191,T+=c*(5*_),T+=l*(5*m),T+=f*(5*v),T+=(h+=8191&(P>>>8|A<<8))*(5*y);var M=N+=(T+=(d+=A>>>5|r)*(5*g))>>>13;M+=i*g,M+=o*p,M+=s*(5*S),M+=a*(5*E),N=(M+=u*(5*w))>>>13,M&=8191,M+=c*(5*b),M+=l*(5*_),M+=f*(5*m),M+=h*(5*v),N+=(M+=d*(5*y))>>>13,M&=8191;var L=N;L+=i*y,L+=o*g,L+=s*p,L+=a*(5*S),N=(L+=u*(5*E))>>>13,L&=8191,L+=c*(5*w),L+=l*(5*b),L+=f*(5*_),L+=h*(5*m);var j=N+=(L+=d*(5*v))>>>13;j+=i*v,j+=o*y,j+=s*g,j+=a*p,N=(j+=u*(5*S))>>>13,j&=8191,j+=c*(5*E),j+=l*(5*w),j+=f*(5*b),j+=h*(5*_);var U=N+=(j+=d*(5*m))>>>13;U+=i*m,U+=o*v,U+=s*y,U+=a*g,N=(U+=u*p)>>>13,U&=8191,U+=c*(5*S),U+=l*(5*E),U+=f*(5*w),U+=h*(5*b);var D=N+=(U+=d*(5*_))>>>13;D+=i*_,D+=o*m,D+=s*v,D+=a*y,N=(D+=u*g)>>>13,D&=8191,D+=c*p,D+=l*(5*S),D+=f*(5*E),D+=h*(5*w);var z=N+=(D+=d*(5*b))>>>13;z+=i*b,z+=o*_,z+=s*m,z+=a*v,N=(z+=u*y)>>>13,z&=8191,z+=c*g,z+=l*p,z+=f*(5*S),z+=h*(5*E);var F=N+=(z+=d*(5*w))>>>13;F+=i*w,F+=o*b,F+=s*_,F+=a*m,N=(F+=u*v)>>>13,F&=8191,F+=c*y,F+=l*g,F+=f*p,F+=h*(5*S);var B=N+=(F+=d*(5*E))>>>13;B+=i*E,B+=o*w,B+=s*b,B+=a*_,N=(B+=u*m)>>>13,B&=8191,B+=c*v,B+=l*y,B+=f*g,B+=h*p;var H=N+=(B+=d*(5*S))>>>13;H+=i*S,H+=o*E,H+=s*w,H+=a*b,N=(H+=u*_)>>>13,H&=8191,H+=c*m,H+=l*v,H+=f*y,H+=h*g,i=T=8191&(N=(N=((N+=(H+=d*p)>>>13)<<2)+N|0)+(T&=8191)|0),o=M+=N>>>=13,s=L&=8191,a=j&=8191,u=U&=8191,c=D&=8191,l=z&=8191,f=F&=8191,h=B&=8191,d=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=u,this._h[5]=c,this._h[6]=l,this._h[7]=f,this._h[8]=h,this._h[9]=d},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=n,n=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,s[0]=this._h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this._h[o]=this._h[o]&r|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(Aa),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=la,n=Aa,r=Oa,i=fa,o=Na;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var s=new Uint8Array(16),a=function(){function a(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return a.prototype.seal=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);t.stream(this._key,s,a,4);var u,c=n.length+this.tagLength;if(o){if(o.length!==c)throw new Error("ChaCha20Poly1305: incorrect destination length");u=o}else u=new Uint8Array(c);return t.streamXOR(this._key,s,n,u,4),this._authenticate(u.subarray(u.length-this.tagLength,u.length),a,u.subarray(0,u.length-this.tagLength),i),r.wipe(s),u},a.prototype.open=function(e,n,i,s){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var a=new Uint8Array(16);a.set(e,a.length-e.length);var u=new Uint8Array(32);t.stream(this._key,a,u,4);var c=new Uint8Array(this.tagLength);if(this._authenticate(c,u,n.subarray(0,n.length-this.tagLength),i),!o.equal(c,n.subarray(n.length-this.tagLength,n.length)))return null;var l,f=n.length-this.tagLength;if(s){if(s.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");l=s}else l=new Uint8Array(f);return t.streamXOR(this._key,a,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(a),l},a.prototype.clean=function(){return r.wipe(this._key),this},a.prototype._authenticate=function(e,t,o,a){var u=new n.Poly1305(t);a&&(u.update(a),a.length%16>0&&u.update(s.subarray(a.length%16))),u.update(o),o.length%16>0&&u.update(s.subarray(o.length%16));var c=new Uint8Array(8);a&&i.writeUint64LE(a.length,c),u.update(c),i.writeUint64LE(o.length,c),u.update(c);for(var l=u.digest(),f=0;f<l.length;f++)e[f]=l[f];u.clean(),r.wipe(l),r.wipe(c)},a}();e.ChaCha20Poly1305=a}({});var Ma={},La={},ja={};Object.defineProperty(ja,"__esModule",{value:!0}),ja.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(La,"__esModule",{value:!0});var Ua=ja,Da=Na,za=Oa,Fa=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;this._inner.update(n);for(r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),Ua.isSerializableHash(this._inner)&&Ua.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),za.wipe(n)}return e.prototype.reset=function(){if(!Ua.isSerializableHash(this._inner)||!Ua.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){Ua.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Ua.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!Ua.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!Ua.isSerializableHash(this._inner)||!Ua.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!Ua.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();La.HMAC=Fa,La.hmac=function(e,t,n){var r=new Fa(e,t);r.update(n);var i=r.digest();return r.clean(),i},La.equal=Da.equal,Object.defineProperty(Ma,"__esModule",{value:!0});var Ba=La,Ha=Oa,qa=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=Ba.hmac(this._hash,n,t);this._hmac=new Ba.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),Ha.wipe(this._buffer),Ha.wipe(this._counter),this._bufpos=0},e}();Ma.HKDF=qa;var Va={},$a={},Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.BrowserRandomSource=void 0;function Ka(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}Wa.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var Ga={},Ya=h(Object.freeze({__proto__:null,default:{}}));Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.NodeRandomSource=void 0;const Qa=Oa;Ga.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==Ka){const e=Ya;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,Qa.wipe)(t),n}},Object.defineProperty($a,"__esModule",{value:!0}),$a.SystemRandomSource=void 0;const Ja=Wa,Xa=Ga;$a.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new Ja.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new Xa.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=$a,n=fa,r=Oa;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const o=i(4,t),s=(0,n.readUint32LE)(o);return(0,r.wipe)(o),s};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(t,n=o,s=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let a="";const u=n.length,c=256-256%u;for(;t>0;){const e=i(Math.ceil(256*t/c),s);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<c&&(a+=n.charAt(i%u),t--)}(0,r.wipe)(e)}return a}e.randomString=s,e.randomStringForEntropy=function(t,n=o,r=e.defaultRandomSource){return s(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(Va);!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=fa,n=Oa;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=o(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,s=n<<3,a=n%64<56?64:128;this._buffer[r]=128;for(var u=r+1;u<a-8;u++)this._buffer[u]=0;t.writeUint32BE(i,this._buffer,a-8),t.writeUint32BE(s,this._buffer,a-4),o(this._temp,this._state,this._buffer,0,a),this._finished=!0}for(u=0;u<this.digestLength/4;u++)t.writeUint32BE(this._state[u],e,4*u);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(e,n,r,o,s){for(;s>=64;){for(var a=n[0],u=n[1],c=n[2],l=n[3],f=n[4],h=n[5],d=n[6],p=n[7],g=0;g<16;g++){var y=o+4*g;e[g]=t.readUint32BE(r,y)}for(g=16;g<64;g++){var v=e[g-2],m=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,_=((v=e[g-15])>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;e[g]=(m+e[g-7]|0)+(_+e[g-16]|0)}for(g=0;g<64;g++){m=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&h^~f&d)|0)+(p+(i[g]+e[g]|0)|0)|0,_=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&u^a&c^u&c)|0;p=d,d=h,h=f,f=l+m|0,l=c,c=u,u=a,a=m+_|0}n[0]+=a,n[1]+=u,n[2]+=c,n[3]+=l,n[4]+=f,n[5]+=h,n[6]+=d,n[7]+=p,o+=64,s-=64}return o}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}({});!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=Va,n=Oa;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const o=r([56129,1]);function s(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function a(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function l(e,t,n){let r,i,o=0,s=0,a=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,v=0,m=0,_=0,b=0,w=0,E=0,S=0,O=0,x=0,I=0,R=0,k=0,C=0,P=0,A=0,N=0,T=0,M=0,L=0,j=n[0],U=n[1],D=n[2],z=n[3],F=n[4],B=n[5],H=n[6],q=n[7],V=n[8],$=n[9],W=n[10],K=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];r=t[0],o+=r*j,s+=r*U,a+=r*D,u+=r*z,c+=r*F,l+=r*B,f+=r*H,h+=r*q,d+=r*V,p+=r*$,g+=r*W,y+=r*K,v+=r*G,m+=r*Y,_+=r*Q,b+=r*J,r=t[1],s+=r*j,a+=r*U,u+=r*D,c+=r*z,l+=r*F,f+=r*B,h+=r*H,d+=r*q,p+=r*V,g+=r*$,y+=r*W,v+=r*K,m+=r*G,_+=r*Y,b+=r*Q,w+=r*J,r=t[2],a+=r*j,u+=r*U,c+=r*D,l+=r*z,f+=r*F,h+=r*B,d+=r*H,p+=r*q,g+=r*V,y+=r*$,v+=r*W,m+=r*K,_+=r*G,b+=r*Y,w+=r*Q,E+=r*J,r=t[3],u+=r*j,c+=r*U,l+=r*D,f+=r*z,h+=r*F,d+=r*B,p+=r*H,g+=r*q,y+=r*V,v+=r*$,m+=r*W,_+=r*K,b+=r*G,w+=r*Y,E+=r*Q,S+=r*J,r=t[4],c+=r*j,l+=r*U,f+=r*D,h+=r*z,d+=r*F,p+=r*B,g+=r*H,y+=r*q,v+=r*V,m+=r*$,_+=r*W,b+=r*K,w+=r*G,E+=r*Y,S+=r*Q,O+=r*J,r=t[5],l+=r*j,f+=r*U,h+=r*D,d+=r*z,p+=r*F,g+=r*B,y+=r*H,v+=r*q,m+=r*V,_+=r*$,b+=r*W,w+=r*K,E+=r*G,S+=r*Y,O+=r*Q,x+=r*J,r=t[6],f+=r*j,h+=r*U,d+=r*D,p+=r*z,g+=r*F,y+=r*B,v+=r*H,m+=r*q,_+=r*V,b+=r*$,w+=r*W,E+=r*K,S+=r*G,O+=r*Y,x+=r*Q,I+=r*J,r=t[7],h+=r*j,d+=r*U,p+=r*D,g+=r*z,y+=r*F,v+=r*B,m+=r*H,_+=r*q,b+=r*V,w+=r*$,E+=r*W,S+=r*K,O+=r*G,x+=r*Y,I+=r*Q,R+=r*J,r=t[8],d+=r*j,p+=r*U,g+=r*D,y+=r*z,v+=r*F,m+=r*B,_+=r*H,b+=r*q,w+=r*V,E+=r*$,S+=r*W,O+=r*K,x+=r*G,I+=r*Y,R+=r*Q,k+=r*J,r=t[9],p+=r*j,g+=r*U,y+=r*D,v+=r*z,m+=r*F,_+=r*B,b+=r*H,w+=r*q,E+=r*V,S+=r*$,O+=r*W,x+=r*K,I+=r*G,R+=r*Y,k+=r*Q,C+=r*J,r=t[10],g+=r*j,y+=r*U,v+=r*D,m+=r*z,_+=r*F,b+=r*B,w+=r*H,E+=r*q,S+=r*V,O+=r*$,x+=r*W,I+=r*K,R+=r*G,k+=r*Y,C+=r*Q,P+=r*J,r=t[11],y+=r*j,v+=r*U,m+=r*D,_+=r*z,b+=r*F,w+=r*B,E+=r*H,S+=r*q,O+=r*V,x+=r*$,I+=r*W,R+=r*K,k+=r*G,C+=r*Y,P+=r*Q,A+=r*J,r=t[12],v+=r*j,m+=r*U,_+=r*D,b+=r*z,w+=r*F,E+=r*B,S+=r*H,O+=r*q,x+=r*V,I+=r*$,R+=r*W,k+=r*K,C+=r*G,P+=r*Y,A+=r*Q,N+=r*J,r=t[13],m+=r*j,_+=r*U,b+=r*D,w+=r*z,E+=r*F,S+=r*B,O+=r*H,x+=r*q,I+=r*V,R+=r*$,k+=r*W,C+=r*K,P+=r*G,A+=r*Y,N+=r*Q,T+=r*J,r=t[14],_+=r*j,b+=r*U,w+=r*D,E+=r*z,S+=r*F,O+=r*B,x+=r*H,I+=r*q,R+=r*V,k+=r*$,C+=r*W,P+=r*K,A+=r*G,N+=r*Y,T+=r*Q,M+=r*J,r=t[15],b+=r*j,w+=r*U,E+=r*D,S+=r*z,O+=r*F,x+=r*B,I+=r*H,R+=r*q,k+=r*V,C+=r*$,P+=r*W,A+=r*K,N+=r*G,T+=r*Y,M+=r*Q,L+=r*J,o+=38*w,s+=38*E,a+=38*S,u+=38*O,c+=38*x,l+=38*I,f+=38*R,h+=38*k,d+=38*C,p+=38*P,g+=38*A,y+=38*N,v+=38*T,m+=38*M,_+=38*L,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=v,e[13]=m,e[14]=_,e[15]=b}function f(e,t){l(e,t,t)}function h(e,t){const n=new Uint8Array(32),i=new Float64Array(80),h=r(),d=r(),p=r(),g=r(),y=r(),v=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)d[e]=i[e];h[0]=g[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;a(h,d,t),a(p,g,t),u(y,h,p),c(h,h,p),u(p,d,g),c(d,d,g),f(g,y),f(v,h),l(h,p,h),l(p,d,y),u(y,h,p),c(h,h,p),f(d,h),c(p,g,v),l(h,p,o),u(h,h,g),l(p,p,h),l(h,g,v),l(g,d,i),f(d,y),a(h,d,t),a(p,g,t)}for(let e=0;e<16;e++)i[e+16]=h[e],i[e+32]=p[e],i[e+48]=d[e],i[e+64]=g[e];const m=i.subarray(32),_=i.subarray(16);!function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)f(n,n),2!==e&&4!==e&&l(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(m,m),l(_,_,m);const b=new Uint8Array(32);return function(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];s(i),s(i),s(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,a(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}(b,_),b}function d(e){return h(e,i)}function p(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:d(n),secretKey:n}}e.scalarMult=h,e.scalarMultBase=d,e.generateKeyPairFromSeed=p,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=p(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(n.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=h(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}({});var Za=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=e.length,u=e.charAt(0),c=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===u;)r++,t++;for(var o=(e.length-t)*c+1>>>0,s=new Uint8Array(o);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f<i)&&-1!==h;h--,f++)l+=a*s[h]>>>0,s[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(r+(o-d)),g=r;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var s=(o-i)*l+1>>>0,c=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<r)&&-1!==d;d--,h++)f+=256*c[d]>>>0,c[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=h,i++}for(var p=s-r;p!==s&&0===c[p];)p++;for(var g=u.repeat(n);p<s;++p)g+=e.charAt(c[p]);return g},decodeUnsafe:f,decode:function(e){var n=f(e);if(n)return n;throw new Error(`Non-${t} character`)}}},eu=Za;const tu=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class nu{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class ru{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return ou(this,e)}}class iu{constructor(e){this.decoders=e}or(e){return ou(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const ou=(e,t)=>new iu({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class su{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new nu(e,t,n),this.decoder=new ru(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const au=({name:e,prefix:t,encode:n,decode:r})=>new su(e,t,n,r),uu=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=eu(n,t);return au({prefix:e,name:t,encode:r,decode:e=>tu(i(e))})},cu=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>au({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*n/8|0);let a=0,u=0,c=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);u=u<<n|o,a+=n,a>=8&&(a-=8,s[c++]=255&u>>a)}if(a>=n||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)});au({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});cu({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});cu({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});uu({prefix:"9",name:"base10",alphabet:"0123456789"});cu({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),cu({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});cu({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),cu({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),cu({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),cu({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),cu({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),cu({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),cu({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),cu({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),cu({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});uu({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),uu({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});uu({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),uu({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});cu({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),cu({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),cu({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),cu({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const lu=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),fu=lu.reduce(((e,t,n)=>(e[n]=t,e)),[]),hu=lu.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);au({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=fu[t]),"")},decode:function(e){const t=[];for(const n of e){const e=hu[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var du=function e(t,n,r){n=n||[];var i=r=r||0;for(;t>=yu;)n[r++]=255&t|pu,t/=128;for(;t&gu;)n[r++]=255&t|pu,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},pu=128,gu=-128,yu=Math.pow(2,31);var vu=function e(t,n){var r,i=0,o=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],i+=o<28?(r&_u)<<o:(r&_u)*Math.pow(2,o),o+=7}while(r>=mu);return e.bytes=s-n,i},mu=128,_u=127;var bu=Math.pow(2,7),wu=Math.pow(2,14),Eu=Math.pow(2,21),Su=Math.pow(2,28),Ou=Math.pow(2,35),xu=Math.pow(2,42),Iu=Math.pow(2,49),Ru=Math.pow(2,56),ku=Math.pow(2,63),Cu={encode:du,decode:vu,encodingLength:function(e){return e<bu?1:e<wu?2:e<Eu?3:e<Su?4:e<Ou?5:e<xu?6:e<Iu?7:e<Ru?8:e<ku?9:10}};const Pu=(e,t,n=0)=>(Cu.encode(e,t,n),t),Au=e=>Cu.encodingLength(e),Nu=(e,t)=>{const n=t.byteLength,r=Au(e),i=r+Au(n),o=new Uint8Array(i+n);return Pu(e,o,0),Pu(n,o,r),o.set(t,i),new Tu(e,n,t,o)};class Tu{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const Mu=({name:e,code:t,encode:n})=>new Lu(e,t,n);class Lu{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?Nu(this.code,t):t.then((e=>Nu(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ju=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));Mu({name:"sha2-256",code:18,encode:ju("SHA-256")}),Mu({name:"sha2-512",code:19,encode:ju("SHA-512")});new TextEncoder,new TextDecoder;var Uu=function(e,t){return Uu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Uu(e,t)};
237
+ `;const Us=r("PlatformNotSupportedModal"),Ds=()=>(Us("initializing"),y.exports.jsx(Xo,{children:y.exports.jsx(y.exports.Fragment,{children:y.exports.jsxs(lt,{children:[y.exports.jsx(ft,{children:"Sorry, we don't support this platform just yet."}),y.exports.jsxs(ht,{children:["We're working hard to expand our coverage.",y.exports.jsx("br",{}),"Until we get there, you can try Ledger Connect on:"]}),y.exports.jsx(Ls,{children:y.exports.jsxs(js,{children:[y.exports.jsx("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='250.076' height='248.707' viewBox='0 0 66.166 65.804'%3e%3cdefs%3e%3clinearGradient id='b'%3e%3cstop style='stop-color:%2306c2e7%3bstop-opacity:1' offset='0'/%3e%3cstop offset='.25' style='stop-color:%230db8ec%3bstop-opacity:1'/%3e%3cstop offset='.5' style='stop-color:%2312aef1%3bstop-opacity:1'/%3e%3cstop style='stop-color:%231f86f9%3bstop-opacity:1' offset='.75'/%3e%3cstop style='stop-color:%23107ddd%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient id='a'%3e%3cstop style='stop-color:%23bdbdbd%3bstop-opacity:1' offset='0'/%3e%3cstop style='stop-color:white%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23a' id='d' x1='412.975' y1='237.608' x2='412.975' y2='59.392' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.35154 0 0 .35154 206.79 159.773)'/%3e%3cfilter style='color-interpolation-filters:sRGB' id='f' x='-.021' width='1.042' y='-.022' height='1.045'%3e%3cfeGaussianBlur stdDeviation='.958'/%3e%3c/filter%3e%3cfilter style='color-interpolation-filters:sRGB' id='c' x='-.048' width='1.096' y='-.048' height='1.096'%3e%3cfeGaussianBlur stdDeviation='3.564'/%3e%3c/filter%3e%3cradialGradient xlink:href='%23b' id='e' cx='413.061' cy='136.818' fx='413.061' fy='136.818' r='82.125' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.38143 0 0 .38143 194.545 155.58)'/%3e%3c/defs%3e%3cpath transform='matrix(.33865 0 0 .3261 -106.77 -14.478)' style='opacity:.52999998%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:2.93077397%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23c)' d='M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z'/%3e%3cpath d='M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z' style='opacity:1%3bfill:url(%23d)%3bfill-opacity:1%3bstroke:%23cdcdcd%3bstroke-width:.09301235%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z' style='opacity:1%3bfill:url(%23e)%3bfill-opacity:1%3bstroke:none%3bstroke-width:.94955933%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M351.969 184.612a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.526.002a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zm-8.355.408a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.174l-1.006-4.75a.42.42 0 0 0-.414-.334zm11.184.004a.42.42 0 0 0-.414.333l-1.01 4.75a.42.42 0 1 0 .824.175l1.01-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.631 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.364-.29zm16.567.001a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm-19.237.976a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm21.937.015a.42.42 0 0 0-.393.25l-1.978 4.434a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.593zm-24.415 1.296a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.421l-1.022-1.769a.42.42 0 0 0-.335-.21zm26.859 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .729.42l1.021-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm31.701.022a.42.42 0 0 0-.355.174l-2.856 3.926a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.14zm35.976.003a.421.421 0 0 0-.291.139l-1.366 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.609 3.249a.42.42 0 1 0 .563-.626l-3.608-3.248a.42.42 0 0 0-.304-.108zm40.108.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm-41.822 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.681l1.653-1.2a.42.42 0 0 0-.261-.76zm-45.137 2.336a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm46.727 0a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm-47.938 2.506a.42.42 0 0 0-.18.805l1.865.833a.42.42 0 1 0 .343-.77l-1.865-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.866.83a.42.42 0 1 0 .343.77l1.866-.831a.42.42 0 0 0-.18-.806zm-50.238 2.602a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zm51.315.018a.408.408 0 0 0-.166.02l-4.618 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm-51.987 2.732a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.823l-1.997-.425a.413.413 0 0 0-.085-.009zm52.654.004a.518.518 0 0 0-.084.009l-1.998.424a.42.42 0 1 0 .175.823l1.997-.424a.42.42 0 0 0-.09-.833zm-53.163 2.761a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .088-.837l-4.828-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.086 0l-4.828.504a.42.42 0 1 0 .087.837l4.829-.504a.42.42 0 0 0-.002-.837zm-53.758 2.794a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.086 0l-4.829.504a.42.42 0 1 0 .088.838l4.829-.504a.42.42 0 0 0-.002-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.434.434 0 0 0-.085-.001zm-46.26 2.844a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.669.004a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zm-45.305 1.657a.408.408 0 0 0-.167.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm-43.7 3.273a.42.42 0 0 0-.163.036l-1.865.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.18-.806zm45.46.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.768l-1.865-.833a.42.42 0 0 0-.163-.036zm-41.827.912a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .421-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.248 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.682l1.653-1.2a.42.42 0 0 0-.261-.762zm40.287.015a.42.42 0 0 0-.262.762l1.653 1.2a.42.42 0 1 0 .495-.681l-1.653-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.303.108l-3.611 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm32.8.011a.421.421 0 0 0-.259.734l3.608 3.248a.42.42 0 1 0 .564-.625l-3.609-3.249a.42.42 0 0 0-.303-.107zm-29.374 3.084a.42.42 0 0 0-.355.173l-2.857 3.927a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm25.936.018a.421.421 0 0 0-.327.668l2.851 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.291.14l-1.366 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.33.002a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.139zm-25.655 1.684a.419.419 0 0 0-.392.25l-1.978 4.433a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.592zm17.956.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm-21.432 1.359a.419.419 0 0 0-.335.21l-1.02 1.768a.42.42 0 1 0 .728.421l1.021-1.769a.42.42 0 0 0-.394-.63zm24.935 0a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.422l-1.021-1.769a.42.42 0 0 0-.335-.21zm-17.055.063a.42.42 0 0 0-.414.334l-1.009 4.749a.42.42 0 1 0 .823.175l1.01-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.572.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .801.26l.631-1.942a.42.42 0 0 0-.436-.55zm15.45 0a.42.42 0 0 0-.437.55l.631 1.943a.42.42 0 1 0 .801-.26l-.631-1.942a.42.42 0 0 0-.364-.29zm-10.366 1.083a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.088l.213-2.03a.42.42 0 0 0-.46-.463zm5.268.002a.42.42 0 0 0-.46.463l.211 2.03a.42.42 0 1 0 .837-.088l-.211-2.03a.42.42 0 0 0-.377-.375z' style='opacity:1%3bfill:%23f4f2f3%3bfill-opacity:1%3bstroke:none%3bstroke-width:.38088897%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath transform='matrix(.35154 0 0 .35154 -112.095 -20.822)' d='m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z' style='opacity:.40900005%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.5614785%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23f)'/%3e%3cpath style='opacity:1%3bfill:%23ff5150%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' d='m129.839 160.803-23.014-23.015 31.437-8.423z' transform='matrix(.64804 -.3317 -.36122 .63206 10.328 -23.732)'/%3e%3cpath transform='matrix(-.36122 .63206 .64804 -.3317 -20.923 6.11)' d='m129.839 160.803-23.014-23.015 31.437-8.423z' style='opacity:1%3bfill:%23f1f1f1%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill'/%3e%3cpath style='opacity:.243%3bfill:black%3bstroke:none%3bstroke-width:.09301235px%3bstroke-linecap:butt%3bstroke-linejoin:miter%3bstroke-opacity:1' d='m331.853 231.185 23.416-15.752 16.815-22.665z' transform='translate(-318.886 -180.595)'/%3e%3c/svg%3e"}),"Safari on iOS"]})})]})})}));var zs={exports:{}};!function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,u=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(u[0][s]>u[1][s])return 1;if(u[0][s]===u[1][s]){if(s===a)return 0;s-=1}else if(u[0][s]<u[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=u(n(92)),i=u(n(93)),o=u(n(94)),s=u(n(95)),a=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)})),r>0){var s=Object.keys(n),u=a.default.find(s,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var l=a.default.find(s,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}(zs);var Fs=f(zs.exports);function Bs(){const e=Fs.getParser(window.navigator.userAgent),t=e.getOS(),n=e.getBrowser(),{type:r}=e.getPlatform();return function(){var e,t;return"isBrave"===(null===(t=null===(e=window.navigator.brave)||void 0===e?void 0:e.isBrave)||void 0===t?void 0:t.name)}()&&(n.name="Brave"),{type:r,os:t,browser:n}}let Hs=null;function qs(e,t){if(!Hs){const e=document.body,t=document.createElement("div");t.className="ledger-ck-modal",e.appendChild(t),Hs=ns(t)}if(Hs&&e){let n;switch(e){case"UseLedgerLiveModal":n=y.exports.jsx(Ms,Object.assign({},t));break;case"PlatformNotSupportedModal":n=y.exports.jsx(Ds,{});break;case"ExtensionInstallModal":n=y.exports.jsx(hs,Object.assign({},t))}Hs.render(n)}Jo(!0)}function Vs(e){const t=Bs(),n=(nl("getSupportResult"),rl);Kc(),!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))&&n.isLedgerConnectSupported&&n.isChainIdSupported?qs("ExtensionInstallModal",{onClose:e.onClose}):qs("UseLedgerLiveModal",{isDesktop:"desktop"===t.type,uri:e.uri,onClose:e.onClose})}const $s=r("WalletConnectLegacy"),Ws=i("WalletConnectLegacy");function Ks(){return c(this,void 0,void 0,(function*(){$s("getWalletConnectLegacyProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){$s("initWalletConnectLegacyProvider");const e=Kc();return $s("walletConnectProviderOptions is",e),$s("created a new legacy provider instance"),new g({chainId:e.chainId,bridge:e.bridge,infuraId:e.infuraId,rpc:e.rpc,qrcode:!1})}))}();return function(e){function t(e){$s("connectHandler",e),Jo(!1)}function n(t,r){$s("disconnectHandler",t,r),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect"),e.removeListener("disconnect",n)}$s("assignWalletConnectLegacyProviderEvents"),e.on("connect",t),e.on("disconnect",n)}(e),e.request=function(e){$s("patchWalletConnectLegacyProviderRequest");const t=e.request.bind(e),n=Kc();return function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?($s("calling patched",r,i),new Promise(((o,s)=>c(this,void 0,void 0,(function*(){try{if(!e.connected)return yield e.connector.createSession({chainId:n.chainId}),$s("created a new session"),Vs({uri:e.connector.uri,onClose:()=>{Ws("user rejected"),s(new a)}}),o(yield t({method:r,params:i}));$s("reusing existing session"),o(yield t({method:r,params:i}))}catch(e){return Ws("error",e),s(e)}}))))):($s("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw Ws("error",t),t}}))}var Gs,Ys={exports:{}},Qs="object"==typeof Reflect?Reflect:null,Js=Qs&&"function"==typeof Qs.apply?Qs.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};Gs=Qs&&"function"==typeof Qs.ownKeys?Qs.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var Xs=Number.isNaN||function(e){return e!=e};function Zs(){Zs.init.call(this)}Ys.exports=Zs,Ys.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}ca(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&ca(e,"error",t,n)}(e,i,{once:!0})}))},Zs.EventEmitter=Zs,Zs.prototype._events=void 0,Zs.prototype._eventsCount=0,Zs.prototype._maxListeners=void 0;var ea=10;function ta(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function na(e){return void 0===e._maxListeners?Zs.defaultMaxListeners:e._maxListeners}function ra(e,t,n,r){var i,o,s,a;if(ta(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=na(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function ia(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function oa(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=ia.bind(r);return i.listener=n,r.wrapFn=i,i}function sa(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):ua(i,i.length)}function aa(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function ua(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function ca(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(Zs,"defaultMaxListeners",{enumerable:!0,get:function(){return ea},set:function(e){if("number"!=typeof e||e<0||Xs(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ea=e}}),Zs.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Zs.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||Xs(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Zs.prototype.getMaxListeners=function(){return na(this)},Zs.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)Js(a,this,t);else{var u=a.length,c=ua(a,u);for(n=0;n<u;++n)Js(c[n],this,t)}return!0},Zs.prototype.addListener=function(e,t){return ra(this,e,t,!1)},Zs.prototype.on=Zs.prototype.addListener,Zs.prototype.prependListener=function(e,t){return ra(this,e,t,!0)},Zs.prototype.once=function(e,t){return ta(t),this.on(e,oa(this,e,t)),this},Zs.prototype.prependOnceListener=function(e,t){return ta(t),this.prependListener(e,oa(this,e,t)),this},Zs.prototype.removeListener=function(e,t){var n,r,i,o,s;if(ta(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},Zs.prototype.off=Zs.prototype.removeListener,Zs.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},Zs.prototype.listeners=function(e){return sa(this,e,!0)},Zs.prototype.rawListeners=function(e){return sa(this,e,!1)},Zs.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):aa.call(e,t)},Zs.prototype.listenerCount=aa,Zs.prototype.eventNames=function(){return this._eventsCount>0?Gs(this._events):[]};var la={},fa={},ha={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(ha),Object.defineProperty(fa,"__esModule",{value:!0});var da=ha;function pa(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function ga(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function ya(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function va(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function ma(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function _a(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function ba(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function wa(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function Ea(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),ba(e/4294967296>>>0,t,n),ba(e>>>0,t,n+4),t}function Sa(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),wa(e>>>0,t,n),wa(e/4294967296>>>0,t,n+4),t}fa.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},fa.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},fa.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},fa.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},fa.writeUint16BE=pa,fa.writeInt16BE=pa,fa.writeUint16LE=ga,fa.writeInt16LE=ga,fa.readInt32BE=ya,fa.readUint32BE=va,fa.readInt32LE=ma,fa.readUint32LE=_a,fa.writeUint32BE=ba,fa.writeInt32BE=ba,fa.writeUint32LE=wa,fa.writeInt32LE=wa,fa.readInt64BE=function(e,t){void 0===t&&(t=0);var n=ya(e,t),r=ya(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},fa.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*va(e,t)+va(e,t+4)},fa.readInt64LE=function(e,t){void 0===t&&(t=0);var n=ma(e,t);return 4294967296*ma(e,t+4)+n-4294967296*(n>>31)},fa.readUint64LE=function(e,t){void 0===t&&(t=0);var n=_a(e,t);return 4294967296*_a(e,t+4)+n},fa.writeUint64BE=Ea,fa.writeInt64BE=Ea,fa.writeUint64LE=Sa,fa.writeInt64LE=Sa,fa.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},fa.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},fa.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!da.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=e/8+r-1;o>=r;o--)n[o]=t/i&255,i*=256;return n},fa.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!da.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+e/8;o++)n[o]=t/i&255,i*=256;return n},fa.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},fa.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},fa.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},fa.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},fa.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},fa.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},fa.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},fa.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t};var Oa={};Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(la,"__esModule",{value:!0});var xa=fa,Ia=Oa,Ra=20;function ka(e,t,n){for(var r=1634760805,i=857760878,o=2036477234,s=1797285236,a=n[3]<<24|n[2]<<16|n[1]<<8|n[0],u=n[7]<<24|n[6]<<16|n[5]<<8|n[4],c=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],f=n[19]<<24|n[18]<<16|n[17]<<8|n[16],h=n[23]<<24|n[22]<<16|n[21]<<8|n[20],d=n[27]<<24|n[26]<<16|n[25]<<8|n[24],p=n[31]<<24|n[30]<<16|n[29]<<8|n[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],v=t[11]<<24|t[10]<<16|t[9]<<8|t[8],m=t[15]<<24|t[14]<<16|t[13]<<8|t[12],_=r,b=i,w=o,E=s,S=a,O=u,x=c,I=l,R=f,k=h,C=d,P=p,A=g,N=y,T=v,M=m,L=0;L<Ra;L+=2)S=(S^=R=R+(A=(A^=_=_+S|0)>>>16|A<<16)|0)>>>20|S<<12,O=(O^=k=k+(N=(N^=b=b+O|0)>>>16|N<<16)|0)>>>20|O<<12,x=(x^=C=C+(T=(T^=w=w+x|0)>>>16|T<<16)|0)>>>20|x<<12,I=(I^=P=P+(M=(M^=E=E+I|0)>>>16|M<<16)|0)>>>20|I<<12,x=(x^=C=C+(T=(T^=w=w+x|0)>>>24|T<<8)|0)>>>25|x<<7,I=(I^=P=P+(M=(M^=E=E+I|0)>>>24|M<<8)|0)>>>25|I<<7,O=(O^=k=k+(N=(N^=b=b+O|0)>>>24|N<<8)|0)>>>25|O<<7,S=(S^=R=R+(A=(A^=_=_+S|0)>>>24|A<<8)|0)>>>25|S<<7,O=(O^=C=C+(M=(M^=_=_+O|0)>>>16|M<<16)|0)>>>20|O<<12,x=(x^=P=P+(A=(A^=b=b+x|0)>>>16|A<<16)|0)>>>20|x<<12,I=(I^=R=R+(N=(N^=w=w+I|0)>>>16|N<<16)|0)>>>20|I<<12,S=(S^=k=k+(T=(T^=E=E+S|0)>>>16|T<<16)|0)>>>20|S<<12,I=(I^=R=R+(N=(N^=w=w+I|0)>>>24|N<<8)|0)>>>25|I<<7,S=(S^=k=k+(T=(T^=E=E+S|0)>>>24|T<<8)|0)>>>25|S<<7,x=(x^=P=P+(A=(A^=b=b+x|0)>>>24|A<<8)|0)>>>25|x<<7,O=(O^=C=C+(M=(M^=_=_+O|0)>>>24|M<<8)|0)>>>25|O<<7;xa.writeUint32LE(_+r|0,e,0),xa.writeUint32LE(b+i|0,e,4),xa.writeUint32LE(w+o|0,e,8),xa.writeUint32LE(E+s|0,e,12),xa.writeUint32LE(S+a|0,e,16),xa.writeUint32LE(O+u|0,e,20),xa.writeUint32LE(x+c|0,e,24),xa.writeUint32LE(I+l|0,e,28),xa.writeUint32LE(R+f|0,e,32),xa.writeUint32LE(k+h|0,e,36),xa.writeUint32LE(C+d|0,e,40),xa.writeUint32LE(P+p|0,e,44),xa.writeUint32LE(A+g|0,e,48),xa.writeUint32LE(N+y|0,e,52),xa.writeUint32LE(T+v|0,e,56),xa.writeUint32LE(M+m|0,e,60)}function Ca(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var o,s;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=(o=new Uint8Array(16)).length-t.length,o.set(t,s)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");o=t,s=i}for(var a=new Uint8Array(64),u=0;u<n.length;u+=64){ka(a,o,e);for(var c=u;c<u+64&&c<n.length;c++)r[c]=n[c]^a[c-u];Pa(o,0,s)}return Ia.wipe(a),0===i&&Ia.wipe(o),r}function Pa(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}la.streamXOR=Ca,la.stream=function(e,t,n,r){return void 0===r&&(r=0),Ia.wipe(n),Ca(e,t,n,n,r)};var Aa={},Na={};function Ta(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(Na,"__esModule",{value:!0}),Na.select=function(e,t,n){return~(e-1)&t|e-1&n},Na.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},Na.compare=Ta,Na.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==Ta(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Na,n=Oa;e.DIGEST_LENGTH=16;var r=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=t[10]|t[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var u=t[12]|t[13]<<8;this._r[7]=8065&(a>>>11|u<<5);var c=t[14]|t[15]<<8;this._r[8]=8191&(u>>>8|c<<8),this._r[9]=c>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],u=this._h[4],c=this._h[5],l=this._h[6],f=this._h[7],h=this._h[8],d=this._h[9],p=this._r[0],g=this._r[1],y=this._r[2],v=this._r[3],m=this._r[4],_=this._r[5],b=this._r[6],w=this._r[7],E=this._r[8],S=this._r[9];n>=16;){var O=e[t+0]|e[t+1]<<8;i+=8191&O;var x=e[t+2]|e[t+3]<<8;o+=8191&(O>>>13|x<<3);var I=e[t+4]|e[t+5]<<8;s+=8191&(x>>>10|I<<6);var R=e[t+6]|e[t+7]<<8;a+=8191&(I>>>7|R<<9);var k=e[t+8]|e[t+9]<<8;u+=8191&(R>>>4|k<<12),c+=k>>>1&8191;var C=e[t+10]|e[t+11]<<8;l+=8191&(k>>>14|C<<2);var P=e[t+12]|e[t+13]<<8;f+=8191&(C>>>11|P<<5);var A=e[t+14]|e[t+15]<<8,N=0,T=N;T+=i*p,T+=o*(5*S),T+=s*(5*E),T+=a*(5*w),N=(T+=u*(5*b))>>>13,T&=8191,T+=c*(5*_),T+=l*(5*m),T+=f*(5*v),T+=(h+=8191&(P>>>8|A<<8))*(5*y);var M=N+=(T+=(d+=A>>>5|r)*(5*g))>>>13;M+=i*g,M+=o*p,M+=s*(5*S),M+=a*(5*E),N=(M+=u*(5*w))>>>13,M&=8191,M+=c*(5*b),M+=l*(5*_),M+=f*(5*m),M+=h*(5*v),N+=(M+=d*(5*y))>>>13,M&=8191;var L=N;L+=i*y,L+=o*g,L+=s*p,L+=a*(5*S),N=(L+=u*(5*E))>>>13,L&=8191,L+=c*(5*w),L+=l*(5*b),L+=f*(5*_),L+=h*(5*m);var j=N+=(L+=d*(5*v))>>>13;j+=i*v,j+=o*y,j+=s*g,j+=a*p,N=(j+=u*(5*S))>>>13,j&=8191,j+=c*(5*E),j+=l*(5*w),j+=f*(5*b),j+=h*(5*_);var U=N+=(j+=d*(5*m))>>>13;U+=i*m,U+=o*v,U+=s*y,U+=a*g,N=(U+=u*p)>>>13,U&=8191,U+=c*(5*S),U+=l*(5*E),U+=f*(5*w),U+=h*(5*b);var D=N+=(U+=d*(5*_))>>>13;D+=i*_,D+=o*m,D+=s*v,D+=a*y,N=(D+=u*g)>>>13,D&=8191,D+=c*p,D+=l*(5*S),D+=f*(5*E),D+=h*(5*w);var z=N+=(D+=d*(5*b))>>>13;z+=i*b,z+=o*_,z+=s*m,z+=a*v,N=(z+=u*y)>>>13,z&=8191,z+=c*g,z+=l*p,z+=f*(5*S),z+=h*(5*E);var F=N+=(z+=d*(5*w))>>>13;F+=i*w,F+=o*b,F+=s*_,F+=a*m,N=(F+=u*v)>>>13,F&=8191,F+=c*y,F+=l*g,F+=f*p,F+=h*(5*S);var B=N+=(F+=d*(5*E))>>>13;B+=i*E,B+=o*w,B+=s*b,B+=a*_,N=(B+=u*m)>>>13,B&=8191,B+=c*v,B+=l*y,B+=f*g,B+=h*p;var H=N+=(B+=d*(5*S))>>>13;H+=i*S,H+=o*E,H+=s*w,H+=a*b,N=(H+=u*_)>>>13,H&=8191,H+=c*m,H+=l*v,H+=f*y,H+=h*g,i=T=8191&(N=(N=((N+=(H+=d*p)>>>13)<<2)+N|0)+(T&=8191)|0),o=M+=N>>>=13,s=L&=8191,a=j&=8191,u=U&=8191,c=D&=8191,l=z&=8191,f=F&=8191,h=B&=8191,d=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=u,this._h[5]=c,this._h[6]=l,this._h[7]=f,this._h[8]=h,this._h[9]=d},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=n,n=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,s[0]=this._h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this._h[o]=this._h[o]&r|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(Aa),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=la,n=Aa,r=Oa,i=fa,o=Na;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var s=new Uint8Array(16),a=function(){function a(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return a.prototype.seal=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);t.stream(this._key,s,a,4);var u,c=n.length+this.tagLength;if(o){if(o.length!==c)throw new Error("ChaCha20Poly1305: incorrect destination length");u=o}else u=new Uint8Array(c);return t.streamXOR(this._key,s,n,u,4),this._authenticate(u.subarray(u.length-this.tagLength,u.length),a,u.subarray(0,u.length-this.tagLength),i),r.wipe(s),u},a.prototype.open=function(e,n,i,s){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var a=new Uint8Array(16);a.set(e,a.length-e.length);var u=new Uint8Array(32);t.stream(this._key,a,u,4);var c=new Uint8Array(this.tagLength);if(this._authenticate(c,u,n.subarray(0,n.length-this.tagLength),i),!o.equal(c,n.subarray(n.length-this.tagLength,n.length)))return null;var l,f=n.length-this.tagLength;if(s){if(s.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");l=s}else l=new Uint8Array(f);return t.streamXOR(this._key,a,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(a),l},a.prototype.clean=function(){return r.wipe(this._key),this},a.prototype._authenticate=function(e,t,o,a){var u=new n.Poly1305(t);a&&(u.update(a),a.length%16>0&&u.update(s.subarray(a.length%16))),u.update(o),o.length%16>0&&u.update(s.subarray(o.length%16));var c=new Uint8Array(8);a&&i.writeUint64LE(a.length,c),u.update(c),i.writeUint64LE(o.length,c),u.update(c);for(var l=u.digest(),f=0;f<l.length;f++)e[f]=l[f];u.clean(),r.wipe(l),r.wipe(c)},a}();e.ChaCha20Poly1305=a}({});var Ma={},La={},ja={};Object.defineProperty(ja,"__esModule",{value:!0}),ja.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(La,"__esModule",{value:!0});var Ua=ja,Da=Na,za=Oa,Fa=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;this._inner.update(n);for(r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),Ua.isSerializableHash(this._inner)&&Ua.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),za.wipe(n)}return e.prototype.reset=function(){if(!Ua.isSerializableHash(this._inner)||!Ua.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){Ua.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),Ua.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!Ua.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!Ua.isSerializableHash(this._inner)||!Ua.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!Ua.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();La.HMAC=Fa,La.hmac=function(e,t,n){var r=new Fa(e,t);r.update(n);var i=r.digest();return r.clean(),i},La.equal=Da.equal,Object.defineProperty(Ma,"__esModule",{value:!0});var Ba=La,Ha=Oa,qa=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=Ba.hmac(this._hash,n,t);this._hmac=new Ba.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),Ha.wipe(this._buffer),Ha.wipe(this._counter),this._bufpos=0},e}();Ma.HKDF=qa;var Va={},$a={},Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.BrowserRandomSource=void 0;function Ka(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}Wa.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var Ga={},Ya=h(Object.freeze({__proto__:null,default:{}}));Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.NodeRandomSource=void 0;const Qa=Oa;Ga.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==Ka){const e=Ya;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,Qa.wipe)(t),n}},Object.defineProperty($a,"__esModule",{value:!0}),$a.SystemRandomSource=void 0;const Ja=Wa,Xa=Ga;$a.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new Ja.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new Xa.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=$a,n=fa,r=Oa;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const o=i(4,t),s=(0,n.readUint32LE)(o);return(0,r.wipe)(o),s};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(t,n=o,s=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let a="";const u=n.length,c=256-256%u;for(;t>0;){const e=i(Math.ceil(256*t/c),s);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<c&&(a+=n.charAt(i%u),t--)}(0,r.wipe)(e)}return a}e.randomString=s,e.randomStringForEntropy=function(t,n=o,r=e.defaultRandomSource){return s(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(Va);!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=fa,n=Oa;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=o(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,s=n<<3,a=n%64<56?64:128;this._buffer[r]=128;for(var u=r+1;u<a-8;u++)this._buffer[u]=0;t.writeUint32BE(i,this._buffer,a-8),t.writeUint32BE(s,this._buffer,a-4),o(this._temp,this._state,this._buffer,0,a),this._finished=!0}for(u=0;u<this.digestLength/4;u++)t.writeUint32BE(this._state[u],e,4*u);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(e,n,r,o,s){for(;s>=64;){for(var a=n[0],u=n[1],c=n[2],l=n[3],f=n[4],h=n[5],d=n[6],p=n[7],g=0;g<16;g++){var y=o+4*g;e[g]=t.readUint32BE(r,y)}for(g=16;g<64;g++){var v=e[g-2],m=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,_=((v=e[g-15])>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;e[g]=(m+e[g-7]|0)+(_+e[g-16]|0)}for(g=0;g<64;g++){m=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&h^~f&d)|0)+(p+(i[g]+e[g]|0)|0)|0,_=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&u^a&c^u&c)|0;p=d,d=h,h=f,f=l+m|0,l=c,c=u,u=a,a=m+_|0}n[0]+=a,n[1]+=u,n[2]+=c,n[3]+=l,n[4]+=f,n[5]+=h,n[6]+=d,n[7]+=p,o+=64,s-=64}return o}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}({});!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=Va,n=Oa;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const o=r([56129,1]);function s(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function a(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function l(e,t,n){let r,i,o=0,s=0,a=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,v=0,m=0,_=0,b=0,w=0,E=0,S=0,O=0,x=0,I=0,R=0,k=0,C=0,P=0,A=0,N=0,T=0,M=0,L=0,j=n[0],U=n[1],D=n[2],z=n[3],F=n[4],B=n[5],H=n[6],q=n[7],V=n[8],$=n[9],W=n[10],K=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];r=t[0],o+=r*j,s+=r*U,a+=r*D,u+=r*z,c+=r*F,l+=r*B,f+=r*H,h+=r*q,d+=r*V,p+=r*$,g+=r*W,y+=r*K,v+=r*G,m+=r*Y,_+=r*Q,b+=r*J,r=t[1],s+=r*j,a+=r*U,u+=r*D,c+=r*z,l+=r*F,f+=r*B,h+=r*H,d+=r*q,p+=r*V,g+=r*$,y+=r*W,v+=r*K,m+=r*G,_+=r*Y,b+=r*Q,w+=r*J,r=t[2],a+=r*j,u+=r*U,c+=r*D,l+=r*z,f+=r*F,h+=r*B,d+=r*H,p+=r*q,g+=r*V,y+=r*$,v+=r*W,m+=r*K,_+=r*G,b+=r*Y,w+=r*Q,E+=r*J,r=t[3],u+=r*j,c+=r*U,l+=r*D,f+=r*z,h+=r*F,d+=r*B,p+=r*H,g+=r*q,y+=r*V,v+=r*$,m+=r*W,_+=r*K,b+=r*G,w+=r*Y,E+=r*Q,S+=r*J,r=t[4],c+=r*j,l+=r*U,f+=r*D,h+=r*z,d+=r*F,p+=r*B,g+=r*H,y+=r*q,v+=r*V,m+=r*$,_+=r*W,b+=r*K,w+=r*G,E+=r*Y,S+=r*Q,O+=r*J,r=t[5],l+=r*j,f+=r*U,h+=r*D,d+=r*z,p+=r*F,g+=r*B,y+=r*H,v+=r*q,m+=r*V,_+=r*$,b+=r*W,w+=r*K,E+=r*G,S+=r*Y,O+=r*Q,x+=r*J,r=t[6],f+=r*j,h+=r*U,d+=r*D,p+=r*z,g+=r*F,y+=r*B,v+=r*H,m+=r*q,_+=r*V,b+=r*$,w+=r*W,E+=r*K,S+=r*G,O+=r*Y,x+=r*Q,I+=r*J,r=t[7],h+=r*j,d+=r*U,p+=r*D,g+=r*z,y+=r*F,v+=r*B,m+=r*H,_+=r*q,b+=r*V,w+=r*$,E+=r*W,S+=r*K,O+=r*G,x+=r*Y,I+=r*Q,R+=r*J,r=t[8],d+=r*j,p+=r*U,g+=r*D,y+=r*z,v+=r*F,m+=r*B,_+=r*H,b+=r*q,w+=r*V,E+=r*$,S+=r*W,O+=r*K,x+=r*G,I+=r*Y,R+=r*Q,k+=r*J,r=t[9],p+=r*j,g+=r*U,y+=r*D,v+=r*z,m+=r*F,_+=r*B,b+=r*H,w+=r*q,E+=r*V,S+=r*$,O+=r*W,x+=r*K,I+=r*G,R+=r*Y,k+=r*Q,C+=r*J,r=t[10],g+=r*j,y+=r*U,v+=r*D,m+=r*z,_+=r*F,b+=r*B,w+=r*H,E+=r*q,S+=r*V,O+=r*$,x+=r*W,I+=r*K,R+=r*G,k+=r*Y,C+=r*Q,P+=r*J,r=t[11],y+=r*j,v+=r*U,m+=r*D,_+=r*z,b+=r*F,w+=r*B,E+=r*H,S+=r*q,O+=r*V,x+=r*$,I+=r*W,R+=r*K,k+=r*G,C+=r*Y,P+=r*Q,A+=r*J,r=t[12],v+=r*j,m+=r*U,_+=r*D,b+=r*z,w+=r*F,E+=r*B,S+=r*H,O+=r*q,x+=r*V,I+=r*$,R+=r*W,k+=r*K,C+=r*G,P+=r*Y,A+=r*Q,N+=r*J,r=t[13],m+=r*j,_+=r*U,b+=r*D,w+=r*z,E+=r*F,S+=r*B,O+=r*H,x+=r*q,I+=r*V,R+=r*$,k+=r*W,C+=r*K,P+=r*G,A+=r*Y,N+=r*Q,T+=r*J,r=t[14],_+=r*j,b+=r*U,w+=r*D,E+=r*z,S+=r*F,O+=r*B,x+=r*H,I+=r*q,R+=r*V,k+=r*$,C+=r*W,P+=r*K,A+=r*G,N+=r*Y,T+=r*Q,M+=r*J,r=t[15],b+=r*j,w+=r*U,E+=r*D,S+=r*z,O+=r*F,x+=r*B,I+=r*H,R+=r*q,k+=r*V,C+=r*$,P+=r*W,A+=r*K,N+=r*G,T+=r*Y,M+=r*Q,L+=r*J,o+=38*w,s+=38*E,a+=38*S,u+=38*O,c+=38*x,l+=38*I,f+=38*R,h+=38*k,d+=38*C,p+=38*P,g+=38*A,y+=38*N,v+=38*T,m+=38*M,_+=38*L,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=v,e[13]=m,e[14]=_,e[15]=b}function f(e,t){l(e,t,t)}function h(e,t){const n=new Uint8Array(32),i=new Float64Array(80),h=r(),d=r(),p=r(),g=r(),y=r(),v=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)d[e]=i[e];h[0]=g[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;a(h,d,t),a(p,g,t),u(y,h,p),c(h,h,p),u(p,d,g),c(d,d,g),f(g,y),f(v,h),l(h,p,h),l(p,d,y),u(y,h,p),c(h,h,p),f(d,h),c(p,g,v),l(h,p,o),u(h,h,g),l(p,p,h),l(h,g,v),l(g,d,i),f(d,y),a(h,d,t),a(p,g,t)}for(let e=0;e<16;e++)i[e+16]=h[e],i[e+32]=p[e],i[e+48]=d[e],i[e+64]=g[e];const m=i.subarray(32),_=i.subarray(16);!function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)f(n,n),2!==e&&4!==e&&l(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(m,m),l(_,_,m);const b=new Uint8Array(32);return function(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];s(i),s(i),s(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,a(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}(b,_),b}function d(e){return h(e,i)}function p(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:d(n),secretKey:n}}e.scalarMult=h,e.scalarMultBase=d,e.generateKeyPairFromSeed=p,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=p(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(n.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=h(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}({});var Za=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=e.length,u=e.charAt(0),c=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===u;)r++,t++;for(var o=(e.length-t)*c+1>>>0,s=new Uint8Array(o);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f<i)&&-1!==h;h--,f++)l+=a*s[h]>>>0,s[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(r+(o-d)),g=r;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var s=(o-i)*l+1>>>0,c=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<r)&&-1!==d;d--,h++)f+=256*c[d]>>>0,c[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=h,i++}for(var p=s-r;p!==s&&0===c[p];)p++;for(var g=u.repeat(n);p<s;++p)g+=e.charAt(c[p]);return g},decodeUnsafe:f,decode:function(e){var n=f(e);if(n)return n;throw new Error(`Non-${t} character`)}}},eu=Za;const tu=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class nu{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class ru{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return ou(this,e)}}class iu{constructor(e){this.decoders=e}or(e){return ou(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const ou=(e,t)=>new iu({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class su{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new nu(e,t,n),this.decoder=new ru(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const au=({name:e,prefix:t,encode:n,decode:r})=>new su(e,t,n,r),uu=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=eu(n,t);return au({prefix:e,name:t,encode:r,decode:e=>tu(i(e))})},cu=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>au({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*n/8|0);let a=0,u=0,c=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);u=u<<n|o,a+=n,a>=8&&(a-=8,s[c++]=255&u>>a)}if(a>=n||255&u<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)});au({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});cu({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});cu({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});uu({prefix:"9",name:"base10",alphabet:"0123456789"});cu({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),cu({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});cu({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),cu({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),cu({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),cu({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),cu({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),cu({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),cu({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),cu({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),cu({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});uu({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),uu({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});uu({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),uu({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});cu({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),cu({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),cu({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),cu({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const lu=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),fu=lu.reduce(((e,t,n)=>(e[n]=t,e)),[]),hu=lu.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);au({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=fu[t]),"")},decode:function(e){const t=[];for(const n of e){const e=hu[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var du=function e(t,n,r){n=n||[];var i=r=r||0;for(;t>=yu;)n[r++]=255&t|pu,t/=128;for(;t&gu;)n[r++]=255&t|pu,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},pu=128,gu=-128,yu=Math.pow(2,31);var vu=function e(t,n){var r,i=0,o=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],i+=o<28?(r&_u)<<o:(r&_u)*Math.pow(2,o),o+=7}while(r>=mu);return e.bytes=s-n,i},mu=128,_u=127;var bu=Math.pow(2,7),wu=Math.pow(2,14),Eu=Math.pow(2,21),Su=Math.pow(2,28),Ou=Math.pow(2,35),xu=Math.pow(2,42),Iu=Math.pow(2,49),Ru=Math.pow(2,56),ku=Math.pow(2,63),Cu={encode:du,decode:vu,encodingLength:function(e){return e<bu?1:e<wu?2:e<Eu?3:e<Su?4:e<Ou?5:e<xu?6:e<Iu?7:e<Ru?8:e<ku?9:10}};const Pu=(e,t,n=0)=>(Cu.encode(e,t,n),t),Au=e=>Cu.encodingLength(e),Nu=(e,t)=>{const n=t.byteLength,r=Au(e),i=r+Au(n),o=new Uint8Array(i+n);return Pu(e,o,0),Pu(n,o,r),o.set(t,i),new Tu(e,n,t,o)};class Tu{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const Mu=({name:e,code:t,encode:n})=>new Lu(e,t,n);class Lu{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?Nu(this.code,t):t.then((e=>Nu(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ju=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));Mu({name:"sha2-256",code:18,encode:ju("SHA-256")}),Mu({name:"sha2-512",code:19,encode:ju("SHA-512")});new TextEncoder,new TextDecoder;var Uu=function(e,t){return Uu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Uu(e,t)};
238
238
  /*! *****************************************************************************
239
239
  Copyright (c) Microsoft Corporation.
240
240
 
@@ -326,7 +326,7 @@ PERFORMANCE OF THIS SOFTWARE.
326
326
  * Released under MIT license <https://lodash.com/license>
327
327
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
328
328
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
329
- */mg=bg,_g=bg.exports,function(){var e,n="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",l=1,f=2,h=4,d=1,p=2,g=1,y=2,v=4,m=8,_=16,b=32,w=64,E=128,S=256,O=512,x=30,I="...",R=800,k=16,C=1,P=2,A=3,N=1/0,T=9007199254740991,M=17976931348623157e292,L=NaN,j=4294967295,U=j-1,D=j>>>1,z=[["ary",E],["bind",g],["bindKey",y],["curry",m],["curryRight",_],["flip",O],["partial",b],["partialRight",w],["rearg",S]],F="[object Arguments]",B="[object Array]",H="[object AsyncFunction]",q="[object Boolean]",V="[object Date]",$="[object DOMException]",W="[object Error]",K="[object Function]",G="[object GeneratorFunction]",Y="[object Map]",Q="[object Number]",J="[object Null]",X="[object Object]",Z="[object Promise]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object Undefined]",se="[object WeakMap]",ae="[object WeakSet]",ue="[object ArrayBuffer]",ce="[object DataView]",le="[object Float32Array]",fe="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",pe="[object Int32Array]",ge="[object Uint8Array]",ye="[object Uint8ClampedArray]",ve="[object Uint16Array]",me="[object Uint32Array]",_e=/\b__p \+= '';/g,be=/\b(__p \+=) '' \+/g,we=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ee=/&(?:amp|lt|gt|quot|#39);/g,Se=/[&<>"']/g,Oe=RegExp(Ee.source),xe=RegExp(Se.source),Ie=/<%-([\s\S]+?)%>/g,Re=/<%([\s\S]+?)%>/g,ke=/<%=([\s\S]+?)%>/g,Ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/,Ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,Te=RegExp(Ne.source),Me=/^\s+/,Le=/\s/,je=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ue=/\{\n\/\* \[wrapped with (.+)\] \*/,De=/,? & /,ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/[()=,{}\[\]\/\s]/,Be=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qe=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,$e=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ke=/^0o[0-7]+$/i,Ge=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,Xe="\\ud800-\\udfff",Ze="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",et="\\u2700-\\u27bf",tt="a-z\\xdf-\\xf6\\xf8-\\xff",nt="A-Z\\xc0-\\xd6\\xd8-\\xde",rt="\\ufe0e\\ufe0f",it="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ot="['’]",st="["+Xe+"]",at="["+it+"]",ut="["+Ze+"]",ct="\\d+",lt="["+et+"]",ft="["+tt+"]",ht="[^"+Xe+it+ct+et+tt+nt+"]",dt="\\ud83c[\\udffb-\\udfff]",pt="[^"+Xe+"]",gt="(?:\\ud83c[\\udde6-\\uddff]){2}",yt="[\\ud800-\\udbff][\\udc00-\\udfff]",vt="["+nt+"]",mt="\\u200d",_t="(?:"+ft+"|"+ht+")",bt="(?:"+vt+"|"+ht+")",wt="(?:"+ot+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+ot+"(?:D|LL|M|RE|S|T|VE))?",St="(?:"+ut+"|"+dt+")?",Ot="["+rt+"]?",xt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rt=Ot+St+"(?:"+mt+"(?:"+[pt,gt,yt].join("|")+")"+Ot+St+")*",kt="(?:"+[lt,gt,yt].join("|")+")"+Rt,Ct="(?:"+[pt+ut+"?",ut,gt,yt,st].join("|")+")",Pt=RegExp(ot,"g"),At=RegExp(ut,"g"),Nt=RegExp(dt+"(?="+dt+")|"+Ct+Rt,"g"),Tt=RegExp([vt+"?"+ft+"+"+wt+"(?="+[at,vt,"$"].join("|")+")",bt+"+"+Et+"(?="+[at,vt+_t,"$"].join("|")+")",vt+"?"+_t+"+"+wt,vt+"+"+Et,It,xt,ct,kt].join("|"),"g"),Mt=RegExp("["+mt+Xe+Ze+rt+"]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ut=-1,Dt={};Dt[le]=Dt[fe]=Dt[he]=Dt[de]=Dt[pe]=Dt[ge]=Dt[ye]=Dt[ve]=Dt[me]=!0,Dt[F]=Dt[B]=Dt[ue]=Dt[q]=Dt[ce]=Dt[V]=Dt[W]=Dt[K]=Dt[Y]=Dt[Q]=Dt[X]=Dt[te]=Dt[ne]=Dt[re]=Dt[se]=!1;var zt={};zt[F]=zt[B]=zt[ue]=zt[ce]=zt[q]=zt[V]=zt[le]=zt[fe]=zt[he]=zt[de]=zt[pe]=zt[Y]=zt[Q]=zt[X]=zt[te]=zt[ne]=zt[re]=zt[ie]=zt[ge]=zt[ye]=zt[ve]=zt[me]=!0,zt[W]=zt[K]=zt[se]=!1;var Ft={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ht={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,$t=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Kt="object"==typeof self&&self&&self.Object===Object&&self,Gt=Wt||Kt||Function("return this")(),Yt=_g&&!_g.nodeType&&_g,Qt=Yt&&mg&&!mg.nodeType&&mg,Jt=Qt&&Qt.exports===Yt,Xt=Jt&&Wt.process,Zt=function(){try{return Qt&&Qt.require&&Qt.require("util").types||Xt&&Xt.binding&&Xt.binding("util")}catch{}}(),en=Zt&&Zt.isArrayBuffer,tn=Zt&&Zt.isDate,nn=Zt&&Zt.isMap,rn=Zt&&Zt.isRegExp,on=Zt&&Zt.isSet,sn=Zt&&Zt.isTypedArray;function an(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function un(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function cn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ln(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function fn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function hn(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function dn(e,t){return!(null==e||!e.length)&&xn(e,t,0)>-1}function pn(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function gn(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function yn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function vn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function mn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function _n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bn=Cn("length");function wn(e){return e.split("")}function En(e){return e.match(ze)||[]}function Sn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function On(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function xn(e,t,n){return t==t?tr(e,t,n):On(e,Rn,n)}function In(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Rn(e){return e!=e}function kn(e,t){var n=null==e?0:e.length;return n?Tn(e,t)/n:L}function Cn(t){return function(n){return null==n?e:n[t]}}function Pn(t){return function(n){return null==t?e:t[n]}}function An(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Nn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Tn(t,n){for(var r,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==e&&(r=r===e?s:r+s)}return r}function Mn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ln(e,t){return gn(t,(function(t){return[t,e[t]]}))}function jn(e){return e&&e.slice(0,or(e)+1).replace(Me,"")}function Un(e){return function(t){return e(t)}}function Dn(e,t){return gn(t,(function(t){return e[t]}))}function zn(e,t){return e.has(t)}function Fn(e,t){for(var n=-1,r=e.length;++n<r&&xn(t,e[n],0)>-1;);return n}function Bn(e,t){for(var n=e.length;n--&&xn(t,e[n],0)>-1;);return n}function Hn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var qn=Pn(Ft),Vn=Pn(Bt);function $n(e){return"\\"+qt[e]}function Wn(t,n){return null==t?e:t[n]}function Kn(e){return Mt.test(e)}function Gn(e){return Lt.test(e)}function Yn(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Qn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Jn(e,t){return function(n){return e(t(n))}}function Xn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];(s===t||s===c)&&(e[n]=c,o[i++]=n)}return o}function Zn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function er(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function tr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function nr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function rr(e){return Kn(e)?ar(e):bn(e)}function ir(e){return Kn(e)?ur(e):wn(e)}function or(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var sr=Pn(Ht);function ar(e){for(var t=Nt.lastIndex=0;Nt.test(e);)++t;return t}function ur(e){return e.match(Nt)||[]}function cr(e){return e.match(Tt)||[]}var lr=function t(Le){var ze=(Le=null==Le?Gt:fr.defaults(Gt.Object(),Le,fr.pick(Gt,jt))).Array,Xe=Le.Date,Ze=Le.Error,et=Le.Function,tt=Le.Math,nt=Le.Object,rt=Le.RegExp,it=Le.String,ot=Le.TypeError,st=ze.prototype,at=et.prototype,ut=nt.prototype,ct=Le["__core-js_shared__"],lt=at.toString,ft=ut.hasOwnProperty,ht=0,dt=function(){var e=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pt=ut.toString,gt=lt.call(nt),yt=Gt._,vt=rt("^"+lt.call(ft).replace(Ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=Jt?Le.Buffer:e,_t=Le.Symbol,bt=Le.Uint8Array,wt=mt?mt.allocUnsafe:e,Et=Jn(nt.getPrototypeOf,nt),St=nt.create,Ot=ut.propertyIsEnumerable,xt=st.splice,It=_t?_t.isConcatSpreadable:e,Rt=_t?_t.iterator:e,kt=_t?_t.toStringTag:e,Ct=function(){try{var e=Ks(nt,"defineProperty");return e({},"",{}),e}catch{}}(),Nt=Le.clearTimeout!==Gt.clearTimeout&&Le.clearTimeout,Tt=Xe&&Xe.now!==Gt.Date.now&&Xe.now,Mt=Le.setTimeout!==Gt.setTimeout&&Le.setTimeout,Lt=tt.ceil,Ft=tt.floor,Bt=nt.getOwnPropertySymbols,Ht=mt?mt.isBuffer:e,qt=Le.isFinite,Wt=st.join,Kt=Jn(nt.keys,nt),Yt=tt.max,Qt=tt.min,Xt=Xe.now,Zt=Le.parseInt,bn=tt.random,wn=st.reverse,Pn=Ks(Le,"DataView"),tr=Ks(Le,"Map"),ar=Ks(Le,"Promise"),ur=Ks(Le,"Set"),lr=Ks(Le,"WeakMap"),hr=Ks(nt,"create"),dr=lr&&new lr,pr={},gr=Na(Pn),yr=Na(tr),vr=Na(ar),mr=Na(ur),_r=Na(lr),br=_t?_t.prototype:e,wr=br?br.valueOf:e,Er=br?br.toString:e;function Sr(e){if(xl(e)&&!ul(e)&&!(e instanceof Rr)){if(e instanceof Ir)return e;if(ft.call(e,"__wrapped__"))return Ma(e)}return new Ir(e)}var Or=function(){function t(){}return function(n){if(!Ol(n))return{};if(St)return St(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function xr(){}function Ir(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Rr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function kr(){var e=new Rr(this.__wrapped__);return e.__actions__=is(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=is(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=is(this.__views__),e}function Cr(){if(this.__filtered__){var e=new Rr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e}function Pr(){var e=this.__wrapped__.value(),t=this.__dir__,n=ul(e),r=t<0,i=n?e.length:0,o=Xs(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,f=l.length,h=0,d=Qt(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return zo(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var g=-1,y=e[c+=t];++g<f;){var v=l[g],m=v.iteratee,_=v.type,b=m(y);if(_==P)y=b;else if(!b){if(_==C)continue e;break e}}p[h++]=y}return p}function Ar(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Nr(){this.__data__=hr?hr(null):{},this.size=0}function Tr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Mr(t){var n=this.__data__;if(hr){var r=n[t];return r===a?e:r}return ft.call(n,t)?n[t]:e}function Lr(t){var n=this.__data__;return hr?n[t]!==e:ft.call(n,t)}function jr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=hr&&n===e?a:n,this}function Ur(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dr(){this.__data__=[],this.size=0}function zr(e){var t=this.__data__,n=li(t,e);return!(n<0||(n==t.length-1?t.pop():xt.call(t,n,1),--this.size,0))}function Fr(t){var n=this.__data__,r=li(n,t);return r<0?e:n[r][1]}function Br(e){return li(this.__data__,e)>-1}function Hr(e,t){var n=this.__data__,r=li(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function qr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vr(){this.size=0,this.__data__={hash:new Ar,map:new(tr||Ur),string:new Ar}}function $r(e){var t=$s(this,e).delete(e);return this.size-=t?1:0,t}function Wr(e){return $s(this,e).get(e)}function Kr(e){return $s(this,e).has(e)}function Gr(e,t){var n=$s(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Yr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qr;++t<n;)this.add(e[t])}function Qr(e){return this.__data__.set(e,a),this}function Jr(e){return this.__data__.has(e)}function Xr(e){var t=this.__data__=new Ur(e);this.size=t.size}function Zr(){this.__data__=new Ur,this.size=0}function ei(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ti(e){return this.__data__.get(e)}function ni(e){return this.__data__.has(e)}function ri(e,t){var n=this.__data__;if(n instanceof Ur){var i=n.__data__;if(!tr||i.length<r-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new qr(i)}return n.set(e,t),this.size=n.size,this}function ii(e,t){var n=ul(e),r=!n&&al(e),i=!n&&!r&&dl(e),o=!n&&!r&&!i&&Fl(e),s=n||r||i||o,a=s?Mn(e.length,it):[],u=a.length;for(var c in e)(t||ft.call(e,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sa(c,u)))&&a.push(c);return a}function oi(t){var n=t.length;return n?t[mo(0,n-1)]:e}function si(e,t){return Ca(is(e),yi(t,0,e.length))}function ai(e){return Ca(is(e))}function ui(t,n,r){(r!==e&&!il(t[n],r)||r===e&&!(n in t))&&pi(t,n,r)}function ci(t,n,r){var i=t[n];(!ft.call(t,n)||!il(i,r)||r===e&&!(n in t))&&pi(t,n,r)}function li(e,t){for(var n=e.length;n--;)if(il(e[n][0],t))return n;return-1}function fi(e,t,n,r){return Ei(e,(function(e,i,o){t(r,e,n(e),o)})),r}function hi(e,t){return e&&os(t,Sf(t),e)}function di(e,t){return e&&os(t,Of(t),e)}function pi(e,t,n){"__proto__"==t&&Ct?Ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function gi(t,n){for(var r=-1,i=n.length,o=ze(i),s=null==t;++r<i;)o[r]=s?e:vf(t,n[r]);return o}function yi(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function vi(t,n,r,i,o,s){var a,u=n&l,c=n&f,d=n&h;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!Ol(t))return t;var p=ul(t);if(p){if(a=ta(t),!u)return is(t,a)}else{var g=Js(t),y=g==K||g==G;if(dl(t))return Go(t,u);if(g==X||g==F||y&&!o){if(a=c||y?{}:na(t),!u)return c?as(t,di(a,t)):ss(t,hi(a,t))}else{if(!zt[g])return o?t:{};a=ra(t,g,u)}}s||(s=new Xr);var v=s.get(t);if(v)return v;s.set(t,a),Ul(t)?t.forEach((function(e){a.add(vi(e,n,r,e,t,s))})):Il(t)&&t.forEach((function(e,i){a.set(i,vi(e,n,r,i,t,s))}));var m=p?e:(d?c?Fs:zs:c?Of:Sf)(t);return cn(m||t,(function(e,i){m&&(e=t[i=e]),ci(a,i,vi(e,n,r,i,t,s))})),a}function mi(e){var t=Sf(e);return function(n){return _i(n,e,t)}}function _i(t,n,r){var i=r.length;if(null==t)return!i;for(t=nt(t);i--;){var o=r[i],s=n[o],a=t[o];if(a===e&&!(o in t)||!s(a))return!1}return!0}function bi(t,n,r){if("function"!=typeof t)throw new ot(o);return xa((function(){t.apply(e,r)}),n)}function wi(e,t,n,i){var o=-1,s=dn,a=!0,u=e.length,c=[],l=t.length;if(!u)return c;n&&(t=gn(t,Un(n))),i?(s=pn,a=!1):t.length>=r&&(s=zn,a=!1,t=new Yr(t));e:for(;++o<u;){var f=e[o],h=null==n?f:n(f);if(f=i||0!==f?f:0,a&&h==h){for(var d=l;d--;)if(t[d]===h)continue e;c.push(f)}else s(t,h,i)||c.push(f)}return c}Sr.templateSettings={escape:Ie,evaluate:Re,interpolate:ke,variable:"",imports:{_:Sr}},Sr.prototype=xr.prototype,Sr.prototype.constructor=Sr,Ir.prototype=Or(xr.prototype),Ir.prototype.constructor=Ir,Rr.prototype=Or(xr.prototype),Rr.prototype.constructor=Rr,Ar.prototype.clear=Nr,Ar.prototype.delete=Tr,Ar.prototype.get=Mr,Ar.prototype.has=Lr,Ar.prototype.set=jr,Ur.prototype.clear=Dr,Ur.prototype.delete=zr,Ur.prototype.get=Fr,Ur.prototype.has=Br,Ur.prototype.set=Hr,qr.prototype.clear=Vr,qr.prototype.delete=$r,qr.prototype.get=Wr,qr.prototype.has=Kr,qr.prototype.set=Gr,Yr.prototype.add=Yr.prototype.push=Qr,Yr.prototype.has=Jr,Xr.prototype.clear=Zr,Xr.prototype.delete=ei,Xr.prototype.get=ti,Xr.prototype.has=ni,Xr.prototype.set=ri;var Ei=ls(Ai),Si=ls(Ni,!0);function Oi(e,t){var n=!0;return Ei(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function xi(t,n,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n(s);if(null!=a&&(u===e?a==a&&!zl(a):r(a,u)))var u=a,c=s}return c}function Ii(t,n,r,i){var o=t.length;for((r=Gl(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:Gl(i))<0&&(i+=o),i=r>i?0:Yl(i);r<i;)t[r++]=n;return t}function Ri(e,t){var n=[];return Ei(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function ki(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=oa),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?ki(a,t-1,n,r,i):yn(i,a):r||(i[i.length]=a)}return i}var Ci=fs(),Pi=fs(!0);function Ai(e,t){return e&&Ci(e,t,Sf)}function Ni(e,t){return e&&Pi(e,t,Sf)}function Ti(e,t){return hn(t,(function(t){return wl(e[t])}))}function Mi(t,n){for(var r=0,i=(n=Vo(n,t)).length;null!=t&&r<i;)t=t[Aa(n[r++])];return r&&r==i?t:e}function Li(e,t,n){var r=t(e);return ul(e)?r:yn(r,n(e))}function ji(t){return null==t?t===e?oe:J:kt&&kt in nt(t)?Gs(t):_a(t)}function Ui(e,t){return e>t}function Di(e,t){return null!=e&&ft.call(e,t)}function zi(e,t){return null!=e&&t in nt(e)}function Fi(e,t,n){return e>=Qt(t,n)&&e<Yt(t,n)}function Bi(t,n,r){for(var i=r?pn:dn,o=t[0].length,s=t.length,a=s,u=ze(s),c=1/0,l=[];a--;){var f=t[a];a&&n&&(f=gn(f,Un(n))),c=Qt(f.length,c),u[a]=!r&&(n||o>=120&&f.length>=120)?new Yr(a&&f):e}f=t[0];var h=-1,d=u[0];e:for(;++h<o&&l.length<c;){var p=f[h],g=n?n(p):p;if(p=r||0!==p?p:0,!(d?zn(d,g):i(l,g,r))){for(a=s;--a;){var y=u[a];if(!(y?zn(y,g):i(t[a],g,r)))continue e}d&&d.push(g),l.push(p)}}return l}function Hi(e,t,n,r){return Ai(e,(function(e,i,o){t(r,n(e),i,o)})),r}function qi(t,n,r){var i=null==(t=wa(t,n=Vo(n,t)))?t:t[Aa(ou(n))];return null==i?e:an(i,t,r)}function Vi(e){return xl(e)&&ji(e)==F}function $i(e){return xl(e)&&ji(e)==ue}function Wi(e){return xl(e)&&ji(e)==V}function Ki(e,t,n,r,i){return e===t||(null==e||null==t||!xl(e)&&!xl(t)?e!=e&&t!=t:Gi(e,t,n,r,Ki,i))}function Gi(e,t,n,r,i,o){var s=ul(e),a=ul(t),u=s?B:Js(e),c=a?B:Js(t),l=(u=u==F?X:u)==X,f=(c=c==F?X:c)==X,h=u==c;if(h&&dl(e)){if(!dl(t))return!1;s=!0,l=!1}if(h&&!l)return o||(o=new Xr),s||Fl(e)?Ls(e,t,n,r,i,o):js(e,t,u,n,r,i,o);if(!(n&d)){var p=l&&ft.call(e,"__wrapped__"),g=f&&ft.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,v=g?t.value():t;return o||(o=new Xr),i(y,v,n,r,o)}}return!!h&&(o||(o=new Xr),Us(e,t,n,r,i,o))}function Yi(e){return xl(e)&&Js(e)==Y}function Qi(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=nt(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var c=(u=r[o])[0],l=t[c],f=u[1];if(a&&u[2]){if(l===e&&!(c in t))return!1}else{var h=new Xr;if(i)var g=i(l,f,c,t,n,h);if(!(g===e?Ki(f,l,d|p,i,h):g))return!1}}return!0}function Ji(e){return!(!Ol(e)||fa(e))&&(wl(e)?vt:We).test(Na(e))}function Xi(e){return xl(e)&&ji(e)==te}function Zi(e){return xl(e)&&Js(e)==ne}function eo(e){return xl(e)&&Sl(e.length)&&!!Dt[ji(e)]}function to(e){return"function"==typeof e?e:null==e?Ah:"object"==typeof e?ul(e)?ao(e[0],e[1]):so(e):Vh(e)}function no(e){if(!da(e))return Kt(e);var t=[];for(var n in nt(e))ft.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ro(e){if(!Ol(e))return ma(e);var t=da(e),n=[];for(var r in e)"constructor"==r&&(t||!ft.call(e,r))||n.push(r);return n}function io(e,t){return e<t}function oo(e,t){var n=-1,r=ll(e)?ze(e.length):[];return Ei(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function so(e){var t=Ws(e);return 1==t.length&&t[0][2]?ga(t[0][0],t[0][1]):function(n){return n===e||Qi(n,e,t)}}function ao(t,n){return ua(t)&&pa(n)?ga(Aa(t),n):function(r){var i=vf(r,t);return i===e&&i===n?_f(r,t):Ki(n,i,d|p)}}function uo(t,n,r,i,o){t!==n&&Ci(n,(function(s,a){if(o||(o=new Xr),Ol(s))co(t,n,a,r,uo,i,o);else{var u=i?i(Sa(t,a),s,a+"",t,n,o):e;u===e&&(u=s),ui(t,a,u)}}),Of)}function co(t,n,r,i,o,s,a){var u=Sa(t,r),c=Sa(n,r),l=a.get(c);if(l)ui(t,r,l);else{var f=s?s(u,c,r+"",t,n,a):e,h=f===e;if(h){var d=ul(c),p=!d&&dl(c),g=!d&&!p&&Fl(c);f=c,d||p||g?ul(u)?f=u:fl(u)?f=is(u):p?(h=!1,f=Go(c,!0)):g?(h=!1,f=Zo(c,!0)):f=[]:Ml(c)||al(c)?(f=u,al(u)?f=Jl(u):(!Ol(u)||wl(u))&&(f=na(c))):h=!1}h&&(a.set(c,f),o(f,c,i,s,a),a.delete(c)),ui(t,r,f)}}function lo(t,n){var r=t.length;if(r)return sa(n+=n<0?r:0,r)?t[n]:e}function fo(e,t,n){t=t.length?gn(t,(function(e){return ul(e)?function(t){return Mi(t,1===e.length?e[0]:e)}:e})):[Ah];var r=-1;t=gn(t,Un(Vs()));var i=oo(e,(function(e,n,i){var o=gn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return Nn(i,(function(e,t){return ts(e,t,n)}))}function ho(e,t){return po(e,t,(function(t,n){return _f(e,n)}))}function po(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Mi(e,s);n(a,s)&&Oo(o,Vo(s,e),a)}return o}function go(e){return function(t){return Mi(t,e)}}function yo(e,t,n,r){var i=r?In:xn,o=-1,s=t.length,a=e;for(e===t&&(t=is(t)),n&&(a=gn(e,Un(n)));++o<s;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&xt.call(a,u,1),xt.call(e,u,1);return e}function vo(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;sa(i)?xt.call(e,i,1):jo(e,i)}}return e}function mo(e,t){return e+Ft(bn()*(t-e+1))}function _o(e,t,n,r){for(var i=-1,o=Yt(Lt((t-e)/(n||1)),0),s=ze(o);o--;)s[r?o:++i]=e,e+=n;return s}function bo(e,t){var n="";if(!e||t<1||t>T)return n;do{t%2&&(n+=e),(t=Ft(t/2))&&(e+=e)}while(t);return n}function wo(e,t){return Ia(ba(e,t,Ah),e+"")}function Eo(e){return oi(Hf(e))}function So(e,t){var n=Hf(e);return Ca(n,yi(t,0,n.length))}function Oo(t,n,r,i){if(!Ol(t))return t;for(var o=-1,s=(n=Vo(n,t)).length,a=s-1,u=t;null!=u&&++o<s;){var c=Aa(n[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var f=u[c];(l=i?i(f,c,u):e)===e&&(l=Ol(f)?f:sa(n[o+1])?[]:{})}ci(u,c,l),u=u[c]}return t}var xo=dr?function(e,t){return dr.set(e,t),e}:Ah,Io=Ct?function(e,t){return Ct(e,"toString",{configurable:!0,enumerable:!1,value:Rh(t),writable:!0})}:Ah;function Ro(e){return Ca(Hf(e))}function ko(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=ze(i);++r<i;)o[r]=e[r+t];return o}function Co(e,t){var n;return Ei(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Po(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=D){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!zl(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return Ao(e,t,Ah,n)}function Ao(t,n,r,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(n=r(n))!=n,u=null===n,c=zl(n),l=n===e;o<s;){var f=Ft((o+s)/2),h=r(t[f]),d=h!==e,p=null===h,g=h==h,y=zl(h);if(a)var v=i||g;else v=l?g&&(i||d):u?g&&d&&(i||!p):c?g&&d&&!p&&(i||!y):!p&&!y&&(i?h<=n:h<n);v?o=f+1:s=f}return Qt(s,U)}function No(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!il(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function To(e){return"number"==typeof e?e:zl(e)?L:+e}function Mo(e){if("string"==typeof e)return e;if(ul(e))return gn(e,Mo)+"";if(zl(e))return Er?Er.call(e):"";var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Lo(e,t,n){var i=-1,o=dn,s=e.length,a=!0,u=[],c=u;if(n)a=!1,o=pn;else if(s>=r){var l=t?null:Cs(e);if(l)return Zn(l);a=!1,o=zn,c=new Yr}else c=t?[]:u;e:for(;++i<s;){var f=e[i],h=t?t(f):f;if(f=n||0!==f?f:0,a&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue e;t&&c.push(h),u.push(f)}else o(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u}function jo(e,t){return null==(e=wa(e,t=Vo(t,e)))||delete e[Aa(ou(t))]}function Uo(e,t,n,r){return Oo(e,t,n(Mi(e,t)),r)}function Do(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ko(e,r?0:o,r?o+1:i):ko(e,r?o+1:0,r?i:o)}function zo(e,t){var n=e;return n instanceof Rr&&(n=n.value()),vn(t,(function(e,t){return t.func.apply(t.thisArg,yn([e],t.args))}),n)}function Fo(e,t,n){var r=e.length;if(r<2)return r?Lo(e[0]):[];for(var i=-1,o=ze(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=wi(o[i]||s,e[a],t,n));return Lo(ki(o,1),t,n)}function Bo(t,n,r){for(var i=-1,o=t.length,s=n.length,a={};++i<o;){var u=i<s?n[i]:e;r(a,t[i],u)}return a}function Ho(e){return fl(e)?e:[]}function qo(e){return"function"==typeof e?e:Ah}function Vo(e,t){return ul(e)?e:ua(e,t)?[e]:Pa(Zl(e))}var $o=wo;function Wo(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:ko(t,n,r)}var Ko=Nt||function(e){return Gt.clearTimeout(e)};function Go(e,t){if(t)return e.slice();var n=e.length,r=wt?wt(n):new e.constructor(n);return e.copy(r),r}function Yo(e){var t=new e.constructor(e.byteLength);return new bt(t).set(new bt(e)),t}function Qo(e,t){var n=t?Yo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Jo(e){var t=new e.constructor(e.source,qe.exec(e));return t.lastIndex=e.lastIndex,t}function Xo(e){return wr?nt(wr.call(e)):{}}function Zo(e,t){var n=t?Yo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function es(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=zl(t),a=n!==e,u=null===n,c=n==n,l=zl(n);if(!u&&!l&&!s&&t>n||s&&a&&c&&!u&&!l||i&&a&&c||!r&&c||!o)return 1;if(!i&&!s&&!l&&t<n||l&&r&&o&&!i&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function ts(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=es(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}function ns(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,u=t.length,c=Yt(o-s,0),l=ze(u+c),f=!r;++a<u;)l[a]=t[a];for(;++i<s;)(f||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[a++]=e[i++];return l}function rs(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,u=-1,c=t.length,l=Yt(o-a,0),f=ze(l+c),h=!r;++i<l;)f[i]=e[i];for(var d=i;++u<c;)f[d+u]=t[u];for(;++s<a;)(h||i<o)&&(f[d+n[s]]=e[i++]);return f}function is(e,t){var n=-1,r=e.length;for(t||(t=ze(r));++n<r;)t[n]=e[n];return t}function os(t,n,r,i){var o=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var u=n[s],c=i?i(r[u],t[u],u,r,t):e;c===e&&(c=t[u]),o?pi(r,u,c):ci(r,u,c)}return r}function ss(e,t){return os(e,Ys(e),t)}function as(e,t){return os(e,Qs(e),t)}function us(e,t){return function(n,r){var i=ul(n)?un:fi,o=t?t():{};return i(n,e,Vs(r,2),o)}}function cs(t){return wo((function(n,r){var i=-1,o=r.length,s=o>1?r[o-1]:e,a=o>2?r[2]:e;for(s=t.length>3&&"function"==typeof s?(o--,s):e,a&&aa(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=nt(n);++i<o;){var u=r[i];u&&t(n,u,i,s)}return n}))}function ls(e,t){return function(n,r){if(null==n)return n;if(!ll(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=nt(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function fs(e){return function(t,n,r){for(var i=-1,o=nt(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function hs(e,t,n){var r=t&g,i=gs(e);function o(){return(this&&this!==Gt&&this instanceof o?i:e).apply(r?n:this,arguments)}return o}function ds(t){return function(n){var r=Kn(n=Zl(n))?ir(n):e,i=r?r[0]:n.charAt(0),o=r?Wo(r,1).join(""):n.slice(1);return i[t]()+o}}function ps(e){return function(t){return vn(Eh(Yf(t).replace(Pt,"")),e,"")}}function gs(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Or(e.prototype),r=e.apply(n,t);return Ol(r)?r:n}}function ys(t,n,r){var i=gs(t);function o(){for(var s=arguments.length,a=ze(s),u=s,c=qs(o);u--;)a[u]=arguments[u];var l=s<3&&a[0]!==c&&a[s-1]!==c?[]:Xn(a,c);return(s-=l.length)<r?Rs(t,n,_s,o.placeholder,e,a,l,e,e,r-s):an(this&&this!==Gt&&this instanceof o?i:t,this,a)}return o}function vs(t){return function(n,r,i){var o=nt(n);if(!ll(n)){var s=Vs(r,3);n=Sf(n),r=function(e){return s(o[e],e,o)}}var a=t(n,r,i);return a>-1?o[s?n[a]:a]:e}}function ms(t){return Ds((function(n){var r=n.length,i=r,s=Ir.prototype.thru;for(t&&n.reverse();i--;){var a=n[i];if("function"!=typeof a)throw new ot(o);if(s&&!u&&"wrapper"==Hs(a))var u=new Ir([],!0)}for(i=u?i:r;++i<r;){var c=Hs(a=n[i]),l="wrapper"==c?Bs(a):e;u=l&&la(l[0])&&l[1]==(E|m|b|S)&&!l[4].length&&1==l[9]?u[Hs(l[0])].apply(u,l[3]):1==a.length&&la(a)?u[c]():u.thru(a)}return function(){var e=arguments,t=e[0];if(u&&1==e.length&&ul(t))return u.plant(t).value();for(var i=0,o=r?n[i].apply(this,e):t;++i<r;)o=n[i].call(this,o);return o}}))}function _s(t,n,r,i,o,s,a,u,c,l){var f=n&E,h=n&g,d=n&y,p=n&(m|_),v=n&O,b=d?e:gs(t);function w(){for(var e=arguments.length,g=ze(e),y=e;y--;)g[y]=arguments[y];if(p)var m=qs(w),_=Hn(g,m);if(i&&(g=ns(g,i,o,p)),s&&(g=rs(g,s,a,p)),e-=_,p&&e<l){var E=Xn(g,m);return Rs(t,n,_s,w.placeholder,r,g,E,u,c,l-e)}var S=h?r:this,O=d?S[t]:t;return e=g.length,u?g=Ea(g,u):v&&e>1&&g.reverse(),f&&c<e&&(g.length=c),this&&this!==Gt&&this instanceof w&&(O=b||gs(O)),O.apply(S,g)}return w}function bs(e,t){return function(n,r){return Hi(n,e,t(r),{})}}function ws(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=Mo(r),i=Mo(i)):(r=To(r),i=To(i)),o=t(r,i)}return o}}function Es(e){return Ds((function(t){return t=gn(t,Un(Vs())),wo((function(n){var r=this;return e(t,(function(e){return an(e,r,n)}))}))}))}function Ss(t,n){var r=(n=n===e?" ":Mo(n)).length;if(r<2)return r?bo(n,t):n;var i=bo(n,Lt(t/rr(n)));return Kn(n)?Wo(ir(i),0,t).join(""):i.slice(0,t)}function Os(e,t,n,r){var i=t&g,o=gs(e);function s(){for(var t=-1,a=arguments.length,u=-1,c=r.length,l=ze(c+a),f=this&&this!==Gt&&this instanceof s?o:e;++u<c;)l[u]=r[u];for(;a--;)l[u++]=arguments[++t];return an(f,i?n:this,l)}return s}function xs(t){return function(n,r,i){return i&&"number"!=typeof i&&aa(n,r,i)&&(r=i=e),n=Kl(n),r===e?(r=n,n=0):r=Kl(r),_o(n,r,i=i===e?n<r?1:-1:Kl(i),t)}}function Is(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Ql(t),n=Ql(n)),e(t,n)}}function Rs(t,n,r,i,o,s,a,u,c,l){var f=n&m;n|=f?b:w,(n&=~(f?w:b))&v||(n&=~(g|y));var h=[t,n,o,f?s:e,f?a:e,f?e:s,f?e:a,u,c,l],d=r.apply(e,h);return la(t)&&Oa(d,h),d.placeholder=i,Ra(d,t,n)}function ks(e){var t=tt[e];return function(e,n){if(e=Ql(e),(n=null==n?0:Qt(Gl(n),292))&&qt(e)){var r=(Zl(e)+"e").split("e");return+((r=(Zl(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Cs=ur&&1/Zn(new ur([,-0]))[1]==N?function(e){return new ur(e)}:zh;function Ps(e){return function(t){var n=Js(t);return n==Y?Qn(t):n==ne?er(t):Ln(t,e(t))}}function As(t,n,r,i,s,a,u,c){var l=n&y;if(!l&&"function"!=typeof t)throw new ot(o);var f=i?i.length:0;if(f||(n&=~(b|w),i=s=e),u=u===e?u:Yt(Gl(u),0),c=c===e?c:Gl(c),f-=s?s.length:0,n&w){var h=i,d=s;i=s=e}var p=l?e:Bs(t),v=[t,n,r,i,s,h,d,a,u,c];if(p&&va(v,p),t=v[0],n=v[1],r=v[2],i=v[3],s=v[4],!(c=v[9]=v[9]===e?l?0:t.length:Yt(v[9]-f,0))&&n&(m|_)&&(n&=~(m|_)),n&&n!=g)E=n==m||n==_?ys(t,n,c):n!=b&&n!=(g|b)||s.length?_s.apply(e,v):Os(t,n,r,i);else var E=hs(t,n,r);return Ra((p?xo:Oa)(E,v),t,n)}function Ns(t,n,r,i){return t===e||il(t,ut[r])&&!ft.call(i,r)?n:t}function Ts(t,n,r,i,o,s){return Ol(t)&&Ol(n)&&(s.set(n,t),uo(t,n,e,Ts,s),s.delete(n)),t}function Ms(t){return Ml(t)?e:t}function Ls(t,n,r,i,o,s){var a=r&d,u=t.length,c=n.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(t),f=s.get(n);if(l&&f)return l==n&&f==t;var h=-1,g=!0,y=r&p?new Yr:e;for(s.set(t,n),s.set(n,t);++h<u;){var v=t[h],m=n[h];if(i)var _=a?i(m,v,h,n,t,s):i(v,m,h,t,n,s);if(_!==e){if(_)continue;g=!1;break}if(y){if(!_n(n,(function(e,t){if(!zn(y,t)&&(v===e||o(v,e,r,i,s)))return y.push(t)}))){g=!1;break}}else if(v!==m&&!o(v,m,r,i,s)){g=!1;break}}return s.delete(t),s.delete(n),g}function js(e,t,n,r,i,o,s){switch(n){case ce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ue:return!(e.byteLength!=t.byteLength||!o(new bt(e),new bt(t)));case q:case V:case Q:return il(+e,+t);case W:return e.name==t.name&&e.message==t.message;case te:case re:return e==t+"";case Y:var a=Qn;case ne:var u=r&d;if(a||(a=Zn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=p,s.set(e,t);var l=Ls(a(e),a(t),r,i,o,s);return s.delete(e),l;case ie:if(wr)return wr.call(e)==wr.call(t)}return!1}function Us(t,n,r,i,o,s){var a=r&d,u=zs(t),c=u.length;if(c!=zs(n).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in n:ft.call(n,f)))return!1}var h=s.get(t),p=s.get(n);if(h&&p)return h==n&&p==t;var g=!0;s.set(t,n),s.set(n,t);for(var y=a;++l<c;){var v=t[f=u[l]],m=n[f];if(i)var _=a?i(m,v,f,n,t,s):i(v,m,f,t,n,s);if(!(_===e?v===m||o(v,m,r,i,s):_)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var b=t.constructor,w=n.constructor;b!=w&&"constructor"in t&&"constructor"in n&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(t),s.delete(n),g}function Ds(t){return Ia(ba(t,e,Ga),t+"")}function zs(e){return Li(e,Sf,Ys)}function Fs(e){return Li(e,Of,Qs)}var Bs=dr?function(e){return dr.get(e)}:zh;function Hs(e){for(var t=e.name+"",n=pr[t],r=ft.call(pr,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function qs(e){return(ft.call(Sr,"placeholder")?Sr:e).placeholder}function Vs(){var e=Sr.iteratee||Nh;return e=e===Nh?to:e,arguments.length?e(arguments[0],arguments[1]):e}function $s(e,t){var n=e.__data__;return ca(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ws(e){for(var t=Sf(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,pa(i)]}return t}function Ks(t,n){var r=Wn(t,n);return Ji(r)?r:e}function Gs(t){var n=ft.call(t,kt),r=t[kt];try{t[kt]=e;var i=!0}catch{}var o=pt.call(t);return i&&(n?t[kt]=r:delete t[kt]),o}var Ys=Bt?function(e){return null==e?[]:(e=nt(e),hn(Bt(e),(function(t){return Ot.call(e,t)})))}:Gh,Qs=Bt?function(e){for(var t=[];e;)yn(t,Ys(e)),e=Et(e);return t}:Gh,Js=ji;function Xs(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=Qt(t,e+s);break;case"takeRight":e=Yt(e,t-s)}}return{start:e,end:t}}function Zs(e){var t=e.match(Ue);return t?t[1].split(De):[]}function ea(e,t,n){for(var r=-1,i=(t=Vo(t,e)).length,o=!1;++r<i;){var s=Aa(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Sl(i)&&sa(s,i)&&(ul(e)||al(e))}function ta(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ft.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function na(e){return"function"!=typeof e.constructor||da(e)?{}:Or(Et(e))}function ra(e,t,n){var r=e.constructor;switch(t){case ue:return Yo(e);case q:case V:return new r(+e);case ce:return Qo(e,n);case le:case fe:case he:case de:case pe:case ge:case ye:case ve:case me:return Zo(e,n);case Y:return new r;case Q:case re:return new r(e);case te:return Jo(e);case ne:return new r;case ie:return Xo(e)}}function ia(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(je,"{\n/* [wrapped with "+t+"] */\n")}function oa(e){return ul(e)||al(e)||!!(It&&e&&e[It])}function sa(e,t){var n=typeof e;return!!(t=t??T)&&("number"==n||"symbol"!=n&&Ge.test(e))&&e>-1&&e%1==0&&e<t}function aa(e,t,n){if(!Ol(n))return!1;var r=typeof t;return!!("number"==r?ll(n)&&sa(t,n.length):"string"==r&&t in n)&&il(n[t],e)}function ua(e,t){if(ul(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!zl(e))||Pe.test(e)||!Ce.test(e)||null!=t&&e in nt(t)}function ca(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function la(e){var t=Hs(e),n=Sr[t];if("function"!=typeof n||!(t in Rr.prototype))return!1;if(e===n)return!0;var r=Bs(n);return!!r&&e===r[0]}function fa(e){return!!dt&&dt in e}(Pn&&Js(new Pn(new ArrayBuffer(1)))!=ce||tr&&Js(new tr)!=Y||ar&&Js(ar.resolve())!=Z||ur&&Js(new ur)!=ne||lr&&Js(new lr)!=se)&&(Js=function(t){var n=ji(t),r=n==X?t.constructor:e,i=r?Na(r):"";if(i)switch(i){case gr:return ce;case yr:return Y;case vr:return Z;case mr:return ne;case _r:return se}return n});var ha=ct?wl:Yh;function da(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ut)}function pa(e){return e==e&&!Ol(e)}function ga(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in nt(r))}}function ya(e){var t=Fc(e,(function(e){return n.size===u&&n.clear(),e})),n=t.cache;return t}function va(e,t){var n=e[1],r=t[1],i=n|r,o=i<(g|y|E),s=r==E&&n==m||r==E&&n==S&&e[7].length<=t[8]||r==(E|S)&&t[7].length<=t[8]&&n==m;if(!o&&!s)return e;r&g&&(e[2]=t[2],i|=n&g?0:v);var a=t[3];if(a){var u=e[3];e[3]=u?ns(u,a,t[4]):a,e[4]=u?Xn(e[3],c):t[4]}return(a=t[5])&&(u=e[5],e[5]=u?rs(u,a,t[6]):a,e[6]=u?Xn(e[5],c):t[6]),(a=t[7])&&(e[7]=a),r&E&&(e[8]=null==e[8]?t[8]:Qt(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function ma(e){var t=[];if(null!=e)for(var n in nt(e))t.push(n);return t}function _a(e){return pt.call(e)}function ba(t,n,r){return n=Yt(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=Yt(e.length-n,0),s=ze(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=ze(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),an(t,this,a)}}function wa(e,t){return t.length<2?e:Mi(e,ko(t,0,-1))}function Ea(t,n){for(var r=t.length,i=Qt(n.length,r),o=is(t);i--;){var s=n[i];t[i]=sa(s,r)?o[s]:e}return t}function Sa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oa=ka(xo),xa=Mt||function(e,t){return Gt.setTimeout(e,t)},Ia=ka(Io);function Ra(e,t,n){var r=t+"";return Ia(e,ia(r,Ta(Zs(r),n)))}function ka(t){var n=0,r=0;return function(){var i=Xt(),o=k-(i-r);if(r=i,o>0){if(++n>=R)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Ca(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=mo(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var Pa=ya((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ae,(function(e,n,r,i){t.push(r?i.replace(Be,"$1"):n||e)})),t}));function Aa(e){if("string"==typeof e||zl(e))return e;var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Na(e){if(null!=e){try{return lt.call(e)}catch{}try{return e+""}catch{}}return""}function Ta(e,t){return cn(z,(function(n){var r="_."+n[0];t&n[1]&&!dn(e,r)&&e.push(r)})),e.sort()}function Ma(e){if(e instanceof Rr)return e.clone();var t=new Ir(e.__wrapped__,e.__chain__);return t.__actions__=is(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function La(t,n,r){n=(r?aa(t,n,r):n===e)?1:Yt(Gl(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=ze(Lt(i/n));o<i;)a[s++]=ko(t,o,o+=n);return a}function ja(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function Ua(){var e=arguments.length;if(!e)return[];for(var t=ze(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return yn(ul(n)?is(n):[n],ki(t,1))}var Da=wo((function(e,t){return fl(e)?wi(e,ki(t,1,fl,!0)):[]})),za=wo((function(t,n){var r=ou(n);return fl(r)&&(r=e),fl(t)?wi(t,ki(n,1,fl,!0),Vs(r,2)):[]})),Fa=wo((function(t,n){var r=ou(n);return fl(r)&&(r=e),fl(t)?wi(t,ki(n,1,fl,!0),e,r):[]}));function Ba(t,n,r){var i=null==t?0:t.length;return i?ko(t,(n=r||n===e?1:Gl(n))<0?0:n,i):[]}function Ha(t,n,r){var i=null==t?0:t.length;return i?ko(t,0,(n=i-(n=r||n===e?1:Gl(n)))<0?0:n):[]}function qa(e,t){return e&&e.length?Do(e,Vs(t,3),!0,!0):[]}function Va(e,t){return e&&e.length?Do(e,Vs(t,3),!0):[]}function $a(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&aa(e,t,n)&&(n=0,r=i),Ii(e,t,n,r)):[]}function Wa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Gl(n);return i<0&&(i=Yt(r+i,0)),On(e,Vs(t,3),i)}function Ka(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=Gl(r),o=r<0?Yt(i+o,0):Qt(o,i-1)),On(t,Vs(n,3),o,!0)}function Ga(e){return null!=e&&e.length?ki(e,1):[]}function Ya(e){return null!=e&&e.length?ki(e,N):[]}function Qa(t,n){return null!=t&&t.length?ki(t,n=n===e?1:Gl(n)):[]}function Ja(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function Xa(t){return t&&t.length?t[0]:e}function Za(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Gl(n);return i<0&&(i=Yt(r+i,0)),xn(e,t,i)}function eu(e){return null!=e&&e.length?ko(e,0,-1):[]}var tu=wo((function(e){var t=gn(e,Ho);return t.length&&t[0]===e[0]?Bi(t):[]})),nu=wo((function(t){var n=ou(t),r=gn(t,Ho);return n===ou(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Bi(r,Vs(n,2)):[]})),ru=wo((function(t){var n=ou(t),r=gn(t,Ho);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Bi(r,e,n):[]}));function iu(e,t){return null==e?"":Wt.call(e,t)}function ou(t){var n=null==t?0:t.length;return n?t[n-1]:e}function su(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=Gl(r))<0?Yt(i+o,0):Qt(o,i-1)),n==n?nr(t,n,o):On(t,Rn,o,!0)}function au(t,n){return t&&t.length?lo(t,Gl(n)):e}var uu=wo(cu);function cu(e,t){return e&&e.length&&t&&t.length?yo(e,t):e}function lu(e,t,n){return e&&e.length&&t&&t.length?yo(e,t,Vs(n,2)):e}function fu(t,n,r){return t&&t.length&&n&&n.length?yo(t,n,e,r):t}var hu=Ds((function(e,t){var n=null==e?0:e.length,r=gi(e,t);return vo(e,gn(t,(function(e){return sa(e,n)?+e:e})).sort(es)),r}));function du(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Vs(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return vo(e,i),n}function pu(e){return null==e?e:wn.call(e)}function gu(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&aa(t,n,r)?(n=0,r=i):(n=null==n?0:Gl(n),r=r===e?i:Gl(r)),ko(t,n,r)):[]}function yu(e,t){return Po(e,t)}function vu(e,t,n){return Ao(e,t,Vs(n,2))}function mu(e,t){var n=null==e?0:e.length;if(n){var r=Po(e,t);if(r<n&&il(e[r],t))return r}return-1}function _u(e,t){return Po(e,t,!0)}function bu(e,t,n){return Ao(e,t,Vs(n,2),!0)}function wu(e,t){if(null!=e&&e.length){var n=Po(e,t,!0)-1;if(il(e[n],t))return n}return-1}function Eu(e){return e&&e.length?No(e):[]}function Su(e,t){return e&&e.length?No(e,Vs(t,2)):[]}function Ou(e){var t=null==e?0:e.length;return t?ko(e,1,t):[]}function xu(t,n,r){return t&&t.length?ko(t,0,(n=r||n===e?1:Gl(n))<0?0:n):[]}function Iu(t,n,r){var i=null==t?0:t.length;return i?ko(t,(n=i-(n=r||n===e?1:Gl(n)))<0?0:n,i):[]}function Ru(e,t){return e&&e.length?Do(e,Vs(t,3),!1,!0):[]}function ku(e,t){return e&&e.length?Do(e,Vs(t,3)):[]}var Cu=wo((function(e){return Lo(ki(e,1,fl,!0))})),Pu=wo((function(t){var n=ou(t);return fl(n)&&(n=e),Lo(ki(t,1,fl,!0),Vs(n,2))})),Au=wo((function(t){var n=ou(t);return n="function"==typeof n?n:e,Lo(ki(t,1,fl,!0),e,n)}));function Nu(e){return e&&e.length?Lo(e):[]}function Tu(e,t){return e&&e.length?Lo(e,Vs(t,2)):[]}function Mu(t,n){return n="function"==typeof n?n:e,t&&t.length?Lo(t,e,n):[]}function Lu(e){if(!e||!e.length)return[];var t=0;return e=hn(e,(function(e){if(fl(e))return t=Yt(e.length,t),!0})),Mn(t,(function(t){return gn(e,Cn(t))}))}function ju(t,n){if(!t||!t.length)return[];var r=Lu(t);return null==n?r:gn(r,(function(t){return an(n,e,t)}))}var Uu=wo((function(e,t){return fl(e)?wi(e,t):[]})),Du=wo((function(e){return Fo(hn(e,fl))})),zu=wo((function(t){var n=ou(t);return fl(n)&&(n=e),Fo(hn(t,fl),Vs(n,2))})),Fu=wo((function(t){var n=ou(t);return n="function"==typeof n?n:e,Fo(hn(t,fl),e,n)})),Bu=wo(Lu);function Hu(e,t){return Bo(e||[],t||[],ci)}function qu(e,t){return Bo(e||[],t||[],Oo)}var Vu=wo((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,ju(t,r)}));function $u(e){var t=Sr(e);return t.__chain__=!0,t}function Wu(e,t){return t(e),e}function Ku(e,t){return t(e)}var Gu=Ds((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return gi(e,t)};return!(n>1||this.__actions__.length)&&i instanceof Rr&&sa(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:Ku,args:[o],thisArg:e}),new Ir(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));function Yu(){return $u(this)}function Qu(){return new Ir(this.value(),this.__chain__)}function Ju(){this.__values__===e&&(this.__values__=Wl(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}}function Xu(){return this}function Zu(t){for(var n,r=this;r instanceof xr;){var i=Ma(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n}function ec(){var t=this.__wrapped__;if(t instanceof Rr){var n=t;return this.__actions__.length&&(n=new Rr(this)),(n=n.reverse()).__actions__.push({func:Ku,args:[pu],thisArg:e}),new Ir(n,this.__chain__)}return this.thru(pu)}function tc(){return zo(this.__wrapped__,this.__actions__)}var nc=us((function(e,t,n){ft.call(e,n)?++e[n]:pi(e,n,1)}));function rc(t,n,r){var i=ul(t)?fn:Oi;return r&&aa(t,n,r)&&(n=e),i(t,Vs(n,3))}function ic(e,t){return(ul(e)?hn:Ri)(e,Vs(t,3))}var oc=vs(Wa),sc=vs(Ka);function ac(e,t){return ki(yc(e,t),1)}function uc(e,t){return ki(yc(e,t),N)}function cc(t,n,r){return r=r===e?1:Gl(r),ki(yc(t,n),r)}function lc(e,t){return(ul(e)?cn:Ei)(e,Vs(t,3))}function fc(e,t){return(ul(e)?ln:Si)(e,Vs(t,3))}var hc=us((function(e,t,n){ft.call(e,n)?e[n].push(t):pi(e,n,[t])}));function dc(e,t,n,r){e=ll(e)?e:Hf(e),n=n&&!r?Gl(n):0;var i=e.length;return n<0&&(n=Yt(i+n,0)),Dl(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&xn(e,t,n)>-1}var pc=wo((function(e,t,n){var r=-1,i="function"==typeof t,o=ll(e)?ze(e.length):[];return Ei(e,(function(e){o[++r]=i?an(t,e,n):qi(e,t,n)})),o})),gc=us((function(e,t,n){pi(e,n,t)}));function yc(e,t){return(ul(e)?gn:oo)(e,Vs(t,3))}function vc(t,n,r,i){return null==t?[]:(ul(n)||(n=null==n?[]:[n]),ul(r=i?e:r)||(r=null==r?[]:[r]),fo(t,n,r))}var mc=us((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));function _c(e,t,n){var r=ul(e)?vn:An,i=arguments.length<3;return r(e,Vs(t,4),n,i,Ei)}function bc(e,t,n){var r=ul(e)?mn:An,i=arguments.length<3;return r(e,Vs(t,4),n,i,Si)}function wc(e,t){return(ul(e)?hn:Ri)(e,Bc(Vs(t,3)))}function Ec(e){return(ul(e)?oi:Eo)(e)}function Sc(t,n,r){return n=(r?aa(t,n,r):n===e)?1:Gl(n),(ul(t)?si:So)(t,n)}function Oc(e){return(ul(e)?ai:Ro)(e)}function xc(e){if(null==e)return 0;if(ll(e))return Dl(e)?rr(e):e.length;var t=Js(e);return t==Y||t==ne?e.size:no(e).length}function Ic(t,n,r){var i=ul(t)?_n:Co;return r&&aa(t,n,r)&&(n=e),i(t,Vs(n,3))}var Rc=wo((function(e,t){if(null==e)return[];var n=t.length;return n>1&&aa(e,t[0],t[1])?t=[]:n>2&&aa(t[0],t[1],t[2])&&(t=[t[0]]),fo(e,ki(t,1),[])})),kc=Tt||function(){return Gt.Date.now()};function Cc(e,t){if("function"!=typeof t)throw new ot(o);return e=Gl(e),function(){if(--e<1)return t.apply(this,arguments)}}function Pc(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,As(t,E,e,e,e,e,n)}function Ac(t,n){var r;if("function"!=typeof n)throw new ot(o);return t=Gl(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=e),r}}var Nc=wo((function(e,t,n){var r=g;if(n.length){var i=Xn(n,qs(Nc));r|=b}return As(e,r,t,n,i)})),Tc=wo((function(e,t,n){var r=g|y;if(n.length){var i=Xn(n,qs(Tc));r|=b}return As(t,r,e,n,i)}));function Mc(t,n,r){var i=As(t,m,e,e,e,e,e,n=r?e:n);return i.placeholder=Mc.placeholder,i}function Lc(t,n,r){var i=As(t,_,e,e,e,e,e,n=r?e:n);return i.placeholder=Lc.placeholder,i}function jc(t,n,r){var i,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new ot(o);function g(n){var r=i,o=s;return i=s=e,f=n,u=t.apply(o,r)}function y(e){return f=e,c=xa(_,n),h?g(e):u}function v(e){var t=n-(e-l);return d?Qt(t,a-(e-f)):t}function m(t){var r=t-l;return l===e||r>=n||r<0||d&&t-f>=a}function _(){var e=kc();if(m(e))return b(e);c=xa(_,v(e))}function b(t){return c=e,p&&i?g(t):(i=s=e,u)}function w(){c!==e&&Ko(c),f=0,i=l=s=c=e}function E(){return c===e?u:b(kc())}function S(){var t=kc(),r=m(t);if(i=arguments,s=this,l=t,r){if(c===e)return y(l);if(d)return Ko(c),c=xa(_,n),g(l)}return c===e&&(c=xa(_,n)),u}return n=Ql(n)||0,Ol(r)&&(h=!!r.leading,a=(d="maxWait"in r)?Yt(Ql(r.maxWait)||0,n):a,p="trailing"in r?!!r.trailing:p),S.cancel=w,S.flush=E,S}var Uc=wo((function(e,t){return bi(e,1,t)})),Dc=wo((function(e,t,n){return bi(e,Ql(t)||0,n)}));function zc(e){return As(e,O)}function Fc(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ot(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Fc.Cache||qr),n}function Bc(e){if("function"!=typeof e)throw new ot(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Hc(e){return Ac(2,e)}Fc.Cache=qr;var qc=$o((function(e,t){var n=(t=1==t.length&&ul(t[0])?gn(t[0],Un(Vs())):gn(ki(t,1),Un(Vs()))).length;return wo((function(r){for(var i=-1,o=Qt(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return an(e,this,r)}))})),Vc=wo((function(t,n){var r=Xn(n,qs(Vc));return As(t,b,e,n,r)})),$c=wo((function(t,n){var r=Xn(n,qs($c));return As(t,w,e,n,r)})),Wc=Ds((function(t,n){return As(t,S,e,e,e,n)}));function Kc(t,n){if("function"!=typeof t)throw new ot(o);return wo(t,n=n===e?n:Gl(n))}function Gc(e,t){if("function"!=typeof e)throw new ot(o);return t=null==t?0:Yt(Gl(t),0),wo((function(n){var r=n[t],i=Wo(n,0,t);return r&&yn(i,r),an(e,this,i)}))}function Yc(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ot(o);return Ol(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),jc(e,t,{leading:r,maxWait:t,trailing:i})}function Qc(e){return Pc(e,1)}function Jc(e,t){return Vc(qo(t),e)}function Xc(){if(!arguments.length)return[];var e=arguments[0];return ul(e)?e:[e]}function Zc(e){return vi(e,h)}function el(t,n){return vi(t,h,n="function"==typeof n?n:e)}function tl(e){return vi(e,l|h)}function nl(t,n){return vi(t,l|h,n="function"==typeof n?n:e)}function rl(e,t){return null==t||_i(e,t,Sf(t))}function il(e,t){return e===t||e!=e&&t!=t}var ol=Is(Ui),sl=Is((function(e,t){return e>=t})),al=Vi(function(){return arguments}())?Vi:function(e){return xl(e)&&ft.call(e,"callee")&&!Ot.call(e,"callee")},ul=ze.isArray,cl=en?Un(en):$i;function ll(e){return null!=e&&Sl(e.length)&&!wl(e)}function fl(e){return xl(e)&&ll(e)}function hl(e){return!0===e||!1===e||xl(e)&&ji(e)==q}var dl=Ht||Yh,pl=tn?Un(tn):Wi;function gl(e){return xl(e)&&1===e.nodeType&&!Ml(e)}function yl(e){if(null==e)return!0;if(ll(e)&&(ul(e)||"string"==typeof e||"function"==typeof e.splice||dl(e)||Fl(e)||al(e)))return!e.length;var t=Js(e);if(t==Y||t==ne)return!e.size;if(da(e))return!no(e).length;for(var n in e)if(ft.call(e,n))return!1;return!0}function vl(e,t){return Ki(e,t)}function ml(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Ki(t,n,e,r):!!i}function _l(e){if(!xl(e))return!1;var t=ji(e);return t==W||t==$||"string"==typeof e.message&&"string"==typeof e.name&&!Ml(e)}function bl(e){return"number"==typeof e&&qt(e)}function wl(e){if(!Ol(e))return!1;var t=ji(e);return t==K||t==G||t==H||t==ee}function El(e){return"number"==typeof e&&e==Gl(e)}function Sl(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=T}function Ol(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xl(e){return null!=e&&"object"==typeof e}var Il=nn?Un(nn):Yi;function Rl(e,t){return e===t||Qi(e,t,Ws(t))}function kl(t,n,r){return r="function"==typeof r?r:e,Qi(t,n,Ws(n),r)}function Cl(e){return Tl(e)&&e!=+e}function Pl(e){if(ha(e))throw new Ze(i);return Ji(e)}function Al(e){return null===e}function Nl(e){return null==e}function Tl(e){return"number"==typeof e||xl(e)&&ji(e)==Q}function Ml(e){if(!xl(e)||ji(e)!=X)return!1;var t=Et(e);if(null===t)return!0;var n=ft.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&lt.call(n)==gt}var Ll=rn?Un(rn):Xi;function jl(e){return El(e)&&e>=-T&&e<=T}var Ul=on?Un(on):Zi;function Dl(e){return"string"==typeof e||!ul(e)&&xl(e)&&ji(e)==re}function zl(e){return"symbol"==typeof e||xl(e)&&ji(e)==ie}var Fl=sn?Un(sn):eo;function Bl(t){return t===e}function Hl(e){return xl(e)&&Js(e)==se}function ql(e){return xl(e)&&ji(e)==ae}var Vl=Is(io),$l=Is((function(e,t){return e<=t}));function Wl(e){if(!e)return[];if(ll(e))return Dl(e)?ir(e):is(e);if(Rt&&e[Rt])return Yn(e[Rt]());var t=Js(e);return(t==Y?Qn:t==ne?Zn:Hf)(e)}function Kl(e){return e?(e=Ql(e))===N||e===-N?(e<0?-1:1)*M:e==e?e:0:0===e?e:0}function Gl(e){var t=Kl(e),n=t%1;return t==t?n?t-n:t:0}function Yl(e){return e?yi(Gl(e),0,j):0}function Ql(e){if("number"==typeof e)return e;if(zl(e))return L;if(Ol(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ol(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=jn(e);var n=$e.test(e);return n||Ke.test(e)?$t(e.slice(2),n?2:8):Ve.test(e)?L:+e}function Jl(e){return os(e,Of(e))}function Xl(e){return e?yi(Gl(e),-T,T):0===e?e:0}function Zl(e){return null==e?"":Mo(e)}var ef=cs((function(e,t){if(da(t)||ll(t))os(t,Sf(t),e);else for(var n in t)ft.call(t,n)&&ci(e,n,t[n])})),tf=cs((function(e,t){os(t,Of(t),e)})),nf=cs((function(e,t,n,r){os(t,Of(t),e,r)})),rf=cs((function(e,t,n,r){os(t,Sf(t),e,r)})),of=Ds(gi);function sf(e,t){var n=Or(e);return null==t?n:hi(n,t)}var af=wo((function(t,n){t=nt(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&aa(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=Of(s),u=-1,c=a.length;++u<c;){var l=a[u],f=t[l];(f===e||il(f,ut[l])&&!ft.call(t,l))&&(t[l]=s[l])}return t})),uf=wo((function(t){return t.push(e,Ts),an(kf,e,t)}));function cf(e,t){return Sn(e,Vs(t,3),Ai)}function lf(e,t){return Sn(e,Vs(t,3),Ni)}function ff(e,t){return null==e?e:Ci(e,Vs(t,3),Of)}function hf(e,t){return null==e?e:Pi(e,Vs(t,3),Of)}function df(e,t){return e&&Ai(e,Vs(t,3))}function pf(e,t){return e&&Ni(e,Vs(t,3))}function gf(e){return null==e?[]:Ti(e,Sf(e))}function yf(e){return null==e?[]:Ti(e,Of(e))}function vf(t,n,r){var i=null==t?e:Mi(t,n);return i===e?r:i}function mf(e,t){return null!=e&&ea(e,t,Di)}function _f(e,t){return null!=e&&ea(e,t,zi)}var bf=bs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),e[t]=n}),Rh(Ah)),wf=bs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),ft.call(e,t)?e[t].push(n):e[t]=[n]}),Vs),Ef=wo(qi);function Sf(e){return ll(e)?ii(e):no(e)}function Of(e){return ll(e)?ii(e,!0):ro(e)}function xf(e,t){var n={};return t=Vs(t,3),Ai(e,(function(e,r,i){pi(n,t(e,r,i),e)})),n}function If(e,t){var n={};return t=Vs(t,3),Ai(e,(function(e,r,i){pi(n,r,t(e,r,i))})),n}var Rf=cs((function(e,t,n){uo(e,t,n)})),kf=cs((function(e,t,n,r){uo(e,t,n,r)})),Cf=Ds((function(e,t){var n={};if(null==e)return n;var r=!1;t=gn(t,(function(t){return t=Vo(t,e),r||(r=t.length>1),t})),os(e,Fs(e),n),r&&(n=vi(n,l|f|h,Ms));for(var i=t.length;i--;)jo(n,t[i]);return n}));function Pf(e,t){return Nf(e,Bc(Vs(t)))}var Af=Ds((function(e,t){return null==e?{}:ho(e,t)}));function Nf(e,t){if(null==e)return{};var n=gn(Fs(e),(function(e){return[e]}));return t=Vs(t),po(e,n,(function(e,n){return t(e,n[0])}))}function Tf(t,n,r){var i=-1,o=(n=Vo(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[Aa(n[i])];s===e&&(i=o,s=r),t=wl(s)?s.call(t):s}return t}function Mf(e,t,n){return null==e?e:Oo(e,t,n)}function Lf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Oo(t,n,r,i)}var jf=Ps(Sf),Uf=Ps(Of);function Df(e,t,n){var r=ul(e),i=r||dl(e)||Fl(e);if(t=Vs(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ol(e)&&wl(o)?Or(Et(e)):{}}return(i?cn:Ai)(e,(function(e,r,i){return t(n,e,r,i)})),n}function zf(e,t){return null==e||jo(e,t)}function Ff(e,t,n){return null==e?e:Uo(e,t,qo(n))}function Bf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Uo(t,n,qo(r),i)}function Hf(e){return null==e?[]:Dn(e,Sf(e))}function qf(e){return null==e?[]:Dn(e,Of(e))}function Vf(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=Ql(r))==r?r:0),n!==e&&(n=(n=Ql(n))==n?n:0),yi(Ql(t),n,r)}function $f(t,n,r){return n=Kl(n),r===e?(r=n,n=0):r=Kl(r),Fi(t=Ql(t),n,r)}function Wf(t,n,r){if(r&&"boolean"!=typeof r&&aa(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=Kl(t),n===e?(n=t,t=0):n=Kl(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=bn();return Qt(t+o*(n-t+Vt("1e-"+((o+"").length-1))),n)}return mo(t,n)}var Kf=ps((function(e,t,n){return t=t.toLowerCase(),e+(n?Gf(t):t)}));function Gf(e){return wh(Zl(e).toLowerCase())}function Yf(e){return(e=Zl(e))&&e.replace(Ye,qn).replace(At,"")}function Qf(t,n,r){t=Zl(t),n=Mo(n);var i=t.length,o=r=r===e?i:yi(Gl(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n}function Jf(e){return(e=Zl(e))&&xe.test(e)?e.replace(Se,Vn):e}function Xf(e){return(e=Zl(e))&&Te.test(e)?e.replace(Ne,"\\$&"):e}var Zf=ps((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),eh=ps((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),th=ds("toLowerCase");function nh(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ss(Ft(i),n)+e+Ss(Lt(i),n)}function rh(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;return t&&r<t?e+Ss(t-r,n):e}function ih(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;return t&&r<t?Ss(t-r,n)+e:e}function oh(e,t,n){return n||null==t?t=0:t&&(t=+t),Zt(Zl(e).replace(Me,""),t||0)}function sh(t,n,r){return n=(r?aa(t,n,r):n===e)?1:Gl(n),bo(Zl(t),n)}function ah(){var e=arguments,t=Zl(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var uh=ps((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));function ch(t,n,r){return r&&"number"!=typeof r&&aa(t,n,r)&&(n=r=e),(r=r===e?j:r>>>0)?(t=Zl(t))&&("string"==typeof n||null!=n&&!Ll(n))&&!(n=Mo(n))&&Kn(t)?Wo(ir(t),0,r):t.split(n,r):[]}var lh=ps((function(e,t,n){return e+(n?" ":"")+wh(t)}));function fh(e,t,n){return e=Zl(e),n=null==n?0:yi(Gl(n),0,e.length),t=Mo(t),e.slice(n,n+t.length)==t}function hh(t,n,r){var i=Sr.templateSettings;r&&aa(t,n,r)&&(n=e),t=Zl(t),n=nf({},n,i,Ns);var o,a,u=nf({},n.imports,i.imports,Ns),c=Sf(u),l=Dn(u,c),f=0,h=n.interpolate||Qe,d="__p += '",p=rt((n.escape||Qe).source+"|"+h.source+"|"+(h===ke?He:Qe).source+"|"+(n.evaluate||Qe).source+"|$","g"),g="//# sourceURL="+(ft.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";t.replace(p,(function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(f,u).replace(Je,$n),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+e.length,e})),d+="';\n";var y=ft.call(n,"variable")&&n.variable;if(y){if(Fe.test(y))throw new Ze(s)}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(_e,""):d).replace(be,"$1").replace(we,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Sh((function(){return et(c,g+"return "+d).apply(e,l)}));if(v.source=d,_l(v))throw v;return v}function dh(e){return Zl(e).toLowerCase()}function ph(e){return Zl(e).toUpperCase()}function gh(t,n,r){if((t=Zl(t))&&(r||n===e))return jn(t);if(!t||!(n=Mo(n)))return t;var i=ir(t),o=ir(n);return Wo(i,Fn(i,o),Bn(i,o)+1).join("")}function yh(t,n,r){if((t=Zl(t))&&(r||n===e))return t.slice(0,or(t)+1);if(!t||!(n=Mo(n)))return t;var i=ir(t);return Wo(i,0,Bn(i,ir(n))+1).join("")}function vh(t,n,r){if((t=Zl(t))&&(r||n===e))return t.replace(Me,"");if(!t||!(n=Mo(n)))return t;var i=ir(t);return Wo(i,Fn(i,ir(n))).join("")}function mh(t,n){var r=x,i=I;if(Ol(n)){var o="separator"in n?n.separator:o;r="length"in n?Gl(n.length):r,i="omission"in n?Mo(n.omission):i}var s=(t=Zl(t)).length;if(Kn(t)){var a=ir(t);s=a.length}if(r>=s)return t;var u=r-rr(i);if(u<1)return i;var c=a?Wo(a,0,u).join(""):t.slice(0,u);if(o===e)return c+i;if(a&&(u+=c.length-u),Ll(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=rt(o.source,Zl(qe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===e?u:h)}}else if(t.indexOf(Mo(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i}function _h(e){return(e=Zl(e))&&Oe.test(e)?e.replace(Ee,sr):e}var bh=ps((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),wh=ds("toUpperCase");function Eh(t,n,r){return t=Zl(t),(n=r?e:n)===e?Gn(t)?cr(t):En(t):t.match(n)||[]}var Sh=wo((function(t,n){try{return an(t,e,n)}catch(e){return _l(e)?e:new Ze(e)}})),Oh=Ds((function(e,t){return cn(t,(function(t){t=Aa(t),pi(e,t,Nc(e[t],e))})),e}));function xh(e){var t=null==e?0:e.length,n=Vs();return e=t?gn(e,(function(e){if("function"!=typeof e[1])throw new ot(o);return[n(e[0]),e[1]]})):[],wo((function(n){for(var r=-1;++r<t;){var i=e[r];if(an(i[0],this,n))return an(i[1],this,n)}}))}function Ih(e){return mi(vi(e,l))}function Rh(e){return function(){return e}}function kh(e,t){return null==e||e!=e?t:e}var Ch=ms(),Ph=ms(!0);function Ah(e){return e}function Nh(e){return to("function"==typeof e?e:vi(e,l))}function Th(e){return so(vi(e,l))}function Mh(e,t){return ao(e,vi(t,l))}var Lh=wo((function(e,t){return function(n){return qi(n,e,t)}})),jh=wo((function(e,t){return function(n){return qi(e,n,t)}}));function Uh(e,t,n){var r=Sf(t),i=Ti(t,r);null==n&&(!Ol(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Ti(t,Sf(t)));var o=!(Ol(n)&&"chain"in n&&!n.chain),s=wl(e);return cn(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=is(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,yn([this.value()],arguments))})})),e}function Dh(){return Gt._===this&&(Gt._=yt),this}function zh(){}function Fh(e){return e=Gl(e),wo((function(t){return lo(t,e)}))}var Bh=Es(gn),Hh=Es(fn),qh=Es(_n);function Vh(e){return ua(e)?Cn(Aa(e)):go(e)}function $h(t){return function(n){return null==t?e:Mi(t,n)}}var Wh=xs(),Kh=xs(!0);function Gh(){return[]}function Yh(){return!1}function Qh(){return{}}function Jh(){return""}function Xh(){return!0}function Zh(e,t){if((e=Gl(e))<1||e>T)return[];var n=j,r=Qt(e,j);t=Vs(t),e-=j;for(var i=Mn(r,t);++n<e;)t(n);return i}function ed(e){return ul(e)?gn(e,Aa):zl(e)?[e]:is(Pa(Zl(e)))}function td(e){var t=++ht;return Zl(e)+t}var nd=ws((function(e,t){return e+t}),0),rd=ks("ceil"),id=ws((function(e,t){return e/t}),1),od=ks("floor");function sd(t){return t&&t.length?xi(t,Ah,Ui):e}function ad(t,n){return t&&t.length?xi(t,Vs(n,2),Ui):e}function ud(e){return kn(e,Ah)}function cd(e,t){return kn(e,Vs(t,2))}function ld(t){return t&&t.length?xi(t,Ah,io):e}function fd(t,n){return t&&t.length?xi(t,Vs(n,2),io):e}var hd=ws((function(e,t){return e*t}),1),dd=ks("round"),pd=ws((function(e,t){return e-t}),0);function gd(e){return e&&e.length?Tn(e,Ah):0}function yd(e,t){return e&&e.length?Tn(e,Vs(t,2)):0}return Sr.after=Cc,Sr.ary=Pc,Sr.assign=ef,Sr.assignIn=tf,Sr.assignInWith=nf,Sr.assignWith=rf,Sr.at=of,Sr.before=Ac,Sr.bind=Nc,Sr.bindAll=Oh,Sr.bindKey=Tc,Sr.castArray=Xc,Sr.chain=$u,Sr.chunk=La,Sr.compact=ja,Sr.concat=Ua,Sr.cond=xh,Sr.conforms=Ih,Sr.constant=Rh,Sr.countBy=nc,Sr.create=sf,Sr.curry=Mc,Sr.curryRight=Lc,Sr.debounce=jc,Sr.defaults=af,Sr.defaultsDeep=uf,Sr.defer=Uc,Sr.delay=Dc,Sr.difference=Da,Sr.differenceBy=za,Sr.differenceWith=Fa,Sr.drop=Ba,Sr.dropRight=Ha,Sr.dropRightWhile=qa,Sr.dropWhile=Va,Sr.fill=$a,Sr.filter=ic,Sr.flatMap=ac,Sr.flatMapDeep=uc,Sr.flatMapDepth=cc,Sr.flatten=Ga,Sr.flattenDeep=Ya,Sr.flattenDepth=Qa,Sr.flip=zc,Sr.flow=Ch,Sr.flowRight=Ph,Sr.fromPairs=Ja,Sr.functions=gf,Sr.functionsIn=yf,Sr.groupBy=hc,Sr.initial=eu,Sr.intersection=tu,Sr.intersectionBy=nu,Sr.intersectionWith=ru,Sr.invert=bf,Sr.invertBy=wf,Sr.invokeMap=pc,Sr.iteratee=Nh,Sr.keyBy=gc,Sr.keys=Sf,Sr.keysIn=Of,Sr.map=yc,Sr.mapKeys=xf,Sr.mapValues=If,Sr.matches=Th,Sr.matchesProperty=Mh,Sr.memoize=Fc,Sr.merge=Rf,Sr.mergeWith=kf,Sr.method=Lh,Sr.methodOf=jh,Sr.mixin=Uh,Sr.negate=Bc,Sr.nthArg=Fh,Sr.omit=Cf,Sr.omitBy=Pf,Sr.once=Hc,Sr.orderBy=vc,Sr.over=Bh,Sr.overArgs=qc,Sr.overEvery=Hh,Sr.overSome=qh,Sr.partial=Vc,Sr.partialRight=$c,Sr.partition=mc,Sr.pick=Af,Sr.pickBy=Nf,Sr.property=Vh,Sr.propertyOf=$h,Sr.pull=uu,Sr.pullAll=cu,Sr.pullAllBy=lu,Sr.pullAllWith=fu,Sr.pullAt=hu,Sr.range=Wh,Sr.rangeRight=Kh,Sr.rearg=Wc,Sr.reject=wc,Sr.remove=du,Sr.rest=Kc,Sr.reverse=pu,Sr.sampleSize=Sc,Sr.set=Mf,Sr.setWith=Lf,Sr.shuffle=Oc,Sr.slice=gu,Sr.sortBy=Rc,Sr.sortedUniq=Eu,Sr.sortedUniqBy=Su,Sr.split=ch,Sr.spread=Gc,Sr.tail=Ou,Sr.take=xu,Sr.takeRight=Iu,Sr.takeRightWhile=Ru,Sr.takeWhile=ku,Sr.tap=Wu,Sr.throttle=Yc,Sr.thru=Ku,Sr.toArray=Wl,Sr.toPairs=jf,Sr.toPairsIn=Uf,Sr.toPath=ed,Sr.toPlainObject=Jl,Sr.transform=Df,Sr.unary=Qc,Sr.union=Cu,Sr.unionBy=Pu,Sr.unionWith=Au,Sr.uniq=Nu,Sr.uniqBy=Tu,Sr.uniqWith=Mu,Sr.unset=zf,Sr.unzip=Lu,Sr.unzipWith=ju,Sr.update=Ff,Sr.updateWith=Bf,Sr.values=Hf,Sr.valuesIn=qf,Sr.without=Uu,Sr.words=Eh,Sr.wrap=Jc,Sr.xor=Du,Sr.xorBy=zu,Sr.xorWith=Fu,Sr.zip=Bu,Sr.zipObject=Hu,Sr.zipObjectDeep=qu,Sr.zipWith=Vu,Sr.entries=jf,Sr.entriesIn=Uf,Sr.extend=tf,Sr.extendWith=nf,Uh(Sr,Sr),Sr.add=nd,Sr.attempt=Sh,Sr.camelCase=Kf,Sr.capitalize=Gf,Sr.ceil=rd,Sr.clamp=Vf,Sr.clone=Zc,Sr.cloneDeep=tl,Sr.cloneDeepWith=nl,Sr.cloneWith=el,Sr.conformsTo=rl,Sr.deburr=Yf,Sr.defaultTo=kh,Sr.divide=id,Sr.endsWith=Qf,Sr.eq=il,Sr.escape=Jf,Sr.escapeRegExp=Xf,Sr.every=rc,Sr.find=oc,Sr.findIndex=Wa,Sr.findKey=cf,Sr.findLast=sc,Sr.findLastIndex=Ka,Sr.findLastKey=lf,Sr.floor=od,Sr.forEach=lc,Sr.forEachRight=fc,Sr.forIn=ff,Sr.forInRight=hf,Sr.forOwn=df,Sr.forOwnRight=pf,Sr.get=vf,Sr.gt=ol,Sr.gte=sl,Sr.has=mf,Sr.hasIn=_f,Sr.head=Xa,Sr.identity=Ah,Sr.includes=dc,Sr.indexOf=Za,Sr.inRange=$f,Sr.invoke=Ef,Sr.isArguments=al,Sr.isArray=ul,Sr.isArrayBuffer=cl,Sr.isArrayLike=ll,Sr.isArrayLikeObject=fl,Sr.isBoolean=hl,Sr.isBuffer=dl,Sr.isDate=pl,Sr.isElement=gl,Sr.isEmpty=yl,Sr.isEqual=vl,Sr.isEqualWith=ml,Sr.isError=_l,Sr.isFinite=bl,Sr.isFunction=wl,Sr.isInteger=El,Sr.isLength=Sl,Sr.isMap=Il,Sr.isMatch=Rl,Sr.isMatchWith=kl,Sr.isNaN=Cl,Sr.isNative=Pl,Sr.isNil=Nl,Sr.isNull=Al,Sr.isNumber=Tl,Sr.isObject=Ol,Sr.isObjectLike=xl,Sr.isPlainObject=Ml,Sr.isRegExp=Ll,Sr.isSafeInteger=jl,Sr.isSet=Ul,Sr.isString=Dl,Sr.isSymbol=zl,Sr.isTypedArray=Fl,Sr.isUndefined=Bl,Sr.isWeakMap=Hl,Sr.isWeakSet=ql,Sr.join=iu,Sr.kebabCase=Zf,Sr.last=ou,Sr.lastIndexOf=su,Sr.lowerCase=eh,Sr.lowerFirst=th,Sr.lt=Vl,Sr.lte=$l,Sr.max=sd,Sr.maxBy=ad,Sr.mean=ud,Sr.meanBy=cd,Sr.min=ld,Sr.minBy=fd,Sr.stubArray=Gh,Sr.stubFalse=Yh,Sr.stubObject=Qh,Sr.stubString=Jh,Sr.stubTrue=Xh,Sr.multiply=hd,Sr.nth=au,Sr.noConflict=Dh,Sr.noop=zh,Sr.now=kc,Sr.pad=nh,Sr.padEnd=rh,Sr.padStart=ih,Sr.parseInt=oh,Sr.random=Wf,Sr.reduce=_c,Sr.reduceRight=bc,Sr.repeat=sh,Sr.replace=ah,Sr.result=Tf,Sr.round=dd,Sr.runInContext=t,Sr.sample=Ec,Sr.size=xc,Sr.snakeCase=uh,Sr.some=Ic,Sr.sortedIndex=yu,Sr.sortedIndexBy=vu,Sr.sortedIndexOf=mu,Sr.sortedLastIndex=_u,Sr.sortedLastIndexBy=bu,Sr.sortedLastIndexOf=wu,Sr.startCase=lh,Sr.startsWith=fh,Sr.subtract=pd,Sr.sum=gd,Sr.sumBy=yd,Sr.template=hh,Sr.times=Zh,Sr.toFinite=Kl,Sr.toInteger=Gl,Sr.toLength=Yl,Sr.toLower=dh,Sr.toNumber=Ql,Sr.toSafeInteger=Xl,Sr.toString=Zl,Sr.toUpper=ph,Sr.trim=gh,Sr.trimEnd=yh,Sr.trimStart=vh,Sr.truncate=mh,Sr.unescape=_h,Sr.uniqueId=td,Sr.upperCase=bh,Sr.upperFirst=wh,Sr.each=lc,Sr.eachRight=fc,Sr.first=Xa,Uh(Sr,function(){var e={};return Ai(Sr,(function(t,n){ft.call(Sr.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Sr.VERSION=n,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Sr[e].placeholder=Sr})),cn(["drop","take"],(function(t,n){Rr.prototype[t]=function(r){r=r===e?1:Yt(Gl(r),0);var i=this.__filtered__&&!n?new Rr(this):this.clone();return i.__filtered__?i.__takeCount__=Qt(r,i.__takeCount__):i.__views__.push({size:Qt(r,j),type:t+(i.__dir__<0?"Right":"")}),i},Rr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),cn(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==C||n==A;Rr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Vs(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),cn(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Rr.prototype[e]=function(){return this[n](1).value()[0]}})),cn(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Rr.prototype[e]=function(){return this.__filtered__?new Rr(this):this[n](1)}})),Rr.prototype.compact=function(){return this.filter(Ah)},Rr.prototype.find=function(e){return this.filter(e).head()},Rr.prototype.findLast=function(e){return this.reverse().find(e)},Rr.prototype.invokeMap=wo((function(e,t){return"function"==typeof e?new Rr(this):this.map((function(n){return qi(n,e,t)}))})),Rr.prototype.reject=function(e){return this.filter(Bc(Vs(e)))},Rr.prototype.slice=function(t,n){t=Gl(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Rr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=Gl(n))<0?r.dropRight(-n):r.take(n-t)),r)},Rr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rr.prototype.toArray=function(){return this.take(j)},Ai(Rr.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Sr[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(Sr.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,u=n instanceof Rr,c=a[0],l=u||ul(n),f=function(e){var t=o.apply(Sr,yn([e],a));return i&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=u&&!d;if(!s&&l){n=g?n:new Rr(this);var y=t.apply(n,a);return y.__actions__.push({func:Ku,args:[f],thisArg:e}),new Ir(y,h)}return p&&g?t.apply(this,a):(y=this.thru(f),p?i?y.value()[0]:y.value():y)})})),cn(["pop","push","shift","sort","splice","unshift"],(function(e){var t=st[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Sr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ul(i)?i:[],e)}return this[n]((function(n){return t.apply(ul(n)?n:[],e)}))}})),Ai(Rr.prototype,(function(e,t){var n=Sr[t];if(n){var r=n.name+"";ft.call(pr,r)||(pr[r]=[]),pr[r].push({name:t,func:n})}})),pr[_s(e,y).name]=[{name:"wrapper",func:e}],Rr.prototype.clone=kr,Rr.prototype.reverse=Cr,Rr.prototype.value=Pr,Sr.prototype.at=Gu,Sr.prototype.chain=Yu,Sr.prototype.commit=Qu,Sr.prototype.next=Ju,Sr.prototype.plant=Zu,Sr.prototype.reverse=ec,Sr.prototype.toJSON=Sr.prototype.valueOf=Sr.prototype.value=tc,Sr.prototype.first=Sr.prototype.head,Rt&&(Sr.prototype[Rt]=Xu),Sr},fr=lr();Qt?((Qt.exports=fr)._=fr,Yt._=fr):Gt._=fr}.call(t);var wg=Object.defineProperty,Eg=Object.defineProperties,Sg=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,Ig=Object.prototype.propertyIsEnumerable,Rg=(e,t,n)=>t in e?wg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kg=(e,t)=>{for(var n in t||(t={}))xg.call(t,n)&&Rg(e,n,t[n]);if(Og)for(var n of Og(t))Ig.call(t,n)&&Rg(e,n,t[n]);return e},Cg=(e,t)=>Eg(e,Sg(t));function Pg(e,t,n){let r;const i=Ag(e);return t.rpcMap&&(r=t.rpcMap[i]),r||(r=`${yg}?chainId=eip155:${i}&projectId=${n}`),r}function Ag(e){return e.includes("eip155")?Number(e.split(":")[1]):Number(e)}function Ng(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function Tg(e,t){const n=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!n.length)return[];const r=[];return n.forEach((e=>{const n=t.namespaces[e].accounts;r.push(...n)})),r}function Mg(e={},t={}){const n=Lg(e),r=Lg(t);return bg.exports.merge(n,r)}function Lg(e){var t,n,r,i;const o={};if(!dc(e))return o;for(const[s,a]of Object.entries(e)){const e=sc(s)?[s]:a.chains,u=a.methods||[],c=a.events||[],l=a.rpcMap||{},f=ac(s);o[f]=Cg(kg(kg({},o[f]),a),{chains:zu(e,null==(t=o[f])?void 0:t.chains),methods:zu(u,null==(n=o[f])?void 0:n.methods),events:zu(c,null==(r=o[f])?void 0:r.events),rpcMap:kg(kg({},l),null==(i=o[f])?void 0:i.rpcMap)})}return o}function jg(e){return e.includes(":")?e.split(":")[2]:e}function Ug(e){const t={};for(const[n,r]of Object.entries(e)){const e=r.methods||[],i=r.events||[],o=r.accounts||[],s=sc(n)?[n]:r.chains?r.chains:Ng(r.accounts);t[n]={chains:s,methods:e,events:i,accounts:o}}return t}const Dg={},zg=e=>Dg[e],Fg=(e,t)=>{Dg[e]=t};var Bg={exports:{}};!function(e,n){var r,i=typeof self<"u"?self:t,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();r=o,function(e){var t={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function n(e){return e&&DataView.prototype.isPrototypeOf(e)}if(t.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function h(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function d(e){var t=new FileReader,n=f(t);return t.readAsText(e),n}function p(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:t.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:t.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():t.arrayBuffer&&t.blob&&n(e)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=l(this);if(e)return e;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(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return d(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=s(e),t=a(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},c.prototype.delete=function(e){delete this.map[s(e)]},c.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},c.prototype.set=function(e,t){this.map[s(e)]=a(t)},c.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},c.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),u(e)},c.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),u(e)},c.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),u(e)},t.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}function _(e,t){var n=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&null!=e._bodyInit&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new c(t.headers)),this.method=m(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e){var t=new c;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch{e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function O(n,r){return new Promise((function(i,o){var s=new _(n,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:w(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;i(new E(t,e))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&t.blob&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(typeof s._bodyInit>"u"?null:s._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=c,r.Request=_,r.Response=E),e.Headers=c,e.Request=_,e.Response=E,e.fetch=O,Object.defineProperty(e,"__esModule",{value:!0})}({}),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var s=o;(n=s.fetch).default=s.fetch,n.fetch=s.fetch,n.Headers=s.Headers,n.Request=s.Request,n.Response=s.Response,e.exports=n}(Bg,Bg.exports);var Hg=n(Bg.exports);const qg={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},Vg=10;class $g{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new o.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=sr(e),n=await(await Hg(this.url,Object.assign(Object.assign({},qg),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=sr({id:1,jsonrpc:"2.0",method:"test",params:[]});await Hg(e,Object.assign(Object.assign({},qg),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?or(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=Hl(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return ol(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Vg&&this.events.setMaxListeners(Vg)}}class Wg{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Kg{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){const n=Ag(e);if(!this.httpProviders[n]){const e=t||Pg(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!e)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,e)}this.chainId=n,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Ag(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let r=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";r=r.startsWith("0x")?r:`0x${r}`;const i=parseInt(r,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:r}]},chainId:null==(n=this.namespace.chains)?void 0:n[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class Gg{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Yg{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Qg{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const n=this.getCardanoRPCUrl(t);e[t]=this.createHttpProvider(t,n)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Jg{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Xg{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}var Zg=Object.defineProperty,ey=Object.defineProperties,ty=Object.getOwnPropertyDescriptors,ny=Object.getOwnPropertySymbols,ry=Object.prototype.hasOwnProperty,iy=Object.prototype.propertyIsEnumerable,oy=(e,t,n)=>t in e?Zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sy=(e,t)=>{for(var n in t||(t={}))ry.call(t,n)&&oy(e,n,t[n]);if(ny)for(var n of ny(t))iy.call(t,n)&&oy(e,n,t[n]);return e},ay=(e,t)=>ey(e,ty(t));class uy{constructor(e){this.events=new o.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:un.pino(un.getDefaultLoggerOptions({level:e?.logger||dg})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new uy(e);return await t.initialize(),t}async request(e,t){const[n,r]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:sy({},e),chainId:`${n}:${r}`,topic:this.session.topic})}sendAsync(e,t,n){this.request(e,n).then((e=>t(null,e))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:fc("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:r}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await r().then((e=>{this.session=e,this.namespaces||(this.namespaces=Ug(e.namespaces),this.persist("namespaces",this.namespaces))})).catch((e=>{if(e.message!==Vp)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,r]=this.validateChain(e);this.getProvider(n).setDefaultChain(r,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(hc(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await hg.init({logger:this.providerOpts.logger||dg,relayUrl:this.providerOpts.relayUrl||pg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>ac(e))))];Fg("client",this.client),Fg("events",this.events),Fg("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=Tg(e,this.session),n=Ng(t),r=Mg(this.namespaces,this.optionalNamespaces),i=ay(sy({},r[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new Kg({namespace:i});break;case"solana":this.rpcProviders[e]=new Gg({namespace:i});break;case"cosmos":this.rpcProviders[e]=new Yg({namespace:i});break;case"polkadot":this.rpcProviders[e]=new Wg({namespace:i});break;case"cip34":this.rpcProviders[e]=new Qg({namespace:i});break;case"elrond":this.rpcProviders[e]=new Jg({namespace:i});break;case"multiversx":this.rpcProviders[e]=new Xg({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:n}=t;if("accountsChanged"===n.name){const e=n.data;e&&hc(e)&&this.events.emit("accountsChanged",e.map(jg))}else"chainChanged"===n.name?this.onChainChanged(t.chainId):this.events.emit(n.name,n.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var n;const{namespaces:r}=t,i=null==(n=this.client)?void 0:n.session.get(e);this.session=ay(sy({},i),{namespaces:r}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ay(sy({},fc("USER_DISCONNECTED")),{data:e.topic}))})),this.on(vg.DEFAULT_CHAIN_CHANGED,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:r}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=r,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map((e=>ac(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const r=ac(Object.keys(this.namespaces)[0]);return[r,this.rpcProviders[r].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var n;if(!this.namespaces)return;const[r,i]=this.validateChain(e);t||this.getProvider(r).setDefaultChain(i),(null!=(n=this.namespaces[r])?n:this.namespaces[`${r}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${gg}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${gg}/${e}`)}}const cy=uy;e.UniversalProvider=cy,e.default=uy,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Cc.exports);const Pc=["eth_sendTransaction","personal_sign"],Ac=["eth_accounts","eth_requestAccounts","eth_call","eth_getBalance","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],Nc=["chainChanged","accountsChanged"],Tc=["message","disconnect","connect"];function Mc(e){return Number(e[0].split(":")[1])}function Lc(e){return`0x${e.toString(16)}`}class jc{constructor(){this.events=new Ys.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static init(e){return c(this,void 0,void 0,(function*(){const t=new jc;return yield t.initialize(e),t}))}request(e){return c(this,void 0,void 0,(function*(){return yield this.signer.request(e,this.formatChainId(this.chainId))}))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){return c(this,void 0,void 0,(function*(){this.session||(yield this.connect());return yield this.request({method:"eth_requestAccounts"})}))}connect(e){return c(this,void 0,void 0,(function*(){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=function(e){const{chains:t,optionalChains:n,methods:r,optionalMethods:i,events:o,optionalEvents:s,rpcMap:a}=e;if(!Ic(t))throw new Error("Invalid chains");const u=t,c=r||Pc,l=o||Nc,f={chains:u,methods:c,events:l,rpcMap:{[Mc(u)]:a[Mc(u)]}},h=null==o?void 0:o.filter((e=>!Nc.includes(e))),d=null==r?void 0:r.filter((e=>!Pc.includes(e)));if(!(n||s||i||(null==h?void 0:h.length)||(null==d?void 0:d.length)))return{required:f};const p=(null==h?void 0:h.length)&&(null==d?void 0:d.length)||!n;return{required:f,optional:{chains:[...new Set(p?u.concat(n||[]):n)],methods:[...new Set(c.concat(i||[]))],events:[...new Set(l.concat(s||[]))],rpcMap:a}}}(this.rpc);try{const r=yield new Promise(((r,i)=>c(this,void 0,void 0,(function*(){yield this.signer.connect(Object.assign(Object.assign({namespaces:{[this.namespace]:t}},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:null==e?void 0:e.pairingTopic,skipPairing:!1})).then((e=>{r(e)})).catch((e=>{i(new Error(e.message))}))}))));if(!r)return;this.setChainIds(this.rpc.chains);const i=function(e,t=[]){const n=[];return Object.keys(e).forEach((r=>{if(t.length&&!t.includes(r))return;const i=e[r];n.push(...i.accounts)})),n}(r.namespaces,[this.namespace]);this.setAccounts(i),this.events.emit("connect",{chainId:Lc(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}}))}disconnect(){return c(this,void 0,void 0,(function*(){this.session&&(yield this.signer.disconnect()),this.reset()}))}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===n.name?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Lc(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Object.assign(Object.assign({},function(e,t){const{message:n,code:r}=xc[e];return{message:t?`${n} ${t}`:n,code:r}}("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))),n=t.map((e=>this.parseChainId(e)));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",Lc(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,r]=e.split(":");return{chainId:`${t}:${n}`,address:r}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t;return{chains:(null===(t=e.chains)||void 0===t?void 0:t.map((e=>this.formatChainId(e))))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map((e=>this.formatChainId(e))):void 0,methods:(null==e?void 0:e.methods)||Pc,events:(null==e?void 0:e.events)||Nc,optionalMethods:(null==e?void 0:e.optionalMethods)||[],optionalEvents:(null==e?void 0:e.optionalEvents)||[],rpcMap:(null==e?void 0:e.rpcMap)||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach((e=>{n[e]=this.getRpcUrl(e,t)})),n}initialize(e){return c(this,void 0,void 0,(function*(){this.rpc=this.getRpcConfig(e),this.chainId=Mc(this.rpc.chains),this.signer=yield Cc.exports.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),yield this.loadPersistedSession()}))}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:r}=e;t&&Ic(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)}))),n&&Ic(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null==n?void 0:n.map((e=>this.formatChainId(e))),n.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)})))}getRpcUrl(e,t){var n;return(null===(n=this.rpc.rpcMap)||void 0===n?void 0:n[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}loadPersistedSession(){return c(this,void 0,void 0,(function*(){if(!this.session)return;const e=yield this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:null==t?void 0:t.accounts),this.setAccounts(null==t?void 0:t.accounts)}))}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}const Uc=r("WalletConnectEvm"),Dc=i("WalletConnectEvm");function zc(){return c(this,void 0,void 0,(function*(){Uc("getWalletConnectProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){Uc("initWalletConnectProvider");const e=Yc();Uc("walletConnectProviderOptions is",e);const t=Ac;e.optionalMethods&&Array.isArray(e.optionalMethods)&&t.push(...e.optionalMethods.filter((e=>t.indexOf(e)<0)));const n=Tc;e.optionalEvents&&Array.isArray(e.optionalEvents)&&n.push(...e.optionalEvents.filter((e=>n.indexOf(e)<0)));const r={projectId:e.projectId,chains:e.chains,optionalChains:e.optionalChains,methods:e.methods,optionalMethods:t,events:e.events,optionalEvents:n,rpcMap:e.rpcMap,relayUrl:e.relayUrl,showQrModal:!1};Uc("ethereum init options are",r),Uc("creating a new provider instance");try{return jc.init(r)}catch(e){throw Dc("Error while initializing ethereum provider"),e}}))}();return function(e){if(Uc("assignWalletConnectProviderEvents"),!e)return;function t(e){e&&(e.removeListener("connect",n),e.removeListener("session_delete",r))}function n(e){Uc("connectHandler",e),Jo(!1)}function r(n){Uc("disconnectHandler",n),e.disconnect(),t(e)}t(e),e.on("connect",n),e.on("session_delete",r),Uc("provider is",e)}(e),e.request=function(e){Uc("patchWalletConnectProviderRequest");const t=e.request.bind(e),n=Yc();return Uc("walletConnectProviderOptions is",n),function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(Uc("calling patched",r,i),Uc("handling display_uri once"),e.once("display_uri",Fc),new Promise(((o,s)=>c(this,void 0,void 0,(function*(){var u,c;try{(null===(u=null==e?void 0:e.session)||void 0===u?void 0:u.connected)?(Uc("reusing existing session"),o(yield t({method:r,params:i}))):(c={uri:"",onClose:()=>{Dc("user rejected"),s(new a)}},qs("UseLedgerLiveModal",{isDesktop:"desktop"===Bs().type,uri:c.uri,onClose:c.onClose}),Uc("creating a new session"),yield e.connect({chains:n.chains,optionalChains:n.optionalChains}),o(yield t({method:r,params:i})))}catch(e){return Dc("error",e),s(e)}}))))):(Uc("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw Dc("error",t),t}}))}function Fc(e){Uc("displayUriHandler",e),Ts(e)}const Bc=r("getProvider"),Hc=[1];var qc,Vc;let $c;!function(e){e.Ethereum="Ethereum",e.Solana="Solana"}(qc||(qc={})),function(e){e.LedgerConnect="LedgerConnect",e.WalletConnect="WalletConnect"}(Vc||(Vc={}));const Wc=e=>(Bc("getHexChainId",e),"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)?e:`0x${e.toString(16)}`),Kc=r("supportOptions");let Gc;const Yc=()=>(Kc("getSupportOptions"),Gc),Qc=r("ExtensionEvm"),Jc="ethereum",Xc="isLedgerConnect";var Zc;function el(e){return("iOS"===e.os.name||"macOS"===e.os.name)&&"Safari"===e.browser.name}function tl(e){return!!Zc[e]}function nl(e){return e.every(tl)}function rl(){if(Qc("getEthereumProvider"),"undefined"==typeof window)throw new u;let e=window[Jc];if(Qc("provider is",e),void 0===e||void 0===e[Xc])throw new o;const t=Yc(),n=Wc(t.chainId||0);return Wc(e.chainId)!=n&&(Qc("chainIds are different, changing to",n),e.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})),e}!function(e){e[e.EthereumMainnet=1]="EthereumMainnet",e[e.Polygon=137]="Polygon"}(Zc||(Zc={}));const il=r("support");let ol;var sl=Object.freeze({__proto__:null,link:function(e,t,n,r){var i=this;return e?((e instanceof Element?[e]:"toArray"in e?e.toArray():e).forEach((function(e){e.addEventListener("click",(function(o){var s,a,u=t instanceof Function?t(e):t,c=n instanceof Function?n(e):n,l=e.getAttribute("href")||e.getAttributeNS("http://www.w3.org/1999/xlink","href")||e.getAttribute("xlink:href")||(null===(s=e.getElementsByTagName("a")[0])||void 0===s?void 0:s.getAttribute("href")),f=Dt(i.track(u,c,null!=r?r:{}),null!==(a=i.settings.timeout)&&void 0!==a?a:500);(function(e,t){return!("_blank"!==e.target||!t)})(e,l)||function(e){var t=e;return!!(t.ctrlKey||t.shiftKey||t.metaKey||t.button&&1==t.button)}(o)||l&&(o.preventDefault?o.preventDefault():o.returnValue=!1,f.catch(console.error).then((function(){window.location.href=l})).catch(console.error))}),!1)})),this):this},form:function(e,t,n,r){var i=this;return e?(e instanceof HTMLFormElement&&(e=[e]),e.forEach((function(e){if(!(e instanceof Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var o=function(o){var s;o.preventDefault?o.preventDefault():o.returnValue=!1;var a=t instanceof Function?t(e):t,u=n instanceof Function?n(e):n;Dt(i.track(a,u,null!=r?r:{}),null!==(s=i.settings.timeout)&&void 0!==s?s:500).catch(console.error).then((function(){e.submit()})).catch(console.error)},s=window.jQuery||window.Zepto;s?s(e).submit(o):e.addEventListener("submit",o,!1)})),this):this}});function al(e,t){return Object.keys(t).reduce((function(n,r){r.startsWith(e)&&(n[r.substr(e.length)]=t[r]);return n}),{})}for(var ul=Object.freeze({__proto__:null,queryString:function(e,t){var n=document.createElement("a");n.href=t;var r=n.search.slice(1).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=yn(i),e}),{}),i=[],o=r.ajs_uid,s=r.ajs_event,a=r.ajs_aid,u=Mt(e.options.useQueryString)?e.options.useQueryString:{},c=u.aid,l=void 0===c?/.+/:c,f=u.uid,h=void 0===f?/.+/:f;if(a){var d=Array.isArray(r.ajs_aid)?r.ajs_aid[0]:r.ajs_aid;l.test(d)&&e.setAnonymousId(d)}if(o){var p=Array.isArray(r.ajs_uid)?r.ajs_uid[0]:r.ajs_uid;if(h.test(p)){var g=al("ajs_trait_",r);i.push(e.identify(p,g))}}if(s){var y=Array.isArray(r.ajs_event)?r.ajs_event[0]:r.ajs_event,v=al("ajs_prop_",r);i.push(e.track(y,v))}return Promise.all(i)}}),cl={},ll={},fl=[],hl=0;hl<64;)fl[hl]=0|4294967296*Math.sin(++hl%Math.PI);var dl=Object.freeze({__proto__:null,default:function(e){var t,n,r,i=[t=1732584193,n=4023233417,~t,~n],o=[],s=unescape(encodeURI(e))+"€",a=s.length;for(e=--a/4+2|15,o[--e]=8*a;~a;)o[a>>2]|=s.charCodeAt(a)<<8*a--;for(hl=s=0;hl<e;hl+=16){for(a=i;s<64;a=[r=a[3],t+((r=a[0]+[t&n|~t&r,r&t|~r&n,t^n^r,n^(t|~r)][a=s>>4]+fl[s]+~~o[hl|15&[s,5*s+1,3*s+5,7*s][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+s++%4])|r>>>-a),t,n])t=0|a[1],n=a[2];for(s=4;s;)i[--s]+=a[s]}for(e="";s<32;)e+=(i[s>>3]>>4*(1^s++)&15).toString(16);return e}}),pl=h(dl),gl={exports:{}};!function(e,t){e.exports=function(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}}(gl);
329
+ */mg=bg,_g=bg.exports,function(){var e,n="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",l=1,f=2,h=4,d=1,p=2,g=1,y=2,v=4,m=8,_=16,b=32,w=64,E=128,S=256,O=512,x=30,I="...",R=800,k=16,C=1,P=2,A=3,N=1/0,T=9007199254740991,M=17976931348623157e292,L=NaN,j=4294967295,U=j-1,D=j>>>1,z=[["ary",E],["bind",g],["bindKey",y],["curry",m],["curryRight",_],["flip",O],["partial",b],["partialRight",w],["rearg",S]],F="[object Arguments]",B="[object Array]",H="[object AsyncFunction]",q="[object Boolean]",V="[object Date]",$="[object DOMException]",W="[object Error]",K="[object Function]",G="[object GeneratorFunction]",Y="[object Map]",Q="[object Number]",J="[object Null]",X="[object Object]",Z="[object Promise]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object Undefined]",se="[object WeakMap]",ae="[object WeakSet]",ue="[object ArrayBuffer]",ce="[object DataView]",le="[object Float32Array]",fe="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",pe="[object Int32Array]",ge="[object Uint8Array]",ye="[object Uint8ClampedArray]",ve="[object Uint16Array]",me="[object Uint32Array]",_e=/\b__p \+= '';/g,be=/\b(__p \+=) '' \+/g,we=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ee=/&(?:amp|lt|gt|quot|#39);/g,Se=/[&<>"']/g,Oe=RegExp(Ee.source),xe=RegExp(Se.source),Ie=/<%-([\s\S]+?)%>/g,Re=/<%([\s\S]+?)%>/g,ke=/<%=([\s\S]+?)%>/g,Ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/,Ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ne=/[\\^$.*+?()[\]{}|]/g,Te=RegExp(Ne.source),Me=/^\s+/,Le=/\s/,je=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ue=/\{\n\/\* \[wrapped with (.+)\] \*/,De=/,? & /,ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/[()=,{}\[\]\/\s]/,Be=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qe=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,$e=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ke=/^0o[0-7]+$/i,Ge=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,Xe="\\ud800-\\udfff",Ze="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",et="\\u2700-\\u27bf",tt="a-z\\xdf-\\xf6\\xf8-\\xff",nt="A-Z\\xc0-\\xd6\\xd8-\\xde",rt="\\ufe0e\\ufe0f",it="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ot="['’]",st="["+Xe+"]",at="["+it+"]",ut="["+Ze+"]",ct="\\d+",lt="["+et+"]",ft="["+tt+"]",ht="[^"+Xe+it+ct+et+tt+nt+"]",dt="\\ud83c[\\udffb-\\udfff]",pt="[^"+Xe+"]",gt="(?:\\ud83c[\\udde6-\\uddff]){2}",yt="[\\ud800-\\udbff][\\udc00-\\udfff]",vt="["+nt+"]",mt="\\u200d",_t="(?:"+ft+"|"+ht+")",bt="(?:"+vt+"|"+ht+")",wt="(?:"+ot+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+ot+"(?:D|LL|M|RE|S|T|VE))?",St="(?:"+ut+"|"+dt+")?",Ot="["+rt+"]?",xt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rt=Ot+St+"(?:"+mt+"(?:"+[pt,gt,yt].join("|")+")"+Ot+St+")*",kt="(?:"+[lt,gt,yt].join("|")+")"+Rt,Ct="(?:"+[pt+ut+"?",ut,gt,yt,st].join("|")+")",Pt=RegExp(ot,"g"),At=RegExp(ut,"g"),Nt=RegExp(dt+"(?="+dt+")|"+Ct+Rt,"g"),Tt=RegExp([vt+"?"+ft+"+"+wt+"(?="+[at,vt,"$"].join("|")+")",bt+"+"+Et+"(?="+[at,vt+_t,"$"].join("|")+")",vt+"?"+_t+"+"+wt,vt+"+"+Et,It,xt,ct,kt].join("|"),"g"),Mt=RegExp("["+mt+Xe+Ze+rt+"]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ut=-1,Dt={};Dt[le]=Dt[fe]=Dt[he]=Dt[de]=Dt[pe]=Dt[ge]=Dt[ye]=Dt[ve]=Dt[me]=!0,Dt[F]=Dt[B]=Dt[ue]=Dt[q]=Dt[ce]=Dt[V]=Dt[W]=Dt[K]=Dt[Y]=Dt[Q]=Dt[X]=Dt[te]=Dt[ne]=Dt[re]=Dt[se]=!1;var zt={};zt[F]=zt[B]=zt[ue]=zt[ce]=zt[q]=zt[V]=zt[le]=zt[fe]=zt[he]=zt[de]=zt[pe]=zt[Y]=zt[Q]=zt[X]=zt[te]=zt[ne]=zt[re]=zt[ie]=zt[ge]=zt[ye]=zt[ve]=zt[me]=!0,zt[W]=zt[K]=zt[se]=!1;var Ft={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ht={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,$t=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Kt="object"==typeof self&&self&&self.Object===Object&&self,Gt=Wt||Kt||Function("return this")(),Yt=_g&&!_g.nodeType&&_g,Qt=Yt&&mg&&!mg.nodeType&&mg,Jt=Qt&&Qt.exports===Yt,Xt=Jt&&Wt.process,Zt=function(){try{return Qt&&Qt.require&&Qt.require("util").types||Xt&&Xt.binding&&Xt.binding("util")}catch{}}(),en=Zt&&Zt.isArrayBuffer,tn=Zt&&Zt.isDate,nn=Zt&&Zt.isMap,rn=Zt&&Zt.isRegExp,on=Zt&&Zt.isSet,sn=Zt&&Zt.isTypedArray;function an(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function un(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function cn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ln(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function fn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function hn(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function dn(e,t){return!(null==e||!e.length)&&xn(e,t,0)>-1}function pn(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function gn(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function yn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function vn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function mn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function _n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bn=Cn("length");function wn(e){return e.split("")}function En(e){return e.match(ze)||[]}function Sn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function On(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function xn(e,t,n){return t==t?tr(e,t,n):On(e,Rn,n)}function In(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Rn(e){return e!=e}function kn(e,t){var n=null==e?0:e.length;return n?Tn(e,t)/n:L}function Cn(t){return function(n){return null==n?e:n[t]}}function Pn(t){return function(n){return null==t?e:t[n]}}function An(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Nn(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Tn(t,n){for(var r,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==e&&(r=r===e?s:r+s)}return r}function Mn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ln(e,t){return gn(t,(function(t){return[t,e[t]]}))}function jn(e){return e&&e.slice(0,or(e)+1).replace(Me,"")}function Un(e){return function(t){return e(t)}}function Dn(e,t){return gn(t,(function(t){return e[t]}))}function zn(e,t){return e.has(t)}function Fn(e,t){for(var n=-1,r=e.length;++n<r&&xn(t,e[n],0)>-1;);return n}function Bn(e,t){for(var n=e.length;n--&&xn(t,e[n],0)>-1;);return n}function Hn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var qn=Pn(Ft),Vn=Pn(Bt);function $n(e){return"\\"+qt[e]}function Wn(t,n){return null==t?e:t[n]}function Kn(e){return Mt.test(e)}function Gn(e){return Lt.test(e)}function Yn(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Qn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Jn(e,t){return function(n){return e(t(n))}}function Xn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];(s===t||s===c)&&(e[n]=c,o[i++]=n)}return o}function Zn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function er(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function tr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function nr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function rr(e){return Kn(e)?ar(e):bn(e)}function ir(e){return Kn(e)?ur(e):wn(e)}function or(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var sr=Pn(Ht);function ar(e){for(var t=Nt.lastIndex=0;Nt.test(e);)++t;return t}function ur(e){return e.match(Nt)||[]}function cr(e){return e.match(Tt)||[]}var lr=function t(Le){var ze=(Le=null==Le?Gt:fr.defaults(Gt.Object(),Le,fr.pick(Gt,jt))).Array,Xe=Le.Date,Ze=Le.Error,et=Le.Function,tt=Le.Math,nt=Le.Object,rt=Le.RegExp,it=Le.String,ot=Le.TypeError,st=ze.prototype,at=et.prototype,ut=nt.prototype,ct=Le["__core-js_shared__"],lt=at.toString,ft=ut.hasOwnProperty,ht=0,dt=function(){var e=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),pt=ut.toString,gt=lt.call(nt),yt=Gt._,vt=rt("^"+lt.call(ft).replace(Ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=Jt?Le.Buffer:e,_t=Le.Symbol,bt=Le.Uint8Array,wt=mt?mt.allocUnsafe:e,Et=Jn(nt.getPrototypeOf,nt),St=nt.create,Ot=ut.propertyIsEnumerable,xt=st.splice,It=_t?_t.isConcatSpreadable:e,Rt=_t?_t.iterator:e,kt=_t?_t.toStringTag:e,Ct=function(){try{var e=Ks(nt,"defineProperty");return e({},"",{}),e}catch{}}(),Nt=Le.clearTimeout!==Gt.clearTimeout&&Le.clearTimeout,Tt=Xe&&Xe.now!==Gt.Date.now&&Xe.now,Mt=Le.setTimeout!==Gt.setTimeout&&Le.setTimeout,Lt=tt.ceil,Ft=tt.floor,Bt=nt.getOwnPropertySymbols,Ht=mt?mt.isBuffer:e,qt=Le.isFinite,Wt=st.join,Kt=Jn(nt.keys,nt),Yt=tt.max,Qt=tt.min,Xt=Xe.now,Zt=Le.parseInt,bn=tt.random,wn=st.reverse,Pn=Ks(Le,"DataView"),tr=Ks(Le,"Map"),ar=Ks(Le,"Promise"),ur=Ks(Le,"Set"),lr=Ks(Le,"WeakMap"),hr=Ks(nt,"create"),dr=lr&&new lr,pr={},gr=Na(Pn),yr=Na(tr),vr=Na(ar),mr=Na(ur),_r=Na(lr),br=_t?_t.prototype:e,wr=br?br.valueOf:e,Er=br?br.toString:e;function Sr(e){if(xl(e)&&!ul(e)&&!(e instanceof Rr)){if(e instanceof Ir)return e;if(ft.call(e,"__wrapped__"))return Ma(e)}return new Ir(e)}var Or=function(){function t(){}return function(n){if(!Ol(n))return{};if(St)return St(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function xr(){}function Ir(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Rr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function kr(){var e=new Rr(this.__wrapped__);return e.__actions__=is(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=is(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=is(this.__views__),e}function Cr(){if(this.__filtered__){var e=new Rr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e}function Pr(){var e=this.__wrapped__.value(),t=this.__dir__,n=ul(e),r=t<0,i=n?e.length:0,o=Xs(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=r?a:s-1,l=this.__iteratees__,f=l.length,h=0,d=Qt(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return zo(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var g=-1,y=e[c+=t];++g<f;){var v=l[g],m=v.iteratee,_=v.type,b=m(y);if(_==P)y=b;else if(!b){if(_==C)continue e;break e}}p[h++]=y}return p}function Ar(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Nr(){this.__data__=hr?hr(null):{},this.size=0}function Tr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Mr(t){var n=this.__data__;if(hr){var r=n[t];return r===a?e:r}return ft.call(n,t)?n[t]:e}function Lr(t){var n=this.__data__;return hr?n[t]!==e:ft.call(n,t)}function jr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=hr&&n===e?a:n,this}function Ur(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dr(){this.__data__=[],this.size=0}function zr(e){var t=this.__data__,n=li(t,e);return!(n<0||(n==t.length-1?t.pop():xt.call(t,n,1),--this.size,0))}function Fr(t){var n=this.__data__,r=li(n,t);return r<0?e:n[r][1]}function Br(e){return li(this.__data__,e)>-1}function Hr(e,t){var n=this.__data__,r=li(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function qr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vr(){this.size=0,this.__data__={hash:new Ar,map:new(tr||Ur),string:new Ar}}function $r(e){var t=$s(this,e).delete(e);return this.size-=t?1:0,t}function Wr(e){return $s(this,e).get(e)}function Kr(e){return $s(this,e).has(e)}function Gr(e,t){var n=$s(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Yr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qr;++t<n;)this.add(e[t])}function Qr(e){return this.__data__.set(e,a),this}function Jr(e){return this.__data__.has(e)}function Xr(e){var t=this.__data__=new Ur(e);this.size=t.size}function Zr(){this.__data__=new Ur,this.size=0}function ei(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ti(e){return this.__data__.get(e)}function ni(e){return this.__data__.has(e)}function ri(e,t){var n=this.__data__;if(n instanceof Ur){var i=n.__data__;if(!tr||i.length<r-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new qr(i)}return n.set(e,t),this.size=n.size,this}function ii(e,t){var n=ul(e),r=!n&&al(e),i=!n&&!r&&dl(e),o=!n&&!r&&!i&&Fl(e),s=n||r||i||o,a=s?Mn(e.length,it):[],u=a.length;for(var c in e)(t||ft.call(e,c))&&(!s||!("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sa(c,u)))&&a.push(c);return a}function oi(t){var n=t.length;return n?t[mo(0,n-1)]:e}function si(e,t){return Ca(is(e),yi(t,0,e.length))}function ai(e){return Ca(is(e))}function ui(t,n,r){(r!==e&&!il(t[n],r)||r===e&&!(n in t))&&pi(t,n,r)}function ci(t,n,r){var i=t[n];(!ft.call(t,n)||!il(i,r)||r===e&&!(n in t))&&pi(t,n,r)}function li(e,t){for(var n=e.length;n--;)if(il(e[n][0],t))return n;return-1}function fi(e,t,n,r){return Ei(e,(function(e,i,o){t(r,e,n(e),o)})),r}function hi(e,t){return e&&os(t,Sf(t),e)}function di(e,t){return e&&os(t,Of(t),e)}function pi(e,t,n){"__proto__"==t&&Ct?Ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function gi(t,n){for(var r=-1,i=n.length,o=ze(i),s=null==t;++r<i;)o[r]=s?e:vf(t,n[r]);return o}function yi(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function vi(t,n,r,i,o,s){var a,u=n&l,c=n&f,d=n&h;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!Ol(t))return t;var p=ul(t);if(p){if(a=ta(t),!u)return is(t,a)}else{var g=Js(t),y=g==K||g==G;if(dl(t))return Go(t,u);if(g==X||g==F||y&&!o){if(a=c||y?{}:na(t),!u)return c?as(t,di(a,t)):ss(t,hi(a,t))}else{if(!zt[g])return o?t:{};a=ra(t,g,u)}}s||(s=new Xr);var v=s.get(t);if(v)return v;s.set(t,a),Ul(t)?t.forEach((function(e){a.add(vi(e,n,r,e,t,s))})):Il(t)&&t.forEach((function(e,i){a.set(i,vi(e,n,r,i,t,s))}));var m=p?e:(d?c?Fs:zs:c?Of:Sf)(t);return cn(m||t,(function(e,i){m&&(e=t[i=e]),ci(a,i,vi(e,n,r,i,t,s))})),a}function mi(e){var t=Sf(e);return function(n){return _i(n,e,t)}}function _i(t,n,r){var i=r.length;if(null==t)return!i;for(t=nt(t);i--;){var o=r[i],s=n[o],a=t[o];if(a===e&&!(o in t)||!s(a))return!1}return!0}function bi(t,n,r){if("function"!=typeof t)throw new ot(o);return xa((function(){t.apply(e,r)}),n)}function wi(e,t,n,i){var o=-1,s=dn,a=!0,u=e.length,c=[],l=t.length;if(!u)return c;n&&(t=gn(t,Un(n))),i?(s=pn,a=!1):t.length>=r&&(s=zn,a=!1,t=new Yr(t));e:for(;++o<u;){var f=e[o],h=null==n?f:n(f);if(f=i||0!==f?f:0,a&&h==h){for(var d=l;d--;)if(t[d]===h)continue e;c.push(f)}else s(t,h,i)||c.push(f)}return c}Sr.templateSettings={escape:Ie,evaluate:Re,interpolate:ke,variable:"",imports:{_:Sr}},Sr.prototype=xr.prototype,Sr.prototype.constructor=Sr,Ir.prototype=Or(xr.prototype),Ir.prototype.constructor=Ir,Rr.prototype=Or(xr.prototype),Rr.prototype.constructor=Rr,Ar.prototype.clear=Nr,Ar.prototype.delete=Tr,Ar.prototype.get=Mr,Ar.prototype.has=Lr,Ar.prototype.set=jr,Ur.prototype.clear=Dr,Ur.prototype.delete=zr,Ur.prototype.get=Fr,Ur.prototype.has=Br,Ur.prototype.set=Hr,qr.prototype.clear=Vr,qr.prototype.delete=$r,qr.prototype.get=Wr,qr.prototype.has=Kr,qr.prototype.set=Gr,Yr.prototype.add=Yr.prototype.push=Qr,Yr.prototype.has=Jr,Xr.prototype.clear=Zr,Xr.prototype.delete=ei,Xr.prototype.get=ti,Xr.prototype.has=ni,Xr.prototype.set=ri;var Ei=ls(Ai),Si=ls(Ni,!0);function Oi(e,t){var n=!0;return Ei(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function xi(t,n,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n(s);if(null!=a&&(u===e?a==a&&!zl(a):r(a,u)))var u=a,c=s}return c}function Ii(t,n,r,i){var o=t.length;for((r=Gl(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:Gl(i))<0&&(i+=o),i=r>i?0:Yl(i);r<i;)t[r++]=n;return t}function Ri(e,t){var n=[];return Ei(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function ki(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=oa),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?ki(a,t-1,n,r,i):yn(i,a):r||(i[i.length]=a)}return i}var Ci=fs(),Pi=fs(!0);function Ai(e,t){return e&&Ci(e,t,Sf)}function Ni(e,t){return e&&Pi(e,t,Sf)}function Ti(e,t){return hn(t,(function(t){return wl(e[t])}))}function Mi(t,n){for(var r=0,i=(n=Vo(n,t)).length;null!=t&&r<i;)t=t[Aa(n[r++])];return r&&r==i?t:e}function Li(e,t,n){var r=t(e);return ul(e)?r:yn(r,n(e))}function ji(t){return null==t?t===e?oe:J:kt&&kt in nt(t)?Gs(t):_a(t)}function Ui(e,t){return e>t}function Di(e,t){return null!=e&&ft.call(e,t)}function zi(e,t){return null!=e&&t in nt(e)}function Fi(e,t,n){return e>=Qt(t,n)&&e<Yt(t,n)}function Bi(t,n,r){for(var i=r?pn:dn,o=t[0].length,s=t.length,a=s,u=ze(s),c=1/0,l=[];a--;){var f=t[a];a&&n&&(f=gn(f,Un(n))),c=Qt(f.length,c),u[a]=!r&&(n||o>=120&&f.length>=120)?new Yr(a&&f):e}f=t[0];var h=-1,d=u[0];e:for(;++h<o&&l.length<c;){var p=f[h],g=n?n(p):p;if(p=r||0!==p?p:0,!(d?zn(d,g):i(l,g,r))){for(a=s;--a;){var y=u[a];if(!(y?zn(y,g):i(t[a],g,r)))continue e}d&&d.push(g),l.push(p)}}return l}function Hi(e,t,n,r){return Ai(e,(function(e,i,o){t(r,n(e),i,o)})),r}function qi(t,n,r){var i=null==(t=wa(t,n=Vo(n,t)))?t:t[Aa(ou(n))];return null==i?e:an(i,t,r)}function Vi(e){return xl(e)&&ji(e)==F}function $i(e){return xl(e)&&ji(e)==ue}function Wi(e){return xl(e)&&ji(e)==V}function Ki(e,t,n,r,i){return e===t||(null==e||null==t||!xl(e)&&!xl(t)?e!=e&&t!=t:Gi(e,t,n,r,Ki,i))}function Gi(e,t,n,r,i,o){var s=ul(e),a=ul(t),u=s?B:Js(e),c=a?B:Js(t),l=(u=u==F?X:u)==X,f=(c=c==F?X:c)==X,h=u==c;if(h&&dl(e)){if(!dl(t))return!1;s=!0,l=!1}if(h&&!l)return o||(o=new Xr),s||Fl(e)?Ls(e,t,n,r,i,o):js(e,t,u,n,r,i,o);if(!(n&d)){var p=l&&ft.call(e,"__wrapped__"),g=f&&ft.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,v=g?t.value():t;return o||(o=new Xr),i(y,v,n,r,o)}}return!!h&&(o||(o=new Xr),Us(e,t,n,r,i,o))}function Yi(e){return xl(e)&&Js(e)==Y}function Qi(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=nt(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var c=(u=r[o])[0],l=t[c],f=u[1];if(a&&u[2]){if(l===e&&!(c in t))return!1}else{var h=new Xr;if(i)var g=i(l,f,c,t,n,h);if(!(g===e?Ki(f,l,d|p,i,h):g))return!1}}return!0}function Ji(e){return!(!Ol(e)||fa(e))&&(wl(e)?vt:We).test(Na(e))}function Xi(e){return xl(e)&&ji(e)==te}function Zi(e){return xl(e)&&Js(e)==ne}function eo(e){return xl(e)&&Sl(e.length)&&!!Dt[ji(e)]}function to(e){return"function"==typeof e?e:null==e?Ah:"object"==typeof e?ul(e)?ao(e[0],e[1]):so(e):Vh(e)}function no(e){if(!da(e))return Kt(e);var t=[];for(var n in nt(e))ft.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ro(e){if(!Ol(e))return ma(e);var t=da(e),n=[];for(var r in e)"constructor"==r&&(t||!ft.call(e,r))||n.push(r);return n}function io(e,t){return e<t}function oo(e,t){var n=-1,r=ll(e)?ze(e.length):[];return Ei(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function so(e){var t=Ws(e);return 1==t.length&&t[0][2]?ga(t[0][0],t[0][1]):function(n){return n===e||Qi(n,e,t)}}function ao(t,n){return ua(t)&&pa(n)?ga(Aa(t),n):function(r){var i=vf(r,t);return i===e&&i===n?_f(r,t):Ki(n,i,d|p)}}function uo(t,n,r,i,o){t!==n&&Ci(n,(function(s,a){if(o||(o=new Xr),Ol(s))co(t,n,a,r,uo,i,o);else{var u=i?i(Sa(t,a),s,a+"",t,n,o):e;u===e&&(u=s),ui(t,a,u)}}),Of)}function co(t,n,r,i,o,s,a){var u=Sa(t,r),c=Sa(n,r),l=a.get(c);if(l)ui(t,r,l);else{var f=s?s(u,c,r+"",t,n,a):e,h=f===e;if(h){var d=ul(c),p=!d&&dl(c),g=!d&&!p&&Fl(c);f=c,d||p||g?ul(u)?f=u:fl(u)?f=is(u):p?(h=!1,f=Go(c,!0)):g?(h=!1,f=Zo(c,!0)):f=[]:Ml(c)||al(c)?(f=u,al(u)?f=Jl(u):(!Ol(u)||wl(u))&&(f=na(c))):h=!1}h&&(a.set(c,f),o(f,c,i,s,a),a.delete(c)),ui(t,r,f)}}function lo(t,n){var r=t.length;if(r)return sa(n+=n<0?r:0,r)?t[n]:e}function fo(e,t,n){t=t.length?gn(t,(function(e){return ul(e)?function(t){return Mi(t,1===e.length?e[0]:e)}:e})):[Ah];var r=-1;t=gn(t,Un(Vs()));var i=oo(e,(function(e,n,i){var o=gn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return Nn(i,(function(e,t){return ts(e,t,n)}))}function ho(e,t){return po(e,t,(function(t,n){return _f(e,n)}))}function po(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Mi(e,s);n(a,s)&&Oo(o,Vo(s,e),a)}return o}function go(e){return function(t){return Mi(t,e)}}function yo(e,t,n,r){var i=r?In:xn,o=-1,s=t.length,a=e;for(e===t&&(t=is(t)),n&&(a=gn(e,Un(n)));++o<s;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(a,l,u,r))>-1;)a!==e&&xt.call(a,u,1),xt.call(e,u,1);return e}function vo(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;sa(i)?xt.call(e,i,1):jo(e,i)}}return e}function mo(e,t){return e+Ft(bn()*(t-e+1))}function _o(e,t,n,r){for(var i=-1,o=Yt(Lt((t-e)/(n||1)),0),s=ze(o);o--;)s[r?o:++i]=e,e+=n;return s}function bo(e,t){var n="";if(!e||t<1||t>T)return n;do{t%2&&(n+=e),(t=Ft(t/2))&&(e+=e)}while(t);return n}function wo(e,t){return Ia(ba(e,t,Ah),e+"")}function Eo(e){return oi(Hf(e))}function So(e,t){var n=Hf(e);return Ca(n,yi(t,0,n.length))}function Oo(t,n,r,i){if(!Ol(t))return t;for(var o=-1,s=(n=Vo(n,t)).length,a=s-1,u=t;null!=u&&++o<s;){var c=Aa(n[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var f=u[c];(l=i?i(f,c,u):e)===e&&(l=Ol(f)?f:sa(n[o+1])?[]:{})}ci(u,c,l),u=u[c]}return t}var xo=dr?function(e,t){return dr.set(e,t),e}:Ah,Io=Ct?function(e,t){return Ct(e,"toString",{configurable:!0,enumerable:!1,value:Rh(t),writable:!0})}:Ah;function Ro(e){return Ca(Hf(e))}function ko(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=ze(i);++r<i;)o[r]=e[r+t];return o}function Co(e,t){var n;return Ei(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Po(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=D){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!zl(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return Ao(e,t,Ah,n)}function Ao(t,n,r,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(n=r(n))!=n,u=null===n,c=zl(n),l=n===e;o<s;){var f=Ft((o+s)/2),h=r(t[f]),d=h!==e,p=null===h,g=h==h,y=zl(h);if(a)var v=i||g;else v=l?g&&(i||d):u?g&&d&&(i||!p):c?g&&d&&!p&&(i||!y):!p&&!y&&(i?h<=n:h<n);v?o=f+1:s=f}return Qt(s,U)}function No(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!il(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function To(e){return"number"==typeof e?e:zl(e)?L:+e}function Mo(e){if("string"==typeof e)return e;if(ul(e))return gn(e,Mo)+"";if(zl(e))return Er?Er.call(e):"";var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Lo(e,t,n){var i=-1,o=dn,s=e.length,a=!0,u=[],c=u;if(n)a=!1,o=pn;else if(s>=r){var l=t?null:Cs(e);if(l)return Zn(l);a=!1,o=zn,c=new Yr}else c=t?[]:u;e:for(;++i<s;){var f=e[i],h=t?t(f):f;if(f=n||0!==f?f:0,a&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue e;t&&c.push(h),u.push(f)}else o(c,h,n)||(c!==u&&c.push(h),u.push(f))}return u}function jo(e,t){return null==(e=wa(e,t=Vo(t,e)))||delete e[Aa(ou(t))]}function Uo(e,t,n,r){return Oo(e,t,n(Mi(e,t)),r)}function Do(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ko(e,r?0:o,r?o+1:i):ko(e,r?o+1:0,r?i:o)}function zo(e,t){var n=e;return n instanceof Rr&&(n=n.value()),vn(t,(function(e,t){return t.func.apply(t.thisArg,yn([e],t.args))}),n)}function Fo(e,t,n){var r=e.length;if(r<2)return r?Lo(e[0]):[];for(var i=-1,o=ze(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=wi(o[i]||s,e[a],t,n));return Lo(ki(o,1),t,n)}function Bo(t,n,r){for(var i=-1,o=t.length,s=n.length,a={};++i<o;){var u=i<s?n[i]:e;r(a,t[i],u)}return a}function Ho(e){return fl(e)?e:[]}function qo(e){return"function"==typeof e?e:Ah}function Vo(e,t){return ul(e)?e:ua(e,t)?[e]:Pa(Zl(e))}var $o=wo;function Wo(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:ko(t,n,r)}var Ko=Nt||function(e){return Gt.clearTimeout(e)};function Go(e,t){if(t)return e.slice();var n=e.length,r=wt?wt(n):new e.constructor(n);return e.copy(r),r}function Yo(e){var t=new e.constructor(e.byteLength);return new bt(t).set(new bt(e)),t}function Qo(e,t){var n=t?Yo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Jo(e){var t=new e.constructor(e.source,qe.exec(e));return t.lastIndex=e.lastIndex,t}function Xo(e){return wr?nt(wr.call(e)):{}}function Zo(e,t){var n=t?Yo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function es(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=zl(t),a=n!==e,u=null===n,c=n==n,l=zl(n);if(!u&&!l&&!s&&t>n||s&&a&&c&&!u&&!l||i&&a&&c||!r&&c||!o)return 1;if(!i&&!s&&!l&&t<n||l&&r&&o&&!i&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function ts(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var u=es(i[r],o[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}function ns(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,u=t.length,c=Yt(o-s,0),l=ze(u+c),f=!r;++a<u;)l[a]=t[a];for(;++i<s;)(f||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[a++]=e[i++];return l}function rs(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,u=-1,c=t.length,l=Yt(o-a,0),f=ze(l+c),h=!r;++i<l;)f[i]=e[i];for(var d=i;++u<c;)f[d+u]=t[u];for(;++s<a;)(h||i<o)&&(f[d+n[s]]=e[i++]);return f}function is(e,t){var n=-1,r=e.length;for(t||(t=ze(r));++n<r;)t[n]=e[n];return t}function os(t,n,r,i){var o=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var u=n[s],c=i?i(r[u],t[u],u,r,t):e;c===e&&(c=t[u]),o?pi(r,u,c):ci(r,u,c)}return r}function ss(e,t){return os(e,Ys(e),t)}function as(e,t){return os(e,Qs(e),t)}function us(e,t){return function(n,r){var i=ul(n)?un:fi,o=t?t():{};return i(n,e,Vs(r,2),o)}}function cs(t){return wo((function(n,r){var i=-1,o=r.length,s=o>1?r[o-1]:e,a=o>2?r[2]:e;for(s=t.length>3&&"function"==typeof s?(o--,s):e,a&&aa(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=nt(n);++i<o;){var u=r[i];u&&t(n,u,i,s)}return n}))}function ls(e,t){return function(n,r){if(null==n)return n;if(!ll(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=nt(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function fs(e){return function(t,n,r){for(var i=-1,o=nt(t),s=r(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===n(o[u],u,o))break}return t}}function hs(e,t,n){var r=t&g,i=gs(e);function o(){return(this&&this!==Gt&&this instanceof o?i:e).apply(r?n:this,arguments)}return o}function ds(t){return function(n){var r=Kn(n=Zl(n))?ir(n):e,i=r?r[0]:n.charAt(0),o=r?Wo(r,1).join(""):n.slice(1);return i[t]()+o}}function ps(e){return function(t){return vn(Eh(Yf(t).replace(Pt,"")),e,"")}}function gs(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Or(e.prototype),r=e.apply(n,t);return Ol(r)?r:n}}function ys(t,n,r){var i=gs(t);function o(){for(var s=arguments.length,a=ze(s),u=s,c=qs(o);u--;)a[u]=arguments[u];var l=s<3&&a[0]!==c&&a[s-1]!==c?[]:Xn(a,c);return(s-=l.length)<r?Rs(t,n,_s,o.placeholder,e,a,l,e,e,r-s):an(this&&this!==Gt&&this instanceof o?i:t,this,a)}return o}function vs(t){return function(n,r,i){var o=nt(n);if(!ll(n)){var s=Vs(r,3);n=Sf(n),r=function(e){return s(o[e],e,o)}}var a=t(n,r,i);return a>-1?o[s?n[a]:a]:e}}function ms(t){return Ds((function(n){var r=n.length,i=r,s=Ir.prototype.thru;for(t&&n.reverse();i--;){var a=n[i];if("function"!=typeof a)throw new ot(o);if(s&&!u&&"wrapper"==Hs(a))var u=new Ir([],!0)}for(i=u?i:r;++i<r;){var c=Hs(a=n[i]),l="wrapper"==c?Bs(a):e;u=l&&la(l[0])&&l[1]==(E|m|b|S)&&!l[4].length&&1==l[9]?u[Hs(l[0])].apply(u,l[3]):1==a.length&&la(a)?u[c]():u.thru(a)}return function(){var e=arguments,t=e[0];if(u&&1==e.length&&ul(t))return u.plant(t).value();for(var i=0,o=r?n[i].apply(this,e):t;++i<r;)o=n[i].call(this,o);return o}}))}function _s(t,n,r,i,o,s,a,u,c,l){var f=n&E,h=n&g,d=n&y,p=n&(m|_),v=n&O,b=d?e:gs(t);function w(){for(var e=arguments.length,g=ze(e),y=e;y--;)g[y]=arguments[y];if(p)var m=qs(w),_=Hn(g,m);if(i&&(g=ns(g,i,o,p)),s&&(g=rs(g,s,a,p)),e-=_,p&&e<l){var E=Xn(g,m);return Rs(t,n,_s,w.placeholder,r,g,E,u,c,l-e)}var S=h?r:this,O=d?S[t]:t;return e=g.length,u?g=Ea(g,u):v&&e>1&&g.reverse(),f&&c<e&&(g.length=c),this&&this!==Gt&&this instanceof w&&(O=b||gs(O)),O.apply(S,g)}return w}function bs(e,t){return function(n,r){return Hi(n,e,t(r),{})}}function ws(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=Mo(r),i=Mo(i)):(r=To(r),i=To(i)),o=t(r,i)}return o}}function Es(e){return Ds((function(t){return t=gn(t,Un(Vs())),wo((function(n){var r=this;return e(t,(function(e){return an(e,r,n)}))}))}))}function Ss(t,n){var r=(n=n===e?" ":Mo(n)).length;if(r<2)return r?bo(n,t):n;var i=bo(n,Lt(t/rr(n)));return Kn(n)?Wo(ir(i),0,t).join(""):i.slice(0,t)}function Os(e,t,n,r){var i=t&g,o=gs(e);function s(){for(var t=-1,a=arguments.length,u=-1,c=r.length,l=ze(c+a),f=this&&this!==Gt&&this instanceof s?o:e;++u<c;)l[u]=r[u];for(;a--;)l[u++]=arguments[++t];return an(f,i?n:this,l)}return s}function xs(t){return function(n,r,i){return i&&"number"!=typeof i&&aa(n,r,i)&&(r=i=e),n=Kl(n),r===e?(r=n,n=0):r=Kl(r),_o(n,r,i=i===e?n<r?1:-1:Kl(i),t)}}function Is(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Ql(t),n=Ql(n)),e(t,n)}}function Rs(t,n,r,i,o,s,a,u,c,l){var f=n&m;n|=f?b:w,(n&=~(f?w:b))&v||(n&=~(g|y));var h=[t,n,o,f?s:e,f?a:e,f?e:s,f?e:a,u,c,l],d=r.apply(e,h);return la(t)&&Oa(d,h),d.placeholder=i,Ra(d,t,n)}function ks(e){var t=tt[e];return function(e,n){if(e=Ql(e),(n=null==n?0:Qt(Gl(n),292))&&qt(e)){var r=(Zl(e)+"e").split("e");return+((r=(Zl(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Cs=ur&&1/Zn(new ur([,-0]))[1]==N?function(e){return new ur(e)}:zh;function Ps(e){return function(t){var n=Js(t);return n==Y?Qn(t):n==ne?er(t):Ln(t,e(t))}}function As(t,n,r,i,s,a,u,c){var l=n&y;if(!l&&"function"!=typeof t)throw new ot(o);var f=i?i.length:0;if(f||(n&=~(b|w),i=s=e),u=u===e?u:Yt(Gl(u),0),c=c===e?c:Gl(c),f-=s?s.length:0,n&w){var h=i,d=s;i=s=e}var p=l?e:Bs(t),v=[t,n,r,i,s,h,d,a,u,c];if(p&&va(v,p),t=v[0],n=v[1],r=v[2],i=v[3],s=v[4],!(c=v[9]=v[9]===e?l?0:t.length:Yt(v[9]-f,0))&&n&(m|_)&&(n&=~(m|_)),n&&n!=g)E=n==m||n==_?ys(t,n,c):n!=b&&n!=(g|b)||s.length?_s.apply(e,v):Os(t,n,r,i);else var E=hs(t,n,r);return Ra((p?xo:Oa)(E,v),t,n)}function Ns(t,n,r,i){return t===e||il(t,ut[r])&&!ft.call(i,r)?n:t}function Ts(t,n,r,i,o,s){return Ol(t)&&Ol(n)&&(s.set(n,t),uo(t,n,e,Ts,s),s.delete(n)),t}function Ms(t){return Ml(t)?e:t}function Ls(t,n,r,i,o,s){var a=r&d,u=t.length,c=n.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(t),f=s.get(n);if(l&&f)return l==n&&f==t;var h=-1,g=!0,y=r&p?new Yr:e;for(s.set(t,n),s.set(n,t);++h<u;){var v=t[h],m=n[h];if(i)var _=a?i(m,v,h,n,t,s):i(v,m,h,t,n,s);if(_!==e){if(_)continue;g=!1;break}if(y){if(!_n(n,(function(e,t){if(!zn(y,t)&&(v===e||o(v,e,r,i,s)))return y.push(t)}))){g=!1;break}}else if(v!==m&&!o(v,m,r,i,s)){g=!1;break}}return s.delete(t),s.delete(n),g}function js(e,t,n,r,i,o,s){switch(n){case ce:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ue:return!(e.byteLength!=t.byteLength||!o(new bt(e),new bt(t)));case q:case V:case Q:return il(+e,+t);case W:return e.name==t.name&&e.message==t.message;case te:case re:return e==t+"";case Y:var a=Qn;case ne:var u=r&d;if(a||(a=Zn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=p,s.set(e,t);var l=Ls(a(e),a(t),r,i,o,s);return s.delete(e),l;case ie:if(wr)return wr.call(e)==wr.call(t)}return!1}function Us(t,n,r,i,o,s){var a=r&d,u=zs(t),c=u.length;if(c!=zs(n).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in n:ft.call(n,f)))return!1}var h=s.get(t),p=s.get(n);if(h&&p)return h==n&&p==t;var g=!0;s.set(t,n),s.set(n,t);for(var y=a;++l<c;){var v=t[f=u[l]],m=n[f];if(i)var _=a?i(m,v,f,n,t,s):i(v,m,f,t,n,s);if(!(_===e?v===m||o(v,m,r,i,s):_)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var b=t.constructor,w=n.constructor;b!=w&&"constructor"in t&&"constructor"in n&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(t),s.delete(n),g}function Ds(t){return Ia(ba(t,e,Ga),t+"")}function zs(e){return Li(e,Sf,Ys)}function Fs(e){return Li(e,Of,Qs)}var Bs=dr?function(e){return dr.get(e)}:zh;function Hs(e){for(var t=e.name+"",n=pr[t],r=ft.call(pr,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function qs(e){return(ft.call(Sr,"placeholder")?Sr:e).placeholder}function Vs(){var e=Sr.iteratee||Nh;return e=e===Nh?to:e,arguments.length?e(arguments[0],arguments[1]):e}function $s(e,t){var n=e.__data__;return ca(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ws(e){for(var t=Sf(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,pa(i)]}return t}function Ks(t,n){var r=Wn(t,n);return Ji(r)?r:e}function Gs(t){var n=ft.call(t,kt),r=t[kt];try{t[kt]=e;var i=!0}catch{}var o=pt.call(t);return i&&(n?t[kt]=r:delete t[kt]),o}var Ys=Bt?function(e){return null==e?[]:(e=nt(e),hn(Bt(e),(function(t){return Ot.call(e,t)})))}:Gh,Qs=Bt?function(e){for(var t=[];e;)yn(t,Ys(e)),e=Et(e);return t}:Gh,Js=ji;function Xs(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=Qt(t,e+s);break;case"takeRight":e=Yt(e,t-s)}}return{start:e,end:t}}function Zs(e){var t=e.match(Ue);return t?t[1].split(De):[]}function ea(e,t,n){for(var r=-1,i=(t=Vo(t,e)).length,o=!1;++r<i;){var s=Aa(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Sl(i)&&sa(s,i)&&(ul(e)||al(e))}function ta(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ft.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function na(e){return"function"!=typeof e.constructor||da(e)?{}:Or(Et(e))}function ra(e,t,n){var r=e.constructor;switch(t){case ue:return Yo(e);case q:case V:return new r(+e);case ce:return Qo(e,n);case le:case fe:case he:case de:case pe:case ge:case ye:case ve:case me:return Zo(e,n);case Y:return new r;case Q:case re:return new r(e);case te:return Jo(e);case ne:return new r;case ie:return Xo(e)}}function ia(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(je,"{\n/* [wrapped with "+t+"] */\n")}function oa(e){return ul(e)||al(e)||!!(It&&e&&e[It])}function sa(e,t){var n=typeof e;return!!(t=t??T)&&("number"==n||"symbol"!=n&&Ge.test(e))&&e>-1&&e%1==0&&e<t}function aa(e,t,n){if(!Ol(n))return!1;var r=typeof t;return!!("number"==r?ll(n)&&sa(t,n.length):"string"==r&&t in n)&&il(n[t],e)}function ua(e,t){if(ul(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!zl(e))||Pe.test(e)||!Ce.test(e)||null!=t&&e in nt(t)}function ca(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function la(e){var t=Hs(e),n=Sr[t];if("function"!=typeof n||!(t in Rr.prototype))return!1;if(e===n)return!0;var r=Bs(n);return!!r&&e===r[0]}function fa(e){return!!dt&&dt in e}(Pn&&Js(new Pn(new ArrayBuffer(1)))!=ce||tr&&Js(new tr)!=Y||ar&&Js(ar.resolve())!=Z||ur&&Js(new ur)!=ne||lr&&Js(new lr)!=se)&&(Js=function(t){var n=ji(t),r=n==X?t.constructor:e,i=r?Na(r):"";if(i)switch(i){case gr:return ce;case yr:return Y;case vr:return Z;case mr:return ne;case _r:return se}return n});var ha=ct?wl:Yh;function da(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ut)}function pa(e){return e==e&&!Ol(e)}function ga(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in nt(r))}}function ya(e){var t=Fc(e,(function(e){return n.size===u&&n.clear(),e})),n=t.cache;return t}function va(e,t){var n=e[1],r=t[1],i=n|r,o=i<(g|y|E),s=r==E&&n==m||r==E&&n==S&&e[7].length<=t[8]||r==(E|S)&&t[7].length<=t[8]&&n==m;if(!o&&!s)return e;r&g&&(e[2]=t[2],i|=n&g?0:v);var a=t[3];if(a){var u=e[3];e[3]=u?ns(u,a,t[4]):a,e[4]=u?Xn(e[3],c):t[4]}return(a=t[5])&&(u=e[5],e[5]=u?rs(u,a,t[6]):a,e[6]=u?Xn(e[5],c):t[6]),(a=t[7])&&(e[7]=a),r&E&&(e[8]=null==e[8]?t[8]:Qt(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function ma(e){var t=[];if(null!=e)for(var n in nt(e))t.push(n);return t}function _a(e){return pt.call(e)}function ba(t,n,r){return n=Yt(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=Yt(e.length-n,0),s=ze(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=ze(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),an(t,this,a)}}function wa(e,t){return t.length<2?e:Mi(e,ko(t,0,-1))}function Ea(t,n){for(var r=t.length,i=Qt(n.length,r),o=is(t);i--;){var s=n[i];t[i]=sa(s,r)?o[s]:e}return t}function Sa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Oa=ka(xo),xa=Mt||function(e,t){return Gt.setTimeout(e,t)},Ia=ka(Io);function Ra(e,t,n){var r=t+"";return Ia(e,ia(r,Ta(Zs(r),n)))}function ka(t){var n=0,r=0;return function(){var i=Xt(),o=k-(i-r);if(r=i,o>0){if(++n>=R)return arguments[0]}else n=0;return t.apply(e,arguments)}}function Ca(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=mo(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var Pa=ya((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ae,(function(e,n,r,i){t.push(r?i.replace(Be,"$1"):n||e)})),t}));function Aa(e){if("string"==typeof e||zl(e))return e;var t=e+"";return"0"==t&&1/e==-N?"-0":t}function Na(e){if(null!=e){try{return lt.call(e)}catch{}try{return e+""}catch{}}return""}function Ta(e,t){return cn(z,(function(n){var r="_."+n[0];t&n[1]&&!dn(e,r)&&e.push(r)})),e.sort()}function Ma(e){if(e instanceof Rr)return e.clone();var t=new Ir(e.__wrapped__,e.__chain__);return t.__actions__=is(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function La(t,n,r){n=(r?aa(t,n,r):n===e)?1:Yt(Gl(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=ze(Lt(i/n));o<i;)a[s++]=ko(t,o,o+=n);return a}function ja(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function Ua(){var e=arguments.length;if(!e)return[];for(var t=ze(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return yn(ul(n)?is(n):[n],ki(t,1))}var Da=wo((function(e,t){return fl(e)?wi(e,ki(t,1,fl,!0)):[]})),za=wo((function(t,n){var r=ou(n);return fl(r)&&(r=e),fl(t)?wi(t,ki(n,1,fl,!0),Vs(r,2)):[]})),Fa=wo((function(t,n){var r=ou(n);return fl(r)&&(r=e),fl(t)?wi(t,ki(n,1,fl,!0),e,r):[]}));function Ba(t,n,r){var i=null==t?0:t.length;return i?ko(t,(n=r||n===e?1:Gl(n))<0?0:n,i):[]}function Ha(t,n,r){var i=null==t?0:t.length;return i?ko(t,0,(n=i-(n=r||n===e?1:Gl(n)))<0?0:n):[]}function qa(e,t){return e&&e.length?Do(e,Vs(t,3),!0,!0):[]}function Va(e,t){return e&&e.length?Do(e,Vs(t,3),!0):[]}function $a(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&aa(e,t,n)&&(n=0,r=i),Ii(e,t,n,r)):[]}function Wa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Gl(n);return i<0&&(i=Yt(r+i,0)),On(e,Vs(t,3),i)}function Ka(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=Gl(r),o=r<0?Yt(i+o,0):Qt(o,i-1)),On(t,Vs(n,3),o,!0)}function Ga(e){return null!=e&&e.length?ki(e,1):[]}function Ya(e){return null!=e&&e.length?ki(e,N):[]}function Qa(t,n){return null!=t&&t.length?ki(t,n=n===e?1:Gl(n)):[]}function Ja(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function Xa(t){return t&&t.length?t[0]:e}function Za(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Gl(n);return i<0&&(i=Yt(r+i,0)),xn(e,t,i)}function eu(e){return null!=e&&e.length?ko(e,0,-1):[]}var tu=wo((function(e){var t=gn(e,Ho);return t.length&&t[0]===e[0]?Bi(t):[]})),nu=wo((function(t){var n=ou(t),r=gn(t,Ho);return n===ou(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Bi(r,Vs(n,2)):[]})),ru=wo((function(t){var n=ou(t),r=gn(t,Ho);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Bi(r,e,n):[]}));function iu(e,t){return null==e?"":Wt.call(e,t)}function ou(t){var n=null==t?0:t.length;return n?t[n-1]:e}function su(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=Gl(r))<0?Yt(i+o,0):Qt(o,i-1)),n==n?nr(t,n,o):On(t,Rn,o,!0)}function au(t,n){return t&&t.length?lo(t,Gl(n)):e}var uu=wo(cu);function cu(e,t){return e&&e.length&&t&&t.length?yo(e,t):e}function lu(e,t,n){return e&&e.length&&t&&t.length?yo(e,t,Vs(n,2)):e}function fu(t,n,r){return t&&t.length&&n&&n.length?yo(t,n,e,r):t}var hu=Ds((function(e,t){var n=null==e?0:e.length,r=gi(e,t);return vo(e,gn(t,(function(e){return sa(e,n)?+e:e})).sort(es)),r}));function du(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Vs(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return vo(e,i),n}function pu(e){return null==e?e:wn.call(e)}function gu(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&aa(t,n,r)?(n=0,r=i):(n=null==n?0:Gl(n),r=r===e?i:Gl(r)),ko(t,n,r)):[]}function yu(e,t){return Po(e,t)}function vu(e,t,n){return Ao(e,t,Vs(n,2))}function mu(e,t){var n=null==e?0:e.length;if(n){var r=Po(e,t);if(r<n&&il(e[r],t))return r}return-1}function _u(e,t){return Po(e,t,!0)}function bu(e,t,n){return Ao(e,t,Vs(n,2),!0)}function wu(e,t){if(null!=e&&e.length){var n=Po(e,t,!0)-1;if(il(e[n],t))return n}return-1}function Eu(e){return e&&e.length?No(e):[]}function Su(e,t){return e&&e.length?No(e,Vs(t,2)):[]}function Ou(e){var t=null==e?0:e.length;return t?ko(e,1,t):[]}function xu(t,n,r){return t&&t.length?ko(t,0,(n=r||n===e?1:Gl(n))<0?0:n):[]}function Iu(t,n,r){var i=null==t?0:t.length;return i?ko(t,(n=i-(n=r||n===e?1:Gl(n)))<0?0:n,i):[]}function Ru(e,t){return e&&e.length?Do(e,Vs(t,3),!1,!0):[]}function ku(e,t){return e&&e.length?Do(e,Vs(t,3)):[]}var Cu=wo((function(e){return Lo(ki(e,1,fl,!0))})),Pu=wo((function(t){var n=ou(t);return fl(n)&&(n=e),Lo(ki(t,1,fl,!0),Vs(n,2))})),Au=wo((function(t){var n=ou(t);return n="function"==typeof n?n:e,Lo(ki(t,1,fl,!0),e,n)}));function Nu(e){return e&&e.length?Lo(e):[]}function Tu(e,t){return e&&e.length?Lo(e,Vs(t,2)):[]}function Mu(t,n){return n="function"==typeof n?n:e,t&&t.length?Lo(t,e,n):[]}function Lu(e){if(!e||!e.length)return[];var t=0;return e=hn(e,(function(e){if(fl(e))return t=Yt(e.length,t),!0})),Mn(t,(function(t){return gn(e,Cn(t))}))}function ju(t,n){if(!t||!t.length)return[];var r=Lu(t);return null==n?r:gn(r,(function(t){return an(n,e,t)}))}var Uu=wo((function(e,t){return fl(e)?wi(e,t):[]})),Du=wo((function(e){return Fo(hn(e,fl))})),zu=wo((function(t){var n=ou(t);return fl(n)&&(n=e),Fo(hn(t,fl),Vs(n,2))})),Fu=wo((function(t){var n=ou(t);return n="function"==typeof n?n:e,Fo(hn(t,fl),e,n)})),Bu=wo(Lu);function Hu(e,t){return Bo(e||[],t||[],ci)}function qu(e,t){return Bo(e||[],t||[],Oo)}var Vu=wo((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,ju(t,r)}));function $u(e){var t=Sr(e);return t.__chain__=!0,t}function Wu(e,t){return t(e),e}function Ku(e,t){return t(e)}var Gu=Ds((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return gi(e,t)};return!(n>1||this.__actions__.length)&&i instanceof Rr&&sa(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:Ku,args:[o],thisArg:e}),new Ir(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));function Yu(){return $u(this)}function Qu(){return new Ir(this.value(),this.__chain__)}function Ju(){this.__values__===e&&(this.__values__=Wl(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}}function Xu(){return this}function Zu(t){for(var n,r=this;r instanceof xr;){var i=Ma(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n}function ec(){var t=this.__wrapped__;if(t instanceof Rr){var n=t;return this.__actions__.length&&(n=new Rr(this)),(n=n.reverse()).__actions__.push({func:Ku,args:[pu],thisArg:e}),new Ir(n,this.__chain__)}return this.thru(pu)}function tc(){return zo(this.__wrapped__,this.__actions__)}var nc=us((function(e,t,n){ft.call(e,n)?++e[n]:pi(e,n,1)}));function rc(t,n,r){var i=ul(t)?fn:Oi;return r&&aa(t,n,r)&&(n=e),i(t,Vs(n,3))}function ic(e,t){return(ul(e)?hn:Ri)(e,Vs(t,3))}var oc=vs(Wa),sc=vs(Ka);function ac(e,t){return ki(yc(e,t),1)}function uc(e,t){return ki(yc(e,t),N)}function cc(t,n,r){return r=r===e?1:Gl(r),ki(yc(t,n),r)}function lc(e,t){return(ul(e)?cn:Ei)(e,Vs(t,3))}function fc(e,t){return(ul(e)?ln:Si)(e,Vs(t,3))}var hc=us((function(e,t,n){ft.call(e,n)?e[n].push(t):pi(e,n,[t])}));function dc(e,t,n,r){e=ll(e)?e:Hf(e),n=n&&!r?Gl(n):0;var i=e.length;return n<0&&(n=Yt(i+n,0)),Dl(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&xn(e,t,n)>-1}var pc=wo((function(e,t,n){var r=-1,i="function"==typeof t,o=ll(e)?ze(e.length):[];return Ei(e,(function(e){o[++r]=i?an(t,e,n):qi(e,t,n)})),o})),gc=us((function(e,t,n){pi(e,n,t)}));function yc(e,t){return(ul(e)?gn:oo)(e,Vs(t,3))}function vc(t,n,r,i){return null==t?[]:(ul(n)||(n=null==n?[]:[n]),ul(r=i?e:r)||(r=null==r?[]:[r]),fo(t,n,r))}var mc=us((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));function _c(e,t,n){var r=ul(e)?vn:An,i=arguments.length<3;return r(e,Vs(t,4),n,i,Ei)}function bc(e,t,n){var r=ul(e)?mn:An,i=arguments.length<3;return r(e,Vs(t,4),n,i,Si)}function wc(e,t){return(ul(e)?hn:Ri)(e,Bc(Vs(t,3)))}function Ec(e){return(ul(e)?oi:Eo)(e)}function Sc(t,n,r){return n=(r?aa(t,n,r):n===e)?1:Gl(n),(ul(t)?si:So)(t,n)}function Oc(e){return(ul(e)?ai:Ro)(e)}function xc(e){if(null==e)return 0;if(ll(e))return Dl(e)?rr(e):e.length;var t=Js(e);return t==Y||t==ne?e.size:no(e).length}function Ic(t,n,r){var i=ul(t)?_n:Co;return r&&aa(t,n,r)&&(n=e),i(t,Vs(n,3))}var Rc=wo((function(e,t){if(null==e)return[];var n=t.length;return n>1&&aa(e,t[0],t[1])?t=[]:n>2&&aa(t[0],t[1],t[2])&&(t=[t[0]]),fo(e,ki(t,1),[])})),kc=Tt||function(){return Gt.Date.now()};function Cc(e,t){if("function"!=typeof t)throw new ot(o);return e=Gl(e),function(){if(--e<1)return t.apply(this,arguments)}}function Pc(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,As(t,E,e,e,e,e,n)}function Ac(t,n){var r;if("function"!=typeof n)throw new ot(o);return t=Gl(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=e),r}}var Nc=wo((function(e,t,n){var r=g;if(n.length){var i=Xn(n,qs(Nc));r|=b}return As(e,r,t,n,i)})),Tc=wo((function(e,t,n){var r=g|y;if(n.length){var i=Xn(n,qs(Tc));r|=b}return As(t,r,e,n,i)}));function Mc(t,n,r){var i=As(t,m,e,e,e,e,e,n=r?e:n);return i.placeholder=Mc.placeholder,i}function Lc(t,n,r){var i=As(t,_,e,e,e,e,e,n=r?e:n);return i.placeholder=Lc.placeholder,i}function jc(t,n,r){var i,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new ot(o);function g(n){var r=i,o=s;return i=s=e,f=n,u=t.apply(o,r)}function y(e){return f=e,c=xa(_,n),h?g(e):u}function v(e){var t=n-(e-l);return d?Qt(t,a-(e-f)):t}function m(t){var r=t-l;return l===e||r>=n||r<0||d&&t-f>=a}function _(){var e=kc();if(m(e))return b(e);c=xa(_,v(e))}function b(t){return c=e,p&&i?g(t):(i=s=e,u)}function w(){c!==e&&Ko(c),f=0,i=l=s=c=e}function E(){return c===e?u:b(kc())}function S(){var t=kc(),r=m(t);if(i=arguments,s=this,l=t,r){if(c===e)return y(l);if(d)return Ko(c),c=xa(_,n),g(l)}return c===e&&(c=xa(_,n)),u}return n=Ql(n)||0,Ol(r)&&(h=!!r.leading,a=(d="maxWait"in r)?Yt(Ql(r.maxWait)||0,n):a,p="trailing"in r?!!r.trailing:p),S.cancel=w,S.flush=E,S}var Uc=wo((function(e,t){return bi(e,1,t)})),Dc=wo((function(e,t,n){return bi(e,Ql(t)||0,n)}));function zc(e){return As(e,O)}function Fc(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ot(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Fc.Cache||qr),n}function Bc(e){if("function"!=typeof e)throw new ot(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Hc(e){return Ac(2,e)}Fc.Cache=qr;var qc=$o((function(e,t){var n=(t=1==t.length&&ul(t[0])?gn(t[0],Un(Vs())):gn(ki(t,1),Un(Vs()))).length;return wo((function(r){for(var i=-1,o=Qt(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return an(e,this,r)}))})),Vc=wo((function(t,n){var r=Xn(n,qs(Vc));return As(t,b,e,n,r)})),$c=wo((function(t,n){var r=Xn(n,qs($c));return As(t,w,e,n,r)})),Wc=Ds((function(t,n){return As(t,S,e,e,e,n)}));function Kc(t,n){if("function"!=typeof t)throw new ot(o);return wo(t,n=n===e?n:Gl(n))}function Gc(e,t){if("function"!=typeof e)throw new ot(o);return t=null==t?0:Yt(Gl(t),0),wo((function(n){var r=n[t],i=Wo(n,0,t);return r&&yn(i,r),an(e,this,i)}))}function Yc(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ot(o);return Ol(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),jc(e,t,{leading:r,maxWait:t,trailing:i})}function Qc(e){return Pc(e,1)}function Jc(e,t){return Vc(qo(t),e)}function Xc(){if(!arguments.length)return[];var e=arguments[0];return ul(e)?e:[e]}function Zc(e){return vi(e,h)}function el(t,n){return vi(t,h,n="function"==typeof n?n:e)}function tl(e){return vi(e,l|h)}function nl(t,n){return vi(t,l|h,n="function"==typeof n?n:e)}function rl(e,t){return null==t||_i(e,t,Sf(t))}function il(e,t){return e===t||e!=e&&t!=t}var ol=Is(Ui),sl=Is((function(e,t){return e>=t})),al=Vi(function(){return arguments}())?Vi:function(e){return xl(e)&&ft.call(e,"callee")&&!Ot.call(e,"callee")},ul=ze.isArray,cl=en?Un(en):$i;function ll(e){return null!=e&&Sl(e.length)&&!wl(e)}function fl(e){return xl(e)&&ll(e)}function hl(e){return!0===e||!1===e||xl(e)&&ji(e)==q}var dl=Ht||Yh,pl=tn?Un(tn):Wi;function gl(e){return xl(e)&&1===e.nodeType&&!Ml(e)}function yl(e){if(null==e)return!0;if(ll(e)&&(ul(e)||"string"==typeof e||"function"==typeof e.splice||dl(e)||Fl(e)||al(e)))return!e.length;var t=Js(e);if(t==Y||t==ne)return!e.size;if(da(e))return!no(e).length;for(var n in e)if(ft.call(e,n))return!1;return!0}function vl(e,t){return Ki(e,t)}function ml(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Ki(t,n,e,r):!!i}function _l(e){if(!xl(e))return!1;var t=ji(e);return t==W||t==$||"string"==typeof e.message&&"string"==typeof e.name&&!Ml(e)}function bl(e){return"number"==typeof e&&qt(e)}function wl(e){if(!Ol(e))return!1;var t=ji(e);return t==K||t==G||t==H||t==ee}function El(e){return"number"==typeof e&&e==Gl(e)}function Sl(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=T}function Ol(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xl(e){return null!=e&&"object"==typeof e}var Il=nn?Un(nn):Yi;function Rl(e,t){return e===t||Qi(e,t,Ws(t))}function kl(t,n,r){return r="function"==typeof r?r:e,Qi(t,n,Ws(n),r)}function Cl(e){return Tl(e)&&e!=+e}function Pl(e){if(ha(e))throw new Ze(i);return Ji(e)}function Al(e){return null===e}function Nl(e){return null==e}function Tl(e){return"number"==typeof e||xl(e)&&ji(e)==Q}function Ml(e){if(!xl(e)||ji(e)!=X)return!1;var t=Et(e);if(null===t)return!0;var n=ft.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&lt.call(n)==gt}var Ll=rn?Un(rn):Xi;function jl(e){return El(e)&&e>=-T&&e<=T}var Ul=on?Un(on):Zi;function Dl(e){return"string"==typeof e||!ul(e)&&xl(e)&&ji(e)==re}function zl(e){return"symbol"==typeof e||xl(e)&&ji(e)==ie}var Fl=sn?Un(sn):eo;function Bl(t){return t===e}function Hl(e){return xl(e)&&Js(e)==se}function ql(e){return xl(e)&&ji(e)==ae}var Vl=Is(io),$l=Is((function(e,t){return e<=t}));function Wl(e){if(!e)return[];if(ll(e))return Dl(e)?ir(e):is(e);if(Rt&&e[Rt])return Yn(e[Rt]());var t=Js(e);return(t==Y?Qn:t==ne?Zn:Hf)(e)}function Kl(e){return e?(e=Ql(e))===N||e===-N?(e<0?-1:1)*M:e==e?e:0:0===e?e:0}function Gl(e){var t=Kl(e),n=t%1;return t==t?n?t-n:t:0}function Yl(e){return e?yi(Gl(e),0,j):0}function Ql(e){if("number"==typeof e)return e;if(zl(e))return L;if(Ol(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ol(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=jn(e);var n=$e.test(e);return n||Ke.test(e)?$t(e.slice(2),n?2:8):Ve.test(e)?L:+e}function Jl(e){return os(e,Of(e))}function Xl(e){return e?yi(Gl(e),-T,T):0===e?e:0}function Zl(e){return null==e?"":Mo(e)}var ef=cs((function(e,t){if(da(t)||ll(t))os(t,Sf(t),e);else for(var n in t)ft.call(t,n)&&ci(e,n,t[n])})),tf=cs((function(e,t){os(t,Of(t),e)})),nf=cs((function(e,t,n,r){os(t,Of(t),e,r)})),rf=cs((function(e,t,n,r){os(t,Sf(t),e,r)})),of=Ds(gi);function sf(e,t){var n=Or(e);return null==t?n:hi(n,t)}var af=wo((function(t,n){t=nt(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&aa(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=Of(s),u=-1,c=a.length;++u<c;){var l=a[u],f=t[l];(f===e||il(f,ut[l])&&!ft.call(t,l))&&(t[l]=s[l])}return t})),uf=wo((function(t){return t.push(e,Ts),an(kf,e,t)}));function cf(e,t){return Sn(e,Vs(t,3),Ai)}function lf(e,t){return Sn(e,Vs(t,3),Ni)}function ff(e,t){return null==e?e:Ci(e,Vs(t,3),Of)}function hf(e,t){return null==e?e:Pi(e,Vs(t,3),Of)}function df(e,t){return e&&Ai(e,Vs(t,3))}function pf(e,t){return e&&Ni(e,Vs(t,3))}function gf(e){return null==e?[]:Ti(e,Sf(e))}function yf(e){return null==e?[]:Ti(e,Of(e))}function vf(t,n,r){var i=null==t?e:Mi(t,n);return i===e?r:i}function mf(e,t){return null!=e&&ea(e,t,Di)}function _f(e,t){return null!=e&&ea(e,t,zi)}var bf=bs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),e[t]=n}),Rh(Ah)),wf=bs((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),ft.call(e,t)?e[t].push(n):e[t]=[n]}),Vs),Ef=wo(qi);function Sf(e){return ll(e)?ii(e):no(e)}function Of(e){return ll(e)?ii(e,!0):ro(e)}function xf(e,t){var n={};return t=Vs(t,3),Ai(e,(function(e,r,i){pi(n,t(e,r,i),e)})),n}function If(e,t){var n={};return t=Vs(t,3),Ai(e,(function(e,r,i){pi(n,r,t(e,r,i))})),n}var Rf=cs((function(e,t,n){uo(e,t,n)})),kf=cs((function(e,t,n,r){uo(e,t,n,r)})),Cf=Ds((function(e,t){var n={};if(null==e)return n;var r=!1;t=gn(t,(function(t){return t=Vo(t,e),r||(r=t.length>1),t})),os(e,Fs(e),n),r&&(n=vi(n,l|f|h,Ms));for(var i=t.length;i--;)jo(n,t[i]);return n}));function Pf(e,t){return Nf(e,Bc(Vs(t)))}var Af=Ds((function(e,t){return null==e?{}:ho(e,t)}));function Nf(e,t){if(null==e)return{};var n=gn(Fs(e),(function(e){return[e]}));return t=Vs(t),po(e,n,(function(e,n){return t(e,n[0])}))}function Tf(t,n,r){var i=-1,o=(n=Vo(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[Aa(n[i])];s===e&&(i=o,s=r),t=wl(s)?s.call(t):s}return t}function Mf(e,t,n){return null==e?e:Oo(e,t,n)}function Lf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Oo(t,n,r,i)}var jf=Ps(Sf),Uf=Ps(Of);function Df(e,t,n){var r=ul(e),i=r||dl(e)||Fl(e);if(t=Vs(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ol(e)&&wl(o)?Or(Et(e)):{}}return(i?cn:Ai)(e,(function(e,r,i){return t(n,e,r,i)})),n}function zf(e,t){return null==e||jo(e,t)}function Ff(e,t,n){return null==e?e:Uo(e,t,qo(n))}function Bf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Uo(t,n,qo(r),i)}function Hf(e){return null==e?[]:Dn(e,Sf(e))}function qf(e){return null==e?[]:Dn(e,Of(e))}function Vf(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=Ql(r))==r?r:0),n!==e&&(n=(n=Ql(n))==n?n:0),yi(Ql(t),n,r)}function $f(t,n,r){return n=Kl(n),r===e?(r=n,n=0):r=Kl(r),Fi(t=Ql(t),n,r)}function Wf(t,n,r){if(r&&"boolean"!=typeof r&&aa(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=Kl(t),n===e?(n=t,t=0):n=Kl(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=bn();return Qt(t+o*(n-t+Vt("1e-"+((o+"").length-1))),n)}return mo(t,n)}var Kf=ps((function(e,t,n){return t=t.toLowerCase(),e+(n?Gf(t):t)}));function Gf(e){return wh(Zl(e).toLowerCase())}function Yf(e){return(e=Zl(e))&&e.replace(Ye,qn).replace(At,"")}function Qf(t,n,r){t=Zl(t),n=Mo(n);var i=t.length,o=r=r===e?i:yi(Gl(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n}function Jf(e){return(e=Zl(e))&&xe.test(e)?e.replace(Se,Vn):e}function Xf(e){return(e=Zl(e))&&Te.test(e)?e.replace(Ne,"\\$&"):e}var Zf=ps((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),eh=ps((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),th=ds("toLowerCase");function nh(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ss(Ft(i),n)+e+Ss(Lt(i),n)}function rh(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;return t&&r<t?e+Ss(t-r,n):e}function ih(e,t,n){e=Zl(e);var r=(t=Gl(t))?rr(e):0;return t&&r<t?Ss(t-r,n)+e:e}function oh(e,t,n){return n||null==t?t=0:t&&(t=+t),Zt(Zl(e).replace(Me,""),t||0)}function sh(t,n,r){return n=(r?aa(t,n,r):n===e)?1:Gl(n),bo(Zl(t),n)}function ah(){var e=arguments,t=Zl(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var uh=ps((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));function ch(t,n,r){return r&&"number"!=typeof r&&aa(t,n,r)&&(n=r=e),(r=r===e?j:r>>>0)?(t=Zl(t))&&("string"==typeof n||null!=n&&!Ll(n))&&!(n=Mo(n))&&Kn(t)?Wo(ir(t),0,r):t.split(n,r):[]}var lh=ps((function(e,t,n){return e+(n?" ":"")+wh(t)}));function fh(e,t,n){return e=Zl(e),n=null==n?0:yi(Gl(n),0,e.length),t=Mo(t),e.slice(n,n+t.length)==t}function hh(t,n,r){var i=Sr.templateSettings;r&&aa(t,n,r)&&(n=e),t=Zl(t),n=nf({},n,i,Ns);var o,a,u=nf({},n.imports,i.imports,Ns),c=Sf(u),l=Dn(u,c),f=0,h=n.interpolate||Qe,d="__p += '",p=rt((n.escape||Qe).source+"|"+h.source+"|"+(h===ke?He:Qe).source+"|"+(n.evaluate||Qe).source+"|$","g"),g="//# sourceURL="+(ft.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ut+"]")+"\n";t.replace(p,(function(e,n,r,i,s,u){return r||(r=i),d+=t.slice(f,u).replace(Je,$n),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+e.length,e})),d+="';\n";var y=ft.call(n,"variable")&&n.variable;if(y){if(Fe.test(y))throw new Ze(s)}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(_e,""):d).replace(be,"$1").replace(we,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Sh((function(){return et(c,g+"return "+d).apply(e,l)}));if(v.source=d,_l(v))throw v;return v}function dh(e){return Zl(e).toLowerCase()}function ph(e){return Zl(e).toUpperCase()}function gh(t,n,r){if((t=Zl(t))&&(r||n===e))return jn(t);if(!t||!(n=Mo(n)))return t;var i=ir(t),o=ir(n);return Wo(i,Fn(i,o),Bn(i,o)+1).join("")}function yh(t,n,r){if((t=Zl(t))&&(r||n===e))return t.slice(0,or(t)+1);if(!t||!(n=Mo(n)))return t;var i=ir(t);return Wo(i,0,Bn(i,ir(n))+1).join("")}function vh(t,n,r){if((t=Zl(t))&&(r||n===e))return t.replace(Me,"");if(!t||!(n=Mo(n)))return t;var i=ir(t);return Wo(i,Fn(i,ir(n))).join("")}function mh(t,n){var r=x,i=I;if(Ol(n)){var o="separator"in n?n.separator:o;r="length"in n?Gl(n.length):r,i="omission"in n?Mo(n.omission):i}var s=(t=Zl(t)).length;if(Kn(t)){var a=ir(t);s=a.length}if(r>=s)return t;var u=r-rr(i);if(u<1)return i;var c=a?Wo(a,0,u).join(""):t.slice(0,u);if(o===e)return c+i;if(a&&(u+=c.length-u),Ll(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=rt(o.source,Zl(qe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===e?u:h)}}else if(t.indexOf(Mo(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i}function _h(e){return(e=Zl(e))&&Oe.test(e)?e.replace(Ee,sr):e}var bh=ps((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),wh=ds("toUpperCase");function Eh(t,n,r){return t=Zl(t),(n=r?e:n)===e?Gn(t)?cr(t):En(t):t.match(n)||[]}var Sh=wo((function(t,n){try{return an(t,e,n)}catch(e){return _l(e)?e:new Ze(e)}})),Oh=Ds((function(e,t){return cn(t,(function(t){t=Aa(t),pi(e,t,Nc(e[t],e))})),e}));function xh(e){var t=null==e?0:e.length,n=Vs();return e=t?gn(e,(function(e){if("function"!=typeof e[1])throw new ot(o);return[n(e[0]),e[1]]})):[],wo((function(n){for(var r=-1;++r<t;){var i=e[r];if(an(i[0],this,n))return an(i[1],this,n)}}))}function Ih(e){return mi(vi(e,l))}function Rh(e){return function(){return e}}function kh(e,t){return null==e||e!=e?t:e}var Ch=ms(),Ph=ms(!0);function Ah(e){return e}function Nh(e){return to("function"==typeof e?e:vi(e,l))}function Th(e){return so(vi(e,l))}function Mh(e,t){return ao(e,vi(t,l))}var Lh=wo((function(e,t){return function(n){return qi(n,e,t)}})),jh=wo((function(e,t){return function(n){return qi(e,n,t)}}));function Uh(e,t,n){var r=Sf(t),i=Ti(t,r);null==n&&(!Ol(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Ti(t,Sf(t)));var o=!(Ol(n)&&"chain"in n&&!n.chain),s=wl(e);return cn(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=is(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,yn([this.value()],arguments))})})),e}function Dh(){return Gt._===this&&(Gt._=yt),this}function zh(){}function Fh(e){return e=Gl(e),wo((function(t){return lo(t,e)}))}var Bh=Es(gn),Hh=Es(fn),qh=Es(_n);function Vh(e){return ua(e)?Cn(Aa(e)):go(e)}function $h(t){return function(n){return null==t?e:Mi(t,n)}}var Wh=xs(),Kh=xs(!0);function Gh(){return[]}function Yh(){return!1}function Qh(){return{}}function Jh(){return""}function Xh(){return!0}function Zh(e,t){if((e=Gl(e))<1||e>T)return[];var n=j,r=Qt(e,j);t=Vs(t),e-=j;for(var i=Mn(r,t);++n<e;)t(n);return i}function ed(e){return ul(e)?gn(e,Aa):zl(e)?[e]:is(Pa(Zl(e)))}function td(e){var t=++ht;return Zl(e)+t}var nd=ws((function(e,t){return e+t}),0),rd=ks("ceil"),id=ws((function(e,t){return e/t}),1),od=ks("floor");function sd(t){return t&&t.length?xi(t,Ah,Ui):e}function ad(t,n){return t&&t.length?xi(t,Vs(n,2),Ui):e}function ud(e){return kn(e,Ah)}function cd(e,t){return kn(e,Vs(t,2))}function ld(t){return t&&t.length?xi(t,Ah,io):e}function fd(t,n){return t&&t.length?xi(t,Vs(n,2),io):e}var hd=ws((function(e,t){return e*t}),1),dd=ks("round"),pd=ws((function(e,t){return e-t}),0);function gd(e){return e&&e.length?Tn(e,Ah):0}function yd(e,t){return e&&e.length?Tn(e,Vs(t,2)):0}return Sr.after=Cc,Sr.ary=Pc,Sr.assign=ef,Sr.assignIn=tf,Sr.assignInWith=nf,Sr.assignWith=rf,Sr.at=of,Sr.before=Ac,Sr.bind=Nc,Sr.bindAll=Oh,Sr.bindKey=Tc,Sr.castArray=Xc,Sr.chain=$u,Sr.chunk=La,Sr.compact=ja,Sr.concat=Ua,Sr.cond=xh,Sr.conforms=Ih,Sr.constant=Rh,Sr.countBy=nc,Sr.create=sf,Sr.curry=Mc,Sr.curryRight=Lc,Sr.debounce=jc,Sr.defaults=af,Sr.defaultsDeep=uf,Sr.defer=Uc,Sr.delay=Dc,Sr.difference=Da,Sr.differenceBy=za,Sr.differenceWith=Fa,Sr.drop=Ba,Sr.dropRight=Ha,Sr.dropRightWhile=qa,Sr.dropWhile=Va,Sr.fill=$a,Sr.filter=ic,Sr.flatMap=ac,Sr.flatMapDeep=uc,Sr.flatMapDepth=cc,Sr.flatten=Ga,Sr.flattenDeep=Ya,Sr.flattenDepth=Qa,Sr.flip=zc,Sr.flow=Ch,Sr.flowRight=Ph,Sr.fromPairs=Ja,Sr.functions=gf,Sr.functionsIn=yf,Sr.groupBy=hc,Sr.initial=eu,Sr.intersection=tu,Sr.intersectionBy=nu,Sr.intersectionWith=ru,Sr.invert=bf,Sr.invertBy=wf,Sr.invokeMap=pc,Sr.iteratee=Nh,Sr.keyBy=gc,Sr.keys=Sf,Sr.keysIn=Of,Sr.map=yc,Sr.mapKeys=xf,Sr.mapValues=If,Sr.matches=Th,Sr.matchesProperty=Mh,Sr.memoize=Fc,Sr.merge=Rf,Sr.mergeWith=kf,Sr.method=Lh,Sr.methodOf=jh,Sr.mixin=Uh,Sr.negate=Bc,Sr.nthArg=Fh,Sr.omit=Cf,Sr.omitBy=Pf,Sr.once=Hc,Sr.orderBy=vc,Sr.over=Bh,Sr.overArgs=qc,Sr.overEvery=Hh,Sr.overSome=qh,Sr.partial=Vc,Sr.partialRight=$c,Sr.partition=mc,Sr.pick=Af,Sr.pickBy=Nf,Sr.property=Vh,Sr.propertyOf=$h,Sr.pull=uu,Sr.pullAll=cu,Sr.pullAllBy=lu,Sr.pullAllWith=fu,Sr.pullAt=hu,Sr.range=Wh,Sr.rangeRight=Kh,Sr.rearg=Wc,Sr.reject=wc,Sr.remove=du,Sr.rest=Kc,Sr.reverse=pu,Sr.sampleSize=Sc,Sr.set=Mf,Sr.setWith=Lf,Sr.shuffle=Oc,Sr.slice=gu,Sr.sortBy=Rc,Sr.sortedUniq=Eu,Sr.sortedUniqBy=Su,Sr.split=ch,Sr.spread=Gc,Sr.tail=Ou,Sr.take=xu,Sr.takeRight=Iu,Sr.takeRightWhile=Ru,Sr.takeWhile=ku,Sr.tap=Wu,Sr.throttle=Yc,Sr.thru=Ku,Sr.toArray=Wl,Sr.toPairs=jf,Sr.toPairsIn=Uf,Sr.toPath=ed,Sr.toPlainObject=Jl,Sr.transform=Df,Sr.unary=Qc,Sr.union=Cu,Sr.unionBy=Pu,Sr.unionWith=Au,Sr.uniq=Nu,Sr.uniqBy=Tu,Sr.uniqWith=Mu,Sr.unset=zf,Sr.unzip=Lu,Sr.unzipWith=ju,Sr.update=Ff,Sr.updateWith=Bf,Sr.values=Hf,Sr.valuesIn=qf,Sr.without=Uu,Sr.words=Eh,Sr.wrap=Jc,Sr.xor=Du,Sr.xorBy=zu,Sr.xorWith=Fu,Sr.zip=Bu,Sr.zipObject=Hu,Sr.zipObjectDeep=qu,Sr.zipWith=Vu,Sr.entries=jf,Sr.entriesIn=Uf,Sr.extend=tf,Sr.extendWith=nf,Uh(Sr,Sr),Sr.add=nd,Sr.attempt=Sh,Sr.camelCase=Kf,Sr.capitalize=Gf,Sr.ceil=rd,Sr.clamp=Vf,Sr.clone=Zc,Sr.cloneDeep=tl,Sr.cloneDeepWith=nl,Sr.cloneWith=el,Sr.conformsTo=rl,Sr.deburr=Yf,Sr.defaultTo=kh,Sr.divide=id,Sr.endsWith=Qf,Sr.eq=il,Sr.escape=Jf,Sr.escapeRegExp=Xf,Sr.every=rc,Sr.find=oc,Sr.findIndex=Wa,Sr.findKey=cf,Sr.findLast=sc,Sr.findLastIndex=Ka,Sr.findLastKey=lf,Sr.floor=od,Sr.forEach=lc,Sr.forEachRight=fc,Sr.forIn=ff,Sr.forInRight=hf,Sr.forOwn=df,Sr.forOwnRight=pf,Sr.get=vf,Sr.gt=ol,Sr.gte=sl,Sr.has=mf,Sr.hasIn=_f,Sr.head=Xa,Sr.identity=Ah,Sr.includes=dc,Sr.indexOf=Za,Sr.inRange=$f,Sr.invoke=Ef,Sr.isArguments=al,Sr.isArray=ul,Sr.isArrayBuffer=cl,Sr.isArrayLike=ll,Sr.isArrayLikeObject=fl,Sr.isBoolean=hl,Sr.isBuffer=dl,Sr.isDate=pl,Sr.isElement=gl,Sr.isEmpty=yl,Sr.isEqual=vl,Sr.isEqualWith=ml,Sr.isError=_l,Sr.isFinite=bl,Sr.isFunction=wl,Sr.isInteger=El,Sr.isLength=Sl,Sr.isMap=Il,Sr.isMatch=Rl,Sr.isMatchWith=kl,Sr.isNaN=Cl,Sr.isNative=Pl,Sr.isNil=Nl,Sr.isNull=Al,Sr.isNumber=Tl,Sr.isObject=Ol,Sr.isObjectLike=xl,Sr.isPlainObject=Ml,Sr.isRegExp=Ll,Sr.isSafeInteger=jl,Sr.isSet=Ul,Sr.isString=Dl,Sr.isSymbol=zl,Sr.isTypedArray=Fl,Sr.isUndefined=Bl,Sr.isWeakMap=Hl,Sr.isWeakSet=ql,Sr.join=iu,Sr.kebabCase=Zf,Sr.last=ou,Sr.lastIndexOf=su,Sr.lowerCase=eh,Sr.lowerFirst=th,Sr.lt=Vl,Sr.lte=$l,Sr.max=sd,Sr.maxBy=ad,Sr.mean=ud,Sr.meanBy=cd,Sr.min=ld,Sr.minBy=fd,Sr.stubArray=Gh,Sr.stubFalse=Yh,Sr.stubObject=Qh,Sr.stubString=Jh,Sr.stubTrue=Xh,Sr.multiply=hd,Sr.nth=au,Sr.noConflict=Dh,Sr.noop=zh,Sr.now=kc,Sr.pad=nh,Sr.padEnd=rh,Sr.padStart=ih,Sr.parseInt=oh,Sr.random=Wf,Sr.reduce=_c,Sr.reduceRight=bc,Sr.repeat=sh,Sr.replace=ah,Sr.result=Tf,Sr.round=dd,Sr.runInContext=t,Sr.sample=Ec,Sr.size=xc,Sr.snakeCase=uh,Sr.some=Ic,Sr.sortedIndex=yu,Sr.sortedIndexBy=vu,Sr.sortedIndexOf=mu,Sr.sortedLastIndex=_u,Sr.sortedLastIndexBy=bu,Sr.sortedLastIndexOf=wu,Sr.startCase=lh,Sr.startsWith=fh,Sr.subtract=pd,Sr.sum=gd,Sr.sumBy=yd,Sr.template=hh,Sr.times=Zh,Sr.toFinite=Kl,Sr.toInteger=Gl,Sr.toLength=Yl,Sr.toLower=dh,Sr.toNumber=Ql,Sr.toSafeInteger=Xl,Sr.toString=Zl,Sr.toUpper=ph,Sr.trim=gh,Sr.trimEnd=yh,Sr.trimStart=vh,Sr.truncate=mh,Sr.unescape=_h,Sr.uniqueId=td,Sr.upperCase=bh,Sr.upperFirst=wh,Sr.each=lc,Sr.eachRight=fc,Sr.first=Xa,Uh(Sr,function(){var e={};return Ai(Sr,(function(t,n){ft.call(Sr.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Sr.VERSION=n,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Sr[e].placeholder=Sr})),cn(["drop","take"],(function(t,n){Rr.prototype[t]=function(r){r=r===e?1:Yt(Gl(r),0);var i=this.__filtered__&&!n?new Rr(this):this.clone();return i.__filtered__?i.__takeCount__=Qt(r,i.__takeCount__):i.__views__.push({size:Qt(r,j),type:t+(i.__dir__<0?"Right":"")}),i},Rr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),cn(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==C||n==A;Rr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Vs(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),cn(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Rr.prototype[e]=function(){return this[n](1).value()[0]}})),cn(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Rr.prototype[e]=function(){return this.__filtered__?new Rr(this):this[n](1)}})),Rr.prototype.compact=function(){return this.filter(Ah)},Rr.prototype.find=function(e){return this.filter(e).head()},Rr.prototype.findLast=function(e){return this.reverse().find(e)},Rr.prototype.invokeMap=wo((function(e,t){return"function"==typeof e?new Rr(this):this.map((function(n){return qi(n,e,t)}))})),Rr.prototype.reject=function(e){return this.filter(Bc(Vs(e)))},Rr.prototype.slice=function(t,n){t=Gl(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Rr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=Gl(n))<0?r.dropRight(-n):r.take(n-t)),r)},Rr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Rr.prototype.toArray=function(){return this.take(j)},Ai(Rr.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Sr[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(Sr.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,u=n instanceof Rr,c=a[0],l=u||ul(n),f=function(e){var t=o.apply(Sr,yn([e],a));return i&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=u&&!d;if(!s&&l){n=g?n:new Rr(this);var y=t.apply(n,a);return y.__actions__.push({func:Ku,args:[f],thisArg:e}),new Ir(y,h)}return p&&g?t.apply(this,a):(y=this.thru(f),p?i?y.value()[0]:y.value():y)})})),cn(["pop","push","shift","sort","splice","unshift"],(function(e){var t=st[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Sr.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ul(i)?i:[],e)}return this[n]((function(n){return t.apply(ul(n)?n:[],e)}))}})),Ai(Rr.prototype,(function(e,t){var n=Sr[t];if(n){var r=n.name+"";ft.call(pr,r)||(pr[r]=[]),pr[r].push({name:t,func:n})}})),pr[_s(e,y).name]=[{name:"wrapper",func:e}],Rr.prototype.clone=kr,Rr.prototype.reverse=Cr,Rr.prototype.value=Pr,Sr.prototype.at=Gu,Sr.prototype.chain=Yu,Sr.prototype.commit=Qu,Sr.prototype.next=Ju,Sr.prototype.plant=Zu,Sr.prototype.reverse=ec,Sr.prototype.toJSON=Sr.prototype.valueOf=Sr.prototype.value=tc,Sr.prototype.first=Sr.prototype.head,Rt&&(Sr.prototype[Rt]=Xu),Sr},fr=lr();Qt?((Qt.exports=fr)._=fr,Yt._=fr):Gt._=fr}.call(t);var wg=Object.defineProperty,Eg=Object.defineProperties,Sg=Object.getOwnPropertyDescriptors,Og=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,Ig=Object.prototype.propertyIsEnumerable,Rg=(e,t,n)=>t in e?wg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kg=(e,t)=>{for(var n in t||(t={}))xg.call(t,n)&&Rg(e,n,t[n]);if(Og)for(var n of Og(t))Ig.call(t,n)&&Rg(e,n,t[n]);return e},Cg=(e,t)=>Eg(e,Sg(t));function Pg(e,t,n){let r;const i=Ag(e);return t.rpcMap&&(r=t.rpcMap[i]),r||(r=`${yg}?chainId=eip155:${i}&projectId=${n}`),r}function Ag(e){return e.includes("eip155")?Number(e.split(":")[1]):Number(e)}function Ng(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function Tg(e,t){const n=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!n.length)return[];const r=[];return n.forEach((e=>{const n=t.namespaces[e].accounts;r.push(...n)})),r}function Mg(e={},t={}){const n=Lg(e),r=Lg(t);return bg.exports.merge(n,r)}function Lg(e){var t,n,r,i;const o={};if(!dc(e))return o;for(const[s,a]of Object.entries(e)){const e=sc(s)?[s]:a.chains,u=a.methods||[],c=a.events||[],l=a.rpcMap||{},f=ac(s);o[f]=Cg(kg(kg({},o[f]),a),{chains:zu(e,null==(t=o[f])?void 0:t.chains),methods:zu(u,null==(n=o[f])?void 0:n.methods),events:zu(c,null==(r=o[f])?void 0:r.events),rpcMap:kg(kg({},l),null==(i=o[f])?void 0:i.rpcMap)})}return o}function jg(e){return e.includes(":")?e.split(":")[2]:e}function Ug(e){const t={};for(const[n,r]of Object.entries(e)){const e=r.methods||[],i=r.events||[],o=r.accounts||[],s=sc(n)?[n]:r.chains?r.chains:Ng(r.accounts);t[n]={chains:s,methods:e,events:i,accounts:o}}return t}const Dg={},zg=e=>Dg[e],Fg=(e,t)=>{Dg[e]=t};var Bg={exports:{}};!function(e,n){var r,i=typeof self<"u"?self:t,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();r=o,function(e){var t={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function n(e){return e&&DataView.prototype.isPrototypeOf(e)}if(t.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function c(e){this.map={},e instanceof c?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function h(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function d(e){var t=new FileReader,n=f(t);return t.readAsText(e),n}function p(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:t.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:t.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():t.arrayBuffer&&t.blob&&n(e)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=l(this);if(e)return e;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(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return d(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=s(e),t=a(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},c.prototype.delete=function(e){delete this.map[s(e)]},c.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},c.prototype.set=function(e,t){this.map[s(e)]=a(t)},c.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},c.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),u(e)},c.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),u(e)},c.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),u(e)},t.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}function _(e,t){var n=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&null!=e._bodyInit&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new c(t.headers)),this.method=m(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e){var t=new c;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch{e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function O(n,r){return new Promise((function(i,o){var s=new _(n,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:w(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;i(new E(t,e))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&t.blob&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(typeof s._bodyInit>"u"?null:s._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=c,r.Request=_,r.Response=E),e.Headers=c,e.Request=_,e.Response=E,e.fetch=O,Object.defineProperty(e,"__esModule",{value:!0})}({}),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var s=o;(n=s.fetch).default=s.fetch,n.fetch=s.fetch,n.Headers=s.Headers,n.Request=s.Request,n.Response=s.Response,e.exports=n}(Bg,Bg.exports);var Hg=n(Bg.exports);const qg={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},Vg=10;class $g{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new o.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=sr(e),n=await(await Hg(this.url,Object.assign(Object.assign({},qg),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=sr({id:1,jsonrpc:"2.0",method:"test",params:[]});await Hg(e,Object.assign(Object.assign({},qg),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?or(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=Hl(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return ol(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Vg&&this.events.setMaxListeners(Vg)}}class Wg{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Kg{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){const n=Ag(e);if(!this.httpProviders[n]){const e=t||Pg(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!e)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,e)}this.chainId=n,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Ag(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}async handleSwitchChain(e){var t,n;let r=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0";r=r.startsWith("0x")?r:`0x${r}`;const i=parseInt(r,16);if(this.isChainApproved(i))this.setDefaultChain(`${i}`);else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error(`Failed to switch to chain 'eip155:${i}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:r}]},chainId:null==(n=this.namespace.chains)?void 0:n[0]}),this.setDefaultChain(`${i}`)}return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}}class Gg{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Yg{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Qg{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const n=this.getCardanoRPCUrl(t);e[t]=this.createHttpProvider(t,n)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Jg{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}class Xg{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=zg("events"),this.client=zg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Pg(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(vg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Pg(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new $g(n,zg("disableProviderPing")))}}var Zg=Object.defineProperty,ey=Object.defineProperties,ty=Object.getOwnPropertyDescriptors,ny=Object.getOwnPropertySymbols,ry=Object.prototype.hasOwnProperty,iy=Object.prototype.propertyIsEnumerable,oy=(e,t,n)=>t in e?Zg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sy=(e,t)=>{for(var n in t||(t={}))ry.call(t,n)&&oy(e,n,t[n]);if(ny)for(var n of ny(t))iy.call(t,n)&&oy(e,n,t[n]);return e},ay=(e,t)=>ey(e,ty(t));class uy{constructor(e){this.events=new o.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:un.pino(un.getDefaultLoggerOptions({level:e?.logger||dg})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new uy(e);return await t.initialize(),t}async request(e,t){const[n,r]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:sy({},e),chainId:`${n}:${r}`,topic:this.session.topic})}sendAsync(e,t,n){this.request(e,n).then((e=>t(null,e))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:fc("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:r}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await r().then((e=>{this.session=e,this.namespaces||(this.namespaces=Ug(e.namespaces),this.persist("namespaces",this.namespaces))})).catch((e=>{if(e.message!==Vp)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;const[n,r]=this.validateChain(e);this.getProvider(n).setDefaultChain(r,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(hc(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await hg.init({logger:this.providerOpts.logger||dg,relayUrl:this.providerOpts.relayUrl||pg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>ac(e))))];Fg("client",this.client),Fg("events",this.events),Fg("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=Tg(e,this.session),n=Ng(t),r=Mg(this.namespaces,this.optionalNamespaces),i=ay(sy({},r[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new Kg({namespace:i});break;case"solana":this.rpcProviders[e]=new Gg({namespace:i});break;case"cosmos":this.rpcProviders[e]=new Yg({namespace:i});break;case"polkadot":this.rpcProviders[e]=new Wg({namespace:i});break;case"cip34":this.rpcProviders[e]=new Qg({namespace:i});break;case"elrond":this.rpcProviders[e]=new Jg({namespace:i});break;case"multiversx":this.rpcProviders[e]=new Xg({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:n}=t;if("accountsChanged"===n.name){const e=n.data;e&&hc(e)&&this.events.emit("accountsChanged",e.map(jg))}else"chainChanged"===n.name?this.onChainChanged(t.chainId):this.events.emit(n.name,n.data);this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var n;const{namespaces:r}=t,i=null==(n=this.client)?void 0:n.session.get(e);this.session=ay(sy({},i),{namespaces:r}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ay(sy({},fc("USER_DISCONNECTED")),{data:e.topic}))})),this.on(vg.DEFAULT_CHAIN_CHANGED,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:r}=e;t&&Object.keys(t).length&&(this.namespaces=t),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=r,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,n];if(t&&!Object.keys(this.namespaces||{}).map((e=>ac(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const r=ac(Object.keys(this.namespaces)[0]);return[r,this.rpcProviders[r].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var n;if(!this.namespaces)return;const[r,i]=this.validateChain(e);t||this.getProvider(r).setDefaultChain(i),(null!=(n=this.namespaces[r])?n:this.namespaces[`${r}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${gg}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${gg}/${e}`)}}const cy=uy;e.UniversalProvider=cy,e.default=uy,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Cc.exports);const Pc=["eth_sendTransaction","personal_sign"],Ac=["chainChanged","accountsChanged"];function Nc(e){return Number(e[0].split(":")[1])}function Tc(e){return`0x${e.toString(16)}`}class Mc{constructor(){this.events=new Ys.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static init(e){return c(this,void 0,void 0,(function*(){const t=new Mc;return yield t.initialize(e),t}))}request(e){return c(this,void 0,void 0,(function*(){return yield this.signer.request(e,this.formatChainId(this.chainId))}))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){return c(this,void 0,void 0,(function*(){this.session||(yield this.connect());return yield this.request({method:"eth_requestAccounts"})}))}connect(e){return c(this,void 0,void 0,(function*(){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=function(e){const{chains:t,optionalChains:n,methods:r,optionalMethods:i,events:o,optionalEvents:s,rpcMap:a}=e;if(!Ic(t))throw new Error("Invalid chains");const u=t,c=r||Pc,l=o||Ac,f={chains:u,methods:c,events:l,rpcMap:{[Nc(u)]:a[Nc(u)]}},h=null==o?void 0:o.filter((e=>!Ac.includes(e))),d=null==r?void 0:r.filter((e=>!Pc.includes(e)));if(!(n||s||i||(null==h?void 0:h.length)||(null==d?void 0:d.length)))return{required:f};const p=(null==h?void 0:h.length)&&(null==d?void 0:d.length)||!n;return{required:f,optional:{chains:[...new Set(p?u.concat(n||[]):n)],methods:[...new Set(c.concat(i||[]))],events:[...new Set(l.concat(s||[]))],rpcMap:a}}}(this.rpc);try{const r=yield new Promise(((r,i)=>c(this,void 0,void 0,(function*(){yield this.signer.connect(Object.assign(Object.assign({namespaces:{[this.namespace]:t}},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:null==e?void 0:e.pairingTopic,skipPairing:!1})).then((e=>{r(e)})).catch((e=>{i(new Error(e.message))}))}))));if(!r)return;this.setChainIds(this.rpc.chains);const i=function(e,t=[]){const n=[];return Object.keys(e).forEach((r=>{if(t.length&&!t.includes(r))return;const i=e[r];n.push(...i.accounts)})),n}(r.namespaces,[this.namespace]);this.setAccounts(i),this.events.emit("connect",{chainId:Tc(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}}))}disconnect(){return c(this,void 0,void 0,(function*(){this.session&&(yield this.signer.disconnect()),this.reset()}))}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===n.name?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",Tc(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Object.assign(Object.assign({},function(e,t){const{message:n,code:r}=xc[e];return{message:t?`${n} ${t}`:n,code:r}}("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{this.events.emit("display_uri",e)}))}switchEthereumChain(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))),n=t.map((e=>this.parseChainId(e)));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",Tc(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.switchEthereumChain(t)}}parseAccountId(e){const[t,n,r]=e.split(":");return{chainId:`${t}:${n}`,address:r}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t;return{chains:(null===(t=e.chains)||void 0===t?void 0:t.map((e=>this.formatChainId(e))))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map((e=>this.formatChainId(e))):void 0,methods:(null==e?void 0:e.methods)||Pc,events:(null==e?void 0:e.events)||Ac,optionalMethods:(null==e?void 0:e.optionalMethods)||[],optionalEvents:(null==e?void 0:e.optionalEvents)||[],rpcMap:(null==e?void 0:e.rpcMap)||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach((e=>{n[e]=this.getRpcUrl(e,t)})),n}initialize(e){return c(this,void 0,void 0,(function*(){this.rpc=this.getRpcConfig(e),this.chainId=Nc(this.rpc.chains),this.signer=yield Cc.exports.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:e.disableProviderPing,relayUrl:e.relayUrl,storageOptions:e.storageOptions}),this.registerEventListeners(),yield this.loadPersistedSession()}))}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:r}=e;t&&Ic(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)}))),n&&Ic(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null==n?void 0:n.map((e=>this.formatChainId(e))),n.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)})))}getRpcUrl(e,t){var n;return(null===(n=this.rpc.rpcMap)||void 0===n?void 0:n[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}loadPersistedSession(){return c(this,void 0,void 0,(function*(){if(!this.session)return;const e=yield this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),t=this.session.namespaces[`${this.namespace}:${e}`]?this.session.namespaces[`${this.namespace}:${e}`]:this.session.namespaces[this.namespace];this.setChainIds(e?[this.formatChainId(e)]:null==t?void 0:t.accounts),this.setAccounts(null==t?void 0:t.accounts)}))}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}const Lc=r("WalletConnectEvm"),jc=i("WalletConnectEvm");function Uc(){return c(this,void 0,void 0,(function*(){Lc("getWalletConnectProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){Lc("initWalletConnectProvider");const e=Kc();Lc("walletConnectProviderOptions is",e);const t={projectId:e.projectId,chains:e.chains,optionalChains:e.optionalChains,methods:e.methods,optionalMethods:e.optionalMethods||[],events:e.events,optionalEvents:e.optionalEvents||[],rpcMap:e.rpcMap,relayUrl:e.relayUrl,showQrModal:!1};Lc("ethereum init options are",t),Lc("creating a new provider instance");try{return Mc.init(t)}catch(e){throw jc("Error while initializing ethereum provider"),e}}))}();return function(e){if(Lc("assignWalletConnectProviderEvents"),!e)return;function t(e){e&&(e.removeListener("connect",n),e.removeListener("session_delete",r))}function n(e){Lc("connectHandler",e),Jo(!1)}function r(n){Lc("disconnectHandler",n),e.disconnect(),t(e)}t(e),e.on("connect",n),e.on("session_delete",r),Lc("provider is",e)}(e),e.request=function(e){Lc("patchWalletConnectProviderRequest");const t=e.request.bind(e),n=Kc();return Lc("walletConnectProviderOptions is",n),function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(Lc("calling patched",r,i),Lc("handling display_uri once"),e.once("display_uri",Dc),new Promise(((o,s)=>c(this,void 0,void 0,(function*(){var u,c;try{(null===(u=null==e?void 0:e.session)||void 0===u?void 0:u.connected)?(Lc("reusing existing session"),o(yield t({method:r,params:i}))):(c={uri:"",onClose:()=>{jc("user rejected"),s(new a)}},qs("UseLedgerLiveModal",{isDesktop:"desktop"===Bs().type,uri:c.uri,onClose:c.onClose}),Lc("creating a new session"),yield e.connect({chains:n.chains,optionalChains:n.optionalChains}),o(yield t({method:r,params:i})))}catch(e){return jc("error",e),s(e)}}))))):(Lc("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw jc("error",t),t}}))}function Dc(e){Lc("displayUriHandler",e),Ts(e)}const zc=r("getProvider"),Fc=[1];var Bc,Hc;let qc;!function(e){e.Ethereum="Ethereum",e.Solana="Solana"}(Bc||(Bc={})),function(e){e.LedgerConnect="LedgerConnect",e.WalletConnect="WalletConnect"}(Hc||(Hc={}));const Vc=e=>(zc("getHexChainId",e),"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]*$/)?e:`0x${e.toString(16)}`),$c=r("supportOptions");let Wc;const Kc=()=>($c("getSupportOptions"),Wc),Gc=r("ExtensionEvm"),Yc="ethereum",Qc="isLedgerConnect";var Jc;function Xc(e){return("iOS"===e.os.name||"macOS"===e.os.name)&&"Safari"===e.browser.name}function Zc(e){return!!Jc[e]}function el(e){return e.every(Zc)}function tl(){if(Gc("getEthereumProvider"),"undefined"==typeof window)throw new u;let e=window[Yc];if(Gc("provider is",e),void 0===e||void 0===e[Qc])throw new o;const t=Kc(),n=Vc(t.chainId||0);return Vc(e.chainId)!=n&&(Gc("chainIds are different, changing to",n),e.request({method:"wallet_switchEthereumChain",params:[{chainId:n}]})),e}!function(e){e[e.EthereumMainnet=1]="EthereumMainnet",e[e.Polygon=137]="Polygon"}(Jc||(Jc={}));const nl=r("support");let rl;var il=Object.freeze({__proto__:null,link:function(e,t,n,r){var i=this;return e?((e instanceof Element?[e]:"toArray"in e?e.toArray():e).forEach((function(e){e.addEventListener("click",(function(o){var s,a,u=t instanceof Function?t(e):t,c=n instanceof Function?n(e):n,l=e.getAttribute("href")||e.getAttributeNS("http://www.w3.org/1999/xlink","href")||e.getAttribute("xlink:href")||(null===(s=e.getElementsByTagName("a")[0])||void 0===s?void 0:s.getAttribute("href")),f=Dt(i.track(u,c,null!=r?r:{}),null!==(a=i.settings.timeout)&&void 0!==a?a:500);(function(e,t){return!("_blank"!==e.target||!t)})(e,l)||function(e){var t=e;return!!(t.ctrlKey||t.shiftKey||t.metaKey||t.button&&1==t.button)}(o)||l&&(o.preventDefault?o.preventDefault():o.returnValue=!1,f.catch(console.error).then((function(){window.location.href=l})).catch(console.error))}),!1)})),this):this},form:function(e,t,n,r){var i=this;return e?(e instanceof HTMLFormElement&&(e=[e]),e.forEach((function(e){if(!(e instanceof Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var o=function(o){var s;o.preventDefault?o.preventDefault():o.returnValue=!1;var a=t instanceof Function?t(e):t,u=n instanceof Function?n(e):n;Dt(i.track(a,u,null!=r?r:{}),null!==(s=i.settings.timeout)&&void 0!==s?s:500).catch(console.error).then((function(){e.submit()})).catch(console.error)},s=window.jQuery||window.Zepto;s?s(e).submit(o):e.addEventListener("submit",o,!1)})),this):this}});function ol(e,t){return Object.keys(t).reduce((function(n,r){r.startsWith(e)&&(n[r.substr(e.length)]=t[r]);return n}),{})}for(var sl=Object.freeze({__proto__:null,queryString:function(e,t){var n=document.createElement("a");n.href=t;var r=n.search.slice(1).split("&").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=yn(i),e}),{}),i=[],o=r.ajs_uid,s=r.ajs_event,a=r.ajs_aid,u=Mt(e.options.useQueryString)?e.options.useQueryString:{},c=u.aid,l=void 0===c?/.+/:c,f=u.uid,h=void 0===f?/.+/:f;if(a){var d=Array.isArray(r.ajs_aid)?r.ajs_aid[0]:r.ajs_aid;l.test(d)&&e.setAnonymousId(d)}if(o){var p=Array.isArray(r.ajs_uid)?r.ajs_uid[0]:r.ajs_uid;if(h.test(p)){var g=ol("ajs_trait_",r);i.push(e.identify(p,g))}}if(s){var y=Array.isArray(r.ajs_event)?r.ajs_event[0]:r.ajs_event,v=ol("ajs_prop_",r);i.push(e.track(y,v))}return Promise.all(i)}}),al={},ul={},cl=[],ll=0;ll<64;)cl[ll]=0|4294967296*Math.sin(++ll%Math.PI);var fl=Object.freeze({__proto__:null,default:function(e){var t,n,r,i=[t=1732584193,n=4023233417,~t,~n],o=[],s=unescape(encodeURI(e))+"€",a=s.length;for(e=--a/4+2|15,o[--e]=8*a;~a;)o[a>>2]|=s.charCodeAt(a)<<8*a--;for(ll=s=0;ll<e;ll+=16){for(a=i;s<64;a=[r=a[3],t+((r=a[0]+[t&n|~t&r,r&t|~r&n,t^n^r,n^(t|~r)][a=s>>4]+cl[s]+~~o[ll|15&[s,5*s+1,3*s+5,7*s][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+s++%4])|r>>>-a),t,n])t=0|a[1],n=a[2];for(s=4;s;)i[--s]+=a[s]}for(e="";s<32;)e+=(i[s>>3]>>4*(1^s++)&15).toString(16);return e}}),hl=h(fl),dl={exports:{}};!function(e,t){e.exports=function(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}}(dl);
330
330
  /**
331
331
  * @license Apache-2.0
332
332
  *
@@ -344,7 +344,7 @@ PERFORMANCE OF THIS SOFTWARE.
344
344
  * See the License for the specific language governing permissions and
345
345
  * limitations under the License.
346
346
  */
347
- var yl=Number.POSITIVE_INFINITY,vl=Number.NEGATIVE_INFINITY;var ml=
347
+ var pl=Number.POSITIVE_INFINITY,gl=Number.NEGATIVE_INFINITY;var yl=
348
348
  /**
349
349
  * @license Apache-2.0
350
350
  *
@@ -362,7 +362,7 @@ var yl=Number.POSITIVE_INFINITY,vl=Number.NEGATIVE_INFINITY;var ml=
362
362
  * See the License for the specific language governing permissions and
363
363
  * limitations under the License.
364
364
  */
365
- function(e){return e!=e},_l=ml,bl=yl,wl=vl;
365
+ function(e){return e!=e},vl=yl,ml=pl,_l=gl;
366
366
  /**
367
367
  * @license Apache-2.0
368
368
  *
@@ -379,7 +379,7 @@ function(e){return e!=e},_l=ml,bl=yl,wl=vl;
379
379
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
380
380
  * See the License for the specific language governing permissions and
381
381
  * limitations under the License.
382
- */var El=function(e){return e===bl||e===wl},Sl=El,Ol="function"==typeof Object.defineProperty?Object.defineProperty:null;
382
+ */var bl=function(e){return e===ml||e===_l},wl=bl,El="function"==typeof Object.defineProperty?Object.defineProperty:null;
383
383
  /**
384
384
  * @license Apache-2.0
385
385
  *
@@ -396,7 +396,7 @@ function(e){return e!=e},_l=ml,bl=yl,wl=vl;
396
396
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
397
397
  * See the License for the specific language governing permissions and
398
398
  * limitations under the License.
399
- */var xl=function(){try{return Ol({},"x",{}),!0}catch(e){return!1}},Il=Object.defineProperty,Rl=Object.prototype,kl=Rl.toString,Cl=Rl.__defineGetter__,Pl=Rl.__defineSetter__,Al=Rl.__lookupGetter__,Nl=Rl.__lookupSetter__;
399
+ */var Sl=function(){try{return El({},"x",{}),!0}catch(e){return!1}},Ol=Object.defineProperty,xl=Object.prototype,Il=xl.toString,Rl=xl.__defineGetter__,kl=xl.__defineSetter__,Cl=xl.__lookupGetter__,Pl=xl.__lookupSetter__;
400
400
  /**
401
401
  * @license Apache-2.0
402
402
  *
@@ -413,7 +413,7 @@ function(e){return e!=e},_l=ml,bl=yl,wl=vl;
413
413
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
414
414
  * See the License for the specific language governing permissions and
415
415
  * limitations under the License.
416
- */var Tl=Il,Ml=function(e,t,n){var r,i,o,s;if("object"!=typeof e||null===e||"[object Array]"===kl.call(e))throw new TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if("object"!=typeof n||null===n||"[object Array]"===kl.call(n))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+n+"`.");if((i="value"in n)&&(Al.call(e,t)||Nl.call(e,t)?(r=e.__proto__,e.__proto__=Rl,delete e[t],e[t]=n.value,e.__proto__=r):e[t]=n.value),o="get"in n,s="set"in n,i&&(o||s))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return o&&Cl&&Cl.call(e,t,n.get),s&&Pl&&Pl.call(e,t,n.set),e},Ll=xl()?Tl:Ml;
416
+ */var Al=Ol,Nl=function(e,t,n){var r,i,o,s;if("object"!=typeof e||null===e||"[object Array]"===Il.call(e))throw new TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if("object"!=typeof n||null===n||"[object Array]"===Il.call(n))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+n+"`.");if((i="value"in n)&&(Cl.call(e,t)||Pl.call(e,t)?(r=e.__proto__,e.__proto__=xl,delete e[t],e[t]=n.value,e.__proto__=r):e[t]=n.value),o="get"in n,s="set"in n,i&&(o||s))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return o&&Rl&&Rl.call(e,t,n.get),s&&kl&&kl.call(e,t,n.set),e},Tl=Sl()?Al:Nl;
417
417
  /**
418
418
  * @license Apache-2.0
419
419
  *
@@ -430,7 +430,7 @@ function(e){return e!=e},_l=ml,bl=yl,wl=vl;
430
430
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
431
431
  * See the License for the specific language governing permissions and
432
432
  * limitations under the License.
433
- */var jl=function(e,t,n){Ll(e,t,{configurable:!1,enumerable:!1,writable:!1,value:n})};
433
+ */var Ml=function(e,t,n){Tl(e,t,{configurable:!1,enumerable:!1,writable:!1,value:n})};
434
434
  /**
435
435
  * @license Apache-2.0
436
436
  *
@@ -447,7 +447,7 @@ function(e){return e!=e},_l=ml,bl=yl,wl=vl;
447
447
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
448
448
  * See the License for the specific language governing permissions and
449
449
  * limitations under the License.
450
- */var Ul=
450
+ */var Ll=
451
451
  /**
452
452
  * @license Apache-2.0
453
453
  *
@@ -482,7 +482,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
482
482
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
483
483
  * See the License for the specific language governing permissions and
484
484
  * limitations under the License.
485
- */var Dl=function(){return Ul&&"symbol"==typeof Symbol.toStringTag},zl=Object.prototype.toString,Fl=zl;
485
+ */var jl=function(){return Ll&&"symbol"==typeof Symbol.toStringTag},Ul=Object.prototype.toString,Dl=Ul;
486
486
  /**
487
487
  * @license Apache-2.0
488
488
  *
@@ -499,7 +499,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
499
499
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
500
500
  * See the License for the specific language governing permissions and
501
501
  * limitations under the License.
502
- */var Bl=function(e){return Fl.call(e)},Hl=Object.prototype.hasOwnProperty;
502
+ */var zl=function(e){return Dl.call(e)},Fl=Object.prototype.hasOwnProperty;
503
503
  /**
504
504
  * @license Apache-2.0
505
505
  *
@@ -516,7 +516,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
516
516
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
517
517
  * See the License for the specific language governing permissions and
518
518
  * limitations under the License.
519
- */var ql=function(e,t){return null!=e&&Hl.call(e,t)},Vl="function"==typeof Symbol?Symbol.toStringTag:"",$l=ql,Wl=Vl,Kl=zl;
519
+ */var Bl=function(e,t){return null!=e&&Fl.call(e,t)},Hl="function"==typeof Symbol?Symbol.toStringTag:"",ql=Bl,Vl=Hl,$l=Ul;
520
520
  /**
521
521
  * @license Apache-2.0
522
522
  *
@@ -533,7 +533,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
533
533
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
534
534
  * See the License for the specific language governing permissions and
535
535
  * limitations under the License.
536
- */var Gl=function(e){var t,n,r;if(null==e)return Kl.call(e);n=e[Wl],t=$l(e,Wl);try{e[Wl]=void 0}catch(t){return Kl.call(e)}return r=Kl.call(e),t?e[Wl]=n:delete e[Wl],r},Yl=Bl,Ql=Gl,Jl=Dl()?Ql:Yl,Xl=Jl,Zl="function"==typeof Uint32Array;
536
+ */var Wl=function(e){var t,n,r;if(null==e)return $l.call(e);n=e[Vl],t=ql(e,Vl);try{e[Vl]=void 0}catch(t){return $l.call(e)}return r=$l.call(e),t?e[Vl]=n:delete e[Vl],r},Kl=zl,Gl=Wl,Yl=jl()?Gl:Kl,Ql=Yl,Jl="function"==typeof Uint32Array;
537
537
  /**
538
538
  * @license Apache-2.0
539
539
  *
@@ -550,7 +550,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
550
550
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
551
551
  * See the License for the specific language governing permissions and
552
552
  * limitations under the License.
553
- */var ef="function"==typeof Uint32Array?Uint32Array:null,tf=function(e){return Zl&&e instanceof Uint32Array||"[object Uint32Array]"===Xl(e)},nf=ef;
553
+ */var Xl="function"==typeof Uint32Array?Uint32Array:null,Zl=function(e){return Jl&&e instanceof Uint32Array||"[object Uint32Array]"===Ql(e)},ef=Xl;
554
554
  /**
555
555
  * @license Apache-2.0
556
556
  *
@@ -567,7 +567,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
567
567
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
568
568
  * See the License for the specific language governing permissions and
569
569
  * limitations under the License.
570
- */var rf=function(){var e,t;if("function"!=typeof nf)return!1;try{t=new nf(t=[1,3.14,-3.14,4294967296,4294967297]),e=tf(t)&&1===t[0]&&3===t[1]&&4294967293===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e};
570
+ */var tf=function(){var e,t;if("function"!=typeof ef)return!1;try{t=new ef(t=[1,3.14,-3.14,4294967296,4294967297]),e=Zl(t)&&1===t[0]&&3===t[1]&&4294967293===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e};
571
571
  /**
572
572
  * @license Apache-2.0
573
573
  *
@@ -584,7 +584,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
584
584
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
585
585
  * See the License for the specific language governing permissions and
586
586
  * limitations under the License.
587
- */var of="function"==typeof Uint32Array?Uint32Array:void 0,sf=
587
+ */var nf="function"==typeof Uint32Array?Uint32Array:void 0,rf=
588
588
  /**
589
589
  * @license Apache-2.0
590
590
  *
@@ -602,7 +602,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
602
602
  * See the License for the specific language governing permissions and
603
603
  * limitations under the License.
604
604
  */
605
- function(){throw new Error("not implemented")},af=rf()?of:sf,uf=Jl,cf="function"==typeof Float64Array;
605
+ function(){throw new Error("not implemented")},of=tf()?nf:rf,sf=Yl,af="function"==typeof Float64Array;
606
606
  /**
607
607
  * @license Apache-2.0
608
608
  *
@@ -619,7 +619,7 @@ function(){throw new Error("not implemented")},af=rf()?of:sf,uf=Jl,cf="function"
619
619
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
620
620
  * See the License for the specific language governing permissions and
621
621
  * limitations under the License.
622
- */var lf="function"==typeof Float64Array?Float64Array:null,ff=function(e){return cf&&e instanceof Float64Array||"[object Float64Array]"===uf(e)},hf=lf;
622
+ */var uf="function"==typeof Float64Array?Float64Array:null,cf=function(e){return af&&e instanceof Float64Array||"[object Float64Array]"===sf(e)},lf=uf;
623
623
  /**
624
624
  * @license Apache-2.0
625
625
  *
@@ -636,7 +636,7 @@ function(){throw new Error("not implemented")},af=rf()?of:sf,uf=Jl,cf="function"
636
636
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
637
637
  * See the License for the specific language governing permissions and
638
638
  * limitations under the License.
639
- */var df=function(){var e,t;if("function"!=typeof hf)return!1;try{t=new hf([1,3.14,-3.14,NaN]),e=ff(t)&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){e=!1}return e};
639
+ */var ff=function(){var e,t;if("function"!=typeof lf)return!1;try{t=new lf([1,3.14,-3.14,NaN]),e=cf(t)&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){e=!1}return e};
640
640
  /**
641
641
  * @license Apache-2.0
642
642
  *
@@ -653,7 +653,7 @@ function(){throw new Error("not implemented")},af=rf()?of:sf,uf=Jl,cf="function"
653
653
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
654
654
  * See the License for the specific language governing permissions and
655
655
  * limitations under the License.
656
- */var pf="function"==typeof Float64Array?Float64Array:void 0,gf=
656
+ */var hf="function"==typeof Float64Array?Float64Array:void 0,df=
657
657
  /**
658
658
  * @license Apache-2.0
659
659
  *
@@ -671,7 +671,7 @@ function(){throw new Error("not implemented")},af=rf()?of:sf,uf=Jl,cf="function"
671
671
  * See the License for the specific language governing permissions and
672
672
  * limitations under the License.
673
673
  */
674
- function(){throw new Error("not implemented")},yf=df()?pf:gf,vf=Jl,mf="function"==typeof Uint8Array;
674
+ function(){throw new Error("not implemented")},pf=ff()?hf:df,gf=Yl,yf="function"==typeof Uint8Array;
675
675
  /**
676
676
  * @license Apache-2.0
677
677
  *
@@ -688,7 +688,7 @@ function(){throw new Error("not implemented")},yf=df()?pf:gf,vf=Jl,mf="function"
688
688
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
689
689
  * See the License for the specific language governing permissions and
690
690
  * limitations under the License.
691
- */var _f="function"==typeof Uint8Array?Uint8Array:null,bf=function(e){return mf&&e instanceof Uint8Array||"[object Uint8Array]"===vf(e)},wf=_f;
691
+ */var vf="function"==typeof Uint8Array?Uint8Array:null,mf=function(e){return yf&&e instanceof Uint8Array||"[object Uint8Array]"===gf(e)},_f=vf;
692
692
  /**
693
693
  * @license Apache-2.0
694
694
  *
@@ -705,7 +705,7 @@ function(){throw new Error("not implemented")},yf=df()?pf:gf,vf=Jl,mf="function"
705
705
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
706
706
  * See the License for the specific language governing permissions and
707
707
  * limitations under the License.
708
- */var Ef=function(){var e,t;if("function"!=typeof wf)return!1;try{t=new wf(t=[1,3.14,-3.14,256,257]),e=bf(t)&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e};
708
+ */var bf=function(){var e,t;if("function"!=typeof _f)return!1;try{t=new _f(t=[1,3.14,-3.14,256,257]),e=mf(t)&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e};
709
709
  /**
710
710
  * @license Apache-2.0
711
711
  *
@@ -722,7 +722,7 @@ function(){throw new Error("not implemented")},yf=df()?pf:gf,vf=Jl,mf="function"
722
722
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
723
723
  * See the License for the specific language governing permissions and
724
724
  * limitations under the License.
725
- */var Sf="function"==typeof Uint8Array?Uint8Array:void 0,Of=
725
+ */var wf="function"==typeof Uint8Array?Uint8Array:void 0,Ef=
726
726
  /**
727
727
  * @license Apache-2.0
728
728
  *
@@ -740,7 +740,7 @@ function(){throw new Error("not implemented")},yf=df()?pf:gf,vf=Jl,mf="function"
740
740
  * See the License for the specific language governing permissions and
741
741
  * limitations under the License.
742
742
  */
743
- function(){throw new Error("not implemented")},xf=Ef()?Sf:Of,If=Jl,Rf="function"==typeof Uint16Array;
743
+ function(){throw new Error("not implemented")},Sf=bf()?wf:Ef,Of=Yl,xf="function"==typeof Uint16Array;
744
744
  /**
745
745
  * @license Apache-2.0
746
746
  *
@@ -757,7 +757,7 @@ function(){throw new Error("not implemented")},xf=Ef()?Sf:Of,If=Jl,Rf="function"
757
757
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
758
758
  * See the License for the specific language governing permissions and
759
759
  * limitations under the License.
760
- */var kf="function"==typeof Uint16Array?Uint16Array:null,Cf=function(e){return Rf&&e instanceof Uint16Array||"[object Uint16Array]"===If(e)},Pf=kf;
760
+ */var If="function"==typeof Uint16Array?Uint16Array:null,Rf=function(e){return xf&&e instanceof Uint16Array||"[object Uint16Array]"===Of(e)},kf=If;
761
761
  /**
762
762
  * @license Apache-2.0
763
763
  *
@@ -774,7 +774,7 @@ function(){throw new Error("not implemented")},xf=Ef()?Sf:Of,If=Jl,Rf="function"
774
774
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
775
775
  * See the License for the specific language governing permissions and
776
776
  * limitations under the License.
777
- */var Af=function(){var e,t;if("function"!=typeof Pf)return!1;try{t=new Pf(t=[1,3.14,-3.14,65536,65537]),e=Cf(t)&&1===t[0]&&3===t[1]&&65533===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e};
777
+ */var Cf=function(){var e,t;if("function"!=typeof kf)return!1;try{t=new kf(t=[1,3.14,-3.14,65536,65537]),e=Rf(t)&&1===t[0]&&3===t[1]&&65533===t[2]&&0===t[3]&&1===t[4]}catch(t){e=!1}return e};
778
778
  /**
779
779
  * @license Apache-2.0
780
780
  *
@@ -791,7 +791,7 @@ function(){throw new Error("not implemented")},xf=Ef()?Sf:Of,If=Jl,Rf="function"
791
791
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
792
792
  * See the License for the specific language governing permissions and
793
793
  * limitations under the License.
794
- */var Nf,Tf="function"==typeof Uint16Array?Uint16Array:void 0,Mf=
794
+ */var Pf,Af="function"==typeof Uint16Array?Uint16Array:void 0,Nf=
795
795
  /**
796
796
  * @license Apache-2.0
797
797
  *
@@ -809,7 +809,7 @@ function(){throw new Error("not implemented")},xf=Ef()?Sf:Of,If=Jl,Rf="function"
809
809
  * See the License for the specific language governing permissions and
810
810
  * limitations under the License.
811
811
  */
812
- function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
812
+ function(){throw new Error("not implemented")},Tf={uint16:Cf()?Af:Nf,uint8:Sf};
813
813
  /**
814
814
  * @license Apache-2.0
815
815
  *
@@ -826,7 +826,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
826
826
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
827
827
  * See the License for the specific language governing permissions and
828
828
  * limitations under the License.
829
- */(Nf=new Lf.uint16(1))[0]=4660;var jf,Uf,Df=52===new Lf.uint8(Nf.buffer)[0];
829
+ */(Pf=new Tf.uint16(1))[0]=4660;var Mf,Lf,jf=52===new Tf.uint8(Pf.buffer)[0];
830
830
  /**
831
831
  * @license Apache-2.0
832
832
  *
@@ -843,7 +843,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
843
843
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
844
844
  * See the License for the specific language governing permissions and
845
845
  * limitations under the License.
846
- */!0===Df?(jf=1,Uf=0):(jf=0,Uf=1);var zf=af,Ff={HIGH:jf,LOW:Uf},Bf=new yf(1),Hf=new zf(Bf.buffer),qf=Ff.HIGH,Vf=Ff.LOW;
846
+ */!0===jf?(Mf=1,Lf=0):(Mf=0,Lf=1);var Uf=of,Df={HIGH:Mf,LOW:Lf},zf=new pf(1),Ff=new Uf(zf.buffer),Bf=Df.HIGH,Hf=Df.LOW;
847
847
  /**
848
848
  * @license Apache-2.0
849
849
  *
@@ -860,7 +860,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
860
860
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
861
861
  * See the License for the specific language governing permissions and
862
862
  * limitations under the License.
863
- */var $f=function(e,t,n,r){return Bf[0]=e,t[r]=Hf[qf],t[r+n]=Hf[Vf],t},Wf=$f;
863
+ */var qf=function(e,t,n,r){return zf[0]=e,t[r]=Ff[Bf],t[r+n]=Ff[Hf],t},Vf=qf;
864
864
  /**
865
865
  * @license Apache-2.0
866
866
  *
@@ -877,7 +877,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
877
877
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
878
878
  * See the License for the specific language governing permissions and
879
879
  * limitations under the License.
880
- */var Kf=function(e){return Wf(e,[0,0],1,0)},Gf=Kf;
880
+ */var $f=function(e){return Vf(e,[0,0],1,0)},Wf=$f;
881
881
  /**
882
882
  * @license Apache-2.0
883
883
  *
@@ -894,7 +894,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
894
894
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
895
895
  * See the License for the specific language governing permissions and
896
896
  * limitations under the License.
897
- */jl(Gf,"assign",$f);var Yf=Gf,Qf=af,Jf=!0===Df?1:0,Xf=new yf(1),Zf=new Qf(Xf.buffer);
897
+ */Ml(Wf,"assign",qf);var Kf=Wf,Gf=of,Yf=!0===jf?1:0,Qf=new pf(1),Jf=new Gf(Qf.buffer);
898
898
  /**
899
899
  * @license Apache-2.0
900
900
  *
@@ -911,7 +911,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
911
911
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
912
912
  * See the License for the specific language governing permissions and
913
913
  * limitations under the License.
914
- */var eh,th,nh=function(e){return Xf[0]=e,Zf[Jf]},rh=nh;
914
+ */var Xf,Zf,eh=function(e){return Qf[0]=e,Jf[Yf]},th=eh;
915
915
  /**
916
916
  * @license Apache-2.0
917
917
  *
@@ -928,7 +928,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
928
928
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
929
929
  * See the License for the specific language governing permissions and
930
930
  * limitations under the License.
931
- */!0===Df?(eh=1,th=0):(eh=0,th=1);var ih=af,oh={HIGH:eh,LOW:th},sh=new yf(1),ah=new ih(sh.buffer),uh=oh.HIGH,ch=oh.LOW;
931
+ */!0===jf?(Xf=1,Zf=0):(Xf=0,Zf=1);var nh=of,rh={HIGH:Xf,LOW:Zf},ih=new pf(1),oh=new nh(ih.buffer),sh=rh.HIGH,ah=rh.LOW;
932
932
  /**
933
933
  * @license Apache-2.0
934
934
  *
@@ -945,7 +945,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
945
945
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
946
946
  * See the License for the specific language governing permissions and
947
947
  * limitations under the License.
948
- */var lh=function(e,t){return ah[uh]=e,ah[ch]=t,sh[0]},fh=lh,hh=Yf,dh=rh,ph=fh,gh=[0,0];
948
+ */var uh=function(e,t){return oh[sh]=e,oh[ah]=t,ih[0]},ch=uh,lh=Kf,fh=th,hh=ch,dh=[0,0];
949
949
  /**
950
950
  * @license Apache-2.0
951
951
  *
@@ -962,7 +962,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
962
962
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
963
963
  * See the License for the specific language governing permissions and
964
964
  * limitations under the License.
965
- */var yh=function(e,t){var n,r;return hh.assign(e,gh,1,0),n=gh[0],n&=2147483647,r=dh(t),ph(n|=r&=2147483648,gh[1])},vh=yh;
965
+ */var ph=function(e,t){var n,r;return lh.assign(e,dh,1,0),n=dh[0],n&=2147483647,r=fh(t),hh(n|=r&=2147483648,dh[1])},gh=ph;
966
966
  /**
967
967
  * @license Apache-2.0
968
968
  *
@@ -979,7 +979,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
979
979
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
980
980
  * See the License for the specific language governing permissions and
981
981
  * limitations under the License.
982
- */var mh=
982
+ */var yh=
983
983
  /**
984
984
  * @license Apache-2.0
985
985
  *
@@ -997,7 +997,7 @@ function(){throw new Error("not implemented")},Lf={uint16:Af()?Tf:Mf,uint8:xf};
997
997
  * See the License for the specific language governing permissions and
998
998
  * limitations under the License.
999
999
  */
1000
- function(e){return Math.abs(e)},_h=Sl,bh=_l,wh=mh;
1000
+ function(e){return Math.abs(e)},vh=wl,mh=vl,_h=yh;
1001
1001
  /**
1002
1002
  * @license Apache-2.0
1003
1003
  *
@@ -1014,7 +1014,7 @@ function(e){return Math.abs(e)},_h=Sl,bh=_l,wh=mh;
1014
1014
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1015
1015
  * See the License for the specific language governing permissions and
1016
1016
  * limitations under the License.
1017
- */var Eh=function(e,t,n,r){return bh(e)||_h(e)?(t[r]=e,t[r+n]=0,t):0!==e&&wh(e)<22250738585072014e-324?(t[r]=4503599627370496*e,t[r+n]=-52,t):(t[r]=e,t[r+n]=0,t)},Sh=Eh;
1017
+ */var bh=function(e,t,n,r){return mh(e)||vh(e)?(t[r]=e,t[r+n]=0,t):0!==e&&_h(e)<22250738585072014e-324?(t[r]=4503599627370496*e,t[r+n]=-52,t):(t[r]=e,t[r+n]=0,t)},wh=bh;
1018
1018
  /**
1019
1019
  * @license Apache-2.0
1020
1020
  *
@@ -1031,7 +1031,7 @@ function(e){return Math.abs(e)},_h=Sl,bh=_l,wh=mh;
1031
1031
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1032
1032
  * See the License for the specific language governing permissions and
1033
1033
  * limitations under the License.
1034
- */var Oh=function(e){return Sh(e,[0,0],1,0)},xh=Oh;
1034
+ */var Eh=function(e){return wh(e,[0,0],1,0)},Sh=Eh;
1035
1035
  /**
1036
1036
  * @license Apache-2.0
1037
1037
  *
@@ -1048,7 +1048,7 @@ function(e){return Math.abs(e)},_h=Sl,bh=_l,wh=mh;
1048
1048
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1049
1049
  * See the License for the specific language governing permissions and
1050
1050
  * limitations under the License.
1051
- */jl(xh,"assign",Eh);var Ih=rh;
1051
+ */Ml(Sh,"assign",bh);var Oh=th;
1052
1052
  /**
1053
1053
  * @license Apache-2.0
1054
1054
  *
@@ -1065,7 +1065,7 @@ function(e){return Math.abs(e)},_h=Sl,bh=_l,wh=mh;
1065
1065
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1066
1066
  * See the License for the specific language governing permissions and
1067
1067
  * limitations under the License.
1068
- */var Rh=function(e){var t=Ih(e);return(t=(2146435072&t)>>>20)-1023|0},kh=yl,Ch=vl,Ph=_l,Ah=Sl,Nh=vh,Th=xh,Mh=Rh,Lh=Yf,jh=fh,Uh=[0,0],Dh=[0,0];
1068
+ */var xh=function(e){var t=Oh(e);return(t=(2146435072&t)>>>20)-1023|0},Ih=pl,Rh=gl,kh=vl,Ch=wl,Ph=gh,Ah=Sh,Nh=xh,Th=Kf,Mh=ch,Lh=[0,0],jh=[0,0];
1069
1069
  /**
1070
1070
  * @license Apache-2.0
1071
1071
  *
@@ -1082,7 +1082,7 @@ function(e){return Math.abs(e)},_h=Sl,bh=_l,wh=mh;
1082
1082
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1083
1083
  * See the License for the specific language governing permissions and
1084
1084
  * limitations under the License.
1085
- */var zh=function(e,t){var n,r;return 0===e||Ph(e)||Ah(e)?e:(Th(Uh),t+=Uh[1],(t+=Mh(e=Uh[0]))<-1074?Nh(0,e):t>1023?e<0?Ch:kh:(t<=-1023?(t+=52,r=2220446049250313e-31):r=1,Lh(Dh),n=Dh[0],n&=2148532223,r*jh(n|=t+1023<<20,Dh[1])))},Fh=zh,Bh={};
1085
+ */var Uh=function(e,t){var n,r;return 0===e||kh(e)||Ch(e)?e:(Ah(Lh),t+=Lh[1],(t+=Nh(e=Lh[0]))<-1074?Ph(0,e):t>1023?e<0?Rh:Ih:(t<=-1023?(t+=52,r=2220446049250313e-31):r=1,Th(jh),n=jh[0],n&=2148532223,r*Mh(n|=t+1023<<20,jh[1])))},Dh=Uh,zh={};
1086
1086
  /**
1087
1087
  * @license Apache-2.0
1088
1088
  *
@@ -1099,4 +1099,4 @@ function(e){return Math.abs(e)},_h=Sl,bh=_l,wh=mh;
1099
1099
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1100
1100
  * See the License for the specific language governing permissions and
1101
1101
  * limitations under the License.
1102
- */Bh.dset=function(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,s=t.length,a=e;o<s&&"__proto__"!==(i=t[o++])&&"constructor"!==i&&"prototype"!==i;)a=a[i]=o===s?n:typeof(r=a[i])==typeof t?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]};var Hh={},qh=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.unset=void 0;var Vh=qh(gl.exports);Hh.unset=function(e,t){if((0,Vh.default)(e,t)){for(var n=t.split("."),r=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)r=n.pop().slice(0,-1)+"."+r;for(;n.length;)e=e[t=n.shift()];return delete e[r]}return!0};var $h=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ll,"__esModule",{value:!0});var Wh=$h(pl),Kh=$h(gl.exports),Gh=$h(Fh),Yh=Bh,Qh=Hh;function Jh(e,t){Zh(e,t.drop,(function(e,t){t.forEach((function(t){return delete e[t]}))}))}function Xh(e,t){Zh(e,t.allow,(function(e,t){Object.keys(e).forEach((function(n){t.includes(n)||delete e[n]}))}))}function Zh(e,t,n){Object.entries(t).forEach((function(t){var r=t[0],i=t[1],o=function(e){"object"==typeof e&&null!==e&&n(e,i)},s=""===r?e:(0,Kh.default)(e,r);Array.isArray(s)?s.forEach(o):o(s)}))}function ed(e,t){var n=JSON.parse(JSON.stringify(e));for(var r in t.map)if(t.map.hasOwnProperty(r)){var i=t.map[r],o=r.split("."),s=void 0;if(o.length>1?(o.pop(),s=(0,Kh.default)(n,o.join("."))):s=e,"object"==typeof s){if(i.copy){var a=(0,Kh.default)(n,i.copy);void 0!==a&&(0,Yh.dset)(e,r,a)}else if(i.move){var u=(0,Kh.default)(n,i.move);void 0!==u&&(0,Yh.dset)(e,r,u),(0,Qh.unset)(e,i.move)}else i.hasOwnProperty("set")&&(0,Yh.dset)(e,r,i.set);if(i.to_string){var c=(0,Kh.default)(e,r);if("string"==typeof c||"object"==typeof c&&null!==c)continue;void 0!==c?(0,Yh.dset)(e,r,JSON.stringify(c)):(0,Yh.dset)(e,r,"undefined")}}}}function td(e,t){return!(t.sample.percent<=0)&&(t.sample.percent>=1||(t.sample.path?function(e,t){var n=(0,Kh.default)(e,t.sample.path),r=(0,Wh.default)(JSON.stringify(n)),i=-64,o=[];nd(r.slice(0,8),o);for(var s=0,a=0;a<64&&1!==o[a];a++)s++;if(0!==s){var u=[];nd(r.slice(9,16),u),i-=s,o.splice(0,s),u.splice(64-s),o=o.concat(u)}return o[63]=0===o[63]?1:0,(0,Gh.default)(parseInt(o.join(""),2),i)<t.sample.percent}(e,t):(n=t.sample.percent,Math.random()<=n)));var n}function nd(e,t){for(var n=0;n<8;n++)for(var r=e[n],i=128;i>=1;i/=2)r-i>=0?(r-=i,t.push(1)):t.push(0)}ll.default=function(e,t){for(var n=e,r=0,i=t;r<i.length;r++){var o=i[r];switch(o.type){case"drop":return null;case"drop_properties":Jh(n,o.config);break;case"allow_properties":Xh(n,o.config);break;case"sample_event":if(td(n,o.config))break;return null;case"map_properties":ed(n,o.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(o.type,'" is unsupported.'))}}return n};var rd={},id=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rd,"__esModule",{value:!0});var od=id(gl.exports);function sd(e,t){if(!Array.isArray(e))return!0===ad(e,t);var n=e[0];switch(n){case"!":return!sd(e[1],t);case"or":for(var r=1;r<e.length;r++)if(sd(e[r],t))return!0;return!1;case"and":for(r=1;r<e.length;r++)if(!sd(e[r],t))return!1;return!0;case"=":case"!=":return function(e,t,n,r){ud(e)&&(e=sd(e,r));ud(t)&&(t=sd(t,r));"object"==typeof e&&"object"==typeof t&&(e=JSON.stringify(e),t=JSON.stringify(t));switch(n){case"=":return e===t;case"!=":return e!==t;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(ad(e[1],t),ad(e[2],t),n,t);case"<=":case"<":case">":case">=":return function(e,t,n,r){ud(e)&&(e=sd(e,r));ud(t)&&(t=sd(t,r));if("number"!=typeof e||"number"!=typeof t)return!1;switch(n){case"<=":return e<=t;case">=":return e>=t;case"<":return e<t;case">":return e>t;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(ad(e[1],t),ad(e[2],t),n,t);case"in":return function(e,t,n){return void 0!==t.find((function(t){return ad(t,n)===e}))}(ad(e[1],t),ad(e[2],t),t);case"contains":return function(e,t){if("string"!=typeof e||"string"!=typeof t)return!1;return-1!==e.indexOf(t)}(ad(e[1],t),ad(e[2],t));case"match":return function(e,t){if("string"!=typeof e||"string"!=typeof t)return!1;return function(e,t){var n,r;e:for(;e.length>0;){var i=void 0,o=void 0;if(i=(n=cd(e)).star,o=n.chunk,e=n.pattern,i&&""===o)return!0;var s=ld(o,t),a=s.t,u=s.ok,c=s.err;if(c)return!1;if(!u||!(0===a.length||e.length>0)){if(i)for(var l=0;l<t.length;l++){if(a=(r=ld(o,t.slice(l+1))).t,u=r.ok,c=r.err,u){if(0===e.length&&a.length>0)continue;t=a;continue e}if(c)return!1}return!1}t=a}return 0===t.length}(t,e)}(ad(e[1],t),ad(e[2],t));case"lowercase":var i=ad(e[1],t);return"string"!=typeof i?null:i.toLowerCase();case"typeof":return typeof ad(e[1],t);case"length":return function(e){if(null===e)return 0;if(!Array.isArray(e)&&"string"!=typeof e)return NaN;return e.length}(ad(e[1],t));default:throw new Error("FQL IR could not evaluate for token: ".concat(n))}}function ad(e,t){return Array.isArray(e)?e:"object"==typeof e?e.value:(0,od.default)(t,e)}function ud(e){return!!Array.isArray(e)&&(("lowercase"===e[0]||"length"===e[0]||"typeof"===e[0])&&2===e.length||("contains"===e[0]||"match"===e[0])&&3===e.length)}function cd(e){for(var t={star:!1,chunk:"",pattern:""};e.length>0&&"*"===e[0];)e=e.slice(1),t.star=!0;var n,r=!1;e:for(n=0;n<e.length;n++)switch(e[n]){case"\\":n+1<e.length&&n++;break;case"[":r=!0;break;case"]":r=!1;break;case"*":if(!r)break e}return t.chunk=e.slice(0,n),t.pattern=e.slice(n),t}function ld(e,t){for(var n,r,i={t:"",ok:!1,err:!1};e.length>0;){if(0===t.length)return i;switch(e[0]){case"[":var o=t[0];t=t.slice(1);var s=!0;(e=e.slice(1)).length>0&&"^"===e[0]&&(s=!1,e=e.slice(1));for(var a=!1,u=0;;){if(e.length>0&&"]"===e[0]&&u>0){e=e.slice(1);break}var c,l="";if(c=(n=fd(e)).char,e=n.newChunk,n.err)return i;if(l=c,"-"===e[0]&&(l=(r=fd(e.slice(1))).char,e=r.newChunk,r.err))return i;c<=o&&o<=l&&(a=!0),u++}if(a!==s)return i;break;case"?":t=t.slice(1),e=e.slice(1);break;case"\\":if(0===(e=e.slice(1)).length)return i.err=!0,i;default:if(e[0]!==t[0])return i;t=t.slice(1),e=e.slice(1)}}return i.t=t,i.ok=!0,i.err=!1,i}function fd(e){var t={char:"",newChunk:"",err:!1};return 0===e.length||"-"===e[0]||"]"===e[0]||"\\"===e[0]&&0===(e=e.slice(1)).length?(t.err=!0,t):(t.char=e[0],t.newChunk=e.slice(1),0===t.newChunk.length&&(t.err=!0),t)}rd.default=function(e,t){if(!t)throw new Error("No matcher supplied!");switch(t.type){case"all":return!0;case"fql":return function(e,t){if(!e)return!1;try{e=JSON.parse(e)}catch(t){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(e,'": ').concat(t))}var n=sd(e,t);if("boolean"!=typeof n)return!1;return n}(t.ir,e);default:throw new Error("Matcher of type ".concat(t.type," unsupported."))}};var hd={};Object.defineProperty(hd,"__esModule",{value:!0});var dd=function(){function e(e){this.rules=[],this.rules=e||[]}return e.prototype.getRulesByDestinationName=function(e){for(var t=[],n=0,r=this.rules;n<r.length;n++){var i=r[n];i.destinationName!==e&&void 0!==i.destinationName||t.push(i)}return t},e}();hd.default=dd,function(e){var t=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.matches=e.transform=void 0;var n=ll;Object.defineProperty(e,"transform",{enumerable:!0,get:function(){return t(n).default}});var r=rd;Object.defineProperty(e,"matches",{enumerable:!0,get:function(){return t(r).default}});var i=hd;Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return t(i).default}})}(cl);var pd=Object.freeze({__proto__:null,tsubMiddleware:function(e){return function(t){var n=t.payload,r=t.integration,i=t.next;new cl.Store(e).getRulesByDestinationName(r).forEach((function(e){for(var t=e.matchers,r=e.transformers,o=0;o<t.length;o++)if(cl.matches(n.obj,t[o])&&(n.obj=cl.transform(n.obj,r[o]),null===n.obj))return i(null)})),i(n)}}});function gd(e,t){var n,r;return"boolean"==typeof(null==t?void 0:t.enabled)?t.enabled:null===(r=null===(n=null==e?void 0:e.__default)||void 0===n?void 0:n.enabled)||void 0===r||r}function yd(e){return e.toLowerCase().replace(".","").replace(/\s+/g,"-")}function vd(e,t){return void 0===t&&(t=!1),t?btoa(e).replace(/=/g,""):void 0}function md(e,t,n,r){return mt(this,void 0,void 0,(function(){var i,o,s,a,u,c;return _t(this,(function(l){switch(l.label){case 0:i=yd(t),o=vd(i,r),s=or(),a="".concat(s,"/integrations/").concat(null!=o?o:i,"/").concat(n,"/").concat(null!=o?o:i,".dynamic.js.gz"),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,dr(a)];case 2:return l.sent(),function(e,t,n){var r,i;try{var o=(null!==(i=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(e,"resource"))&&void 0!==i?i:[])[0];o&&t.stats.gauge("legacy_destination_time",Math.round(o.duration),bt([n],o.duration<100?["cached"]:[],!0))}catch(e){}}(a,e,t),[3,4];case 3:throw u=l.sent(),e.stats.gauge("legacy_destination_time",-1,["plugin:".concat(t),"failed"]),u;case 4:return c=window["".concat(i,"Deps")],[4,Promise.all(c.map((function(e){return dr(s+e+".gz")})))];case 5:return l.sent(),window["".concat(i,"Loader")](),[2,window["".concat(i,"Integration")]]}}))}))}function _d(e,t){return mt(this,void 0,void 0,(function(){var n,r=this;return _t(this,(function(i){switch(i.label){case 0:return n=[],cn()?[2,t]:[4,io((function(){return t.length>0&&un()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return _t(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,Jt(r,e)]:[2];case 1:return i=o.sent(),i instanceof zn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}var bd=function(){function e(e,t,n,r,i,o){void 0===r&&(r={}),this.options={},this.type="destination",this.middleware=[],this._ready=!1,this._initialized=!1,this.flushing=!1,this.name=e,this.version=t,this.settings=vt({},r),this.disableAutoISOConversion=i.disableAutoISOConversion||!1,this.integrationSource=o,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.options=i,this.buffer=i.disableClientPersistence?new Ht(4,[]):new Gn(4,"".concat(n,":dest-").concat(e)),this.scheduleFlush()}return e.prototype.isLoaded=function(){return this._ready},e.prototype.ready=function(){var e;return null!==(e=this.onReady)&&void 0!==e?e:Promise.resolve()},e.prototype.load=function(e,t){var n;return mt(this,void 0,void 0,(function(){var r,i,o=this;return _t(this,(function(s){switch(s.label){case 0:return this._ready||void 0!==this.onReady?[2]:null===(n=this.integrationSource)||void 0===n?[3,1]:(i=n,[3,3]);case 1:return[4,md(e,this.name,this.version,this.options.obfuscate)];case 2:i=s.sent(),s.label=3;case 3:r=i,this.integration=function(e,t,n){var r;"Integration"in e?(e({user:function(){return n.user()},addIntegration:function(){}}),r=e.Integration):r=e;var i=new r(t);return i.analytics=n,i}(r,this.settings,t),this.onReady=new Promise((function(e){o.integration.once("ready",(function(){o._ready=!0,e(!0)}))})),this.onInitialize=new Promise((function(e){o.integration.on("initialize",(function(){o._initialized=!0,e(!0)}))}));try{e.stats.increment("analytics_js.integration.invoke",1,["method:initialize","integration_name:".concat(this.name)]),this.integration.initialize()}catch(t){throw e.stats.increment("analytics_js.integration.invoke.error",1,["method:initialize","integration_name:".concat(this.name)]),t}return[2]}}))}))},e.prototype.unload=function(e,t){return function(e,t,n){return mt(this,void 0,void 0,(function(){var r,i,o;return _t(this,(function(s){return r=or(),i=yd(e),o=vd(e,n),[2,pr("".concat(r,"/integrations/").concat(null!=o?o:i,"/").concat(t,"/").concat(null!=o?o:i,".dynamic.js.gz"))]}))}))}(this.name,this.version,this.options.obfuscate)},e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.middleware=(e=this.middleware).concat.apply(e,t)},e.prototype.shouldBuffer=function(e){return"page"!==e.event.type&&(cn()||!1===this._ready||!1===this._initialized)},e.prototype.send=function(e,t,n){var r,i;return mt(this,void 0,void 0,(function(){var o,s,a,u,c,l;return _t(this,(function(f){switch(f.label){case 0:if(this.shouldBuffer(e))return this.buffer.push(e),this.scheduleFlush(),[2,e];if(o=null===(i=null===(r=this.options)||void 0===r?void 0:r.plan)||void 0===i?void 0:i.track,s=e.event.event,o&&s&&"Segment.io"!==this.name){if(a=o[s],!gd(o,a))return e.updateEvent("integrations",vt(vt({},e.event.integrations),{All:!1,"Segment.io":!0})),e.cancel(new Yt({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,e];if(e.updateEvent("integrations",vt(vt({},e.event.integrations),null==a?void 0:a.integrations)),(null==a?void 0:a.enabled)&&!1===(null==a?void 0:a.integrations[this.name]))return e.cancel(new Yt({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,e]}return[4,Qi(this.name,e.event,this.middleware)];case 1:if(null===(u=f.sent()))return[2,e];c=new t(u,{traverse:!this.disableAutoISOConversion}),e.stats.increment("analytics_js.integration.invoke",1,["method:".concat(n),"integration_name:".concat(this.name)]),f.label=2;case 2:return f.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,n,c)]:[3,4];case 3:f.sent(),f.label=4;case 4:return[3,6];case 5:throw l=f.sent(),e.stats.increment("analytics_js.integration.invoke.error",1,["method:".concat(n),"integration_name:".concat(this.name)]),l;case 6:return[2,e]}}))}))},e.prototype.track=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Track,"track")]}))}))},e.prototype.page=function(e){var t;return mt(this,void 0,void 0,(function(){var n=this;return _t(this,(function(r){return(null===(t=this.integration)||void 0===t?void 0:t._assumesPageview)&&!this._initialized&&this.integration.initialize(),[2,this.onInitialize.then((function(){return n.send(e,gr.Page,"page")}))]}))}))},e.prototype.identify=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Identify,"identify")]}))}))},e.prototype.alias=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Alias,"alias")]}))}))},e.prototype.group=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Group,"group")]}))}))},e.prototype.scheduleFlush=function(){var e=this;this.flushing||setTimeout((function(){return mt(e,void 0,void 0,(function(){var e;return _t(this,(function(t){switch(t.label){case 0:return this.flushing=!0,e=this,[4,_d(this,this.buffer)];case 1:return e.buffer=t.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},e}();var wd=Object.freeze({__proto__:null,LegacyDestination:bd,ajsDestinations:function(e,t,n,r,i,o){var s,a;if(void 0===n&&(n={}),void 0===r&&(r={}),an())return[];t.plan&&((r=null!=r?r:{}).plan=t.plan);var u=null!==(a=null===(s=t.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==a?a:[],c=t.integrations,l=r.integrations,f=sr(t,null!=r?r:{}),h=null==o?void 0:o.reduce((function(e,t){var n;return vt(vt({},e),((n={})[function(e){return("Integration"in e?e.Integration:e).prototype.name}(t)]=t,n))}),{}),d=new Set(bt(bt([],Object.keys(c).filter((function(e){return function(e,t){var n,r=t.type,i=t.bundlingStatus,o=t.versionSettings,s="unbundled"!==i&&("browser"===r||(null===(n=null==o?void 0:o.componentTypes)||void 0===n?void 0:n.includes("browser")));return!e.startsWith("Segment")&&"Iterable"!==e&&s}(e,c[e])})),!0),Object.keys(h||{}).filter((function(e){return Mt(c[e])||Mt(null==l?void 0:l[e])})),!0));return Array.from(d).filter((function(e){return!function(e,t){var n=!1===t.All&&void 0===t[e];return!1===t[e]||n}(e,n)})).map((function(t){var n=function(e){var t,n,r,i;return null!==(i=null!==(n=null===(t=null==e?void 0:e.versionSettings)||void 0===t?void 0:t.override)&&void 0!==n?n:null===(r=null==e?void 0:e.versionSettings)||void 0===r?void 0:r.version)&&void 0!==i?i:"latest"}(c[t]),o=new bd(t,n,e,f[t],r,null==h?void 0:h[t]);return u.filter((function(e){return e.destinationName===t})).length>0&&i&&o.addMiddleware(i),o}))}});var Ed=Object.freeze({__proto__:null,loadLegacyVideoPlugins:function(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve().then((function(){return Id}))];case 1:return t=n.sent(),e._plugins=t,[2]}}))}))}});var Sd=Object.freeze({__proto__:null,schemaFilter:function(e,t){function n(n){var r=e,i=n.event.event;if(r&&i){var o=r[i];if(!gd(r,o))return n.updateEvent("integrations",vt(vt({},n.event.integrations),{All:!1,"Segment.io":!0})),n;var s=function(e,t){var n,r;if(!e||!Object.keys(e))return{};var i=e.integrations?Object.keys(e.integrations).filter((function(t){return!1===e.integrations[t]})):[],o=[];return(null!==(n=t.remotePlugins)&&void 0!==n?n:[]).forEach((function(e){i.forEach((function(t){(e.name.includes(t)||t.includes(e.name))&&o.push(e.name)}))})),(null!==(r=t.remotePlugins)&&void 0!==r?r:[]).reduce((function(e,t){return t.settings.subscriptions&&o.includes(t.name)&&t.settings.subscriptions.forEach((function(n){return e["".concat(t.name," ").concat(n.partnerAction)]=!1})),e}),{})}(o,t);n.updateEvent("integrations",vt(vt(vt({},n.event.integrations),null==o?void 0:o.integrations),s))}return n}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:n,alias:n,track:n,identify:n,group:n}}});var Od=Object.freeze({__proto__:null,remoteMiddlewares:function(e,t,n){var r;return mt(this,void 0,void 0,(function(){var i,o,s,a,u=this;return _t(this,(function(c){switch(c.label){case 0:return an()?[2,[]]:(i=or(),o=null!==(r=t.enabledMiddleware)&&void 0!==r?r:{},s=Object.entries(o).filter((function(e){return e[0],e[1]})).map((function(e){return e[0]})),a=s.map((function(t){return mt(u,void 0,void 0,(function(){var r,o,s,a;return _t(this,(function(u){switch(u.label){case 0:r=t.replace("@segment/",""),o=r,n&&(o=btoa(r).replace(/=/g,"")),s="".concat(i,"/middleware/").concat(o,"/latest/").concat(o,".js.gz"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,dr(s)];case 2:return u.sent(),[2,window["".concat(r,"Middleware")]];case 3:return a=u.sent(),e.log("error",a),e.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}}))}))})),[4,Promise.all(a)]);case 1:return[2,c.sent().filter(Boolean)]}}))}))}}),xd={exports:{}};!function(e,t){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){n.r(t);var r="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest;for(var o in i.open(t.method||"get",e,!0),t.headers)i.setRequestHeader(o,t.headers[o]);function s(){var e,t=[],n=[],r={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(i,o,s){t.push(o=o.toLowerCase()),n.push([o,s]),e=r[o],r[o]=e?e+","+s:s})),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:s,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return t},entries:function(){return n},get:function(e){return r[e.toLowerCase()]},has:function(e){return e.toLowerCase()in r}}}}i.withCredentials="include"==t.credentials,i.onload=function(){n(s())},i.onerror=r,i.send(t.body)}))};t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginName=t}return r(e,[{key:"track",value:function(e,t){window.analytics.track(e,t,{integration:{name:this.pluginName}})}}]),e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeAnalytics=t.VimeoAnalytics=void 0;var r=o(n(3)),i=o(n(4));function o(e){return e&&e.__esModule?e:{default:e}}t.VimeoAnalytics=r.default,t.YouTubeAnalytics=i.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"VimeoAnalytics"));return r.authToken=n,r.player=e,r.metadata={content:{},playback:{videoPlayer:"Vimeo"}},r.mostRecentHeartbeat=0,r.isPaused=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"initialize",value:function(){var e=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var n in t)this.registerHandler(n,t[n]);this.player.getVideoId().then((function(t){e.retrieveMetadata({id:t})})).catch(console.error)}},{key:"registerHandler",value:function(e,t){var n=this;this.player.on(e,(function(e){n.updateMetadata(e),t.call(n,e)}))}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var e=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==e&&t-e>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(e){var t=this;return new Promise((function(n,r){var o=e.id;(0,i.default)("https://api.vimeo.com/videos/"+o,{headers:{Authorization:"Bearer "+t.authToken}}).then((function(e){return e.ok?e.json():r(e)})).then((function(e){t.metadata.content.title=e.name,t.metadata.content.description=e.description,t.metadata.content.publisher=e.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=e.duration})).catch((function(e){return console.error("Request to Vimeo API Failed with: ",e),r(e)}))}))}},{key:"updateMetadata",value:function(e){var t=this;return new Promise((function(n,r){t.player.getVolume().then((function(r){r&&(t.metadata.playback.sound=100*r),t.metadata.playback.position=e.seconds,n()})).catch(r)}))}}]),t}(o(n(1)).default);t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return r.player=e,r.apiKey=n,r.playerLoaded=!1,r.playbackStarted=!1,r.contentStarted=!1,r.isPaused=!1,r.isBuffering=!1,r.isSeeking=!1,r.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},r.metadata=[{playback:{video_player:"youtube"},content:{}}],r.playlistIndex=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var t=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=t,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise((function(t,n){var r=e.player.getVideoData(),o=e.player.getPlaylist()||[r.video_id],s=o.join();(0,i.default)("https://www.googleapis.com/youtube/v3/videos?id="+s+"&part=snippet,contentDetails&key="+e.apiKey).then((function(e){if(!e.ok){var t=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw t.response=e,t}return e.json()})).then((function(n){e.metadata=[];for(var r=0,i=0;i<o.length;i++){var s=n.items[i];e.metadata.push({content:{title:s.snippet.title,description:s.snippet.description,keywords:s.snippet.tags,channel:s.snippet.channelTitle,airdate:s.snippet.publishedAt}}),r+=a(s.contentDetails.duration)}for(i=0;i<o.length;i++)e.metadata[i].playback={total_length:r,video_player:"youtube"};t()})).catch((function(t){e.metadata=o.map((function(e){return{playback:{video_player:"youtube"},content:{}}})),n(t)}))}))}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var t=this.player.getPlaylist();t&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===t.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),t=this.player.getPlaylist();(t&&e===t.length-1||-1===e)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,t=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-t)>2e3}}]),t}(o(n(1)).default);function a(e){var t=e.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map((function(e){if(null!=e)return e.replace(/\D/,"")})),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}t.default=s}])}(xd);var Id=t({__proto__:null,default:f(xd.exports)},[xd.exports]);e.checkSupport=function(e){il("checkSupport",e),(e=>{var t;Kc("setSupportOptions",e);const n=e.walletConnectVersion||1;let r,i,o=[];1===n?(i=e.chainId||1,r=[i]):(r=e.chains||Hc,i=r[0],o.push(...r),(null===(t=e.optionalChains)||void 0===t?void 0:t.length)&&o.push(...e.optionalChains.filter((e=>o.indexOf(e)<0))));const s=Object.assign(Object.assign({},e),{walletConnectVersion:n,chains:r,chainId:i,optionalChains:o,projectId:e.projectId||""});if(2===n&&(!e.projectId||""===e.projectId))throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");Gc=s})(e);const t=Yc();let n;return t.providerType,qc.Ethereum,n=function(e){il("checkEthereumSupport",e);const t=Bs();let n=!1;try{n=!!rl()}catch(e){}const r={isLedgerConnectSupported:el(t),isLedgerConnectEnabled:!!n,isChainIdSupported:nl(e.chains),providerImplementation:Vc.LedgerConnect};r.isLedgerConnectSupported&&r.isLedgerConnectEnabled&&r.isChainIdSupported||(r.providerImplementation=Vc.WalletConnect);return function(e){Bc("setProviderImplementation",e),$c=e}(r.providerImplementation),r}(t),il("checkSupportResult is",n),ol=n,n},e.enableDebugLogs=()=>{n=!0},e.getProvider=function(){return c(this,void 0,void 0,(function*(){Bc("getProvider",$c);const e=Yc();if(e.providerType===qc.Ethereum)return(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))||$c!==Vc.LedgerConnect?(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||1!==e.walletConnectVersion&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))?yield zc():yield Ks():rl();throw new s}))},Object.defineProperty(e,"__esModule",{value:!0})}));//# sourceMappingURL=index.js.map
1102
+ */zh.dset=function(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,s=t.length,a=e;o<s&&"__proto__"!==(i=t[o++])&&"constructor"!==i&&"prototype"!==i;)a=a[i]=o===s?n:typeof(r=a[i])==typeof t?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]};var Fh={},Bh=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.unset=void 0;var Hh=Bh(dl.exports);Fh.unset=function(e,t){if((0,Hh.default)(e,t)){for(var n=t.split("."),r=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)r=n.pop().slice(0,-1)+"."+r;for(;n.length;)e=e[t=n.shift()];return delete e[r]}return!0};var qh=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ul,"__esModule",{value:!0});var Vh=qh(hl),$h=qh(dl.exports),Wh=qh(Dh),Kh=zh,Gh=Fh;function Yh(e,t){Jh(e,t.drop,(function(e,t){t.forEach((function(t){return delete e[t]}))}))}function Qh(e,t){Jh(e,t.allow,(function(e,t){Object.keys(e).forEach((function(n){t.includes(n)||delete e[n]}))}))}function Jh(e,t,n){Object.entries(t).forEach((function(t){var r=t[0],i=t[1],o=function(e){"object"==typeof e&&null!==e&&n(e,i)},s=""===r?e:(0,$h.default)(e,r);Array.isArray(s)?s.forEach(o):o(s)}))}function Xh(e,t){var n=JSON.parse(JSON.stringify(e));for(var r in t.map)if(t.map.hasOwnProperty(r)){var i=t.map[r],o=r.split("."),s=void 0;if(o.length>1?(o.pop(),s=(0,$h.default)(n,o.join("."))):s=e,"object"==typeof s){if(i.copy){var a=(0,$h.default)(n,i.copy);void 0!==a&&(0,Kh.dset)(e,r,a)}else if(i.move){var u=(0,$h.default)(n,i.move);void 0!==u&&(0,Kh.dset)(e,r,u),(0,Gh.unset)(e,i.move)}else i.hasOwnProperty("set")&&(0,Kh.dset)(e,r,i.set);if(i.to_string){var c=(0,$h.default)(e,r);if("string"==typeof c||"object"==typeof c&&null!==c)continue;void 0!==c?(0,Kh.dset)(e,r,JSON.stringify(c)):(0,Kh.dset)(e,r,"undefined")}}}}function Zh(e,t){return!(t.sample.percent<=0)&&(t.sample.percent>=1||(t.sample.path?function(e,t){var n=(0,$h.default)(e,t.sample.path),r=(0,Vh.default)(JSON.stringify(n)),i=-64,o=[];ed(r.slice(0,8),o);for(var s=0,a=0;a<64&&1!==o[a];a++)s++;if(0!==s){var u=[];ed(r.slice(9,16),u),i-=s,o.splice(0,s),u.splice(64-s),o=o.concat(u)}return o[63]=0===o[63]?1:0,(0,Wh.default)(parseInt(o.join(""),2),i)<t.sample.percent}(e,t):(n=t.sample.percent,Math.random()<=n)));var n}function ed(e,t){for(var n=0;n<8;n++)for(var r=e[n],i=128;i>=1;i/=2)r-i>=0?(r-=i,t.push(1)):t.push(0)}ul.default=function(e,t){for(var n=e,r=0,i=t;r<i.length;r++){var o=i[r];switch(o.type){case"drop":return null;case"drop_properties":Yh(n,o.config);break;case"allow_properties":Qh(n,o.config);break;case"sample_event":if(Zh(n,o.config))break;return null;case"map_properties":Xh(n,o.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(o.type,'" is unsupported.'))}}return n};var td={},nd=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(td,"__esModule",{value:!0});var rd=nd(dl.exports);function id(e,t){if(!Array.isArray(e))return!0===od(e,t);var n=e[0];switch(n){case"!":return!id(e[1],t);case"or":for(var r=1;r<e.length;r++)if(id(e[r],t))return!0;return!1;case"and":for(r=1;r<e.length;r++)if(!id(e[r],t))return!1;return!0;case"=":case"!=":return function(e,t,n,r){sd(e)&&(e=id(e,r));sd(t)&&(t=id(t,r));"object"==typeof e&&"object"==typeof t&&(e=JSON.stringify(e),t=JSON.stringify(t));switch(n){case"=":return e===t;case"!=":return e!==t;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(od(e[1],t),od(e[2],t),n,t);case"<=":case"<":case">":case">=":return function(e,t,n,r){sd(e)&&(e=id(e,r));sd(t)&&(t=id(t,r));if("number"!=typeof e||"number"!=typeof t)return!1;switch(n){case"<=":return e<=t;case">=":return e>=t;case"<":return e<t;case">":return e>t;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(od(e[1],t),od(e[2],t),n,t);case"in":return function(e,t,n){return void 0!==t.find((function(t){return od(t,n)===e}))}(od(e[1],t),od(e[2],t),t);case"contains":return function(e,t){if("string"!=typeof e||"string"!=typeof t)return!1;return-1!==e.indexOf(t)}(od(e[1],t),od(e[2],t));case"match":return function(e,t){if("string"!=typeof e||"string"!=typeof t)return!1;return function(e,t){var n,r;e:for(;e.length>0;){var i=void 0,o=void 0;if(i=(n=ad(e)).star,o=n.chunk,e=n.pattern,i&&""===o)return!0;var s=ud(o,t),a=s.t,u=s.ok,c=s.err;if(c)return!1;if(!u||!(0===a.length||e.length>0)){if(i)for(var l=0;l<t.length;l++){if(a=(r=ud(o,t.slice(l+1))).t,u=r.ok,c=r.err,u){if(0===e.length&&a.length>0)continue;t=a;continue e}if(c)return!1}return!1}t=a}return 0===t.length}(t,e)}(od(e[1],t),od(e[2],t));case"lowercase":var i=od(e[1],t);return"string"!=typeof i?null:i.toLowerCase();case"typeof":return typeof od(e[1],t);case"length":return function(e){if(null===e)return 0;if(!Array.isArray(e)&&"string"!=typeof e)return NaN;return e.length}(od(e[1],t));default:throw new Error("FQL IR could not evaluate for token: ".concat(n))}}function od(e,t){return Array.isArray(e)?e:"object"==typeof e?e.value:(0,rd.default)(t,e)}function sd(e){return!!Array.isArray(e)&&(("lowercase"===e[0]||"length"===e[0]||"typeof"===e[0])&&2===e.length||("contains"===e[0]||"match"===e[0])&&3===e.length)}function ad(e){for(var t={star:!1,chunk:"",pattern:""};e.length>0&&"*"===e[0];)e=e.slice(1),t.star=!0;var n,r=!1;e:for(n=0;n<e.length;n++)switch(e[n]){case"\\":n+1<e.length&&n++;break;case"[":r=!0;break;case"]":r=!1;break;case"*":if(!r)break e}return t.chunk=e.slice(0,n),t.pattern=e.slice(n),t}function ud(e,t){for(var n,r,i={t:"",ok:!1,err:!1};e.length>0;){if(0===t.length)return i;switch(e[0]){case"[":var o=t[0];t=t.slice(1);var s=!0;(e=e.slice(1)).length>0&&"^"===e[0]&&(s=!1,e=e.slice(1));for(var a=!1,u=0;;){if(e.length>0&&"]"===e[0]&&u>0){e=e.slice(1);break}var c,l="";if(c=(n=cd(e)).char,e=n.newChunk,n.err)return i;if(l=c,"-"===e[0]&&(l=(r=cd(e.slice(1))).char,e=r.newChunk,r.err))return i;c<=o&&o<=l&&(a=!0),u++}if(a!==s)return i;break;case"?":t=t.slice(1),e=e.slice(1);break;case"\\":if(0===(e=e.slice(1)).length)return i.err=!0,i;default:if(e[0]!==t[0])return i;t=t.slice(1),e=e.slice(1)}}return i.t=t,i.ok=!0,i.err=!1,i}function cd(e){var t={char:"",newChunk:"",err:!1};return 0===e.length||"-"===e[0]||"]"===e[0]||"\\"===e[0]&&0===(e=e.slice(1)).length?(t.err=!0,t):(t.char=e[0],t.newChunk=e.slice(1),0===t.newChunk.length&&(t.err=!0),t)}td.default=function(e,t){if(!t)throw new Error("No matcher supplied!");switch(t.type){case"all":return!0;case"fql":return function(e,t){if(!e)return!1;try{e=JSON.parse(e)}catch(t){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(e,'": ').concat(t))}var n=id(e,t);if("boolean"!=typeof n)return!1;return n}(t.ir,e);default:throw new Error("Matcher of type ".concat(t.type," unsupported."))}};var ld={};Object.defineProperty(ld,"__esModule",{value:!0});var fd=function(){function e(e){this.rules=[],this.rules=e||[]}return e.prototype.getRulesByDestinationName=function(e){for(var t=[],n=0,r=this.rules;n<r.length;n++){var i=r[n];i.destinationName!==e&&void 0!==i.destinationName||t.push(i)}return t},e}();ld.default=fd,function(e){var t=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.matches=e.transform=void 0;var n=ul;Object.defineProperty(e,"transform",{enumerable:!0,get:function(){return t(n).default}});var r=td;Object.defineProperty(e,"matches",{enumerable:!0,get:function(){return t(r).default}});var i=ld;Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return t(i).default}})}(al);var hd=Object.freeze({__proto__:null,tsubMiddleware:function(e){return function(t){var n=t.payload,r=t.integration,i=t.next;new al.Store(e).getRulesByDestinationName(r).forEach((function(e){for(var t=e.matchers,r=e.transformers,o=0;o<t.length;o++)if(al.matches(n.obj,t[o])&&(n.obj=al.transform(n.obj,r[o]),null===n.obj))return i(null)})),i(n)}}});function dd(e,t){var n,r;return"boolean"==typeof(null==t?void 0:t.enabled)?t.enabled:null===(r=null===(n=null==e?void 0:e.__default)||void 0===n?void 0:n.enabled)||void 0===r||r}function pd(e){return e.toLowerCase().replace(".","").replace(/\s+/g,"-")}function gd(e,t){return void 0===t&&(t=!1),t?btoa(e).replace(/=/g,""):void 0}function yd(e,t,n,r){return mt(this,void 0,void 0,(function(){var i,o,s,a,u,c;return _t(this,(function(l){switch(l.label){case 0:i=pd(t),o=gd(i,r),s=or(),a="".concat(s,"/integrations/").concat(null!=o?o:i,"/").concat(n,"/").concat(null!=o?o:i,".dynamic.js.gz"),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,dr(a)];case 2:return l.sent(),function(e,t,n){var r,i;try{var o=(null!==(i=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(e,"resource"))&&void 0!==i?i:[])[0];o&&t.stats.gauge("legacy_destination_time",Math.round(o.duration),bt([n],o.duration<100?["cached"]:[],!0))}catch(e){}}(a,e,t),[3,4];case 3:throw u=l.sent(),e.stats.gauge("legacy_destination_time",-1,["plugin:".concat(t),"failed"]),u;case 4:return c=window["".concat(i,"Deps")],[4,Promise.all(c.map((function(e){return dr(s+e+".gz")})))];case 5:return l.sent(),window["".concat(i,"Loader")](),[2,window["".concat(i,"Integration")]]}}))}))}function vd(e,t){return mt(this,void 0,void 0,(function(){var n,r=this;return _t(this,(function(i){switch(i.label){case 0:return n=[],cn()?[2,t]:[4,io((function(){return t.length>0&&un()}),(function(){return mt(r,void 0,void 0,(function(){var r,i;return _t(this,(function(o){switch(o.label){case 0:return(r=t.pop())?[4,Jt(r,e)]:[2];case 1:return i=o.sent(),i instanceof zn||n.push(r),[2]}}))}))}))];case 1:return i.sent(),n.map((function(e){return t.pushWithBackoff(e)})),[2,t]}}))}))}var md=function(){function e(e,t,n,r,i,o){void 0===r&&(r={}),this.options={},this.type="destination",this.middleware=[],this._ready=!1,this._initialized=!1,this.flushing=!1,this.name=e,this.version=t,this.settings=vt({},r),this.disableAutoISOConversion=i.disableAutoISOConversion||!1,this.integrationSource=o,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.options=i,this.buffer=i.disableClientPersistence?new Ht(4,[]):new Gn(4,"".concat(n,":dest-").concat(e)),this.scheduleFlush()}return e.prototype.isLoaded=function(){return this._ready},e.prototype.ready=function(){var e;return null!==(e=this.onReady)&&void 0!==e?e:Promise.resolve()},e.prototype.load=function(e,t){var n;return mt(this,void 0,void 0,(function(){var r,i,o=this;return _t(this,(function(s){switch(s.label){case 0:return this._ready||void 0!==this.onReady?[2]:null===(n=this.integrationSource)||void 0===n?[3,1]:(i=n,[3,3]);case 1:return[4,yd(e,this.name,this.version,this.options.obfuscate)];case 2:i=s.sent(),s.label=3;case 3:r=i,this.integration=function(e,t,n){var r;"Integration"in e?(e({user:function(){return n.user()},addIntegration:function(){}}),r=e.Integration):r=e;var i=new r(t);return i.analytics=n,i}(r,this.settings,t),this.onReady=new Promise((function(e){o.integration.once("ready",(function(){o._ready=!0,e(!0)}))})),this.onInitialize=new Promise((function(e){o.integration.on("initialize",(function(){o._initialized=!0,e(!0)}))}));try{e.stats.increment("analytics_js.integration.invoke",1,["method:initialize","integration_name:".concat(this.name)]),this.integration.initialize()}catch(t){throw e.stats.increment("analytics_js.integration.invoke.error",1,["method:initialize","integration_name:".concat(this.name)]),t}return[2]}}))}))},e.prototype.unload=function(e,t){return function(e,t,n){return mt(this,void 0,void 0,(function(){var r,i,o;return _t(this,(function(s){return r=or(),i=pd(e),o=gd(e,n),[2,pr("".concat(r,"/integrations/").concat(null!=o?o:i,"/").concat(t,"/").concat(null!=o?o:i,".dynamic.js.gz"))]}))}))}(this.name,this.version,this.options.obfuscate)},e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.middleware=(e=this.middleware).concat.apply(e,t)},e.prototype.shouldBuffer=function(e){return"page"!==e.event.type&&(cn()||!1===this._ready||!1===this._initialized)},e.prototype.send=function(e,t,n){var r,i;return mt(this,void 0,void 0,(function(){var o,s,a,u,c,l;return _t(this,(function(f){switch(f.label){case 0:if(this.shouldBuffer(e))return this.buffer.push(e),this.scheduleFlush(),[2,e];if(o=null===(i=null===(r=this.options)||void 0===r?void 0:r.plan)||void 0===i?void 0:i.track,s=e.event.event,o&&s&&"Segment.io"!==this.name){if(a=o[s],!dd(o,a))return e.updateEvent("integrations",vt(vt({},e.event.integrations),{All:!1,"Segment.io":!0})),e.cancel(new Yt({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,e];if(e.updateEvent("integrations",vt(vt({},e.event.integrations),null==a?void 0:a.integrations)),(null==a?void 0:a.enabled)&&!1===(null==a?void 0:a.integrations[this.name]))return e.cancel(new Yt({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,e]}return[4,Qi(this.name,e.event,this.middleware)];case 1:if(null===(u=f.sent()))return[2,e];c=new t(u,{traverse:!this.disableAutoISOConversion}),e.stats.increment("analytics_js.integration.invoke",1,["method:".concat(n),"integration_name:".concat(this.name)]),f.label=2;case 2:return f.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,n,c)]:[3,4];case 3:f.sent(),f.label=4;case 4:return[3,6];case 5:throw l=f.sent(),e.stats.increment("analytics_js.integration.invoke.error",1,["method:".concat(n),"integration_name:".concat(this.name)]),l;case 6:return[2,e]}}))}))},e.prototype.track=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Track,"track")]}))}))},e.prototype.page=function(e){var t;return mt(this,void 0,void 0,(function(){var n=this;return _t(this,(function(r){return(null===(t=this.integration)||void 0===t?void 0:t._assumesPageview)&&!this._initialized&&this.integration.initialize(),[2,this.onInitialize.then((function(){return n.send(e,gr.Page,"page")}))]}))}))},e.prototype.identify=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Identify,"identify")]}))}))},e.prototype.alias=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Alias,"alias")]}))}))},e.prototype.group=function(e){return mt(this,void 0,void 0,(function(){return _t(this,(function(t){return[2,this.send(e,gr.Group,"group")]}))}))},e.prototype.scheduleFlush=function(){var e=this;this.flushing||setTimeout((function(){return mt(e,void 0,void 0,(function(){var e;return _t(this,(function(t){switch(t.label){case 0:return this.flushing=!0,e=this,[4,vd(this,this.buffer)];case 1:return e.buffer=t.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},e}();var _d=Object.freeze({__proto__:null,LegacyDestination:md,ajsDestinations:function(e,t,n,r,i,o){var s,a;if(void 0===n&&(n={}),void 0===r&&(r={}),an())return[];t.plan&&((r=null!=r?r:{}).plan=t.plan);var u=null!==(a=null===(s=t.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==a?a:[],c=t.integrations,l=r.integrations,f=sr(t,null!=r?r:{}),h=null==o?void 0:o.reduce((function(e,t){var n;return vt(vt({},e),((n={})[function(e){return("Integration"in e?e.Integration:e).prototype.name}(t)]=t,n))}),{}),d=new Set(bt(bt([],Object.keys(c).filter((function(e){return function(e,t){var n,r=t.type,i=t.bundlingStatus,o=t.versionSettings,s="unbundled"!==i&&("browser"===r||(null===(n=null==o?void 0:o.componentTypes)||void 0===n?void 0:n.includes("browser")));return!e.startsWith("Segment")&&"Iterable"!==e&&s}(e,c[e])})),!0),Object.keys(h||{}).filter((function(e){return Mt(c[e])||Mt(null==l?void 0:l[e])})),!0));return Array.from(d).filter((function(e){return!function(e,t){var n=!1===t.All&&void 0===t[e];return!1===t[e]||n}(e,n)})).map((function(t){var n=function(e){var t,n,r,i;return null!==(i=null!==(n=null===(t=null==e?void 0:e.versionSettings)||void 0===t?void 0:t.override)&&void 0!==n?n:null===(r=null==e?void 0:e.versionSettings)||void 0===r?void 0:r.version)&&void 0!==i?i:"latest"}(c[t]),o=new md(t,n,e,f[t],r,null==h?void 0:h[t]);return u.filter((function(e){return e.destinationName===t})).length>0&&i&&o.addMiddleware(i),o}))}});var bd=Object.freeze({__proto__:null,loadLegacyVideoPlugins:function(e){return mt(this,void 0,void 0,(function(){var t;return _t(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve().then((function(){return Od}))];case 1:return t=n.sent(),e._plugins=t,[2]}}))}))}});var wd=Object.freeze({__proto__:null,schemaFilter:function(e,t){function n(n){var r=e,i=n.event.event;if(r&&i){var o=r[i];if(!dd(r,o))return n.updateEvent("integrations",vt(vt({},n.event.integrations),{All:!1,"Segment.io":!0})),n;var s=function(e,t){var n,r;if(!e||!Object.keys(e))return{};var i=e.integrations?Object.keys(e.integrations).filter((function(t){return!1===e.integrations[t]})):[],o=[];return(null!==(n=t.remotePlugins)&&void 0!==n?n:[]).forEach((function(e){i.forEach((function(t){(e.name.includes(t)||t.includes(e.name))&&o.push(e.name)}))})),(null!==(r=t.remotePlugins)&&void 0!==r?r:[]).reduce((function(e,t){return t.settings.subscriptions&&o.includes(t.name)&&t.settings.subscriptions.forEach((function(n){return e["".concat(t.name," ").concat(n.partnerAction)]=!1})),e}),{})}(o,t);n.updateEvent("integrations",vt(vt(vt({},n.event.integrations),null==o?void 0:o.integrations),s))}return n}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:n,alias:n,track:n,identify:n,group:n}}});var Ed=Object.freeze({__proto__:null,remoteMiddlewares:function(e,t,n){var r;return mt(this,void 0,void 0,(function(){var i,o,s,a,u=this;return _t(this,(function(c){switch(c.label){case 0:return an()?[2,[]]:(i=or(),o=null!==(r=t.enabledMiddleware)&&void 0!==r?r:{},s=Object.entries(o).filter((function(e){return e[0],e[1]})).map((function(e){return e[0]})),a=s.map((function(t){return mt(u,void 0,void 0,(function(){var r,o,s,a;return _t(this,(function(u){switch(u.label){case 0:r=t.replace("@segment/",""),o=r,n&&(o=btoa(r).replace(/=/g,"")),s="".concat(i,"/middleware/").concat(o,"/latest/").concat(o,".js.gz"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,dr(s)];case 2:return u.sent(),[2,window["".concat(r,"Middleware")]];case 3:return a=u.sent(),e.log("error",a),e.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}}))}))})),[4,Promise.all(a)]);case 1:return[2,c.sent().filter(Boolean)]}}))}))}}),Sd={exports:{}};!function(e,t){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){n.r(t);var r="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest;for(var o in i.open(t.method||"get",e,!0),t.headers)i.setRequestHeader(o,t.headers[o]);function s(){var e,t=[],n=[],r={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(i,o,s){t.push(o=o.toLowerCase()),n.push([o,s]),e=r[o],r[o]=e?e+","+s:s})),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:s,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return t},entries:function(){return n},get:function(e){return r[e.toLowerCase()]},has:function(e){return e.toLowerCase()in r}}}}i.withCredentials="include"==t.credentials,i.onload=function(){n(s())},i.onerror=r,i.send(t.body)}))};t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginName=t}return r(e,[{key:"track",value:function(e,t){window.analytics.track(e,t,{integration:{name:this.pluginName}})}}]),e}();t.default=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeAnalytics=t.VimeoAnalytics=void 0;var r=o(n(3)),i=o(n(4));function o(e){return e&&e.__esModule?e:{default:e}}t.VimeoAnalytics=r.default,t.YouTubeAnalytics=i.default},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"VimeoAnalytics"));return r.authToken=n,r.player=e,r.metadata={content:{},playback:{videoPlayer:"Vimeo"}},r.mostRecentHeartbeat=0,r.isPaused=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"initialize",value:function(){var e=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var n in t)this.registerHandler(n,t[n]);this.player.getVideoId().then((function(t){e.retrieveMetadata({id:t})})).catch(console.error)}},{key:"registerHandler",value:function(e,t){var n=this;this.player.on(e,(function(e){n.updateMetadata(e),t.call(n,e)}))}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var e=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==e&&t-e>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(e){var t=this;return new Promise((function(n,r){var o=e.id;(0,i.default)("https://api.vimeo.com/videos/"+o,{headers:{Authorization:"Bearer "+t.authToken}}).then((function(e){return e.ok?e.json():r(e)})).then((function(e){t.metadata.content.title=e.name,t.metadata.content.description=e.description,t.metadata.content.publisher=e.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=e.duration})).catch((function(e){return console.error("Request to Vimeo API Failed with: ",e),r(e)}))}))}},{key:"updateMetadata",value:function(e){var t=this;return new Promise((function(n,r){t.player.getVolume().then((function(r){r&&(t.metadata.playback.sound=100*r),t.metadata.playback.position=e.seconds,n()})).catch(r)}))}}]),t}(o(n(1)).default);t.default=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return r.player=e,r.apiKey=n,r.playerLoaded=!1,r.playbackStarted=!1,r.contentStarted=!1,r.isPaused=!1,r.isBuffering=!1,r.isSeeking=!1,r.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},r.metadata=[{playback:{video_player:"youtube"},content:{}}],r.playlistIndex=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var t=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=t,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise((function(t,n){var r=e.player.getVideoData(),o=e.player.getPlaylist()||[r.video_id],s=o.join();(0,i.default)("https://www.googleapis.com/youtube/v3/videos?id="+s+"&part=snippet,contentDetails&key="+e.apiKey).then((function(e){if(!e.ok){var t=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw t.response=e,t}return e.json()})).then((function(n){e.metadata=[];for(var r=0,i=0;i<o.length;i++){var s=n.items[i];e.metadata.push({content:{title:s.snippet.title,description:s.snippet.description,keywords:s.snippet.tags,channel:s.snippet.channelTitle,airdate:s.snippet.publishedAt}}),r+=a(s.contentDetails.duration)}for(i=0;i<o.length;i++)e.metadata[i].playback={total_length:r,video_player:"youtube"};t()})).catch((function(t){e.metadata=o.map((function(e){return{playback:{video_player:"youtube"},content:{}}})),n(t)}))}))}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var t=this.player.getPlaylist();t&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===t.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),t=this.player.getPlaylist();(t&&e===t.length-1||-1===e)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,t=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-t)>2e3}}]),t}(o(n(1)).default);function a(e){var t=e.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map((function(e){if(null!=e)return e.replace(/\D/,"")})),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}t.default=s}])}(Sd);var Od=t({__proto__:null,default:f(Sd.exports)},[Sd.exports]);e.checkSupport=function(e){nl("checkSupport",e),(e=>{var t;$c("setSupportOptions",e);const n=e.walletConnectVersion||1;let r,i,o=[];1===n?(i=e.chainId||1,r=[i]):(r=e.chains||Fc,i=r[0],o.push(...r),(null===(t=e.optionalChains)||void 0===t?void 0:t.length)&&o.push(...e.optionalChains.filter((e=>o.indexOf(e)<0))));const s=Object.assign(Object.assign({},e),{walletConnectVersion:n,chains:r,chainId:i,optionalChains:o,projectId:e.projectId||""});if(2===n&&(!e.projectId||""===e.projectId))throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");Wc=s})(e);const t=Kc();let n;return t.providerType,Bc.Ethereum,n=function(e){nl("checkEthereumSupport",e);const t=Bs();let n=!1;try{n=!!tl()}catch(e){}const r={isLedgerConnectSupported:Xc(t),isLedgerConnectEnabled:!!n,isChainIdSupported:el(e.chains),providerImplementation:Hc.LedgerConnect};r.isLedgerConnectSupported&&r.isLedgerConnectEnabled&&r.isChainIdSupported||(r.providerImplementation=Hc.WalletConnect);return function(e){zc("setProviderImplementation",e),qc=e}(r.providerImplementation),r}(t),nl("checkSupportResult is",n),rl=n,n},e.enableDebugLogs=()=>{n=!0},e.getProvider=function(){return c(this,void 0,void 0,(function*(){zc("getProvider",qc);const e=Kc();if(e.providerType===Bc.Ethereum)return(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))||qc!==Hc.LedgerConnect?(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||1!==e.walletConnectVersion&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))?yield Uc():yield Ks():tl();throw new s}))},Object.defineProperty(e,"__esModule",{value:!0})}));//# sourceMappingURL=index.js.map