!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,(()=>(()=>{var e,t,r={49:(e,t,r)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function n(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,o=new Array(t);r1?o-1:0),i=1;i{var e;(e=window.Element.prototype).matches=e.matches||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector,e.closest=e.closest||function(e){let t=this;for(;t&&!t.matches(e);)t=t.parentElement;return t}},423:function(e,t,r){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,r=1,o=arguments.length;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bind=void 0,t.bind=function(e,t){var r=t.type,o=t.listener,n=t.options;return e.addEventListener(r,o,n),function(){e.removeEventListener(r,o,n)}}},197:(e,t,r)=>{"use strict";t.ak=void 0;var o=r(691);Object.defineProperty(t,"ak",{enumerable:!0,get:function(){return o.bind}});r(423)},21:(e,t,r)=>{var o;o=function(){return function e(t,r,o){function n(s,a){if(!r[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=r[s]={exports:{}};t[s][0].call(u.exports,(function(e){return n(t[s][1][e]||e)}),u,u.exports,e,t,r,o)}return r[s].exports}for(var i="function"==typeof _dereq_&&_dereq_,s=0;s0},a.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/m3OTXk\n")}},s.hasDevTools?(n.isStatic&&(n=function(e){setTimeout(e,0)}),a.prototype.invokeLater=function(e,t,r){this._trampolineEnabled?c.call(this,e,t,r):this._schedule((function(){setTimeout((function(){e.call(t,r)}),100)}))},a.prototype.invoke=function(e,t,r){this._trampolineEnabled?l.call(this,e,t,r):this._schedule((function(){e.call(t,r)}))},a.prototype.settlePromises=function(e){this._trampolineEnabled?u.call(this,e):this._schedule((function(){e._settlePromises()}))}):(a.prototype.invokeLater=c,a.prototype.invoke=l,a.prototype.settlePromises=u),a.prototype.invokeFirst=function(e,t,r){this._normalQueue.unshift(e,t,r),this._queueTick()},a.prototype._drainQueue=function(e){for(;e.length()>0;){var t=e.shift();if("function"==typeof t){var r=e.shift(),o=e.shift();t.call(r,o)}else t._settlePromises()}},a.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._drainQueue(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1},t.exports=new a,t.exports.firstLineError=o},{"./queue.js":28,"./schedule.js":31,"./util.js":38}],3:[function(e,t,r){"use strict";t.exports=function(e,t,r){var o=function(e,t){this._reject(t)},n=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},i=function(e,t){this._isPending()&&this._resolveCallback(t.target)},s=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){var a=r(o),c=new e(t);c._propagateFrom(this,1);var l=this._target();if(c._setBoundTo(a),a instanceof e){var u={promiseRejectionQueued:!1,promise:c,target:l,bindingPromise:a};l._then(t,n,c._progress,c,u),a._then(i,s,c._progress,c,u)}else c._resolveCallback(l);return c},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=131072|this._bitField,this._boundTo=e):this._bitField=-131073&this._bitField},e.prototype._isBound=function(){return 131072==(131072&this._bitField)},e.bind=function(o,n){var i=r(o),s=new e(t);return s._setBoundTo(i),i instanceof e?i._then((function(){s._resolveCallback(n)}),s._reject,s._progress,s,null):s._resolveCallback(n),s}}},{}],4:[function(e,t,r){"use strict";var o;"undefined"!=typeof Promise&&(o=Promise);var n=e("./promise.js")();n.noConflict=function(){try{Promise===n&&(Promise=o)}catch(e){}return n},t.exports=n},{"./promise.js":23}],5:[function(e,t,r){"use strict";var o=Object.create;if(o){var n=o(null),i=o(null);n[" size"]=i[" size"]=0}t.exports=function(t){var r=e("./util.js"),o=r.canEvaluate;function n(e){var o=function(e,o){var n;if(null!=e&&(n=e[o]),"function"!=typeof n){var i="Object "+r.classString(e)+" has no method '"+r.toString(o)+"'";throw new t.TypeError(i)}return n}(e,this.pop());return o.apply(e,this)}function i(e){return e[this]}function s(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}r.isIdentifier,t.prototype.call=function(e){for(var t=arguments.length,r=new Array(t-1),o=1;o32&&this.uncycle()}function l(e){for(var t=[],r=0;r, no stack trace)"}o.inherits(c,Error),c.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},o=0,n=this;void 0!==n;++o)t.push(n),n=n._parent;for(o=(e=this._length=o)-1;o>=0;--o){var i=t[o].stack;void 0===r[i]&&(r[i]=o)}for(o=0;o0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[o]._parent=void 0,t[o]._length=1;var a=o>0?t[o-1]:this;s=0;--l)t[l]._length=c,c++;return}}}},c.prototype.parent=function(){return this._parent},c.prototype.hasParent=function(){return void 0!==this._parent},c.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=c.parseStackAndMessage(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(l(i.stack.split("\n"))),i=i._parent;!function(e){for(var t=e[0],r=1;r=0;--a)if(o[a]===i){s=a;break}for(a=s;a>=0;--a){var c=o[a];if(t[n]!==c)break;t.pop(),n--}t=o}}(n),function(e){for(var t=0;t0?function(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r0&&(t=t.slice(r)),t}(e):[" (No stack trace)"],{message:r,stack:l(t)}},c.formatAndLogError=function(e,r){if("undefined"!=typeof console){var o;if("object"==typeof e||"function"==typeof e){var n=e.stack;o=r+s(n,e)}else o=r+String(e);"function"==typeof t?t(o):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(o)}},c.unhandledRejection=function(e){c.formatAndLogError(e,"^--- With additional stack trace: ")},c.isSupported=function(){return"function"==typeof g},c.fireRejectionEvent=function(e,t,o,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(o,n))}catch(e){r.throwLater(e)}var s=!1;try{s=y(e,o,n)}catch(e){s=!0,r.throwLater(e)}var a=!1;if(f)try{a=f(e.toLowerCase(),{reason:o,promise:n})}catch(e){a=!0,r.throwLater(e)}s||i||a||"unhandledRejection"!==e||c.formatAndLogError(o,"Unhandled rejection ")};var d=function(){return!1},h=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function p(e){var t=e.match(h);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}c.setBounds=function(e,t){if(c.isSupported()){for(var r,o,i=e.stack.split("\n"),s=t.stack.split("\n"),a=-1,l=-1,u=0;u=l||(d=function(e){if(n.test(e))return!0;var t=p(e);return!!(t&&t.fileName===r&&a<=t.line&&t.line<=l)})}};var f,g=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():u(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit=Error.stackTraceLimit+6,i=e,s=t;var r=Error.captureStackTrace;return d=function(e){return n.test(e)},function(e,t){Error.stackTraceLimit=Error.stackTraceLimit+6,r(e,t),Error.stackTraceLimit=Error.stackTraceLimit-6}}var o,c=new Error;if("string"==typeof c.stack&&c.stack.split("\n")[0].indexOf("stackDetection@")>=0)return i=/@/,s=t,a=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){o="stack"in e}return!("stack"in c)&&o&&"number"==typeof Error.stackTraceLimit?(i=e,s=t,function(e){Error.stackTraceLimit=Error.stackTraceLimit+6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit=Error.stackTraceLimit-6}):(s=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?u(t):t.toString()},null)}(),y=function(){if(o.isNode)return function(e,t,r){return"rejectionHandled"===e?process.emit(e,r):process.emit(e,t,r)};var e=!1,t=!0;try{var r=new self.CustomEvent("test");e=r instanceof CustomEvent}catch(e){}if(!e)try{var n=document.createEvent("CustomEvent");n.initCustomEvent("testingtheevent",!1,!0,{}),self.dispatchEvent(n)}catch(e){t=!1}t&&(f=function(t,r){var o;return e?o=new self.CustomEvent(t,{detail:r,bubbles:!1,cancelable:!0}):self.dispatchEvent&&(o=document.createEvent("CustomEvent")).initCustomEvent(t,!1,!0,r),!!o&&!self.dispatchEvent(o)});var i={};return i.unhandledRejection="onunhandledRejection".toLowerCase(),i.rejectionHandled="onrejectionHandled".toLowerCase(),function(e,t,r){var o=i[e],n=self[o];return!!n&&("rejectionHandled"===e?n.call(self,r):n.call(self,t,r),!0)}}();return"undefined"!=typeof console&&void 0!==console.warn&&(t=function(e){console.warn(e)},o.isNode&&process.stderr.isTTY?t=function(e){process.stderr.write(""+e+"\n")}:o.isNode||"string"!=typeof(new Error).stack||(t=function(e){console.warn("%c"+e,"color: red")})),c}},{"./async.js":2,"./util.js":38}],8:[function(e,t,r){"use strict";t.exports=function(t){var r=e("./util.js"),o=e("./errors.js"),n=r.tryCatch,i=r.errorObj,s=e("./es5.js").keys,a=o.TypeError;function c(e,t,r){this._instances=e,this._callback=t,this._promise=r}function l(e,t){var r={},o=n(e).call(r,t);return o===i?o:s(r).length?(i.e=new a("Catch filter must inherit from Error or be a simple predicate function\n\n See http://goo.gl/o84o68\n"),i):o}return c.prototype.doFilter=function(e){for(var r=this._callback,o=this._promise._boundValue(),s=0,a=this._instances.length;s=0)return o[e]}return n.prototype._pushContext=function(){r()&&void 0!==this._trace&&o.push(this._trace)},n.prototype._popContext=function(){r()&&void 0!==this._trace&&o.pop()},e.prototype._peekContext=i,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,function(){if(r())return new n}}},{}],10:[function(e,t,r){"use strict";t.exports=function(t,r){var o,n,i=t._getDomain,s=e("./async.js"),a=e("./errors.js").Warning,c=e("./util.js"),l=c.canAttachTrace,u=c.isNode&&(!!process.env.BLUEBIRD_DEBUG||!1);return c.isNode&&0==process.env.BLUEBIRD_DEBUG&&(u=!1),u&&s.disableTrampolineIfNecessary(),t.prototype._ignoreRejections=function(){this._unsetRejectionIsUnhandled(),this._bitField=16777216|this._bitField},t.prototype._ensurePossibleRejectionHandled=function(){0==(16777216&this._bitField)&&(this._setRejectionIsUnhandled(),s.invokeLater(this._notifyUnhandledRejection,this,void 0))},t.prototype._notifyUnhandledRejectionIsHandled=function(){r.fireRejectionEvent("rejectionHandled",o,void 0,this)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._getCarriedStackTrace()||this._settledValue;this._setUnhandledRejectionIsNotified(),r.fireRejectionEvent("unhandledRejection",n,e,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=524288|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-524289&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(524288&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=2097152|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-2097153&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(2097152&this._bitField)>0},t.prototype._setCarriedStackTrace=function(e){this._bitField=1048576|this._bitField,this._fulfillmentHandler0=e},t.prototype._isCarryingStackTrace=function(){return(1048576&this._bitField)>0},t.prototype._getCarriedStackTrace=function(){return this._isCarryingStackTrace()?this._fulfillmentHandler0:void 0},t.prototype._captureStackTrace=function(){return u&&(this._trace=new r(this._peekContext())),this},t.prototype._attachExtraTrace=function(e,t){if(u&&l(e)){var o=this._trace;if(void 0!==o&&t&&(o=o._parent),void 0!==o)o.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=r.parseStackAndMessage(e);c.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),c.notEnumerableProp(e,"__stackCleaned__",!0)}}},t.prototype._warn=function(e){var t=new a(e),o=this._peekContext();if(o)o.attachExtraTrace(t);else{var n=r.parseStackAndMessage(t);t.stack=n.message+"\n"+n.stack.join("\n")}r.formatAndLogError(t,"")},t.onPossiblyUnhandledRejection=function(e){var t=i();n="function"==typeof e?null===t?e:t.bind(e):void 0},t.onUnhandledRejectionHandled=function(e){var t=i();o="function"==typeof e?null===t?e:t.bind(e):void 0},t.longStackTraces=function(){if(s.haveItemsQueued()&&!1===u)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/DT1qyG\n");(u=r.isSupported())&&s.disableTrampolineIfNecessary()},t.hasLongStackTraces=function(){return u&&r.isSupported()},r.isSupported()||(t.longStackTraces=function(){},u=!1),function(){return u}}},{"./async.js":2,"./errors.js":13,"./util.js":38}],11:[function(e,t,r){"use strict";var o=e("./util.js").isPrimitive;t.exports=function(e){var t=function(){return this},r=function(){throw this},n=function(){},i=function(){throw void 0},s=function(e,t){return 1===t?function(){throw e}:2===t?function(){return e}:void 0};e.prototype.return=e.prototype.thenReturn=function(r){return void 0===r?this.then(n):o(r)?this._then(s(r,2),void 0,void 0,void 0,void 0):(r instanceof e&&r._ignoreRejections(),this._then(t,void 0,void 0,r,void 0))},e.prototype.throw=e.prototype.thenThrow=function(e){return void 0===e?this.then(i):o(e)?this._then(s(e,1),void 0,void 0,void 0,void 0):this._then(r,void 0,void 0,e,void 0)}}},{"./util.js":38}],12:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.reduce;e.prototype.each=function(e){return r(this,e,null,t)},e.each=function(e,o){return r(e,o,null,t)}}},{}],13:[function(e,t,r){"use strict";var o,n,i=e("./es5.js"),s=i.freeze,a=e("./util.js"),c=a.inherits,l=a.notEnumerableProp;function u(e,t){function r(o){if(!(this instanceof r))return new r(o);l(this,"message","string"==typeof o?o:t),l(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return c(r,Error),r}var d=u("Warning","warning"),h=u("CancellationError","cancellation error"),p=u("TimeoutError","timeout error"),f=u("AggregateError","aggregate error");try{o=TypeError,n=RangeError}catch(e){o=u("TypeError","type error"),n=u("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y0&&"function"==typeof arguments[t]&&(e=arguments[t]);for(var o=arguments.length,n=new Array(o),i=0;i=1?[]:h,a.invoke(f,this,void 0)}function f(){this._init$(void 0,-2)}function g(e,t,r,o){var n="object"==typeof r&&null!==r?r.concurrency:0;return new p(e,t,n="number"==typeof n&&isFinite(n)&&n>=1?n:0,o)}c.inherits(p,r),p.prototype._init=function(){},p.prototype._promiseFulfilled=function(e,r){var o=this._values,i=this.length(),s=this._preservedValues,a=this._limit;if(o[r]===d){if(o[r]=e,a>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return}else{if(a>=1&&this._inFlight>=a)return o[r]=e,void this._queue.push(r);null!==s&&(s[r]=e);var c=this._callback,h=this._promise._boundValue();this._promise._pushContext();var p=l(c).call(h,e,r,i);if(this._promise._popContext(),p===u)return this._reject(p.e);var f=n(p,this._promise);if(f instanceof t){if((f=f._target())._isPending())return a>=1&&this._inFlight++,o[r]=d,f._proxyPromiseArray(this,r);if(!f._isFulfilled())return this._reject(f._reason());p=f._value()}o[r]=p}++this._totalResolved>=i&&(null!==s?this._filter(o,s):this._resolve(o))},p.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight1){var r,o=new Array(t-1),n=0;for(r=0;r0&&"function"!=typeof e&&"function"!=typeof t){var o=".then() only accepts functions but was passed: "+s.classString(e);arguments.length>1&&(o+=", "+s.classString(t)),this._warn(o)}return this._then(e,t,r,void 0,void 0)},E.prototype.done=function(e,t,r){this._then(e,t,r,void 0,void 0)._setIsFinal()},E.prototype.spread=function(e,t){return this.all()._then(e,t,void 0,h,void 0)},E.prototype.isCancellable=function(){return!this.isResolved()&&this._cancellable()},E.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},E.prototype.all=function(){return new g(this).promise()},E.prototype.error=function(e){return this.caught(s.originatesFromRejection,e)},E.getNewLibraryCopy=t.exports,E.is=function(e){return e instanceof E},E.fromNode=function(e){var t=new E(d),r=j(e)(w(t));return r===k&&t._rejectCallback(r.e,!0,!0),t},E.all=function(e){return new g(e).promise()},E.defer=E.pending=function(){var e=new E(d);return new m(e)},E.cast=function(e){var t=f(e);if(!(t instanceof E)){var r=t;(t=new E(d))._fulfillUnchecked(r)}return t},E.resolve=E.fulfilled=E.cast,E.reject=E.rejected=function(e){var t=new E(d);return t._captureStackTrace(),t._rejectCallback(e,!0),t},E.setScheduler=function(e){if("function"!=typeof e)throw new u("fn must be a function\n\n See http://goo.gl/916lJJ\n");var t=c._schedule;return c._schedule=e,t},E.prototype._then=function(e,t,o,n,i){var s=void 0!==i,a=s?i:new E(d);s||(a._propagateFrom(this,5),a._captureStackTrace());var l=this._target();l!==this&&(void 0===n&&(n=this._boundTo),s||a._setIsMigrated());var u=l._addCallbacks(e,t,o,a,n,r());return l._isResolved()&&!l._isSettlePromisesQueued()&&c.invoke(l._settlePromiseAtPostResolution,l,u),a},E.prototype._settlePromiseAtPostResolution=function(e){this._isRejectionUnhandled()&&this._unsetRejectionIsUnhandled(),this._settlePromiseAt(e)},E.prototype._length=function(){return 131071&this._bitField},E.prototype._isFollowingOrFulfilledOrRejected=function(){return(939524096&this._bitField)>0},E.prototype._isFollowing=function(){return 536870912==(536870912&this._bitField)},E.prototype._setLength=function(e){this._bitField=-131072&this._bitField|131071&e},E.prototype._setFulfilled=function(){this._bitField=268435456|this._bitField},E.prototype._setRejected=function(){this._bitField=134217728|this._bitField},E.prototype._setFollowing=function(){this._bitField=536870912|this._bitField},E.prototype._setIsFinal=function(){this._bitField=33554432|this._bitField},E.prototype._isFinal=function(){return(33554432&this._bitField)>0},E.prototype._cancellable=function(){return(67108864&this._bitField)>0},E.prototype._setCancellable=function(){this._bitField=67108864|this._bitField},E.prototype._unsetCancellable=function(){this._bitField=-67108865&this._bitField},E.prototype._setIsMigrated=function(){this._bitField=4194304|this._bitField},E.prototype._unsetIsMigrated=function(){this._bitField=-4194305&this._bitField},E.prototype._isMigrated=function(){return(4194304&this._bitField)>0},E.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[5*e-5+4];if(t!==a)return void 0===t&&this._isBound()?this._boundValue():t},E.prototype._promiseAt=function(e){return 0===e?this._promise0:this[5*e-5+3]},E.prototype._fulfillmentHandlerAt=function(e){return 0===e?this._fulfillmentHandler0:this[5*e-5+0]},E.prototype._rejectionHandlerAt=function(e){return 0===e?this._rejectionHandler0:this[5*e-5+1]},E.prototype._boundValue=function(){var e=this._boundTo;return void 0!==e&&e instanceof E?e.isFulfilled()?e.value():void 0:e},E.prototype._migrateCallbacks=function(e,t){var r=e._fulfillmentHandlerAt(t),o=e._rejectionHandlerAt(t),n=e._progressHandlerAt(t),i=e._promiseAt(t),s=e._receiverAt(t);i instanceof E&&i._setIsMigrated(),void 0===s&&(s=a),this._addCallbacks(r,o,n,i,s,null)},E.prototype._addCallbacks=function(e,t,r,o,n,i){var s=this._length();if(s>=131066&&(s=0,this._setLength(0)),0===s)this._promise0=o,void 0!==n&&(this._receiver0=n),"function"!=typeof e||this._isCarryingStackTrace()||(this._fulfillmentHandler0=null===i?e:i.bind(e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:i.bind(t)),"function"==typeof r&&(this._progressHandler0=null===i?r:i.bind(r));else{var a=5*s-5;this[a+3]=o,this[a+4]=n,"function"==typeof e&&(this[a+0]=null===i?e:i.bind(e)),"function"==typeof t&&(this[a+1]=null===i?t:i.bind(t)),"function"==typeof r&&(this[a+2]=null===i?r:i.bind(r))}return this._setLength(s+1),s},E.prototype._setProxyHandlers=function(e,t){var r=this._length();if(r>=131066&&(r=0,this._setLength(0)),0===r)this._promise0=t,this._receiver0=e;else{var o=5*r-5;this[o+3]=t,this[o+4]=e}this._setLength(r+1)},E.prototype._proxyPromiseArray=function(e,t){this._setProxyHandlers(e,t)},E.prototype._resolveCallback=function(e,t){if(!this._isFollowingOrFulfilledOrRejected()){if(e===this)return this._rejectCallback(o(),!1,!0);var r=f(e,this);if(!(r instanceof E))return this._fulfill(e);var n=1|(t?4:0);this._propagateFrom(r,n);var i=r._target();if(i._isPending()){for(var s=this._length(),a=0;a0&&e._cancellable()&&(this._setCancellable(),this._cancellationParent=e),(4&t)>0&&e._isBound()&&this._setBoundTo(e._boundTo)},E.prototype._fulfill=function(e){this._isFollowingOrFulfilledOrRejected()||this._fulfillUnchecked(e)},E.prototype._reject=function(e,t){this._isFollowingOrFulfilledOrRejected()||this._rejectUnchecked(e,t)},E.prototype._settlePromiseAt=function(e){var t=this._promiseAt(e),r=t instanceof E;if(r&&t._isMigrated())return t._unsetIsMigrated(),c.invoke(this._settlePromiseAt,this,e);var o=this._isFulfilled()?this._fulfillmentHandlerAt(e):this._rejectionHandlerAt(e),n=this._isCarryingStackTrace()?this._getCarriedStackTrace():void 0,i=this._settledValue,s=this._receiverAt(e);this._clearCallbackDataAtIndex(e),"function"==typeof o?r?this._settlePromiseFromHandler(o,s,i,t):o.call(s,i,t):s instanceof g?s._isResolved()||(this._isFulfilled()?s._promiseFulfilled(i,t):s._promiseRejected(i,t)):r&&(this._isFulfilled()?t._fulfill(i):t._reject(i,n)),e>=4&&4==(31&e)&&c.invokeLater(this._setLength,this,0)},E.prototype._clearCallbackDataAtIndex=function(e){if(0===e)this._isCarryingStackTrace()||(this._fulfillmentHandler0=void 0),this._rejectionHandler0=this._progressHandler0=this._receiver0=this._promise0=void 0;else{var t=5*e-5;this[t+3]=this[t+4]=this[t+0]=this[t+1]=this[t+2]=void 0}},E.prototype._isSettlePromisesQueued=function(){return-1073741824==(-1073741824&this._bitField)},E.prototype._setSettlePromisesQueued=function(){this._bitField=-1073741824|this._bitField},E.prototype._unsetSettlePromisesQueued=function(){this._bitField=1073741823&this._bitField},E.prototype._queueSettlePromises=function(){c.settlePromises(this),this._setSettlePromisesQueued()},E.prototype._fulfillUnchecked=function(e){if(e===this){var t=o();return this._attachExtraTrace(t),this._rejectUnchecked(t,void 0)}this._setFulfilled(),this._settledValue=e,this._cleanValues(),this._length()>0&&this._queueSettlePromises()},E.prototype._rejectUncheckedCheckError=function(e){var t=s.ensureErrorObject(e);this._rejectUnchecked(e,t===e?void 0:t)},E.prototype._rejectUnchecked=function(e,t){if(e===this){var r=o();return this._attachExtraTrace(r),this._rejectUnchecked(r)}this._setRejected(),this._settledValue=e,this._cleanValues(),this._isFinal()?c.throwLater((function(e){throw"stack"in e&&c.invokeFirst(y.unhandledRejection,void 0,e),e}),void 0===t?e:t):(void 0!==t&&t!==e&&this._setCarriedStackTrace(t),this._length()>0?this._queueSettlePromises():this._ensurePossibleRejectionHandled())},E.prototype._settlePromises=function(){this._unsetSettlePromisesQueued();for(var e=this._length(),t=0;t=this._length&&this._resolve(this._values)},s.prototype._promiseRejected=function(e,t){this._totalResolved++,this._reject(e)},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(e){return e},s}},{"./util.js":38}],25:[function(e,t,r){"use strict";var o,n=e("./util.js"),i=n.maybeWrapAsError,s=e("./errors.js"),a=s.TimeoutError,c=s.OperationalError,l=n.haveGetters,u=e("./es5.js"),d=/^(?:name|message|stack|cause)$/;function h(e){return function(t,r){if(null!==e){if(t){var o=function(e){var t;if(function(e){return e instanceof Error&&u.getPrototypeOf(e)===Error.prototype}(e)){(t=new c(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var r=u.keys(e),o=0;o2){for(var s=arguments.length,a=new Array(s-1),l=1;l=this._length){for(var r={},o=this.length(),n=0,i=this.length();n>1},t.prototype.props=function(){return l(this)},t.props=function(e){return l(e)}}},{"./es5.js":14,"./util.js":38}],28:[function(e,t,r){"use strict";function o(e){this._capacity=e,this._length=0,this._front=0}o.prototype._willBeOverCapacity=function(e){return this._capacity=this._length&&this._resolve(this._values)},n.prototype._promiseFulfilled=function(e,t){var r=new o;r._bitField=268435456,r._settledValue=e,this._promiseResolved(t,r)},n.prototype._promiseRejected=function(e,t){var r=new o;r._bitField=134217728,r._settledValue=e,this._promiseResolved(t,r)},t.settle=function(e){return new n(e).promise()},t.prototype.settle=function(){return new n(this).promise()}}},{"./util.js":38}],33:[function(e,t,r){"use strict";t.exports=function(t,r,o){var n=e("./util.js"),i=e("./errors.js").RangeError,s=e("./errors.js").AggregateError,a=n.isArray;function c(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function l(e,t){if((0|t)!==t||t<0)return o("expecting a positive integer\n\n See http://goo.gl/1wAmHx\n");var r=new c(e),n=r.promise();return r.setHowMany(t),r.init(),n}n.inherits(c,r),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=a(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(e){this._howMany=e},c.prototype._promiseFulfilled=function(e){this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values))},c.prototype._promiseRejected=function(e){if(this._addRejected(e),this.howMany()>this._canPossiblyFulfill()){for(var t=new s,r=this.length();r0},t.prototype.isRejected=e.prototype._isRejected=function(){return(134217728&this._bitField)>0},t.prototype.isPending=e.prototype._isPending=function(){return 0==(402653184&this._bitField)},t.prototype.isResolved=e.prototype._isResolved=function(){return(402653184&this._bitField)>0},e.prototype.isPending=function(){return this._target()._isPending()},e.prototype.isRejected=function(){return this._target()._isRejected()},e.prototype.isFulfilled=function(){return this._target()._isFulfilled()},e.prototype.isResolved=function(){return this._target()._isResolved()},e.prototype._value=function(){return this._settledValue},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue},e.prototype.value=function(){var e=this._target();if(!e.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/hc1DLj\n");return e._settledValue},e.prototype.reason=function(){var e=this._target();if(!e.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/hPuiwB\n");return e._unsetRejectionIsUnhandled(),e._settledValue},e.PromiseInspection=t}},{}],35:[function(e,t,r){"use strict";t.exports=function(t,r){var o=e("./util.js"),n=o.errorObj,i=o.isObject;function s(e){return e.then}var a={}.hasOwnProperty;return function(e,c){if(i(e)){if(e instanceof t)return e;if(function(e){return a.call(e,"_promise0")}(e)){var l=new t(r);return e._then(l._fulfillUnchecked,l._rejectUncheckedCheckError,l._progressUnchecked,l,null),l}var u=o.tryCatch(s)(e);if(u===n)return c&&c._pushContext(),l=t.reject(u.e),c&&c._popContext(),l;if("function"==typeof u)return function(e,i,s){var a=new t(r),c=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var l=!0,u=o.tryCatch(i).call(e,(function(e){a&&(a._resolveCallback(e),a=null)}),(function(e){a&&(a._rejectCallback(e,l,!0),a=null)}),(function(e){a&&"function"==typeof a._progress&&a._progress(e)}));return l=!1,a&&u===n&&(a._rejectCallback(u.e,!0,!0),a=null),c}(e,u,c)}return e}}},{"./util.js":38}],36:[function(e,t,r){"use strict";t.exports=function(t,r){var o=e("./util.js"),n=t.TimeoutError,i=function(e){return s(+this).thenReturn(e)},s=t.delay=function(e,o){if(void 0===o){o=e,e=void 0;var n=new t(r);return setTimeout((function(){n._fulfill()}),o),n}return o=+o,t.resolve(e)._then(i,null,null,o,void 0)};function a(e){var t=this;return t instanceof Number&&(t=+t),clearTimeout(t),e}function c(e){var t=this;throw t instanceof Number&&(t=+t),clearTimeout(t),e}t.prototype.delay=function(e){return s(this,e)},t.prototype.timeout=function(e,t){e=+e;var r=this.then().cancellable();r._cancellationParent=this;var i=setTimeout((function(){!function(e,t){var r;e.isPending()&&(!o.isPrimitive(t)&&t instanceof Error?r=t:("string"!=typeof t&&(t="operation timed out"),r=new n(t)),o.markAsOriginatingFromRejection(r),e._attachExtraTrace(r),e._cancel(r))}(r,t)}),e);return r._then(a,c,void 0,i,void 0)}}},{"./util.js":38}],37:[function(e,t,r){"use strict";t.exports=function(t,r,o,n){var i=e("./errors.js").TypeError,s=e("./util.js").inherits,a=t.PromiseInspection;function c(e){for(var r=e.length,o=0;o=i)return s.resolve();var c=function(e){var t=o(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}(e[n++]);if(c instanceof t&&c._isDisposable()){try{c=o(c._getDisposer().tryDispose(r),e.promise)}catch(e){return l(e)}if(c instanceof t)return c._then(a,l,null,null,null)}a()}(),s.promise}function d(e){var t=new a;return t._settledValue=e,t._bitField=268435456,u(this,t).thenReturn(e)}function h(e){var t=new a;return t._settledValue=e,t._bitField=134217728,u(this,t).thenThrow(e)}function p(e,t,r){this._data=e,this._promise=t,this._context=r}function f(e,t,r){this.constructor$(e,t,r)}function g(e){return p.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}p.prototype.data=function(){return this._data},p.prototype.promise=function(){return this._promise},p.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():null},p.prototype.tryDispose=function(e){var t=this.resource(),r=this._context;void 0!==r&&r._pushContext();var o=null!==t?this.doDispose(t,e):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,o},p.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},s(f,p),f.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},t.using=function(){var e=arguments.length;if(e<2)return r("you must pass at least 2 arguments to Promise.using");var n,i=arguments[e-1];if("function"!=typeof i)return r("fn must be a function\n\n See http://goo.gl/916lJJ\n");var s=!0;2===e&&Array.isArray(arguments[0])?(e=(n=arguments[0]).length,s=!1):(n=arguments,e--);for(var a=new Array(e),l=0;l0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-262145&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new f(e,this,n());throw new i}}},{"./errors.js":13,"./util.js":38}],38:[function(e,t,r){"use strict";var o,n=e("./es5.js"),i="undefined"==typeof navigator,s=function(){try{var e={};return n.defineProperty(e,"f",{get:function(){return 3}}),3===e.f}catch(e){return!1}}(),a={e:{}};function c(){try{var e=o;return o=null,e.apply(this,arguments)}catch(e){return a.e=e,a}}function l(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function u(e,t,r){if(l(e))return e;var o={value:r,configurable:!0,enumerable:!1,writable:!0};return n.defineProperty(e,t,o),e}var d=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var r=0;r1,o=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=h.test(e+"")&&n.names(e).length>0;if(r||o||i)return!0}return!1}catch(e){return!1}},isIdentifier:function(e){return p.test(e)},inheritedDataKeys:d,getDataPropertyOrDefault:function(e,t,r){if(!n.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var o=Object.getOwnPropertyDescriptor(e,t);return null!=o?null==o.get&&null==o.set?o.value:r:void 0},thrower:function(e){throw e},isArray:n.isArray,haveGetters:s,notEnumerableProp:u,isPrimitive:l,isObject:function(e){return!l(e)},canEvaluate:i,errorObj:a,tryCatch:function(e){return o=e,c},inherits:function(e,t){var r={}.hasOwnProperty;function o(){for(var o in this.constructor=e,this.constructor$=t,t.prototype)r.call(t.prototype,o)&&"$"!==o.charAt(o.length-1)&&(this[o+"$"]=t.prototype[o])}return o.prototype=t.prototype,e.prototype=new o,e.prototype},withAppended:function(e,t){var r,o=e.length,n=new Array(o+1);for(r=0;r10||b[0]>0),_.isNode&&_.toFastProperties(process);try{throw new Error}catch(e){_.lastLineError=e}t.exports=_},{"./es5.js":14}]},{},[4])(4)},e.exports=o(),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)},625:(e,t,r)=>{var o=r(189)(),n=r(125);e.exports=function(e,t){function r(t){if(!(this instanceof r))return new r(t);try{throw new Error(t)}catch(t){t.name=e,this.stack=t.stack}o&&this.stack&&(this.stack=n(this.stack,e,t)),this.message=t||"",this.name=e}return r.prototype=new(t||Error),r.prototype.constructor=r,r.prototype.inspect=function(){return this.message?"["+e+": "+this.message+"]":"["+e+"]"},r.prototype.name=e,r}},125:e=>{"use strict";e.exports=function(e,t,r){var o=t;return r&&(o+=": "+r),o+e.slice(e.indexOf("\n"))}},189:e=>{"use strict";e.exports=function(){var e=new Error("yep");return!!e.stack&&"Error: yep\n"===e.stack.substr(0,11)}},779:e=>{"use strict";function t(e){if(this._capacity=o(e),this._length=0,this._front=0,r(e)){for(var t=e.length,n=0;n1){var o=this._capacity;if(r+t>o){for(var n=0;n1){if(t+r>(n=this._capacity)){for(var o=r-1;o>=0;o--){this._checkCapacity(t+1);var n=this._capacity;this[s=(this._front-1&n-1^n)-n]=arguments[o],t++,this._length=t,this._front=s}return t}var i=this._front;for(o=r-1;o>=0;o--){var s;this[s=(i-1&n-1^n)-n]=arguments[o],i=s}return this._front=i,this._length=t+r,t+r}return 0===r?t:(this._checkCapacity(t+1),n=this._capacity,this[o=(this._front-1&n-1^n)-n]=e,this._length=t+1,this._front=o,t+1)},t.prototype.peekBack=function(){var e=this._length;if(0!==e)return this[this._front+e-1&this._capacity-1]},t.prototype.peekFront=function(){if(0!==this._length)return this[this._front]},t.prototype.get=function(e){var t=e;if(t===(0|t)){var r=this._length;if(t<0&&(t+=r),!(t<0||t>=r))return this[this._front+t&this._capacity-1]}},t.prototype.isEmpty=function(){return 0===this._length},t.prototype.clear=function(){for(var e=this._length,t=this._front,r=this._capacity,o=0;ot&&function(e,t,r,o,n){for(var i=0;i>>=0,t-=1,t|=t>>1,t|=t>>2,t|=t>>4,1+((t|=t>>8)|t>>16);var t}e.exports=t},917:(e,t,r)=>{var o,n="Expected a function",i="__lodash_hash_undefined__",s=1/0,a="[object Function]",c="[object GeneratorFunction]",l="[object Symbol]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,h=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,y="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,v="object"==typeof self&&self&&self.Object===Object&&self,b=y||v||Function("return this")(),_=Array.prototype,m=Function.prototype,w=Object.prototype,k=b["__core-js_shared__"],j=(o=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"",E=m.toString,C=w.hasOwnProperty,x=w.toString,A=RegExp("^"+E.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=b.Symbol,F=_.splice,T=U(b,"Map"),O=U(Object,"create"),P=S?S.prototype:void 0,R=P?P.toString:void 0;function D(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1},I.prototype.set=function(e,t){var r=this.__data__,o=N(r,e);return o<0?r.push([e,t]):r[o][1]=t,this},B.prototype.clear=function(){this.__data__={hash:new D,map:new(T||I),string:new D}},B.prototype.delete=function(e){return M(this,e).delete(e)},B.prototype.get=function(e){return M(this,e).get(e)},B.prototype.has=function(e){return M(this,e).has(e)},B.prototype.set=function(e,t){return M(this,e).set(e,t),this};var z=L((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(W(e))return R?R.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var r=[];return h.test(e)&&r.push(""),e.replace(p,(function(e,t,o,n){r.push(o?n.replace(f,"$1"):t||e)})),r}));function q(e){if("string"==typeof e||W(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function L(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(n);var r=function(){var o=arguments,n=t?t.apply(this,o):o[0],i=r.cache;if(i.has(n))return i.get(n);var s=e.apply(this,o);return r.cache=i.set(n,s),s};return r.cache=new(L.Cache||B),r}L.Cache=B;var $=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function W(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&x.call(e)==l}e.exports=function(e,t,r){var o=null==e?void 0:function(e,t){var r;t=function(e,t){if($(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!W(e))||d.test(e)||!u.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:$(r=t)?r:z(r);for(var o=0,n=t.length;null!=e&&o{var o,n="Expected a function",i="__lodash_hash_undefined__",s=1/0,a=9007199254740991,c="[object Arguments]",l="[object Function]",u="[object GeneratorFunction]",d="[object Symbol]",h=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,p=/^\w*$/,f=/^\./,g=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,y=/\\(\\)?/g,v=/^\[object .+?Constructor\]$/,b=/^(?:0|[1-9]\d*)$/,_="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,m="object"==typeof self&&self&&self.Object===Object&&self,w=_||m||Function("return this")(),k=Array.prototype,j=Function.prototype,E=Object.prototype,C=w["__core-js_shared__"],x=(o=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"",A=j.toString,S=E.hasOwnProperty,F=E.toString,T=RegExp("^"+A.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=w.Symbol,P=E.propertyIsEnumerable,R=k.splice,D=H(w,"Map"),I=H(Object,"create"),B=O?O.prototype:void 0,N=B?B.toString:void 0;function M(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1},U.prototype.set=function(e,t){var r=this.__data__,o=q(r,e);return o<0?r.push([e,t]):r[o][1]=t,this},z.prototype.clear=function(){this.__data__={hash:new M,map:new(D||U),string:new M}},z.prototype.delete=function(e){return $(this,e).delete(e)},z.prototype.get=function(e){return $(this,e).get(e)},z.prototype.has=function(e){return $(this,e).has(e)},z.prototype.set=function(e,t){return $(this,e).set(e,t),this};var W=K((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Z(e))return N?N.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var r=[];return f.test(e)&&r.push(""),e.replace(g,(function(e,t,o,n){r.push(o?n.replace(y,"$1"):t||e)})),r}));function V(e){if("string"==typeof e||Z(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function K(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(n);var r=function(){var o=arguments,n=t?t.apply(this,o):o[0],i=r.cache;if(i.has(n))return i.get(n);var s=e.apply(this,o);return r.cache=i.set(n,s),s};return r.cache=new(K.Cache||z),r}K.Cache=z;var Q=Array.isArray;function J(e){var t=X(e)?F.call(e):"";return t==l||t==u}function G(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function X(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return!!e&&"object"==typeof e}function Z(e){return"symbol"==typeof e||Y(e)&&F.call(e)==d}e.exports=function(e,t){return null!=e&&function(e,t,r){var o;t=function(e,t){if(Q(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Z(e))||p.test(e)||!h.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:Q(o=t)?o:W(o);for(var n,i=-1,s=t.length;++i-1&&e%1==0&&e{var t=1/0,r=9007199254740991,o="[object Arguments]",n="[object Function]",i="[object GeneratorFunction]",s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=/^(?:0|[1-9]\d*)$/,d=parseInt;function h(e){return e!=e}var p,f,g=Object.prototype,y=g.hasOwnProperty,v=g.toString,b=g.propertyIsEnumerable,_=(p=Object.keys,f=Object,function(e){return p(f(e))}),m=Math.max;function w(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||u.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!function(e){var t=E(e)?v.call(e):"";return t==n||t==i}(e)}function E(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function C(e){return!!e&&"object"==typeof e}e.exports=function(e,r,n,i){var u;e=j(e)?e:(u=e)?function(e,t){return function(t,r){for(var o=-1,n=t?t.length:0,i=Array(n);++o-1:!!p&&function(e,t,r){if(t!=t)return function(e,t,r,o){for(var n=e.length,i=r+-1;++i-1}},427:e=>{var t,r,o=Function.prototype,n=Object.prototype,i=o.toString,s=n.hasOwnProperty,a=i.call(Object),c=n.toString,l=(t=Object.getPrototypeOf,r=Object,function(e){return t(r(e))});function u(e){return!!e&&"object"==typeof e}e.exports=function(e){return!!e&&1===e.nodeType&&u(e)&&!function(e){if(!u(e)||"[object Object]"!=c.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=l(e);if(null===t)return!0;var r=s.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&i.call(r)==a}(e)}},810:(e,t,r)=>{var o="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,n="object"==typeof self&&self&&self.Object===Object&&self,i=(o||n||Function("return this")()).isFinite;e.exports=function(e){return"number"==typeof e&&i(e)}},217:e=>{var t=Object.prototype.toString,r=Array.isArray;e.exports=function(e){return"string"==typeof e||!r(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==t.call(e)}},230:(e,t,r)=>{var o=1/0,n=9007199254740991,i="[object Arguments]",s="[object Function]",a="[object GeneratorFunction]",c="[object Symbol]",l="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=l||u||Function("return this")();function h(e,t){for(var r=-1,o=t.length,n=e.length;++r0&&r(a)?t>1?m(a,t-1,r,o,n):h(n,a):o||(n[n.length]=a)}return n}function w(e){return j(e)||function(e){return function(e){return E(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?g.call(e):"";return t==s||t==a}(e)}(e)}(e)&&f.call(e,"callee")&&(!v.call(e,"callee")||g.call(e)==i)}(e)||!!(b&&e&&e[b])}function k(e){if("string"==typeof e||function(e){return"symbol"==typeof e||E(e)&&g.call(e)==c}(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}var j=Array.isArray;function E(e){return!!e&&"object"==typeof e}var C,x,A=(C=function(e,t){return null==e?{}:function(e,t){return function(e,t,r){for(var o=-1,n=t.length,i={};++o{"use strict";var r="undefined"!=typeof Reflect?Reflect.construct:void 0,o=Object.defineProperty,n=Error.captureStackTrace;function i(e){void 0!==e&&o(this,"message",{configurable:!0,value:e,writable:!0});var t=this.constructor.name;void 0!==t&&t!==this.name&&o(this,"name",{configurable:!0,value:t,writable:!0}),n(this,this.constructor)}void 0===n&&(n=function(e){var t=new Error;o(e,"stack",{configurable:!0,get:function(){var e=t.stack;return o(this,"stack",{configurable:!0,value:e,writable:!0}),e},set:function(t){o(e,"stack",{configurable:!0,value:t,writable:!0})}})}),i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function e(e,t){return o(e,"name",{configurable:!0,value:t})}try{var t=function(){};if(e(t,"foo"),"foo"===t.name)return e}catch(e){}}();(e.exports=function(e,t){if(null==t||t===Error)t=i;else if("function"!=typeof t)throw new TypeError("super_ should be a function");var o;if("string"==typeof e)o=e,e=void 0!==r?function(){return r(t,arguments,this.constructor)}:function(){t.apply(this,arguments)},void 0!==s&&(s(e,o),o=void 0);else if("function"!=typeof e)throw new TypeError("constructor should be either a string or a function");e.super_=e.super=t;var n={constructor:{configurable:!0,value:e,writable:!0}};return void 0!==o&&(n.name={configurable:!0,value:o,writable:!0}),e.prototype=Object.create(t.prototype,n),e}).BaseError=i},604:(e,t)=>{"use strict";function r(e,t,r){return t<=e&&e<=r}function o(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}var n=-1;function i(e){this.tokens=[].slice.call(e)}i.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():n},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var s=-1;function a(e,t){if(e)throw TypeError("Decoder error");return t||65533}var c="utf-8";function l(e,t){if(!(this instanceof l))return new l(e,t);if((e=void 0!==e?String(e).toLowerCase():c)!==c)throw new Error("Encoding not supported. Only utf-8 is supported");t=o(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(t.fatal),this._ignoreBOM=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function u(e,t){if(!(this instanceof u))return new u(e,t);if((e=void 0!==e?String(e).toLowerCase():c)!==c)throw new Error("Encoding not supported. Only utf-8 is supported");t=o(t),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function d(e){var t=e.fatal,o=0,i=0,c=0,l=128,u=191;this.handler=function(e,d){if(d===n&&0!==c)return c=0,a(t);if(d===n)return s;if(0===c){if(r(d,0,127))return d;if(r(d,194,223))c=1,o=d-192;else if(r(d,224,239))224===d&&(l=160),237===d&&(u=159),c=2,o=d-224;else{if(!r(d,240,244))return a(t);240===d&&(l=144),244===d&&(u=143),c=3,o=d-240}return o<<=6*c,null}if(!r(d,l,u))return o=c=i=0,l=128,u=191,e.prepend(d),a(t);if(l=128,u=191,o+=d-128<<6*(c-(i+=1)),i!==c)return null;var h=o;return o=c=i=0,h}}function h(e){e.fatal,this.handler=function(e,t){if(t===n)return s;if(r(t,0,127))return t;var o,i;r(t,128,2047)?(o=1,i=192):r(t,2048,65535)?(o=2,i=224):r(t,65536,1114111)&&(o=3,i=240);for(var a=[(t>>6*o)+i];o>0;){var c=t>>6*(o-1);a.push(128|63&c),o-=1}return a}}l.prototype={decode:function(e,t){var r;r="object"==typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"==typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=o(t),this._streaming||(this._decoder=new d({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var n,a=new i(r),c=[];!a.endOfStream()&&(n=this._decoder.handler(a,a.read()))!==s;)null!==n&&(Array.isArray(n)?c.push.apply(c,n):c.push(n));if(!this._streaming){do{if((n=this._decoder.handler(a,a.read()))===s)break;null!==n&&(Array.isArray(n)?c.push.apply(c,n):c.push(n))}while(!a.endOfStream());this._decoder=null}return c.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===c[0]?(this._BOMseen=!0,c.shift()):this._BOMseen=!0)),function(e){for(var t="",r=0;r>10),56320+(1023&o)))}return t}(c)}},u.prototype={encode:function(e,t){e=e?String(e):"",t=o(t),this._streaming||(this._encoder=new h(this._options)),this._streaming=Boolean(t.stream);for(var r,n=[],a=new i(function(e){for(var t=String(e),r=t.length,o=0,n=[];o57343)n.push(i);else if(56320<=i&&i<=57343)n.push(65533);else if(55296<=i&&i<=56319)if(o===r-1)n.push(65533);else{var s=e.charCodeAt(o+1);if(56320<=s&&s<=57343){var a=1023&i,c=1023&s;n.push(65536+(a<<10)+c),o+=1}else n.push(65533)}o+=1}return n}(e));!a.endOfStream()&&(r=this._encoder.handler(a,a.read()))!==s;)Array.isArray(r)?n.push.apply(n,r):n.push(r);if(!this._streaming){for(;(r=this._encoder.handler(a,a.read()))!==s;)Array.isArray(r)?n.push.apply(n,r):n.push(r);this._encoder=null}return new Uint8Array(n)}},t.p=u,t.k=l},850:e=>{e.exports=function(){for(var e={},r=0;r{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>({25:"@atlaskit-internal_atlassian-legacy-light",85:"@atlaskit-internal_atlassian-light-new-input-border",210:"@atlaskit-internal_atlassian-shape",211:"@atlaskit-internal_atlassian-typography",214:"@atlaskit-internal_atlassian-legacy-dark",216:"@atlaskit-internal_atlassian-dark-iteration",334:"@atlaskit-internal_atlassian-light",436:"@atlaskit-internal_atlassian-spacing",903:"@atlaskit-internal_atlassian-dark",942:"@atlaskit-internal_atlassian-dark-new-input-border"}[e]+".power-up.min.js"),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="trello-for-websites:",n.l=(r,o,i,s)=>{if(e[r])e[r].push(o);else{var a,c;if(void 0!==i)for(var l=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var n=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach((e=>e(o))),t)return t(o)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),c&&document.head.appendChild(a)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={179:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=i);var s=n.p+n.u(t),a=new Error;n.l(s,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+s+")",a.name="ChunkLoadError",a.type=i,a.request=s,o[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,i,[s,a,c]=r,l=0;if(s.some((t=>0!==e[t]))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);c&&c(n)}for(t&&t(r);l{"use strict";n.r(i);var e=n(49),t=n.n(e),r=n(21),o=n.n(r),s=n(810),a=n.n(s);const c=e=>{window.console&&"function"==typeof console.warn&&console.warn(e)},l={blue:{50:"#E4F0F6",100:"#BCD9EA",200:"#8BBDD9",300:"#5BA4CF",400:"#298FCA",500:"#0079BF",600:"#026AA7",700:"#055A8C",800:"#094C72",900:"#0C3953"},green:{50:"#EEF6EC",100:"#D6ECD2",200:"#B7DDB0",300:"#99D18F",400:"#7BC86C",500:"#61BD4F",600:"#5AAC44",700:"#519839",800:"#49852E",900:"#3F6F21"},orange:{50:"#FDF5EC",100:"#FCE8D2",200:"#FAD8B0",300:"#FDC788",400:"#FFB968",500:"#FFAB4A",600:"#E99E40",700:"#D29034",800:"#BB8129",900:"#A0711C"},red:{50:"#FBEDEB",100:"#F5D3CE",200:"#EFB3AB",300:"#EC9488",400:"#EF7564",500:"#EB5A46",600:"#CF513D",700:"#B04632",800:"#933B27",900:"#6E2F1A"},yellow:{50:"#FDFAE5",100:"#FAF3C0",200:"#F5EA92",300:"#F3E260",400:"#F5DD29",500:"#F2D600",600:"#E6C60D",700:"#D9B51C",800:"#CCA42B",900:"#BD903C"},purple:{50:"#F7F0FA",100:"#EDDBF4",200:"#DFC0EB",300:"#D5A6E6",400:"#CD8DE5",500:"#C377E0",600:"#A86CC1",700:"#89609E",800:"#6C547B",900:"#484553"},pink:{50:"#FEF2F9",100:"#FCDEF0",200:"#FAC6E5",300:"#FFB0E1",400:"#FF95D6",500:"#FF80CE",600:"#E76EB1",700:"#CD5A91",800:"#B44772",900:"#96304C"},sky:{50:"#E4F7FA",100:"#BDECF3",200:"#8FDFEB",300:"#5DD3E5",400:"#29CCE5",500:"#00C2E0",600:"#00AECC",700:"#0098B7",800:"#0082A0",900:"#006988"},lime:{50:"#ECFBF3",100:"#D3F6E4",200:"#B3F1D0",300:"#90ECC1",400:"#6DECA9",500:"#51E898",600:"#4FD683",700:"#4DC26B",800:"#4CAF54",900:"#4A9839"},gray:{50:"#F8F9F9",100:"#EDEFF0",200:"#E2E4E6",300:"#D6DADC",400:"#CDD2D4",500:"#C4C9CC",600:"#B6BBBF",700:"#A5ACB0",800:"#959DA1",900:"#838C91"},black:{50:"#C1C7D0",100:"#7A869A",200:"#6B778C",300:"#5E6C84",400:"#505F79",500:"#42526E",600:"#344563",700:"#253858",800:"#172B4D",900:"#091E42"},"business-blue":{50:"#EDEFF4",100:"#D2D7E5",200:"#B2B9D0",300:"#838FB5",400:"#6170A1",500:"#42548E",600:"#3E4D80",700:"#3A476F",800:"#36405F",900:"#30364C"},shades:{0:"#FFFFFF",10:"#FAFCFC",20:"#F5F6F7",30:"#EBEEF0",40:"#DFE3E6",50:"#C2CCD1",60:"#B3BAC5",70:"#A6B3BA",80:"#97A7B0",90:"#899AA3",100:"#798D99",200:"#6B808C",300:"#5E7785",400:"#516B7A",500:"#425E6E",600:"#355263",700:"#254659",800:"#17394D",900:"#092D42"}};l.neutrals=l.shades;const u=(e,t)=>{if(c("The colors utility has been deprecated and will be removed in future versions. Please refer to the Color Theme Compliance docs for an alternative, see: https://developer.atlassian.com/cloud/trello/power-ups/color-theme-compliance/using-atlassian-design-tokens/#how-do-i-get-the-value-of-a-token-in-javascript-"),!e||"string"!=typeof e)throw new Error("Invalid color name");const r=e.toLowerCase();if(!l[r])throw new Error(`Unknown color name: ${r}`);const o=a()(t)?t:500;if(!l[r][o])throw new Error(`Unknown color weight: ${o}`);return l[r][o]},d=e=>{if(!e||"string"!=typeof e)throw new Error("Invalid named color string");if(/^#[a-fA-F0-9]{6}$/.test(e))return e;const t=/^([a-zA-Z-]+)(#[1-9]?0?0)?$/.exec(e);if(!t)throw new Error("Invalid accentColor provided");const r=t[1];let o=500;return t[2]&&(o=parseInt(t[2].substring(1),10)),u(r,o)};function h(e){if(!e)return null;for(let t=0;t255||r<0)throw new Error("Invalid bytes. Bytes must be 0 - 255")}const t=new Uint8Array(e),r=[];for(let e=0;e"function"==typeof e,y=g(window.TextEncoder)?window.TextEncoder:f.p,v=g(window.TextDecoder)?window.TextDecoder:f.k,b="AES-CBC",_={name:b,length:256},m=!0,w=["encrypt","decrypt"],k="object"==typeof window.crypto,j=!k&&"object"==typeof window.msCrypto;let E;k?E=null==window.crypto.subtle&&null!=window.crypto.webkitSubtle?window.crypto.webkitSubtle:window.crypto.subtle:j&&(E=window.msCrypto.subtle);const C=e=>{const t=(new y).encode(e);return new(o())(((e,r)=>{if(k)E.digest({name:"SHA-256"},t).then((t=>e(h(t))));else if(j){const o=E.digest({name:"SHA-256"},t);o.oncomplete=t=>{e(h(t.target.result))},o.onerror=e=>{r(new Error(`Error digesting text: ${e.type}`))}}else r(new Error("Browser not supported."))}))},x={generateInitVector:()=>{if(k&&"function"==typeof window.crypto.getRandomValues)return window.crypto.getRandomValues(new Uint8Array(16));if(j&&"function"==typeof window.msCrypto.getRandomValues)return window.msCrypto.getRandomValues(new Uint8Array(16));throw new Error("Browser not supported.")},generateAESCBCKey:()=>new(o())(((e,t)=>{if(k)e(E.generateKey(_,m,w));else if(j){const r=E.generateKey(_,m,w);r.oncomplete=t=>{e(t.target.result)},r.onerror=e=>{t(new Error(`Error generating key: ${e.type}`))}}else t(new Error("Browser not supported."))})),importAESCBCKeyFromRaw:e=>{const t=p(e);return new(o())(((e,r)=>{if(k)e(E.importKey("raw",t,b,m,w));else if(j){const o=E.importKey("raw",t,b,m,w);o.oncomplete=t=>{e(t.target.result)},o.onerror=e=>{r(new Error(`Error importing key: ${e.type}`))}}else r(new Error("Browser not supported."))}))},exportAESCBCKeyToRaw:e=>new(o())(((t,r)=>{if(k)E.exportKey("raw",e).then((e=>t(h(e))));else if(j){const o=E.exportKey("raw",e);o.oncomplete=e=>{t(h(e.target.result))},o.onerror=e=>{r(new Error(`Error exporting key: ${e.type}`))}}else r(new Error("Browser not supported."))})),encryptSecret:(e,t,r)=>C(r).then((n=>{const i=(new y).encode(n+r);return k?E.encrypt({name:b,iv:e},t,i).then((e=>h(e))):j?new(o())(((r,o)=>{const n=E.encrypt({name:b,iv:e},t,i);n.oncomplete=e=>{r(h(e.target.result))},n.onerror=e=>{o(new Error(`Error encrypting secret: ${e.type}`))}})):o().reject(new Error("Browser not supported."))})),decryptSecret:(e,t,r)=>{const n=p(r);return new(o())(((r,o)=>{if(k)E.decrypt({name:b,iv:e},t,n).then((e=>{r((new v).decode(e))})).catch((e=>{o(new Error(`Decryption failed. Message: ${e.message}`))}));else if(j){const i=E.decrypt({name:b,iv:e},t,n);i.oncomplete=e=>{r((new v).decode(e.target.result))},i.onerror=e=>{o(new Error(`Decryption failed. Message: ${e.type}`))}}else o(new Error("Browser not supported."))})).then((e=>{const t=e.substring(0,64),r=e.substring(64);if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Decryption failed. Unable to validate integrity.");return C(r).then((e=>{if(e===t)return r;throw new Error("Decryption failed. Unable to validate integrity.")}))}))},sha256Digest:C};var A=n(917),S=n.n(A),F=n(950),T=n.n(F);const O="Error",P=(e,t)=>{const r=T()([e,O].join("::"));return t.forEach((t=>{r[t]=T()([e,t].join("::"),r)})),r},R=P("i18n",["ArgNotFound","InvalidResourceUrl","KeyNotFound","LoadLocalizerNotAFunction","LocaleNotFound","LocaleNotSpecified","LocalizerNotFound","MissingDefaultLocale","MissingResourceUrl","MissingSupportedLocales","UnableToParseArgs","UnableToParseAttrs","Unknown","UnsupportedKeyType"]),D=(e,t,r)=>r.includes(e)?e:e.includes("-")?D(e.split("-")[0],t,r):t;class I{constructor(e){this.resourceDictionary=e}localize(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{dotNotation:!1};const o=null!=r&&r.dotNotation?S()(this.resourceDictionary,e):this.resourceDictionary[e];if(null!=o){if(t){const n=null!=r&&r.dotNotation?/\{(\w+?(?:\.\w+?)*\w+?)\}/gi:/\{(\w+?)\}/gi;let i="",s=n.exec(o),a=0;for(;s;){s.index>a&&(i+=o.substring(a,s.index));const c=null!=r&&r.dotNotation?S()(t,s[1]):t[s[1]];if(void 0===c)throw new R.ArgNotFound(`Arg: ${s[1]} was not defined for key: ${e}`);i+=c,a=s.index+s[0].length,s=n.exec(o)}return i+=o.substring(a),i}return o}throw new R.KeyNotFound(`No resource defined for key: ${e}`)}}let B,N,M="";const U=(e,t)=>{const r=t||{};let n="";if(!e)return n="Unable to load a localizer without a locale",o().reject(new R.LocaleNotSpecified(n));if(window.localizer)return o().resolve();if(r.localizer)window.localizer=r.localizer;else{if(r.loadLocalizer)return"function"==typeof r.loadLocalizer?o().resolve(r.loadLocalizer(e)).then((e=>(window.localizer=e,o().resolve()))):(n="Specified loadLocalizer must be a function that returns a localizer or a Promise resolving to a localizer",o().reject(new R.LoadLocalizerNotAFunction(n)));if(r.localization){const{defaultLocale:t,supportedLocales:n,resourceUrl:i}=r.localization;return t?n?i?((e,t,r,n)=>o().try((()=>{let i;return i=e?D(e,t,r):t,i===M&&N?N:(B||(B=new(o())(((e,t)=>{const r=new XMLHttpRequest;r.open("GET",((e,t)=>{if(!e.includes("{locale}"))throw new R.InvalidResourceUrl("ResourceUrl must specify where to place locale with {locale}");return e.replace("{locale}",t)})(n,i),!0),r.onload=()=>{try{if(200===r.status){const t=JSON.parse(r.responseText);return N=new I(t),M=i,e(N)}return 404===r.status?t(new R.LocaleNotFound(`${i} not found.`)):t(new R.Unknown(`Unable to load locale: ${i}, status: ${r.status}`))}catch(e){return t(new R.Unknown(e.message))}},r.send()}))),B)})))(e,t,n,i).then((e=>(window.localizer=e,o().resolve()))):o().reject(new R.MissingResourceUrl("Missing resourceUrl")):o().reject(new R.MissingSupportedLocales("Missing supportedLocales")):o().reject(new R.MissingDefaultLocale("Missing defaultLocale"))}}return o().resolve()},z=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{dotNotation:!1};if(window.localizer&&"function"==typeof window.localizer.localize)return window.localizer.localize(e,t,r);throw new R.LocalizerNotFound("No localizer available for localization.")},q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{dotNotation:!1};return e?e.map((e=>{if("string"==typeof e)return z(e,{},t);if(Array.isArray(e))return z(e[0],e[1],t);throw new R.UnsupportedKeyType("localizeKeys doesn't recognize the supplied key type: "+typeof e)})):[]},L=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{dotNotation:!1};const r=e.querySelectorAll("[data-i18n-id],[data-i18n-attrs]");for(let e=0,o=r.length;e{if(/^https?:\/\//.test(e))return e;const t=window.location.origin||`${window.location.protocol}//${window.location.host}`,r=window.location.pathname.replace(/[^/]+$/,"");return/^\/\//.test(e)?[t,e.substring(1)].join(""):/^\//.test(e)?[t,e].join(""):[t,r,e].join("")};var H=n(991),W=n.n(H);const V={},K={};let Q=0;setInterval((()=>{const e=Object.keys(V),t=Date.now();e.forEach((e=>{V[e].expires{const n=t.callback,{action:i}=t,s=t.options;return o().try((()=>{switch(i){case"run":if(W()(K,n))return K[n].call(null,e,s);if(W()(V,n))return K[n]=V[n].fx,delete V[n],K[n].call(null,e,s);throw c("Attempted to run callback that does not exist or was not retained"),e.NotHandled("callback does not exist or was not retained");case"retain":if(W()(V,n))return K[n]=V[n].fx,delete V[n],n;throw c("Attempted to retain callback that does not exist"),e.NotHandled("callback can no longer be retained");case"release":return W()(K,n)?(delete K[n],null):(c("Attempted to release callback that is not retained"),null);default:throw c("Attempted an unknown callback action"),e.NotHandled("unknown callback action")}})).then(r)},serialize:e=>{const t=`cb${Q+=1}`;return V[t]={fx:e,expires:Date.now()+12e4},{_callback:t}},reset:()=>{Q=0,Object.keys(V).forEach((e=>{delete V[e]})),Object.keys(K).forEach((e=>{delete K[e]}))}};var G=n(850),X=n.n(G),Y=n(244),Z=n.n(Y),ee=n(427),te=n.n(ee),re=n(217),oe=n.n(re),ne=n(230),ie=n.n(ne);const se={"border.radius.050":"--ds-radius-050","border.radius.100":"--ds-radius-100","border.radius.200":"--ds-radius-200","border.radius.300":"--ds-radius-300","border.radius.400":"--ds-radius-400","border.radius.round":"--ds-radius-round","border.width.0":"--ds-width-0","border.width.050":"--ds-width-050","border.width.100":"--ds-width-100","color.text":"--ds-text","color.text.accent.red":"--ds-text-accent-red","color.text.accent.red.bolder":"--ds-text-accent-red-bolder","color.text.accent.orange":"--ds-text-accent-orange","color.text.accent.orange.bolder":"--ds-text-accent-orange-bolder","color.text.accent.yellow":"--ds-text-accent-yellow","color.text.accent.yellow.bolder":"--ds-text-accent-yellow-bolder","color.text.accent.green":"--ds-text-accent-green","color.text.accent.green.bolder":"--ds-text-accent-green-bolder","color.text.accent.teal":"--ds-text-accent-teal","color.text.accent.teal.bolder":"--ds-text-accent-teal-bolder","color.text.accent.blue":"--ds-text-accent-blue","color.text.accent.blue.bolder":"--ds-text-accent-blue-bolder","color.text.accent.purple":"--ds-text-accent-purple","color.text.accent.purple.bolder":"--ds-text-accent-purple-bolder","color.text.accent.magenta":"--ds-text-accent-magenta","color.text.accent.magenta.bolder":"--ds-text-accent-magenta-bolder","color.text.accent.gray":"--ds-text-accent-gray","color.text.accent.gray.bolder":"--ds-text-accent-gray-bolder","color.text.disabled":"--ds-text-disabled","color.text.inverse":"--ds-text-inverse","color.text.selected":"--ds-text-selected","color.text.brand":"--ds-text-brand","color.text.danger":"--ds-text-danger","color.text.warning":"--ds-text-warning","color.text.warning.inverse":"--ds-text-warning-inverse","color.text.success":"--ds-text-success","color.text.discovery":"--ds-text-discovery","color.text.information":"--ds-text-information","color.text.subtlest":"--ds-text-subtlest","color.text.subtle":"--ds-text-subtle","color.link":"--ds-link","color.link.pressed":"--ds-link-pressed","color.icon":"--ds-icon","color.icon.accent.red":"--ds-icon-accent-red","color.icon.accent.orange":"--ds-icon-accent-orange","color.icon.accent.yellow":"--ds-icon-accent-yellow","color.icon.accent.green":"--ds-icon-accent-green","color.icon.accent.teal":"--ds-icon-accent-teal","color.icon.accent.blue":"--ds-icon-accent-blue","color.icon.accent.purple":"--ds-icon-accent-purple","color.icon.accent.magenta":"--ds-icon-accent-magenta","color.icon.accent.gray":"--ds-icon-accent-gray","color.icon.disabled":"--ds-icon-disabled","color.icon.inverse":"--ds-icon-inverse","color.icon.selected":"--ds-icon-selected","color.icon.brand":"--ds-icon-brand","color.icon.danger":"--ds-icon-danger","color.icon.warning":"--ds-icon-warning","color.icon.warning.inverse":"--ds-icon-warning-inverse","color.icon.success":"--ds-icon-success","color.icon.discovery":"--ds-icon-discovery","color.icon.information":"--ds-icon-information","color.icon.subtle":"--ds-icon-subtle","color.border":"--ds-border","color.border.accent.red":"--ds-border-accent-red","color.border.accent.orange":"--ds-border-accent-orange","color.border.accent.yellow":"--ds-border-accent-yellow","color.border.accent.green":"--ds-border-accent-green","color.border.accent.teal":"--ds-border-accent-teal","color.border.accent.blue":"--ds-border-accent-blue","color.border.accent.purple":"--ds-border-accent-purple","color.border.accent.magenta":"--ds-border-accent-magenta","color.border.accent.gray":"--ds-border-accent-gray","color.border.disabled":"--ds-border-disabled","color.border.focused":"--ds-border-focused","color.border.input":"--ds-border-input","color.border.inverse":"--ds-border-inverse","color.border.selected":"--ds-border-selected","color.border.brand":"--ds-border-brand","color.border.danger":"--ds-border-danger","color.border.warning":"--ds-border-warning","color.border.success":"--ds-border-success","color.border.discovery":"--ds-border-discovery","color.border.information":"--ds-border-information","color.border.bold":"--ds-border-bold","color.background.accent.red.subtlest":"--ds-background-accent-red-subtlest","color.background.accent.red.subtler":"--ds-background-accent-red-subtler","color.background.accent.red.subtle":"--ds-background-accent-red-subtle","color.background.accent.red.bolder":"--ds-background-accent-red-bolder","color.background.accent.orange.subtlest":"--ds-background-accent-orange-subtlest","color.background.accent.orange.subtler":"--ds-background-accent-orange-subtler","color.background.accent.orange.subtle":"--ds-background-accent-orange-subtle","color.background.accent.orange.bolder":"--ds-background-accent-orange-bolder","color.background.accent.yellow.subtlest":"--ds-background-accent-yellow-subtlest","color.background.accent.yellow.subtler":"--ds-background-accent-yellow-subtler","color.background.accent.yellow.subtle":"--ds-background-accent-yellow-subtle","color.background.accent.yellow.bolder":"--ds-background-accent-yellow-bolder","color.background.accent.green.subtlest":"--ds-background-accent-green-subtlest","color.background.accent.green.subtler":"--ds-background-accent-green-subtler","color.background.accent.green.subtle":"--ds-background-accent-green-subtle","color.background.accent.green.bolder":"--ds-background-accent-green-bolder","color.background.accent.teal.subtlest":"--ds-background-accent-teal-subtlest","color.background.accent.teal.subtler":"--ds-background-accent-teal-subtler","color.background.accent.teal.subtle":"--ds-background-accent-teal-subtle","color.background.accent.teal.bolder":"--ds-background-accent-teal-bolder","color.background.accent.blue.subtlest":"--ds-background-accent-blue-subtlest","color.background.accent.blue.subtler":"--ds-background-accent-blue-subtler","color.background.accent.blue.subtle":"--ds-background-accent-blue-subtle","color.background.accent.blue.bolder":"--ds-background-accent-blue-bolder","color.background.accent.purple.subtlest":"--ds-background-accent-purple-subtlest","color.background.accent.purple.subtler":"--ds-background-accent-purple-subtler","color.background.accent.purple.subtle":"--ds-background-accent-purple-subtle","color.background.accent.purple.bolder":"--ds-background-accent-purple-bolder","color.background.accent.magenta.subtlest":"--ds-background-accent-magenta-subtlest","color.background.accent.magenta.subtler":"--ds-background-accent-magenta-subtler","color.background.accent.magenta.subtle":"--ds-background-accent-magenta-subtle","color.background.accent.magenta.bolder":"--ds-background-accent-magenta-bolder","color.background.accent.gray.subtlest":"--ds-background-accent-gray-subtlest","color.background.accent.gray.subtler":"--ds-background-accent-gray-subtler","color.background.accent.gray.subtle":"--ds-background-accent-gray-subtle","color.background.accent.gray.bolder":"--ds-background-accent-gray-bolder","color.background.disabled":"--ds-background-disabled","color.background.input":"--ds-background-input","color.background.input.hovered":"--ds-background-input-hovered","color.background.input.pressed":"--ds-background-input-pressed","color.background.inverse.subtle":"--ds-background-inverse-subtle","color.background.inverse.subtle.hovered":"--ds-background-inverse-subtle-hovered","color.background.inverse.subtle.pressed":"--ds-background-inverse-subtle-pressed","color.background.neutral":"--ds-background-neutral","color.background.neutral.hovered":"--ds-background-neutral-hovered","color.background.neutral.pressed":"--ds-background-neutral-pressed","color.background.neutral.subtle":"--ds-background-neutral-subtle","color.background.neutral.subtle.hovered":"--ds-background-neutral-subtle-hovered","color.background.neutral.subtle.pressed":"--ds-background-neutral-subtle-pressed","color.background.neutral.bold":"--ds-background-neutral-bold","color.background.neutral.bold.hovered":"--ds-background-neutral-bold-hovered","color.background.neutral.bold.pressed":"--ds-background-neutral-bold-pressed","color.background.selected":"--ds-background-selected","color.background.selected.hovered":"--ds-background-selected-hovered","color.background.selected.pressed":"--ds-background-selected-pressed","color.background.selected.bold":"--ds-background-selected-bold","color.background.selected.bold.hovered":"--ds-background-selected-bold-hovered","color.background.selected.bold.pressed":"--ds-background-selected-bold-pressed","color.background.brand.bold":"--ds-background-brand-bold","color.background.brand.bold.hovered":"--ds-background-brand-bold-hovered","color.background.brand.bold.pressed":"--ds-background-brand-bold-pressed","color.background.danger":"--ds-background-danger","color.background.danger.hovered":"--ds-background-danger-hovered","color.background.danger.pressed":"--ds-background-danger-pressed","color.background.danger.bold":"--ds-background-danger-bold","color.background.danger.bold.hovered":"--ds-background-danger-bold-hovered","color.background.danger.bold.pressed":"--ds-background-danger-bold-pressed","color.background.warning":"--ds-background-warning","color.background.warning.hovered":"--ds-background-warning-hovered","color.background.warning.pressed":"--ds-background-warning-pressed","color.background.warning.bold":"--ds-background-warning-bold","color.background.warning.bold.hovered":"--ds-background-warning-bold-hovered","color.background.warning.bold.pressed":"--ds-background-warning-bold-pressed","color.background.success":"--ds-background-success","color.background.success.hovered":"--ds-background-success-hovered","color.background.success.pressed":"--ds-background-success-pressed","color.background.success.bold":"--ds-background-success-bold","color.background.success.bold.hovered":"--ds-background-success-bold-hovered","color.background.success.bold.pressed":"--ds-background-success-bold-pressed","color.background.discovery":"--ds-background-discovery","color.background.discovery.hovered":"--ds-background-discovery-hovered","color.background.discovery.pressed":"--ds-background-discovery-pressed","color.background.discovery.bold":"--ds-background-discovery-bold","color.background.discovery.bold.hovered":"--ds-background-discovery-bold-hovered","color.background.discovery.bold.pressed":"--ds-background-discovery-bold-pressed","color.background.information":"--ds-background-information","color.background.information.hovered":"--ds-background-information-hovered","color.background.information.pressed":"--ds-background-information-pressed","color.background.information.bold":"--ds-background-information-bold","color.background.information.bold.hovered":"--ds-background-information-bold-hovered","color.background.information.bold.pressed":"--ds-background-information-bold-pressed","color.blanket":"--ds-blanket","color.blanket.selected":"--ds-blanket-selected","color.blanket.danger":"--ds-blanket-danger","color.interaction.hovered":"--ds-interaction-hovered","color.interaction.pressed":"--ds-interaction-pressed","color.skeleton":"--ds-skeleton","color.skeleton.subtle":"--ds-skeleton-subtle","color.chart.categorical.1":"--ds-chart-categorical-1","color.chart.categorical.1.hovered":"--ds-chart-categorical-1-hovered","color.chart.categorical.2":"--ds-chart-categorical-2","color.chart.categorical.2.hovered":"--ds-chart-categorical-2-hovered","color.chart.categorical.3":"--ds-chart-categorical-3","color.chart.categorical.3.hovered":"--ds-chart-categorical-3-hovered","color.chart.categorical.4":"--ds-chart-categorical-4","color.chart.categorical.4.hovered":"--ds-chart-categorical-4-hovered","color.chart.categorical.5":"--ds-chart-categorical-5","color.chart.categorical.5.hovered":"--ds-chart-categorical-5-hovered","color.chart.categorical.6":"--ds-chart-categorical-6","color.chart.categorical.6.hovered":"--ds-chart-categorical-6-hovered","color.chart.categorical.7":"--ds-chart-categorical-7","color.chart.categorical.7.hovered":"--ds-chart-categorical-7-hovered","color.chart.categorical.8":"--ds-chart-categorical-8","color.chart.categorical.8.hovered":"--ds-chart-categorical-8-hovered","color.chart.neutral":"--ds-chart-neutral","color.chart.neutral.hovered":"--ds-chart-neutral-hovered","color.chart.red.bold":"--ds-chart-red-bold","color.chart.red.bold.hovered":"--ds-chart-red-bold-hovered","color.chart.red.bolder":"--ds-chart-red-bolder","color.chart.red.bolder.hovered":"--ds-chart-red-bolder-hovered","color.chart.red.boldest":"--ds-chart-red-boldest","color.chart.red.boldest.hovered":"--ds-chart-red-boldest-hovered","color.chart.orange.bold":"--ds-chart-orange-bold","color.chart.orange.bold.hovered":"--ds-chart-orange-bold-hovered","color.chart.orange.bolder":"--ds-chart-orange-bolder","color.chart.orange.bolder.hovered":"--ds-chart-orange-bolder-hovered","color.chart.orange.boldest":"--ds-chart-orange-boldest","color.chart.orange.boldest.hovered":"--ds-chart-orange-boldest-hovered","color.chart.yellow.bold":"--ds-chart-yellow-bold","color.chart.yellow.bold.hovered":"--ds-chart-yellow-bold-hovered","color.chart.yellow.bolder":"--ds-chart-yellow-bolder","color.chart.yellow.bolder.hovered":"--ds-chart-yellow-bolder-hovered","color.chart.yellow.boldest":"--ds-chart-yellow-boldest","color.chart.yellow.boldest.hovered":"--ds-chart-yellow-boldest-hovered","color.chart.green.bold":"--ds-chart-green-bold","color.chart.green.bold.hovered":"--ds-chart-green-bold-hovered","color.chart.green.bolder":"--ds-chart-green-bolder","color.chart.green.bolder.hovered":"--ds-chart-green-bolder-hovered","color.chart.green.boldest":"--ds-chart-green-boldest","color.chart.green.boldest.hovered":"--ds-chart-green-boldest-hovered","color.chart.teal.bold":"--ds-chart-teal-bold","color.chart.teal.bold.hovered":"--ds-chart-teal-bold-hovered","color.chart.teal.bolder":"--ds-chart-teal-bolder","color.chart.teal.bolder.hovered":"--ds-chart-teal-bolder-hovered","color.chart.teal.boldest":"--ds-chart-teal-boldest","color.chart.teal.boldest.hovered":"--ds-chart-teal-boldest-hovered","color.chart.blue.bold":"--ds-chart-blue-bold","color.chart.blue.bold.hovered":"--ds-chart-blue-bold-hovered","color.chart.blue.bolder":"--ds-chart-blue-bolder","color.chart.blue.bolder.hovered":"--ds-chart-blue-bolder-hovered","color.chart.blue.boldest":"--ds-chart-blue-boldest","color.chart.blue.boldest.hovered":"--ds-chart-blue-boldest-hovered","color.chart.purple.bold":"--ds-chart-purple-bold","color.chart.purple.bold.hovered":"--ds-chart-purple-bold-hovered","color.chart.purple.bolder":"--ds-chart-purple-bolder","color.chart.purple.bolder.hovered":"--ds-chart-purple-bolder-hovered","color.chart.purple.boldest":"--ds-chart-purple-boldest","color.chart.purple.boldest.hovered":"--ds-chart-purple-boldest-hovered","color.chart.magenta.bold":"--ds-chart-magenta-bold","color.chart.magenta.bold.hovered":"--ds-chart-magenta-bold-hovered","color.chart.magenta.bolder":"--ds-chart-magenta-bolder","color.chart.magenta.bolder.hovered":"--ds-chart-magenta-bolder-hovered","color.chart.magenta.boldest":"--ds-chart-magenta-boldest","color.chart.magenta.boldest.hovered":"--ds-chart-magenta-boldest-hovered","color.chart.gray.bold":"--ds-chart-gray-bold","color.chart.gray.bold.hovered":"--ds-chart-gray-bold-hovered","color.chart.gray.bolder":"--ds-chart-gray-bolder","color.chart.gray.bolder.hovered":"--ds-chart-gray-bolder-hovered","color.chart.gray.boldest":"--ds-chart-gray-boldest","color.chart.gray.boldest.hovered":"--ds-chart-gray-boldest-hovered","color.chart.brand":"--ds-chart-brand","color.chart.brand.hovered":"--ds-chart-brand-hovered","color.chart.danger":"--ds-chart-danger","color.chart.danger.hovered":"--ds-chart-danger-hovered","color.chart.danger.bold":"--ds-chart-danger-bold","color.chart.danger.bold.hovered":"--ds-chart-danger-bold-hovered","color.chart.warning":"--ds-chart-warning","color.chart.warning.hovered":"--ds-chart-warning-hovered","color.chart.warning.bold":"--ds-chart-warning-bold","color.chart.warning.bold.hovered":"--ds-chart-warning-bold-hovered","color.chart.success":"--ds-chart-success","color.chart.success.hovered":"--ds-chart-success-hovered","color.chart.success.bold":"--ds-chart-success-bold","color.chart.success.bold.hovered":"--ds-chart-success-bold-hovered","color.chart.discovery":"--ds-chart-discovery","color.chart.discovery.hovered":"--ds-chart-discovery-hovered","color.chart.discovery.bold":"--ds-chart-discovery-bold","color.chart.discovery.bold.hovered":"--ds-chart-discovery-bold-hovered","color.chart.information":"--ds-chart-information","color.chart.information.hovered":"--ds-chart-information-hovered","color.chart.information.bold":"--ds-chart-information-bold","color.chart.information.bold.hovered":"--ds-chart-information-bold-hovered","elevation.surface":"--ds-surface","elevation.surface.hovered":"--ds-surface-hovered","elevation.surface.pressed":"--ds-surface-pressed","elevation.surface.overlay":"--ds-surface-overlay","elevation.surface.overlay.hovered":"--ds-surface-overlay-hovered","elevation.surface.overlay.pressed":"--ds-surface-overlay-pressed","elevation.surface.raised":"--ds-surface-raised","elevation.surface.raised.hovered":"--ds-surface-raised-hovered","elevation.surface.raised.pressed":"--ds-surface-raised-pressed","elevation.surface.sunken":"--ds-surface-sunken","elevation.shadow.overflow":"--ds-shadow-overflow","elevation.shadow.overflow.perimeter":"--ds-shadow-overflow-perimeter","elevation.shadow.overflow.spread":"--ds-shadow-overflow-spread","elevation.shadow.overlay":"--ds-shadow-overlay","elevation.shadow.raised":"--ds-shadow-raised","opacity.disabled":"--ds-opacity-disabled","opacity.loading":"--ds-opacity-loading","utility.UNSAFE.transparent":"--ds-UNSAFE-transparent","space.0":"--ds-space-0","space.025":"--ds-space-025","space.050":"--ds-space-050","space.075":"--ds-space-075","space.100":"--ds-space-100","space.150":"--ds-space-150","space.200":"--ds-space-200","space.250":"--ds-space-250","space.300":"--ds-space-300","space.400":"--ds-space-400","space.500":"--ds-space-500","space.600":"--ds-space-600","space.800":"--ds-space-800","space.1000":"--ds-space-1000","font.family.monospace":"--ds-font-family-monospace","font.family.sans":"--ds-font-family-sans","font.size.050":"--ds-font-size-050","font.size.075":"--ds-font-size-075","font.size.100":"--ds-font-size-100","font.size.200":"--ds-font-size-200","font.size.300":"--ds-font-size-300","font.size.400":"--ds-font-size-400","font.size.500":"--ds-font-size-500","font.size.600":"--ds-font-size-600","font.weight.bold":"--ds-font-weight-bold","font.weight.medium":"--ds-font-weight-medium","font.weight.regular":"--ds-font-weight-regular","font.weight.semibold":"--ds-font-weight-semibold","font.lineHeight.100":"--ds-font-lineHeight-100","font.lineHeight.200":"--ds-font-lineHeight-200","font.lineHeight.300":"--ds-font-lineHeight-300","font.lineHeight.400":"--ds-font-lineHeight-400","font.lineHeight.500":"--ds-font-lineHeight-500","font.lineHeight.600":"--ds-font-lineHeight-600"};var ae="--".concat("ds","-token-not-found");const ce=function(e,t){var r=se[e];return r||(r=ae),t?"var(".concat(r,", ").concat(t,")"):"var(".concat(r,")")},le=(e,t)=>{if(!e)return e;if(("url"===t||"icon"===t)&&"string"==typeof e&&0===e.indexOf("./"))return $(e.substr(2));const r={};switch(typeof e){case"object":return Array.isArray(e)?e.map(le):(Object.keys(e).forEach((t=>{r[t]=le(e[t],t)})),r);case"function":return J.serialize(e);default:return e}},ue=le,de=e=>/^[a-f0-9]{24}$/.test(e),he=e=>/^[a-zA-Z0-9]{8}$/.test(e),pe=e=>-1!==["shared","private"].indexOf(e),fe=e=>-1!==["board","card","member","organization"].indexOf(e),ge="POWER-UP-THEME-CHANGE",ye={board:8192,card:4096,member:4096,organization:8192},ve={};function be(e,t,r,n){const i=this,s={...r};i.setRequestQueue||(i.setRequestQueue=new Map);const a=`PUT:${e}:${t}`,{chain:c,size:l}=i.setRequestQueue.has(a)?i.setRequestQueue.get(a):{chain:o().resolve(),size:0},u=()=>i.get(e,t),d=c.then(u,u).then((e=>{const t=e||{},r=JSON.stringify(t),c=n(t);if(s.data=JSON.stringify(c),s.data===r)return o().resolve();if(s.data.length>ye[s.scope])throw new Error(`PluginData length of ${ye[s.scope]} characters exceeded. See: https://developers.trello.com/v1.0/reference#section-size-limit`);const l=i.requestWithContext("set",s);return l.finally((()=>{const e=i.setRequestQueue.get(a);1===e.size?i.setRequestQueue.delete(a):i.setRequestQueue.set({chain:e.chain,size:e.size-1})})),l}));return i.setRequestQueue.set(a,{chain:d,size:l+1}),d}ve.getContext=function(){return this.args[0].context},ve.isMemberSignedIn=function(){const e=this.getContext();return null!=e&&"notLoggedIn"!==e.member&&null!=e.member},ve.memberCanWriteToModel=function(e){if(!this.isMemberSignedIn())return!1;if("string"!=typeof e||!Z()(["board","card","organization"],e))throw new Error("modelType must be one of: board, card, organization");const t=this.getContext();return null!=t&&null!=t.permissions&&"write"===t.permissions[e]},ve.requestWithContext=function(e,t){const r=t||{};return r.context="function"==typeof this.getContext?this.getContext():{},this.request(e,ue(r))},ve.getAll=function(){const e=this;return e.outstandingGetAllReq||(e.outstandingGetAllReq=e.requestWithContext("data").then((t=>{const r={};return Object.keys(t).forEach((e=>{r[e]={},Object.keys(t[e]).forEach((o=>{try{r[e][o]=JSON.parse(t[e][o])}catch(t){r[e][o]={}}}))})),e.outstandingGetAllReq=null,r})).catch((t=>{throw e.outstandingGetAllReq=null,t}))),e.outstandingGetAllReq},ve.get=function(e,t,r,o){const n=this;n.outstandingGetRequests||(n.outstandingGetRequests=new Map);let i="GET";const s={};if((de(e)||he(e))&&(s.idCard=e,e="card",i=`GET:${s.idCard}`),!pe(t))throw new Error("Invalid value for visibility.");if(!fe(e))throw new Error("Invalid value for scope.");return n.outstandingGetRequests.has(i)||n.outstandingGetRequests.set(i,n.requestWithContext("data",s)),n.outstandingGetRequests.get(i).then((s=>{let a={};if(s&&W()(s,e)&&W()(s[e],t))try{a=JSON.parse(s[e][t])}catch(e){}return n.outstandingGetRequests.delete(i),null==r?a||o:null!=a&&W()(a,r)?a[r]:o})).catch((e=>{throw n.outstandingGetRequests.delete(i),e}))},ve.set=function(e,t,r,o){const n={scope:e,visibility:t};if(!pe(t))throw new Error("Invalid value for visibility.");if((de(e)||he(e))&&(n.idCard=e,n.scope="card"),!fe(n.scope))throw new Error("Invalid value for scope.");return be.call(this,e,t,n,(e=>{const t={...e};return"object"==typeof r?Object.keys(r).forEach((e=>{t[e]=r[e]})):t[r]=o,t}))},ve.remove=function(e,t,r){const o={scope:e,visibility:t};let n=r;if((de(e)||he(e))&&(o.idCard=e,o.scope="card"),Array.isArray(n)||(n=[r]),n.some((e=>"string"!=typeof e)))return c("t.remove function takes either a single string or an array of strings for which keys to remove"),null;if(!fe(o.scope))throw new Error("Invalid value for scope.");if(!pe(t))throw new Error("Invalid value for visibility.");return be.call(this,e,t,o,(e=>{const t={...e};return n.forEach((e=>{delete t[e]})),t}))},ve.safe=e=>String(null==e?"":e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"),ve.arg=function(e,t){const r=this.args[1];return r&&"object"==typeof r&&W()(r,e)?r[e]:t},ve.signUrl=function(e,t){const r=this.getContext(),o=encodeURIComponent(JSON.stringify({secret:this.secret,context:r,locale:window.locale,args:t}));return e.includes("#")?(c("Power-Up signing url that already has a hash. This will remove the existing hash.",e),`${e.slice(0,e.indexOf("#"))}#${o}`):`${e}#${o}`},ve.navigate=function(e){return e&&"object"==typeof e&&"string"==typeof e.url?this.requestWithContext("navigate",e):o().reject(new Error("Invalid or missing url provided in options object"))},ve.showCard=function(e){return e&&"string"==typeof e?this.requestWithContext("showCard",{idCard:e}):o().reject(new Error("Invalid idCard provided"))},ve.hideCard=function(){return this.requestWithContext("hideCard")},ve.alert=function(e){const t=ie()(e,["message","duration","display"]),r=t.message;return!oe()(r)||r.length<1||r.length>140?o().reject(new Error("Alert requires a message of 1 to 140 characters")):this.requestWithContext("alert",t)},ve.hideAlert=function(){return this.requestWithContext("hideAlert")},ve.popup=function(e){if(!(this.getContext().el||e&&e.mouseEvent))return c("Unable to open popup. Context missing target element or a mouseEvent was not provided. This usually means you are using the wrong t param, and should instead use the one provided to the callback function itself, not the capability handler. If you are within an iframe, then make sure you pass the mouse event."),o().reject(new Error("Context missing target element and no mouse event provided"));const t={title:e.title};if(e&&e.mouseEvent){const{mouseEvent:r}=e,{clientX:n,clientY:i}=r;if(!a()(n)||!a()(i))return o().reject(new Error("Invalid mouseEvent was provided"));{let e=n,s=i;if(0===e&&0===s){if(!r.target||!r.target.getBoundingClientRect)return o().reject(new Error("Invalid mouseEvent was provided"));const t=r.target.getBoundingClientRect();e=t.left,s=t.top}t.pos={x:e,y:s}}}e&&"function"==typeof e.callback&&(t.callback=e.callback);try{if(e.url&&"string"==typeof e.url)t.content={type:"iframe",url:this.signUrl($(e.url),e.args),width:e.width,height:e.height};else if(e.items)t.content=(e=>{let t;if(Array.isArray(e.items)||"function"==typeof e.items)t=e.items;else{if("object"!=typeof e.items)throw new Error("Unsupported items type for popup. Must be an array, object, or function");t=Object.keys(e.items).map((t=>{const r=e.items[t];return"function"==typeof r?{text:t,callback:r}:r&&"function"==typeof r.callback?X()({text:t},r):{text:t}}))}return{items:t,type:"list",search:e.search}})(e);else if("confirm"===e.type)t.content=(e=>{if("string"!=typeof e.message||"string"!=typeof e.confirmText)throw new Error("Confirm popups must have a message and confirmText");if("function"!=typeof e.onConfirm)throw new Error("Confirm popup requires onConfirm function");if("function"==typeof e.onCancel&&"string"!=typeof e.cancelText)throw new Error("Confirm popup requires cancelText to support onCancel function");const t={type:"confirm",message:e.message,confirmStyle:e.confirmStyle||"primary",confirmText:e.confirmText,onConfirm:e.onConfirm};return"string"==typeof e.cancelText&&(t.cancelText=e.cancelText),"function"==typeof e.onCancel&&(t.onCancel=e.onCancel),t})(e);else{if("datetime"!==e.type&&"date"!==e.type)return o().reject(new Error("Unknown popup type requested"));delete t.callback,t.content=(e=>{if("function"!=typeof e.callback)throw new Error("Date popups must have a callback function");const t={type:e.type,callback:e.callback};if(e.date&&"function"==typeof e.date.toISOString&&(t.date=e.date.toISOString()),e.minDate&&"function"==typeof e.minDate.toISOString&&(t.minDate=e.minDate.toISOString()),e.maxDate&&"function"==typeof e.maxDate.toISOString&&(t.maxDate=e.maxDate.toISOString()),t.minDate&&t.maxDate&&t.minDate>t.maxDate)throw new Error("Date popup maxDate must come after minDate if specified");return t})(e)}}catch(e){return o().reject(e)}return this.requestWithContext("popup",t)},ve.overlay=function(e){c("overlay() has been deprecated. Please use modal() instead. See: https://trello.readme.io/v1.0/reference#t-modal");const t={};return e.url&&(t.content={type:"iframe",url:this.signUrl($(e.url),e.args),inset:e.inset}),this.requestWithContext("overlay",t)},ve.boardBar=function(e){if(!e||!e.url||"string"!=typeof e.url)throw new Error("BoardBar options requires a valid url");if(e.actions&&!Array.isArray(e.actions))throw new Error("BoardBar actions property must be an array");let t;e.accentColor&&(t=d(e.accentColor));const r={content:{actions:e.actions||[],callback:e.callback,accentColor:t,height:e.height||200,resizable:e.resizable||!1,title:e.title,type:"iframe",url:this.signUrl($(e.url),e.args)}};return this.requestWithContext("board-bar",r)},ve.modal=function(e){if(!e||!e.url||"string"!=typeof e.url)throw new Error("Modal options requires a valid url");if(e.actions&&!Array.isArray(e.actions))throw new Error("Modal actions property must be an array");let t;e.accentColor&&(t=d(e.accentColor));const r={content:{actions:e.actions||[],callback:e.callback,accentColor:t,fullscreen:e.fullscreen||!1,height:e.height||400,title:e.title,type:"iframe",url:this.signUrl($(e.url),e.args)}};return this.requestWithContext("modal",r)},ve.updateModal=function(e){if(!e)return o().resolve();const{accentColor:t,actions:r,fullscreen:n,title:i}=e;if(!(t||r||n||i))return o().resolve();if(e.url)throw new Error("Updating Modal url not allowed");if(e.callback)throw new Error("Unable to update callback. You can set onBeforeUnload to run code before Modal close: https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload");if(r&&!Array.isArray(r))throw new Error("Modal actions property must be an array");const s={content:ie()(e,["actions","accentColor","fullscreen","title"])};return t&&(s.content.accentColor=d(t)),this.requestWithContext("update-modal",s)},ve.hide=function(){return c("hide() handler has been deprecated. Please use closePopup()"),this.requestWithContext("close-popup")},ve.closePopup=function(){return this.requestWithContext("close-popup")},ve.back=function(){return this.requestWithContext("pop-popup")},ve.hideOverlay=function(){return c("hideOverlay() handler has been deprecated. Please use closeOverlay()"),this.requestWithContext("close-overlay")},ve.closeOverlay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c("overlay() has been deprecated. Please use modal() instead. See: https://trello.readme.io/v1.0/reference#t-modal");const t={inset:e.inset};return this.requestWithContext("close-overlay",t)},ve.hideBoardBar=function(){return c("hideBoardBar() handler has been deprecated. Please use closeBoardBar()"),this.requestWithContext("close-board-bar")},ve.closeBoardBar=function(){return this.requestWithContext("close-board-bar")},ve.closeModal=function(){return this.requestWithContext("close-modal")},ve.sizeTo=function(e){let t;if(oe()(e)){const r=document.querySelector(e);if(!r)return o().reject(new Error(`No elements matched sizeTo query selector: ${e}`));r.style.overflow="hidden",t=Math.ceil(Math.max(r.scrollHeight,r.getBoundingClientRect().height))}else if(te()(e)){const r=e;r.style.overflow="hidden",t=Math.ceil(Math.max(r.scrollHeight,r.getBoundingClientRect().height))}else{if(!(a()(e)&&e>0))return o().reject(new Error(`Invalid argument. Must be a selector, element, or positive number. Was: ${e}`));t=e}return t?this.requestWithContext("resize",{height:t}):o().reject(new Error(`Unable to determine desired height for ${e} computed ${t}`))},ve.localizeKey=z,ve.localizeKeys=q,ve.localizeNode=L,ve.card=function(){for(var e=arguments.length,t=new Array(e),r=0;r{let n;const i=t().randomId(),s=r||{};if("string"==typeof e)n=e;else{if("function"!=typeof e)throw c("authorize requires a url or function that takes a secret and returns a url"),new Error("Invalid arguments passed to authorize");n=e(i)}let a=()=>!0;s.validToken&&"function"==typeof s.validToken&&(a=s.validToken);const l=s.width||800,u=s.height||600,d=["width=",l,",height=",u,",left=",window.screenX+Math.floor((window.outerWidth-l)/2),",top=",window.screenY+Math.floor((window.outerHeight-u)/2)].join(""),h=(e,t)=>{const r=window.open(e,"authorize",t);return"function"==typeof s.windowCallback&&s.windowCallback(r),r};return new(o())((r=>{window.addEventListener("storage",(e=>{const t=r=>{if("token"===r.key&&r.newValue&&a(r.newValue)){try{localStorage.removeItem("token")}catch(e){}window.removeEventListener("storage",t,!1),delete window.authorize,e(r.newValue)}};return t})(r),!1),"function"==typeof e?new(t())({Promise:o(),local:window,remote:h(n,d),targetOrigin:s.targetOrigin||"*",secret:i,handlers:{value(e,t){t&&t.token&&a(t.token)&&(this.stop(),r(t.token))}}}):(window.authorize=e=>{e&&a(e)&&(delete window.authorize,r(e))},h(n,d))}))},ve.storeSecret=function(e,t){if(!this.isMemberSignedIn())throw new Error("No active member in context.");const r=this.getContext().member,o=this;return x.sha256Digest(`${r}:${e}`).then((e=>o.get("member","private","aescbc").then((e=>e||x.generateAESCBCKey().then((e=>x.exportAESCBCKeyToRaw(e))))).then((r=>x.importAESCBCKeyFromRaw(r).then((n=>{const i=x.generateInitVector();return x.encryptSecret(i,n,t).then((t=>{const n=`${h(i)};${t}`;return window.localStorage.setItem(e,n),o.set("member","private","aescbc",r).then((()=>({key:e,value:n})))}))}))))))},ve.loadSecret=function(e){if(!this.isMemberSignedIn())throw new Error("No active member in context.");const t=this.getContext().member,r=this;return x.sha256Digest(`${t}:${e}`).then((e=>window.localStorage.getItem(e))).then((e=>e?r.get("member","private","aescbc").then((t=>t?x.importAESCBCKeyFromRaw(t).then((t=>{const r=e.substring(0,e.indexOf(";")),o=e.substring(e.indexOf(";")+1),n=p(r);return x.decryptSecret(n,t,o)})):null)):null))},ve.clearSecret=function(e){if(!this.isMemberSignedIn())throw new Error("No active member in context.");const t=this.getContext().member;return x.sha256Digest(`${t}:${e}`).then((e=>(window.localStorage.removeItem(e),null)))},ve.notifyParent=(e,t)=>{const r=t||{};window.parent.postMessage(e,r.targetOrigin||"*")},ve.confetti=function(e){const t={};if(e&&a()(e.clientX)&&a()(e.clientY)&&te()(e.target)){const r=e,{clientX:n,clientY:i}=r;let s=n,a=i;if(0===s&&0===a){if(!r.target||!r.target.getBoundingClientRect)return o().reject(new Error("Invalid mouseEvent was provided"));const e=r.target.getBoundingClientRect();s=e.left+r.target.offsetWidth/2,a=e.top+r.target.offsetHeight/2}t.pos={x:s,y:a}}else{let r;if(te()(e))r=e;else if(oe()(e)&&(r=document.querySelector(e),!r))return o().reject(new Error(`No elements matched confetti query selector: ${e}`));if(r){const e=r.getBoundingClientRect();t.pos={x:e.left+r.offsetWidth/2,y:e.top+r.offsetHeight/2}}}return this.requestWithContext("confetti",t)};const _e=new Map;ve.jwt=function(e){if(!this.isMemberSignedIn())return o().reject(new Error("No active member in context."));const t=!0===(null==e?void 0:e.card);if(t&&!this.getContext().card)return o().reject(new Error("No card in context"));let r="";if("string"==typeof(null==e?void 0:e.state)){if(e.state.length>2048)return o().reject(new Error("State parameter must be a string of at most 2048 characters"));r=e.state}else if(null!=(null==e?void 0:e.state))return o().reject(new Error("State parameter must be a string of at most 2048 characters"));const n=[this.getContext().board,t?this.getContext().card:"",r].join(":");if(_e.has(n))return _e.get(n);const i=this.requestWithContext("jwt",{state:r,includeCard:t});return i.finally((()=>{_e.delete(n)})),_e.set(n,i),_e.get(n)},ve.getColorToken=ce,ve.getComputedColorToken=function(e){var t,r;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=null===(t=ce(e).match(/var\((?--.*)\)/))||void 0===t||null===(r=t.groups)||void 0===r?void 0:r.name;if(!n)return o;const i=document.documentElement;return getComputedStyle(i).getPropertyValue(n).trim()||o},ve.subscribeToThemeChanges=function(e){if("function"!=typeof e)throw new TypeError("Argument passed to subscribeToThemeChanges must be a function");const t=t=>{const{theme:r,type:o}=t.data;t.source===window&&void 0!==r&&o===ge&&e(r)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)};const me=ve,we=(e,r)=>{const n=r||{};return new(n.io||t())({Promise:o(),local:window,remote:window.parent,targetOrigin:n.targetOrigin||"https://trello.com",secret:n.secret,strict:!0,handlers:e,hostHandlers:n.hostHandlers,helpfulStacks:"boolean"!=typeof n.helpfulStacks||n.helpfulStacks,Sentry:n.Sentry})},ke=P("restApi",["AuthDeniedError","AuthNotReadyError","ApiNotConfiguredError"]),je={makeWebCall:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!this.t)throw new ke.AuthNotReadyError("The API helper cannot be used from this context. This probably means that you are attemping to use it inside your iframe connector, but outside a capability handler. For more, http://developers.trello.com/v1.0/reference#api-client-availability.");if("function"!=typeof this.t[e])throw new ke.AuthNotReadyError("This method cannot be used in this context. This probably means that you are attemping to use it inside your iframe connector, but outside a capability handler. For more, http://developers.trello.com/v1.0/reference#api-client-availability.");return this.t[e](...t)},registerMessageHandler:function(e){return new(o())(((t,r)=>{let o,n;o=setInterval((()=>{e&&e.closed&&(clearInterval(o),r(new ke.AuthDeniedError))}),500);const i=o=>{o.origin===window.location.origin&&o.source===e&&(n(),o.source.close(),o.data?t(o.data):r(new ke.AuthDeniedError))},s=e=>{e.key===this.tokenStorageKey&&(n(),this.fetchAndStoreToken().then((e=>{e?t(e):r(new ke.AuthDeniedError)})))};n=()=>{window.removeEventListener("storage",s,!1),window.removeEventListener("message",i,!1),clearInterval(o)},window.addEventListener("message",i,!1),window.addEventListener("storage",s,!1)}))},storeToken:function(e){return this.makeWebCall("set",["member","private",this.tokenStorageKey,e]).then((()=>e))},checkForToken:function(){let e;try{e=this.localStorage.getItem(this.tokenStorageKey)}catch(e){}return e||null},fetchAndStoreToken:function(){const e=this.checkForToken();return e?this.storeToken(e).then((()=>(this.localStorage.removeItem(this.tokenStorageKey),e))):o().resolve(null)},getToken:function(){return this.fetchAndStoreToken().then((e=>e||this.makeWebCall("get",["member","private",this.tokenStorageKey])))},clearToken:function(){try{this.localStorage.removeItem(this.tokenStorageKey)}catch(e){}return this.makeWebCall("remove",["member","private",this.tokenStorageKey])},popupConfig:function(){return`width=550,height=725,left=${window.screenX+(window.outerWidth-550)/2},top=${window.screenY+(window.outerHeight-725)/2}`},showAuthPopup:function(e){let{expiration:t="never",scope:r="read",returnUrl:o=null}=e;const n={name:this.appName,key:this.appKey,expiration:t,scope:r};this.appAuthor&&(n.author=this.appAuthor),n.callback_method="fragment",n.response_type="fragment",n.return_url=o||window.location.href;let i=`${this.authBase()}/authorize?`;return i+=Object.keys(n).map((e=>`${e}=${encodeURIComponent(n[e])}`)).join("&"),window.open(i,"authpopup",this.popupConfig())},authorize:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new(o())(((t,r)=>{const o=this.showAuthPopup(e);this.getToken().then((e=>{e&&(o.close(),t(e))})),this.registerMessageHandler(o).then(t).catch(r)})).then((e=>this.storeToken(e)))},isAuthorized:function(){return this.getToken().then((e=>!!e))},checkAndStoreToken:function(){const e=window.location.hash.match(/token=(.+)?/);if(e&&2===e.length){const t=e[1]||"";try{this.localStorage.setItem(this.tokenStorageKey,t)}catch(e){}try{window.opener&&window.opener.postMessage(t,window.location.origin)}catch(e){}window.setTimeout((()=>window.close()),500)}else this.fetchAndStoreToken()}},Ee=je;class Ce{constructor(e){let{t,appKey:r,appName:o,appAuthor:n,apiOrigin:i="https://api.trello.com",authOrigin:s="https://trello.com",localStorage:a=window.localStorage,tokenStorageKey:c="trello_token"}=e;this.appKey=r,this.appName=o,this.appAuthor=n,this.apiOrigin=i,this.authOrigin=s,this.t=t,this.localStorage=a,this.tokenStorageKey=c}init(){this.checkAndStoreToken()}apiBase(){return`${this.apiOrigin}/1`}authBase(){return`${this.authOrigin}/1`}}Object.keys(Ee).forEach((e=>{Ce.prototype[e]=Ee[e]}));class xe{constructor(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.handlers={},this.io=null,this.NotHandled=t().NotHandled,this.options=r,r.Sentry&&r.Sentry.configureScope((e=>{e.setTag("powerupjs_version","1.25.0")}));const n=this;Object.keys(e).forEach((t=>{n.handlers[t]=function(){for(var r=arguments.length,n=new Array(r),i=0;ie[t].apply(s,n))).then(ue)}})),this.handlers.callback=function(e,t){return J.callback.call(this,e,t,ue)},["requestWithContext","getAll","get","set","remove","safe","localizeKey","localizeKeys","localizeNode","board","cards","lists","member","organization"].forEach((e=>{W()(me,e)&&(n[e]=me[e])}))}connect(){const e=this,t=we(this.handlers,X()(this.options,{hostHandlers:X()(me,{getRestApi(){if(!e.restApi)throw new ke.ApiNotConfiguredError("To use the API helper, make sure you specify appKey and appName when you call TrelloPowerup.initialize. For more, https://developers.trello.com/v1.0/reference#rest-api.");return e.restApi.t=this,e.restApi}})}));return this.io=t,t.request("initialize",Object.keys(this.handlers)).then((e=>(t.secret=e.secret,window.locale=e.locale||"en",this.options.Sentry&&"object"==typeof e&&this.options.Sentry.configureScope((t=>{t.setTag("locale",window.locale),t.setTag("trello_version",e.version||"unknown"),e.member&&t.setUser({id:e.member})})),U(window.locale,this.options).then((()=>t.request("ready")))))).then((()=>t))}initApi(){if(this.options.appKey&&this.options.appName)return this.restApi=new Ce({t:this,appKey:this.options.appKey,appName:this.options.appName,appAuthor:this.options.appAuthor,apiOrigin:this.options.apiOrigin,authOrigin:this.options.authOrigin,localStorage:this.options.localStorage,tokenStorageKey:this.options.tokenStorageKey}),void this.connect().tap((()=>this.restApi.init()));(this.options.appKey||this.options.appName)&&c("Both appKey and appName must be included to use the API. See more https://developers.trello.com/v1.0/reference#rest-api."),this.connect()}request(e,t){return this.io.request(e,t)}init(){this.initApi()}}xe.prototype.NotHandled=t().NotHandled;const Ae=xe;var Se,Fe,Te,Oe,Pe,Re=n(197),De=!(null!==(Se=void 0!==(null===globalThis||void 0===globalThis||null===(Fe=globalThis.process)||void 0===Fe||null===(Te=Fe.env)||void 0===Te?void 0:Te.JEST_WORKER_ID))&&void 0!==Se&&Se)&&"production"!==(null===globalThis||void 0===globalThis||null===(Oe=globalThis.process)||void 0===Oe||null===(Pe=Oe.env)||void 0===Pe?void 0:Pe.NODE_ENV),Ie=function(){var e;De&&(e=console).debug.apply(e,arguments)},Be="@atlaskit/platform-feature-flags",Ne="undefined"!=typeof process&&void 0!==process.env,Me=!!Ne&&"true"===process.env.ENABLE_PLATFORM_FF,Ue=!!Ne&&"true"===process.env.STORYBOOK_ENABLE_PLATFORM_FF,ze=Me||Ue,qe=function(){return!1};function Le(e){return function(e){if(ze)return Ie('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.',Be,e),!0;try{var t=qe(e);return"boolean"!=typeof t?(console.warn("".concat(e," resolved to a non-boolean value, returning false for safety")),!1):t}catch(e){return!1}}(e)}const $e="data-theme",He="data-color-mode",We={light:()=>n.e(334).then(n.bind(n,750)),dark:()=>n.e(903).then(n.bind(n,821)),"legacy-light":()=>n.e(25).then(n.bind(n,649)),"legacy-dark":()=>n.e(214).then(n.bind(n,806)),spacing:()=>n.e(436).then(n.bind(n,495)),typography:()=>n.e(211).then(n.bind(n,381)),shape:()=>n.e(210).then(n.bind(n,512)),"dark-iteration":()=>n.e(216).then(n.bind(n,543)),"light-new-input-border":()=>n.e(85).then(n.bind(n,764)),"dark-new-input-border":()=>n.e(942).then(n.bind(n,701))},Ve=async e=>{if(document.head.querySelector(`style[${$e}="${e}"]`))return;const t=await Ke(e),r=document.createElement("style");r.textContent=t,r.dataset.theme=e,document.head.appendChild(r)},Ke=async e=>{const{default:t}=await We[e]();return t},Qe=["light","dark","legacy-light","legacy-dark","spacing","typography","shape"],Je=["light","dark","spacing","typography"],Ge="undefined"!=typeof window&&"matchMedia"in window&&window.matchMedia("(prefers-color-scheme: dark)");let Xe=function(){};const Ye="auto",Ze="dark",et="light",tt=function(e){document.documentElement.setAttribute(He,e.matches?"dark":"light")},rt=({colorMode:e=Ye,dark:t=Ze,light:r=et,spacing:o,typography:n}={})=>{const i=(s={dark:t,light:r,spacing:o,typography:n},Object.entries(s).reduce(((e,[t,r])=>{return"colorMode"!==t&&(n=t,void 0===Je.find((e=>e===n)))||(o=r,void 0===Qe.find((e=>e===o))&&!["light","dark","auto"].includes(r))?e:e+""+(e?" ":"")+`${t}:${r}`;var o,n}),""));var s;return{[$e]:i,[He]:"auto"===e?"light":e}},ot=async({colorMode:e=Ye,dark:t=Ze,light:r=et,spacing:o,typography:n}={})=>{const i=(e=>{const{colorMode:t,dark:r,light:o,spacing:n,typography:i}=e,s="auto"===t?[o,r]:[e[t]];return[n,i].forEach((e=>{e&&s.push(e)})),Le("platform.design-system-team.update-border-input_ff9l1")&&s.push((s.includes("dark")?"dark":"light")+"-new-input-border"),[...new Set(s)]})({colorMode:e,dark:t,light:r,spacing:o,typography:n});await Promise.all(i.map((async e=>await Ve(e)))),i.includes("dark")&&(Le("design-system-team.dark-theme-iteration_dk1ln")||Le("platform.design-system-team.dark-iteration-confluence_e2t22"))&&await Ve("dark-iteration"),"auto"===e&&Ge?(e=Ge.matches?"dark":"light",Xe=(0,Re.ak)(Ge,{type:"change",listener:tt})):Xe();const s=rt({colorMode:e,dark:t,light:r,spacing:o,typography:n});return Object.entries(s).forEach((([e,t])=>{document.documentElement.setAttribute(e,t)})),Xe};let nt=null;const it=(e,t)=>{if(!nt)try{nt=JSON.parse(decodeURIComponent(window.location.hash.replace(/^#/,"")))}catch(e){c("Power-Up unable to parse url hash, perhaps you needed a t.signUrl(url)?",e),nt={}}return W()(nt,e)?nt[e]:t};class st{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.useADSTokens??=!0,this.io=null,this.args=[{context:it("context",e.context),secret:it("secret",e.secret)}].concat(it("args")),this.secret=it("secret",e.secret),this.options=e,window.locale=it("locale","en"),this.i18nPromise=U(window.locale,e),this.secret||(c("Power-Up iframe initialized without a secret. Requests to Trello will not work."),c("If this is an attachment-section or card-back-section make sure you call t.signUrl on the urls you provide."))}init(){this._initTrelloThemeChangeListener(),this.initSentry(),this.initApi(),this.connect()}connect(){const e={callback(e,t){return J.callback.call(this,e,t,ue)}};this.io=we(e,X()(this.options,{secret:it("secret"),hostHandlers:me}))}request(e,t){return this.io.request(e,t)}render(e){if("function"!=typeof e)throw new TypeError("Argument passed to render must be a function");const t=this;t.onMessage&&window.removeEventListener("message",t.onMessage,!1),t.onMessage=r=>{r.source===window.parent&&"render"===r.data&&t.i18nPromise.then((()=>{e()}))},window.addEventListener("message",t.onMessage,!1)}initApi(){this.options.appKey&&this.options.appName?(this.restApi=new Ce({t:this,appKey:this.options.appKey,appName:this.options.appName,appAuthor:this.options.appAuthor,apiOrigin:this.options.apiOrigin,authOrigin:this.options.authOrigin,localStorage:this.options.localStorage,tokenStorageKey:this.options.tokenStorageKey}),this.restApi.init()):(this.options.appKey||this.options.appName)&&c("Both appKey and appName must be included to use the API. See more at https://developers.trello.com/v1.0/reference#rest-api.")}getRestApi(){if(!this.restApi)throw new ke.ApiNotConfiguredError("To use the API helper, make sure you specify appKey and appName when you call TrelloPowerUp.iframe. See more at https://developers.trello.com/v1.0/reference#rest-api");return this.restApi}initSentry(){if(this.options.Sentry){const e=it("context",this.options.context);this.options.Sentry.configureScope((t=>{t.setTag("locale",it("locale","en")),t.setTag("powerupjs_version","1.25.0"),e&&"object"==typeof e&&(t.setTag("trello_version",e.version||"unknown"),e.member&&t.setUser({id:e.member}),e.board&&t.setTag("idBoard",e.board),e.permissions&&Object.keys(e.permissions).forEach((r=>{t.setExtra(`${r}_permission`,e.permissions[r])})))}))}}_notifyThemeChange(e){this.args[0].context.theme=e,window.postMessage({type:ge,theme:e},window.location.origin)}_updateTheme(e){if(!this.options.useADSTokens)return void this._notifyThemeChange(e);const t=Object.entries(rt({colorMode:e}));if(null===e)return t.forEach((e=>{let[t]=e;document.documentElement.removeAttribute(t)})),void this._notifyThemeChange(e);t.forEach((e=>{let[t,r]=e;document.documentElement.setAttribute(t,r)})),"fallback"!==this.getComputedColorToken("color.text","fallback")?this._notifyThemeChange(e):ot({colorMode:e}).then((t=>{t(),this._notifyThemeChange(e)})).catch((e=>{t.forEach((e=>{let[t]=e;document.documentElement.removeAttribute(t)})),console.error(`Failed to load ADS tokens - ${(null==e?void 0:e.stack)??""}`)}))}_initTrelloThemeChangeListener(){const{initialTheme:e,theme:t}=this.getContext()??{};(e||t)&&this._updateTheme(e??t),window.addEventListener("message",(e=>{var t;const{theme:r,type:o}=e.data;e.source===window.parent&&void 0!==r&&o!==ge&&r!==(null===(t=this.getContext())||void 0===t?void 0:t.theme)&&this._updateTheme(r)}))}}st.prototype.NotHandled=t().NotHandled;for(const e in me)W()(me,e)&&(st.prototype[e]=me[e]);const at=st;n(611);window.TrelloPowerUp=new class{constructor(){this.version="1.25.0",this.CallbackCache=J,this.PostMessageIO=t(),this.Promise=o(),this.util={colors:{getHexString:u,namedColorStringToHex:d},convert:{bytesToHexString:h,hexStringToUint8Array:p},crypto:x,initLocalizer:U,i18n:{localizeKey:z,localizeKeys:q,localizeNode:L},makeErrorEnum:P,relativeUrl:$},this.restApiError=ke,this.initialize=this.initialize.bind(this),this.iframe=this.iframe.bind(this)}initialize(e,t){return null!=this.iframeConnector&&c("Cannot call TrelloPowerUp.initialize() from a secondary iframe where you have already called TrelloPowerUp.iframe(). TrelloPowerUp.initialize() should only be called from your index connector page, and should not include a call to TrelloPowerUp.iframe()"),null!=this.indexConnector?(c("Warning: calling TrelloPowerUp.initialize() more than once will have no effect. It is expected that you call it only once on your index connector."),this.indexConnector):(this.indexConnector=new Ae(e,t),this.indexConnector.init(),this.indexConnector)}iframe(e){return null!=this.indexConnector&&c("Cannot call TrelloPowerUp.iframe() from your index connector where you call TrelloPowerUp.initialize(). TrelloPowerUp.iframe() is only used for secondary iframes you may create or request from Trello during the Power-Up lifecycle."),null!=this.iframeConnector||(this.iframeConnector=new at(e),this.iframeConnector.init()),this.iframeConnector}}})(),i})())); //# sourceMappingURL=power-up.min.js.map