@atomic.io/action-cards-web-sdk-cdn-icons 25.2.2 → 25.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  /*! For license information please see iframe-manager-cdn-icons.js.LICENSE.txt */
2
2
  /*!
3
3
  * @license
4
- * Atomic Web SDK 25.2.2
4
+ * Atomic Web SDK 25.2.3
5
5
  * Copyright 2022 Atomic.io Limited.
6
6
  * For licenses of open source libraries used by the Atomic SDK, please
7
- * see https://downloads.atomic.io/web-sdk/release/25.2.2/LICENSES.txt.
7
+ * see https://downloads.atomic.io/web-sdk/release/25.2.3/LICENSES.txt.
8
8
  */
9
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AtomicSDK=t():e.AtomicSDK=t()}(globalThis,(()=>(()=>{var e={4963:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},7722:(e,t,n)=>{var r=n(6314)("unscopables"),a=Array.prototype;null==a[r]&&n(7728)(a,r,{}),e.exports=function(e){a[r][e]=!0}},7007:(e,t,n)=>{var r=n(5286);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},9315:(e,t,n)=>{var r=n(2110),a=n(875),o=n(2337);e.exports=function(e){return function(t,n,i){var s,l=r(t),c=a(l.length),d=o(i,c);if(e&&n!=n){for(;c>d;)if((s=l[d++])!=s)return!0}else for(;c>d;d++)if((e||d in l)&&l[d]===n)return e||d||0;return!e&&-1}}},2032:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},5645:e=>{var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},741:(e,t,n)=>{var r=n(4963);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}}},1355:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},7057:(e,t,n)=>{e.exports=!n(4253)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},2457:(e,t,n)=>{var r=n(5286),a=n(3816).document,o=r(a)&&r(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},4430:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},2985:(e,t,n)=>{var r=n(3816),a=n(5645),o=n(7728),i=n(3415),s=n(741),l="prototype",c=function(e,t,n){var d,u,p,h,m=e&c.F,g=e&c.G,v=e&c.S,f=e&c.P,b=e&c.B,y=g?r:v?r[t]||(r[t]={}):(r[t]||{})[l],w=g?a:a[t]||(a[t]={}),S=w[l]||(w[l]={});for(d in g&&(n=t),n)p=((u=!m&&y&&void 0!==y[d])?y:n)[d],h=b&&u?s(p,r):f&&"function"==typeof p?s(Function.call,p):p,y&&i(y,d,p,e&c.U),w[d]!=p&&o(w,d,h),f&&S[d]!=p&&(S[d]=p)};r.core=a,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},4253:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},18:(e,t,n)=>{e.exports=n(3825)("native-function-to-string",Function.toString)},3816:e=>{var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},9181:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},7728:(e,t,n)=>{var r=n(9275),a=n(681);e.exports=n(7057)?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},639:(e,t,n)=>{var r=n(3816).document;e.exports=r&&r.documentElement},1734:(e,t,n)=>{e.exports=!n(7057)&&!n(4253)((function(){return 7!=Object.defineProperty(n(2457)("div"),"a",{get:function(){return 7}}).a}))},9797:(e,t,n)=>{var r=n(2032);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},5286:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},9988:(e,t,n)=>{"use strict";var r=n(2503),a=n(681),o=n(2943),i={};n(7728)(i,n(6314)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(i,{next:a(1,n)}),o(e,t+" Iterator")}},2923:(e,t,n)=>{"use strict";var r=n(4461),a=n(2985),o=n(3415),i=n(7728),s=n(7234),l=n(9988),c=n(2943),d=n(468),u=n(6314)("iterator"),p=!([].keys&&"next"in[].keys()),h="keys",m="values",g=function(){return this};e.exports=function(e,t,n,v,f,b,y){l(n,t,v);var w,S,C,k=function(e){if(!p&&e in M)return M[e];switch(e){case h:case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",I=f==m,O=!1,M=e.prototype,T=M[u]||M["@@iterator"]||f&&M[f],F=T||k(f),j=f?I?k("entries"):F:void 0,_="Array"==t&&M.entries||T;if(_&&(C=d(_.call(new e)))!==Object.prototype&&C.next&&(c(C,x,!0),r||"function"==typeof C[u]||i(C,u,g)),I&&T&&T.name!==m&&(O=!0,F=function(){return T.call(this)}),r&&!y||!p&&!O&&M[u]||i(M,u,F),s[t]=F,s[x]=g,f)if(w={values:I?F:k(m),keys:b?F:k(h),entries:j},y)for(S in w)S in M||o(M,S,w[S]);else a(a.P+a.F*(p||O),t,w);return w}},5436:e=>{e.exports=function(e,t){return{value:t,done:!!e}}},7234:e=>{e.exports={}},4461:e=>{e.exports=!1},2503:(e,t,n)=>{var r=n(7007),a=n(5588),o=n(4430),i=n(9335)("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=n(2457)("iframe"),r=o.length;for(t.style.display="none",n(639).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c[l][o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=r(e),n=new s,s[l]=null,n[i]=e):n=c(),void 0===t?n:a(n,t)}},9275:(e,t,n)=>{var r=n(7007),a=n(1734),o=n(1689),i=Object.defineProperty;t.f=n(7057)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),a)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},5588:(e,t,n)=>{var r=n(9275),a=n(7007),o=n(7184);e.exports=n(7057)?Object.defineProperties:function(e,t){a(e);for(var n,i=o(t),s=i.length,l=0;s>l;)r.f(e,n=i[l++],t[n]);return e}},468:(e,t,n)=>{var r=n(9181),a=n(508),o=n(9335)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=a(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},189:(e,t,n)=>{var r=n(9181),a=n(2110),o=n(9315)(!1),i=n(9335)("IE_PROTO");e.exports=function(e,t){var n,s=a(e),l=0,c=[];for(n in s)n!=i&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~o(c,n)||c.push(n));return c}},7184:(e,t,n)=>{var r=n(189),a=n(4430);e.exports=Object.keys||function(e){return r(e,a)}},681:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},3415:(e,t,n)=>{var r=n(3816),a=n(7728),o=n(9181),i=n(3953)("src"),s=n(18),l="toString",c=(""+s).split(l);n(5645).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(o(n,"name")||a(n,"name",t)),e[t]!==n&&(l&&(o(n,i)||a(n,i,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,l,(function(){return"function"==typeof this&&this[i]||s.call(this)}))},2943:(e,t,n)=>{var r=n(9275).f,a=n(9181),o=n(6314)("toStringTag");e.exports=function(e,t,n){e&&!a(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},9335:(e,t,n)=>{var r=n(3825)("keys"),a=n(3953);e.exports=function(e){return r[e]||(r[e]=a(e))}},3825:(e,t,n)=>{var r=n(5645),a=n(3816),o="__core-js_shared__",i=a[o]||(a[o]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(4461)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},2337:(e,t,n)=>{var r=n(1467),a=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?a(e+t,0):o(e,t)}},1467:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},2110:(e,t,n)=>{var r=n(9797),a=n(1355);e.exports=function(e){return r(a(e))}},875:(e,t,n)=>{var r=n(1467),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},508:(e,t,n)=>{var r=n(1355);e.exports=function(e){return Object(r(e))}},1689:(e,t,n)=>{var r=n(5286);e.exports=function(e,t){if(!r(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!r(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},3953:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+n).toString(36))}},6314:(e,t,n)=>{var r=n(3825)("wks"),a=n(3953),o=n(3816).Symbol,i="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=i&&o[e]||(i?o:a)("Symbol."+e))}).store=r},6997:(e,t,n)=>{"use strict";var r=n(7722),a=n(5436),o=n(7234),i=n(2110);e.exports=n(2923)(Array,"Array",(function(e,t){this._t=i(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,a(1)):a(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},1181:(e,t,n)=>{for(var r=n(6997),a=n(7184),o=n(3415),i=n(3816),s=n(7728),l=n(7234),c=n(6314),d=c("iterator"),u=c("toStringTag"),p=l.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=a(h),g=0;g<m.length;g++){var v,f=m[g],b=h[f],y=i[f],w=y&&y.prototype;if(w&&(w[d]||s(w,d,p),w[u]||s(w,u,f),l[f]=p,b))for(v in r)w[v]||o(w,v,r[v],!0)}},3561:e=>{e.exports=function(e){var t=new Date(e.getTime()),n=t.getTimezoneOffset();return t.setSeconds(0,0),6e4*n+t.getTime()%6e4}},4844:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setDate(n.getDate()+a),n}},2680:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,36e5*n)}},7538:(e,t,n)=>{var r=n(2385),a=n(1138);e.exports=function(e,t){var n=Number(t);return a(e,r(e)+n)}},2951:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),a=Number(t);return new Date(n+a)}},1318:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,6e4*n)}},9331:(e,t,n)=>{var r=n(1884),a=n(2807);e.exports=function(e,t){var n=r(e),o=Number(t),i=n.getMonth()+o,s=new Date(0);s.setFullYear(n.getFullYear(),i,1),s.setHours(0,0,0,0);var l=a(s);return n.setMonth(i,Math.min(l,n.getDate())),n}},1482:(e,t,n)=>{var r=n(9331);e.exports=function(e,t){var n=Number(t);return r(e,3*n)}},9723:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,1e3*n)}},5932:(e,t,n)=>{var r=n(4844);e.exports=function(e,t){var n=Number(t);return r(e,7*n)}},6083:(e,t,n)=>{var r=n(9331);e.exports=function(e,t){var n=Number(t);return r(e,12*n)}},6739:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n,a){var o=r(e).getTime(),i=r(t).getTime(),s=r(n).getTime(),l=r(a).getTime();if(o>i||s>l)throw new Error("The start of the range cannot be after the end of the range");return o<l&&s<i}},7886:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){if(!(t instanceof Array))throw new TypeError(toString.call(t)+" is not an instance of Array");var n,a,o=r(e).getTime();return t.forEach((function(e,t){var i=r(e),s=Math.abs(o-i.getTime());(void 0===n||s<a)&&(n=t,a=s)})),n}},3806:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){if(!(t instanceof Array))throw new TypeError(toString.call(t)+" is not an instance of Array");var n,a,o=r(e).getTime();return t.forEach((function(e){var t=r(e),i=Math.abs(o-t.getTime());(void 0===n||i<a)&&(n=t,a=i)})),n}},3374:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),a=r(t).getTime();return n<a?-1:n>a?1:0}},3558:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),a=r(t).getTime();return n>a?-1:n<a?1:0}},6656:(e,t,n)=>{var r=n(6579);e.exports=function(e,t){var n=r(e),a=r(t),o=n.getTime()-6e4*n.getTimezoneOffset(),i=a.getTime()-6e4*a.getTimezoneOffset();return Math.round((o-i)/864e5)}},6554:(e,t,n)=>{var r=n(1971);e.exports=function(e,t){var n=r(e),a=r(t),o=n.getTime()-6e4*n.getTimezoneOffset(),i=a.getTime()-6e4*a.getTimezoneOffset();return Math.round((o-i)/6048e5)}},7051:(e,t,n)=>{var r=n(2385);e.exports=function(e,t){return r(e)-r(t)}},1924:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return 12*(n.getFullYear()-a.getFullYear())+(n.getMonth()-a.getMonth())}},9729:(e,t,n)=>{var r=n(21),a=n(1884);e.exports=function(e,t){var n=a(e),o=a(t);return 4*(n.getFullYear()-o.getFullYear())+(r(n)-r(o))}},9871:(e,t,n)=>{var r=n(5344);e.exports=function(e,t,n){var a=r(e,n),o=r(t,n),i=a.getTime()-6e4*a.getTimezoneOffset(),s=o.getTime()-6e4*o.getTimezoneOffset();return Math.round((i-s)/6048e5)}},8509:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getFullYear()-a.getFullYear()}},6056:(e,t,n)=>{var r=n(1884),a=n(6656),o=n(3374);e.exports=function(e,t){var n=r(e),i=r(t),s=o(n,i),l=Math.abs(a(n,i));return n.setDate(n.getDate()-s*l),s*(l-(o(n,i)===-s))}},298:(e,t,n)=>{var r=n(8081);e.exports=function(e,t){var n=r(e,t)/36e5;return n>0?Math.floor(n):Math.ceil(n)}},9973:(e,t,n)=>{var r=n(1884),a=n(7051),o=n(3374),i=n(9883);e.exports=function(e,t){var n=r(e),s=r(t),l=o(n,s),c=Math.abs(a(n,s));return n=i(n,l*c),l*(c-(o(n,s)===-l))}},8081:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()-a.getTime()}},604:(e,t,n)=>{var r=n(8081);e.exports=function(e,t){var n=r(e,t)/6e4;return n>0?Math.floor(n):Math.ceil(n)}},1387:(e,t,n)=>{var r=n(1884),a=n(1924),o=n(3374);e.exports=function(e,t){var n=r(e),i=r(t),s=o(n,i),l=Math.abs(a(n,i));return n.setMonth(n.getMonth()-s*l),s*(l-(o(n,i)===-s))}},9403:(e,t,n)=>{var r=n(1387);e.exports=function(e,t){var n=r(e,t)/3;return n>0?Math.floor(n):Math.ceil(n)}},7977:(e,t,n)=>{var r=n(8081);e.exports=function(e,t){var n=r(e,t)/1e3;return n>0?Math.floor(n):Math.ceil(n)}},4496:(e,t,n)=>{var r=n(6056);e.exports=function(e,t){var n=r(e,t)/7;return n>0?Math.floor(n):Math.ceil(n)}},760:(e,t,n)=>{var r=n(1884),a=n(8509),o=n(3374);e.exports=function(e,t){var n=r(e),i=r(t),s=o(n,i),l=Math.abs(a(n,i));return n.setFullYear(n.getFullYear()-s*l),s*(l-(o(n,i)===-s))}},3332:(e,t,n)=>{var r=n(3558),a=n(1884),o=n(7977),i=n(1387),s=n(7479),l=43200;e.exports=function(e,t,n){var c=n||{},d=r(e,t),u=c.locale,p=s.distanceInWords.localize;u&&u.distanceInWords&&u.distanceInWords.localize&&(p=u.distanceInWords.localize);var h,m,g={addSuffix:Boolean(c.addSuffix),comparison:d};d>0?(h=a(e),m=a(t)):(h=a(t),m=a(e));var v,f=o(m,h),b=m.getTimezoneOffset()-h.getTimezoneOffset(),y=Math.round(f/60)-b;if(y<2)return c.includeSeconds?f<5?p("lessThanXSeconds",5,g):f<10?p("lessThanXSeconds",10,g):f<20?p("lessThanXSeconds",20,g):f<40?p("halfAMinute",null,g):p(f<60?"lessThanXMinutes":"xMinutes",1,g):0===y?p("lessThanXMinutes",1,g):p("xMinutes",y,g);if(y<45)return p("xMinutes",y,g);if(y<90)return p("aboutXHours",1,g);if(y<1440)return p("aboutXHours",Math.round(y/60),g);if(y<2520)return p("xDays",1,g);if(y<l)return p("xDays",Math.round(y/1440),g);if(y<86400)return p("aboutXMonths",v=Math.round(y/l),g);if((v=i(m,h))<12)return p("xMonths",Math.round(y/l),g);var w=v%12,S=Math.floor(v/12);return w<3?p("aboutXYears",S,g):w<9?p("overXYears",S,g):p("almostXYears",S+1,g)}},7666:(e,t,n)=>{var r=n(3558),a=n(1884),o=n(7977),i=n(7479),s=525600;e.exports=function(e,t,n){var l=n||{},c=r(e,t),d=l.locale,u=i.distanceInWords.localize;d&&d.distanceInWords&&d.distanceInWords.localize&&(u=d.distanceInWords.localize);var p,h,m,g={addSuffix:Boolean(l.addSuffix),comparison:c};c>0?(p=a(e),h=a(t)):(p=a(t),h=a(e));var v=Math[l.partialMethod?String(l.partialMethod):"floor"],f=o(h,p),b=h.getTimezoneOffset()-p.getTimezoneOffset(),y=v(f/60)-b;if("s"===(m=l.unit?String(l.unit):y<1?"s":y<60?"m":y<1440?"h":y<43200?"d":y<s?"M":"Y"))return u("xSeconds",f,g);if("m"===m)return u("xMinutes",y,g);if("h"===m)return u("xHours",v(y/60),g);if("d"===m)return u("xDays",v(y/1440),g);if("M"===m)return u("xMonths",v(y/43200),g);if("Y"===m)return u("xYears",v(y/s),g);throw new Error("Unknown unit: "+m)}},6272:(e,t,n)=>{var r=n(3332);e.exports=function(e,t){return r(Date.now(),e,t)}},5411:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n){var a=r(e),o=void 0!==n?n:1,i=r(t).getTime();if(a.getTime()>i)throw new Error("The first date cannot be after the second date");var s=[],l=a;for(l.setHours(0,0,0,0);l.getTime()<=i;)s.push(r(l)),l.setDate(l.getDate()+o);return s}},549:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setHours(23,59,59,999),t}},2653:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMinutes(59,59,999),t}},6718:(e,t,n)=>{var r=n(1322);e.exports=function(e){return r(e,{weekStartsOn:1})}},5648:(e,t,n)=>{var r=n(2385),a=n(1971);e.exports=function(e){var t=r(e),n=new Date(0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);var o=a(n);return o.setMilliseconds(o.getMilliseconds()-1),o}},9877:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setSeconds(59,999),t}},9356:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}},5661:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth(),a=n-n%3+3;return t.setMonth(a,0),t.setHours(23,59,59,999),t}},6415:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMilliseconds(999),t}},4404:(e,t,n)=>{var r=n(549);e.exports=function(){return r(new Date)}},7410:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r+1),a.setHours(23,59,59,999),a}},1322:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,a=r(e),o=a.getDay(),i=6+(o<n?-7:0)-(o-n);return a.setDate(a.getDate()+i),a.setHours(23,59,59,999),a}},782:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}},4106:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r-1),a.setHours(23,59,59,999),a}},5616:(e,t,n)=>{var r=n(8612),a=n(6563),o=n(2385),i=n(1884),s=n(623),l=n(7479);var c={M:function(e){return e.getMonth()+1},MM:function(e){return p(e.getMonth()+1,2)},Q:function(e){return Math.ceil((e.getMonth()+1)/3)},D:function(e){return e.getDate()},DD:function(e){return p(e.getDate(),2)},DDD:function(e){return r(e)},DDDD:function(e){return p(r(e),3)},d:function(e){return e.getDay()},E:function(e){return e.getDay()||7},W:function(e){return a(e)},WW:function(e){return p(a(e),2)},YY:function(e){return p(e.getFullYear(),4).substr(2)},YYYY:function(e){return p(e.getFullYear(),4)},GG:function(e){return String(o(e)).substr(2)},GGGG:function(e){return o(e)},H:function(e){return e.getHours()},HH:function(e){return p(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(e){return p(c.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return p(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return p(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return p(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return p(e.getMilliseconds(),3)},Z:function(e){return u(e.getTimezoneOffset(),":")},ZZ:function(e){return u(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()}};function d(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|]$/g,""):e.replace(/\\/g,"")}function u(e,t){t=t||"";var n=e>0?"-":"+",r=Math.abs(e),a=r%60;return n+p(Math.floor(r/60),2)+t+p(a,2)}function p(e,t){for(var n=Math.abs(e).toString();n.length<t;)n="0"+n;return n}e.exports=function(e,t,n){var r=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",a=(n||{}).locale,o=l.format.formatters,u=l.format.formattingTokensRegExp;a&&a.format&&a.format.formatters&&(o=a.format.formatters,a.format.formattingTokensRegExp&&(u=a.format.formattingTokensRegExp));var p=i(e);return s(p)?function(e,t,n){var r,a,o=e.match(n),i=o.length;for(r=0;r<i;r++)a=t[o[r]]||c[o[r]],o[r]=a||d(o[r]);return function(e){for(var t="",n=0;n<i;n++)o[n]instanceof Function?t+=o[n](e,c):t+=o[n];return t}}(r,o,u)(p):"Invalid Date"}},5540:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getDate()}},2476:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getDay()}},8612:(e,t,n)=>{var r=n(1884),a=n(9834),o=n(6656);e.exports=function(e){var t=r(e);return o(t,a(t))+1}},2807:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getFullYear(),a=t.getMonth(),o=new Date(0);return o.setFullYear(n,a+1,0),o.setHours(0,0,0,0),o.getDate()}},4789:(e,t,n)=>{var r=n(1164);e.exports=function(e){return r(e)?366:365}},7921:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getHours()}},6373:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e).getDay();return 0===t&&(t=7),t}},6563:(e,t,n)=>{var r=n(1884),a=n(1971),o=n(3892);e.exports=function(e){var t=r(e),n=a(t).getTime()-o(t).getTime();return Math.round(n/6048e5)+1}},7098:(e,t,n)=>{var r=n(3892),a=n(5932);e.exports=function(e){var t=r(e),n=r(a(t,60)).valueOf()-t.valueOf();return Math.round(n/6048e5)}},2385:(e,t,n)=>{var r=n(1884),a=n(1971);e.exports=function(e){var t=r(e),n=t.getFullYear(),o=new Date(0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);var i=a(o),s=new Date(0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);var l=a(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}},8597:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getMilliseconds()}},3362:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getMinutes()}},3503:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getMonth()}},5541:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n,a){var o=r(e).getTime(),i=r(t).getTime(),s=r(n).getTime(),l=r(a).getTime();if(o>i||s>l)throw new Error("The start of the range cannot be after the end of the range");if(!(o<l&&s<i))return 0;var c=(l>i?i:l)-(s<o?o:s);return Math.ceil(c/864e5)}},21:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return Math.floor(t.getMonth()/3)+1}},8780:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getSeconds()}},2482:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getTime()}},8194:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getFullYear()}},7292:(e,t,n)=>{e.exports={addDays:n(4844),addHours:n(2680),addISOYears:n(7538),addMilliseconds:n(2951),addMinutes:n(1318),addMonths:n(9331),addQuarters:n(1482),addSeconds:n(9723),addWeeks:n(5932),addYears:n(6083),areRangesOverlapping:n(6739),closestIndexTo:n(7886),closestTo:n(3806),compareAsc:n(3374),compareDesc:n(3558),differenceInCalendarDays:n(6656),differenceInCalendarISOWeeks:n(6554),differenceInCalendarISOYears:n(7051),differenceInCalendarMonths:n(1924),differenceInCalendarQuarters:n(9729),differenceInCalendarWeeks:n(9871),differenceInCalendarYears:n(8509),differenceInDays:n(6056),differenceInHours:n(298),differenceInISOYears:n(9973),differenceInMilliseconds:n(8081),differenceInMinutes:n(604),differenceInMonths:n(1387),differenceInQuarters:n(9403),differenceInSeconds:n(7977),differenceInWeeks:n(4496),differenceInYears:n(760),distanceInWords:n(3332),distanceInWordsStrict:n(7666),distanceInWordsToNow:n(6272),eachDay:n(5411),endOfDay:n(549),endOfHour:n(2653),endOfISOWeek:n(6718),endOfISOYear:n(5648),endOfMinute:n(9877),endOfMonth:n(9356),endOfQuarter:n(5661),endOfSecond:n(6415),endOfToday:n(4404),endOfTomorrow:n(7410),endOfWeek:n(1322),endOfYear:n(782),endOfYesterday:n(4106),format:n(5616),getDate:n(5540),getDay:n(2476),getDayOfYear:n(8612),getDaysInMonth:n(2807),getDaysInYear:n(4789),getHours:n(7921),getISODay:n(6373),getISOWeek:n(6563),getISOWeeksInYear:n(7098),getISOYear:n(2385),getMilliseconds:n(8597),getMinutes:n(3362),getMonth:n(3503),getOverlappingDaysInRanges:n(5541),getQuarter:n(21),getSeconds:n(8780),getTime:n(2482),getYear:n(8194),isAfter:n(2849),isBefore:n(7754),isDate:n(4286),isEqual:n(9601),isFirstDayOfMonth:n(1364),isFriday:n(2350),isFuture:n(9593),isLastDayOfMonth:n(4399),isLeapYear:n(1164),isMonday:n(126),isPast:n(798),isSameDay:n(4801),isSameHour:n(3344),isSameISOWeek:n(8029),isSameISOYear:n(7877),isSameMinute:n(4465),isSameMonth:n(248),isSameQuarter:n(5347),isSameSecond:n(1742),isSameWeek:n(4868),isSameYear:n(2130),isSaturday:n(2687),isSunday:n(2978),isThisHour:n(1587),isThisISOWeek:n(657),isThisISOYear:n(6106),isThisMinute:n(7980),isThisMonth:n(2767),isThisQuarter:n(1687),isThisSecond:n(7391),isThisWeek:n(147),isThisYear:n(576),isThursday:n(7999),isToday:n(5886),isTomorrow:n(7962),isTuesday:n(6330),isValid:n(623),isWednesday:n(5999),isWeekend:n(7455),isWithinRange:n(6254),isYesterday:n(9099),lastDayOfISOWeek:n(1944),lastDayOfISOYear:n(9312),lastDayOfMonth:n(4949),lastDayOfQuarter:n(3146),lastDayOfWeek:n(106),lastDayOfYear:n(2674),max:n(1489),min:n(3185),parse:n(1884),setDate:n(6130),setDay:n(1110),setDayOfYear:n(1418),setHours:n(6574),setISODay:n(8212),setISOWeek:n(570),setISOYear:n(1138),setMilliseconds:n(3934),setMinutes:n(4809),setMonth:n(6059),setQuarter:n(4059),setSeconds:n(1670),setYear:n(3821),startOfDay:n(6579),startOfHour:n(555),startOfISOWeek:n(1971),startOfISOYear:n(3892),startOfMinute:n(5580),startOfMonth:n(5130),startOfQuarter:n(9309),startOfSecond:n(9966),startOfToday:n(9978),startOfTomorrow:n(7743),startOfWeek:n(5344),startOfYear:n(9834),startOfYesterday:n(6441),subDays:n(5627),subHours:n(7413),subISOYears:n(9883),subMilliseconds:n(8502),subMinutes:n(3350),subMonths:n(1141),subQuarters:n(6607),subSeconds:n(9256),subWeeks:n(9862),subYears:n(8524)}},2849:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()>a.getTime()}},7754:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()<a.getTime()}},4286:e=>{e.exports=function(e){return e instanceof Date}},9601:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},1364:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 1===r(e).getDate()}},2350:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 5===r(e).getDay()}},9593:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getTime()>(new Date).getTime()}},4399:(e,t,n)=>{var r=n(1884),a=n(549),o=n(9356);e.exports=function(e){var t=r(e);return a(t).getTime()===o(t).getTime()}},1164:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e).getFullYear();return t%400==0||t%4==0&&t%100!=0}},126:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 1===r(e).getDay()}},798:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getTime()<(new Date).getTime()}},4801:(e,t,n)=>{var r=n(6579);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},3344:(e,t,n)=>{var r=n(555);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},8029:(e,t,n)=>{var r=n(4868);e.exports=function(e,t){return r(e,t,{weekStartsOn:1})}},7877:(e,t,n)=>{var r=n(3892);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},4465:(e,t,n)=>{var r=n(5580);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},248:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}},5347:(e,t,n)=>{var r=n(9309);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},1742:(e,t,n)=>{var r=n(9966);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},4868:(e,t,n)=>{var r=n(5344);e.exports=function(e,t,n){var a=r(e,n),o=r(t,n);return a.getTime()===o.getTime()}},2130:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getFullYear()===a.getFullYear()}},2687:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 6===r(e).getDay()}},2978:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 0===r(e).getDay()}},1587:(e,t,n)=>{var r=n(3344);e.exports=function(e){return r(new Date,e)}},657:(e,t,n)=>{var r=n(8029);e.exports=function(e){return r(new Date,e)}},6106:(e,t,n)=>{var r=n(7877);e.exports=function(e){return r(new Date,e)}},7980:(e,t,n)=>{var r=n(4465);e.exports=function(e){return r(new Date,e)}},2767:(e,t,n)=>{var r=n(248);e.exports=function(e){return r(new Date,e)}},1687:(e,t,n)=>{var r=n(5347);e.exports=function(e){return r(new Date,e)}},7391:(e,t,n)=>{var r=n(1742);e.exports=function(e){return r(new Date,e)}},147:(e,t,n)=>{var r=n(4868);e.exports=function(e,t){return r(new Date,e,t)}},576:(e,t,n)=>{var r=n(2130);e.exports=function(e){return r(new Date,e)}},7999:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 4===r(e).getDay()}},5886:(e,t,n)=>{var r=n(6579);e.exports=function(e){return r(e).getTime()===r(new Date).getTime()}},7962:(e,t,n)=>{var r=n(6579);e.exports=function(e){var t=new Date;return t.setDate(t.getDate()+1),r(e).getTime()===r(t).getTime()}},6330:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 2===r(e).getDay()}},623:(e,t,n)=>{var r=n(4286);e.exports=function(e){if(r(e))return!isNaN(e);throw new TypeError(toString.call(e)+" is not an instance of Date")}},5999:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 3===r(e).getDay()}},7455:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e).getDay();return 0===t||6===t}},6254:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n){var a=r(e).getTime(),o=r(t).getTime(),i=r(n).getTime();if(o>i)throw new Error("The start of the range cannot be after the end of the range");return a>=o&&a<=i}},9099:(e,t,n)=>{var r=n(6579);e.exports=function(e){var t=new Date;return t.setDate(t.getDate()-1),r(e).getTime()===r(t).getTime()}},1944:(e,t,n)=>{var r=n(106);e.exports=function(e){return r(e,{weekStartsOn:1})}},9312:(e,t,n)=>{var r=n(2385),a=n(1971);e.exports=function(e){var t=r(e),n=new Date(0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);var o=a(n);return o.setDate(o.getDate()-1),o}},4949:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}},3146:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth(),a=n-n%3+3;return t.setMonth(a,0),t.setHours(0,0,0,0),t}},106:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,a=r(e),o=a.getDay(),i=6+(o<n?-7:0)-(o-n);return a.setHours(0,0,0,0),a.setDate(a.getDate()+i),a}},2674:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(0,0,0,0),t}},8854:e=>{var t=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];e.exports=function(e){var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push(r);var a=t.concat(n).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+a.join("|")+"|.)","g")}},2894:e=>{e.exports=function(){var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};return{localize:function(t,n,r){var a;return r=r||{},a="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),r.addSuffix?r.comparison>0?"in "+a:a+" ago":a}}}},664:(e,t,n)=>{var r=n(8854);e.exports=function(){var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Su","Mo","Tu","We","Th","Fr","Sa"],a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=["AM","PM"],s=["am","pm"],l=["a.m.","p.m."],c={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return a[e.getDay()]},dddd:function(e){return o[e.getDay()]},A:function(e){return e.getHours()/12>=1?i[1]:i[0]},a:function(e){return e.getHours()/12>=1?s[1]:s[0]},aa:function(e){return e.getHours()/12>=1?l[1]:l[0]}};return["M","D","DDD","d","Q","W"].forEach((function(e){c[e+"o"]=function(t,n){return function(e){var t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"}(n[e](t))}})),{formatters:c,formattingTokensRegExp:r(c)}}},7479:(e,t,n)=>{var r=n(2894),a=n(664);e.exports={distanceInWords:r(),format:a()}},1489:(e,t,n)=>{var r=n(1884);e.exports=function(){var e=Array.prototype.slice.call(arguments).map((function(e){return r(e)})),t=Math.max.apply(null,e);return new Date(t)}},3185:(e,t,n)=>{var r=n(1884);e.exports=function(){var e=Array.prototype.slice.call(arguments).map((function(e){return r(e)})),t=Math.min.apply(null,e);return new Date(t)}},1884:(e,t,n)=>{var r=n(3561),a=n(4286),o=36e5,i=6e4,s=/[T ]/,l=/:/,c=/^(\d{2})$/,d=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],u=/^(\d{4})/,p=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],h=/^-(\d{2})$/,m=/^-?(\d{3})$/,g=/^-?(\d{2})-?(\d{2})$/,v=/^-?W(\d{2})$/,f=/^-?W(\d{2})-?(\d{1})$/,b=/^(\d{2}([.,]\d*)?)$/,y=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,w=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,S=/([Z+-].*)$/,C=/^(Z)$/,k=/^([+-])(\d{2})$/,x=/^([+-])(\d{2}):?(\d{2})$/;function I(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var a=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+a),r}e.exports=function(e,t){if(a(e))return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var n=(t||{}).additionalDigits;n=null==n?2:Number(n);var O=function(e){var t,n={},r=e.split(s);l.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1]);if(t){var a=S.exec(t);a?(n.time=t.replace(a[1],""),n.timezone=a[1]):n.time=t}return n}(e),M=function(e,t){var n,r=d[t],a=p[t];if(n=u.exec(e)||a.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=c.exec(e)||r.exec(e)){var i=n[1];return{year:100*parseInt(i,10),restDateString:e.slice(i.length)}}return{year:null}}(O.date,n),T=M.year,F=function(e,t){if(null===t)return null;var n,r,a;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=h.exec(e))return r=new Date(0),a=parseInt(n[1],10)-1,r.setUTCFullYear(t,a),r;if(n=m.exec(e)){r=new Date(0);var o=parseInt(n[1],10);return r.setUTCFullYear(t,0,o),r}if(n=g.exec(e)){r=new Date(0),a=parseInt(n[1],10)-1;var i=parseInt(n[2],10);return r.setUTCFullYear(t,a,i),r}if(n=v.exec(e))return I(t,parseInt(n[1],10)-1);if(n=f.exec(e)){return I(t,parseInt(n[1],10)-1,parseInt(n[2],10)-1)}return null}(M.restDateString,T);if(F){var j,_=F.getTime(),L=0;if(O.time&&(L=function(e){var t,n,r;if(t=b.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*o;if(t=y.exec(e))return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),n%24*o+r*i;if(t=w.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var a=parseFloat(t[3].replace(",","."));return n%24*o+r*i+1e3*a}return null}(O.time)),O.timezone)j=function(e){var t,n;if(t=C.exec(e))return 0;if(t=k.exec(e))return n=60*parseInt(t[2],10),"+"===t[1]?-n:n;if(t=x.exec(e))return n=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-n:n;return 0}(O.timezone)*i;else{var D=_+L,A=new Date(D);j=r(A);var E=new Date(D);E.setDate(A.getDate()+1);var H=r(E)-r(A);H>0&&(j+=H)}return new Date(_+L+j)}return new Date(e)}},6130:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setDate(a),n}},1110:(e,t,n)=>{var r=n(1884),a=n(4844);e.exports=function(e,t,n){var o=n&&Number(n.weekStartsOn)||0,i=r(e),s=Number(t),l=i.getDay();return a(i,((s%7+7)%7<o?7:0)+s-l)}},1418:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setMonth(0),n.setDate(a),n}},6574:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setHours(a),n}},8212:(e,t,n)=>{var r=n(1884),a=n(4844),o=n(6373);e.exports=function(e,t){var n=r(e),i=Number(t),s=o(n);return a(n,i-s)}},570:(e,t,n)=>{var r=n(1884),a=n(6563);e.exports=function(e,t){var n=r(e),o=Number(t),i=a(n)-o;return n.setDate(n.getDate()-7*i),n}},1138:(e,t,n)=>{var r=n(1884),a=n(3892),o=n(6656);e.exports=function(e,t){var n=r(e),i=Number(t),s=o(n,a(n)),l=new Date(0);return l.setFullYear(i,0,4),l.setHours(0,0,0,0),(n=a(l)).setDate(n.getDate()+s),n}},3934:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setMilliseconds(a),n}},4809:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setMinutes(a),n}},6059:(e,t,n)=>{var r=n(1884),a=n(2807);e.exports=function(e,t){var n=r(e),o=Number(t),i=n.getFullYear(),s=n.getDate(),l=new Date(0);l.setFullYear(i,o,15),l.setHours(0,0,0,0);var c=a(l);return n.setMonth(o,Math.min(s,c)),n}},4059:(e,t,n)=>{var r=n(1884),a=n(6059);e.exports=function(e,t){var n=r(e),o=Number(t)-(Math.floor(n.getMonth()/3)+1);return a(n,n.getMonth()+3*o)}},1670:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setSeconds(a),n}},3821:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setFullYear(a),n}},6579:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setHours(0,0,0,0),t}},555:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMinutes(0,0,0),t}},1971:(e,t,n)=>{var r=n(5344);e.exports=function(e){return r(e,{weekStartsOn:1})}},3892:(e,t,n)=>{var r=n(2385),a=n(1971);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),a(n)}},5580:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setSeconds(0,0),t}},5130:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setDate(1),t.setHours(0,0,0,0),t}},9309:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth(),a=n-n%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}},9966:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMilliseconds(0),t}},9978:(e,t,n)=>{var r=n(6579);e.exports=function(){return r(new Date)}},7743:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r+1),a.setHours(0,0,0,0),a}},5344:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,a=r(e),o=a.getDay(),i=(o<n?7:0)+o-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}},9834:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}},6441:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r-1),a.setHours(0,0,0,0),a}},5627:(e,t,n)=>{var r=n(4844);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},7413:(e,t,n)=>{var r=n(2680);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},9883:(e,t,n)=>{var r=n(7538);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},8502:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},3350:(e,t,n)=>{var r=n(1318);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},1141:(e,t,n)=>{var r=n(9331);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},6607:(e,t,n)=>{var r=n(1482);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},9256:(e,t,n)=>{var r=n(9723);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},9862:(e,t,n)=>{var r=n(5932);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},8524:(e,t,n)=>{var r=n(6083);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},5202:function(){!function(){"use strict";function e(e){var t=!0,n=!1,r=null,a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function o(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function i(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!a[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function l(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}function c(n){n.metaKey||n.altKey||n.ctrlKey||(o(e.activeElement)&&s(e.activeElement),t=!0)}function d(e){t=!1}function u(e){o(e.target)&&(t||i(e.target))&&s(e.target)}function p(e){o(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(r),r=window.setTimeout((function(){n=!1}),100),l(e.target))}function h(e){"hidden"===document.visibilityState&&(n&&(t=!0),m())}function m(){document.addEventListener("mousemove",v),document.addEventListener("mousedown",v),document.addEventListener("mouseup",v),document.addEventListener("pointermove",v),document.addEventListener("pointerdown",v),document.addEventListener("pointerup",v),document.addEventListener("touchmove",v),document.addEventListener("touchstart",v),document.addEventListener("touchend",v)}function g(){document.removeEventListener("mousemove",v),document.removeEventListener("mousedown",v),document.removeEventListener("mouseup",v),document.removeEventListener("pointermove",v),document.removeEventListener("pointerdown",v),document.removeEventListener("pointerup",v),document.removeEventListener("touchmove",v),document.removeEventListener("touchstart",v),document.removeEventListener("touchend",v)}function v(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,g())}document.addEventListener("keydown",c,!0),document.addEventListener("mousedown",d,!0),document.addEventListener("pointerdown",d,!0),document.addEventListener("touchstart",d,!0),document.addEventListener("visibilitychange",h,!0),m(),e.addEventListener("focus",u,!0),e.addEventListener("blur",p,!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}()},6400:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Component:()=>w,Fragment:()=>y,_unmount:()=>A,cloneElement:()=>R,createContext:()=>V,createElement:()=>v,createRef:()=>b,h:()=>v,hydrate:()=>P,isValidElement:()=>a,options:()=>r,render:()=>H,toChildArray:()=>O});var r,a,o,i,s,l,c,d,u={},p=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function m(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var r,a=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(a[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return f(e,o,t&&t.key,t&&t.ref,null)}function f(e,t,n,a,o){var i={type:e,props:t,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o};return null==o&&(i.__v=i),r.vnode&&r.vnode(i),i}function b(){return{}}function y(e){return e.children}function w(e,t){this.props=e,this.context=t}function S(e,t){if(null==t)return e.__?S(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?S(e):null}function C(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return C(e)}}function k(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!i++||l!==r.debounceRendering)&&((l=r.debounceRendering)||s)(x)}function x(){for(var e;i=o.length;)e=o.sort((function(e,t){return e.__v.__b-t.__v.__b})),o=[],e.some((function(e){var t,n,r,a,o,i,s;e.__d&&(i=(o=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=m({},o)).__v=r,a=j(s,o,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==i?S(o):i),_(n,o),a!=i&&C(o)))}))}function I(e,t,n,r,a,o,i,s,l){var c,d,h,m,v,f,b,y=n&&n.__k||p,w=y.length;if(s==u&&(s=null!=o?o[0]:w?S(n,0):null),c=0,t.__k=O(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(h=y[c])||h&&n.key==h.key&&n.type===h.type)y[c]=void 0;else for(d=0;d<w;d++){if((h=y[d])&&n.key==h.key&&n.type===h.type){y[d]=void 0;break}h=null}if(m=j(e,n,h=h||u,r,a,o,i,s,l),(d=n.ref)&&h.ref!=d&&(b||(b=[]),h.ref&&b.push(h.ref,null,n),b.push(d,n.__c||m,n)),null!=m){var p;if(null==f&&(f=m),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(o==h||m!=s||null==m.parentNode){e:if(null==s||s.parentNode!==e)e.appendChild(m),p=null;else{for(v=s,d=0;(v=v.nextSibling)&&d<w;d+=2)if(v==m)break e;e.insertBefore(m,s),p=s}"option"==t.type&&(e.value="")}s=void 0!==p?p:m.nextSibling,"function"==typeof t.type&&(t.__d=s)}else s&&h.__e==s&&s.parentNode!=e&&(s=S(h))}return c++,n})),t.__e=f,null!=o&&"function"!=typeof t.type)for(c=o.length;c--;)null!=o[c]&&g(o[c]);for(c=w;c--;)null!=y[c]&&A(y[c],y[c]);if(b)for(c=0;c<b.length;c++)D(b[c],b[++c],b[++c])}function O(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)O(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?f(null,e,null,null,e):null!=e.__e||null!=e.__c?f(e.type,e.props,e.key,null,e.__v):e):e);return n}function M(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===h.test(t)?n+"px":null==n?"":n}function T(e,t,n,r,a){var o,i,s,l,c;if(a?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(l in r)n&&l in n||M(o,l,"");if(n)for(c in n)r&&n[c]===r[c]||M(o,c,n[c])}else"o"===t[0]&&"n"===t[1]?(i=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,F,i),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,F,i)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!a&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function F(e){this.l[e.type](r.event?r.event(e):e)}function j(e,t,n,a,o,i,s,l,c){var d,u,p,h,g,v,f,b,S,C,k=t.type;if(void 0!==t.constructor)return null;(d=r.__b)&&d(t);try{e:if("function"==typeof k){if(b=t.props,S=(d=k.contextType)&&a[d.__c],C=d?S?S.props.value:d.__:a,n.__c?f=(u=t.__c=n.__c).__=u.__E:("prototype"in k&&k.prototype.render?t.__c=u=new k(b,C):(t.__c=u=new w(b,C),u.constructor=k,u.render=E),S&&S.sub(u),u.props=b,u.state||(u.state={}),u.context=C,u.__n=a,p=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=k.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=m({},u.__s)),m(u.__s,k.getDerivedStateFromProps(b,u.__s))),h=u.props,g=u.state,p)null==k.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==k.getDerivedStateFromProps&&b!==h&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(b,C),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(b,u.__s,C)||t.__v===n.__v&&!u.__){for(u.props=b,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,u.__h.length&&s.push(u),d=0;d<t.__k.length;d++)t.__k[d]&&(t.__k[d].__=t);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(b,u.__s,C),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(h,g,v)}))}u.context=C,u.props=b,u.state=u.__s,(d=r.__r)&&d(t),u.__d=!1,u.__v=t,u.__P=e,d=u.render(u.props,u.state,u.context),t.__k=null!=d&&d.type==y&&null==d.key?d.props.children:Array.isArray(d)?d:[d],null!=u.getChildContext&&(a=m(m({},a),u.getChildContext())),p||null==u.getSnapshotBeforeUpdate||(v=u.getSnapshotBeforeUpdate(h,g)),I(e,t,n,a,o,i,s,l,c),u.base=t.__e,u.__h.length&&s.push(u),f&&(u.__E=u.__=null),u.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,a,o,i,s,c);(d=r.diffed)&&d(t)}catch(e){t.__v=null,r.__e(e,t,n)}return t.__e}function _(e,t){r.__c&&r.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){r.__e(e,t.__v)}}))}function L(e,t,n,r,a,o,i,s){var l,c,d,h,m,g=n.props,v=t.props;if(a="svg"===t.type||a,null!=o)for(l=0;l<o.length;l++)if(null!=(c=o[l])&&((null===t.type?3===c.nodeType:c.localName===t.type)||e==c)){e=c,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(v);e=a?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,v.is&&{is:v.is}),o=null,s=!1}if(null===t.type)g!==v&&e.data!=v&&(e.data=v);else{if(null!=o&&(o=p.slice.call(e.childNodes)),d=(g=n.props||u).dangerouslySetInnerHTML,h=v.dangerouslySetInnerHTML,!s){if(g===u)for(g={},m=0;m<e.attributes.length;m++)g[e.attributes[m].name]=e.attributes[m].value;(h||d)&&(h&&d&&h.__html==d.__html||(e.innerHTML=h&&h.__html||""))}(function(e,t,n,r,a){var o;for(o in n)"children"===o||"key"===o||o in t||T(e,o,null,n[o],r);for(o in t)a&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||T(e,o,t[o],n[o],r)})(e,v,g,a,s),h?t.__k=[]:(t.__k=t.props.children,I(e,t,n,r,"foreignObject"!==t.type&&a,o,i,u,s)),s||("value"in v&&void 0!==(l=v.value)&&l!==e.value&&T(e,"value",l,g.value,!1),"checked"in v&&void 0!==(l=v.checked)&&l!==e.checked&&T(e,"checked",l,g.checked,!1))}return e}function D(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){r.__e(e,n)}}function A(e,t,n){var a,o,i;if(r.unmount&&r.unmount(e),(a=e.ref)&&(a.current&&a.current!==e.__e||D(a,null,t)),n||"function"==typeof e.type||(n=null!=(o=e.__e)),e.__e=e.__d=void 0,null!=(a=e.__c)){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(e){r.__e(e,t)}a.base=a.__P=null}if(a=e.__k)for(i=0;i<a.length;i++)a[i]&&A(a[i],t,n);null!=o&&g(o)}function E(e,t,n){return this.constructor(e,n)}function H(e,t,n){var a,o,i;r.__&&r.__(e,t),o=(a=n===c)?null:n&&n.__k||t.__k,e=v(y,null,[e]),i=[],j(t,(a?t:n||t).__k=e,o||u,u,void 0!==t.ownerSVGElement,n&&!a?[n]:o?null:p.slice.call(t.childNodes),i,n||u,a),_(i,e)}function P(e,t){H(e,t,c)}function R(e,t){var n,r;for(r in t=m(m({},e.props),t),arguments.length>2&&(t.children=p.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return f(e.type,n,t.key||e.key,t.ref||e.ref,null)}function V(e){var t={},n={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,a=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=a,t},this.shouldComponentUpdate=function(e){a.props.value!==e.value&&r.some((function(t){t.context=e.value,k(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}r={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return k(n.__E=n)}catch(t){e=t}throw e}},a=function(e){return null!=e&&void 0===e.constructor},w.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),k(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},w.prototype.render=y,o=[],i=0,s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=u,d=0},4798:e=>{"use strict";var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.apply(this,arguments)};e.exports=function(e,n){void 0===e&&(e={}),void 0===n&&(n=null);var r=e||{},a=[];function o(){a.forEach((function(e){return e(r)}))}return{middleware:n,setState:function(e){r=t({},r,"function"==typeof e?e(r):e),o()},subscribe:function(e){return a.push(e),function(){a.splice(a.indexOf(e),1)}},getState:function(){return r},reset:function(){r=e,o()}}}},1042:(e,t)=>{"use strict";function n(e,t){if(null!=t){if(t.then)return t.then(e.setState);e.setState(t)}}t.m=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reverse(),function(t,r,a){if(e.length<1)return n(t,r.apply(void 0,[t.getState()].concat(a)));var o=e.map((function(e){return e(t)})).reduce((function(e,t){return t(e,a)}),function(e,t){return function(r){return n(e,r.apply(void 0,[e.getState()].concat(t)))}}(t,a));return o(r)}}},5576:(e,t,n)=>{"use strict";var r=n(6400),a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},a(e,t)};function o(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},i.apply(this,arguments)};function s(e,t){for(var n in e)if(e[n]!==t[n])return!1;for(var n in t)if(!(n in e))return!1;return!0}function l(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return"function"==typeof t.middleware?t.middleware(t,e,n):function(e,t){if(null!=t){if(t.then)return t.then(e.setState);e.setState(t)}}(t,e.apply(void 0,[t.getState()].concat(n)))}}var c=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.update=function(){var e=r.getProps(r.props,r.context);s(e,r.state)||r.setState(e)},r.state=r.getProps(t,n),r.actions=r.getActions(),r}return o(t,e),t.prototype.componentWillMount=function(){this.unsubscribe=this.context.store.subscribe(this.update)},t.prototype.componentWillUnmount=function(){this.unsubscribe(this.update)},t.prototype.componentWillReceiveProps=function(e,t){var n=this.getProps(e,t);s(n,this.state)||this.setState(n)},t.prototype.getProps=function(e,t){var n=e.mapToProps,r=t.store&&t.store.getState()||{};return n?n(r,e):r},t.prototype.getActions=function(){return function(e,t,n){e="function"==typeof e?e(t,n):e;var r={};for(var a in e){var o=e[a];r[a]=l(o,t)}return r}(this.props.actions,this.context.store,this.props)},t.prototype.render=function(e,t,n){var r=e.children,a=n.store;return(r&&r[0]||r)(i({store:a},t,this.actions))},t}(r.Component),d=c;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getChildContext=function(){return{store:this.props.store}},t.prototype.render=function(){return this.props.children&&this.props.children[0]||this.props.children},t}(r.Component);t.zt=u,t.lj=c},7867:(e,t)=>{"use strict";function n(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return"function"==typeof t.middleware?t.middleware(t,e,n):function(e,t){if(null!=t){if(t.then)return t.then(e.setState);e.setState(t)}}(t,e.apply(void 0,[t.getState()].concat(n)))}}var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},r.apply(this,arguments)};t.kv=function(e,t,r){e="function"==typeof e?e(t,r):e;var a={};for(var o in e){var i=e[o];a[o]=n(i,t)}return a},t.Y2=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.reduce((function(e,n){return r({},e,"function"==typeof n?n.apply(void 0,t):n)}),{})}}},5877:(e,t,n)=>{var r=n(3570),a=n(1171),o=a;o.v1=r,o.v4=a,e.exports=o},5327:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,a=t;return[a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]]].join("")}},5217:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},3570:(e,t,n)=>{var r,a,o=n(5217),i=n(5327),s=0,l=0;e.exports=function(e,t,n){var c=t&&n||0,d=t||[],u=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:a;if(null==u||null==p){var h=o();null==u&&(u=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=a=16383&(h[6]<<8|h[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:l+1,v=m-s+(g-l)/1e4;if(v<0&&void 0===e.clockseq&&(p=p+1&16383),(v<0||m>s)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=m,l=g,a=p;var f=(1e4*(268435455&(m+=122192928e5))+g)%4294967296;d[c++]=f>>>24&255,d[c++]=f>>>16&255,d[c++]=f>>>8&255,d[c++]=255&f;var b=m/4294967296*1e4&268435455;d[c++]=b>>>8&255,d[c++]=255&b,d[c++]=b>>>24&15|16,d[c++]=b>>>16&255,d[c++]=p>>>8|128,d[c++]=255&p;for(var y=0;y<6;++y)d[c+y]=u[y];return t||i(d)}},1171:(e,t,n)=>{var r=n(5217),a=n(5327);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||r)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var s=0;s<16;++s)t[o+s]=i[s];return t||a(i)}},1295:e=>{"use strict";let t=0;e.exports={incr:()=>++t,decr:()=>--t,curr:()=>t}},6756:e=>{"use strict";e.exports=(e,t,n="")=>{const r=/url\(['"]?#([\w:.-]+)['"]?\)/g,a=/#([\w:.-]+)/g;return t.match(r)&&(t=t.replace(r,(function(t,n){return e[n]?`url(#${e[n]})`:t}))),["href","xlink:href"].includes(n)&&t.match(a)&&(t=t.replace(a,(function(t,n){return e[n]?`#${e[n]}`:t}))),t}},3054:e=>{"use strict";e.exports=(e,t,n)=>{const r=new RegExp("([^\r\n,{}]+)(,(?=[^}]*{)|s*{)","g");return e=e.replace(r,(function(e,r,a){if(r.match(/^\s*(@media|@.*keyframes|to|from|@font-face|1?[0-9]?[0-9])/))return r+a;const o=r.match(/#(\w+)/);return o&&n[o[1]]&&(r=r.replace(o[0],`#${n[o[1]]}`)),(r=r.replace(/^(\s*)/,"$1"+t+" "))+a}))}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{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.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.d(r,{default:()=>Td});n(1181);var e,t,a,o=n(6400),i=(n(5202),0),s=[],l=o.options.__r,c=o.options.diffed,d=o.options.__c,u=o.options.unmount;function p(e,n){o.options.__h&&o.options.__h(t,e,i||n),i=0;var r=t.__H||(t.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function h(e){return i=1,m(I,e)}function m(n,r,a){var o=p(e++,2);return o.__c||(o.__c=t,o.__=[a?a(r):I(void 0,r),function(e){var t=n(o.__[0],e);o.__[0]!==t&&(o.__[0]=t,o.__c.setState({}))}]),o.__}function g(n,r){var a=p(e++,3);!o.options.__s&&x(a.__H,r)&&(a.__=n,a.__H=r,t.__H.__h.push(a))}function v(n,r){var a=p(e++,4);!o.options.__s&&x(a.__H,r)&&(a.__=n,a.__H=r,t.__h.push(a))}function f(e){return i=5,y((function(){return{current:e}}),[])}function b(e,t,n){i=6,v((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function y(t,n){var r=p(e++,7);return x(r.__H,n)?(r.__H=n,r.__h=t,r.__=t()):r.__}function w(n){var r=t.context[n.__c],a=p(e++,9);return a.__c=n,r?(null==a.__&&(a.__=!0,r.sub(t)),r.props.value):n.__}function S(){s.some((function(e){if(e.__P)try{e.__H.__h.forEach(C),e.__H.__h.forEach(k),e.__H.__h=[]}catch(t){return e.__H.__h=[],o.options.__e(t,e.__v),!0}})),s=[]}function C(e){e.t&&e.t()}function k(e){var t=e.__();"function"==typeof t&&(e.t=t)}function x(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function I(e,t){return"function"==typeof t?t(e):t}function O(e,t){for(var n in t)e[n]=t[n];return e}function M(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}o.options.__r=function(n){l&&l(n),e=0,(t=n.__c).__H&&(t.__H.__h.forEach(C),t.__H.__h.forEach(k),t.__H.__h=[])},o.options.diffed=function(e){c&&c(e);var t=e.__c;if(t){var n=t.__H;n&&n.__h.length&&(1!==s.push(t)&&a===o.options.requestAnimationFrame||((a=o.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(S))}},o.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(C),e.__h=e.__h.filter((function(e){return!e.__||k(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],o.options.__e(n,e.__v)}})),d&&d(e,t)},o.options.unmount=function(e){u&&u(e);var t=e.__c;if(t){var n=t.__H;if(n)try{n.__.forEach((function(e){return e.t&&e.t()}))}catch(e){o.options.__e(e,t.__v)}}};var T=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return M(this.props,e)||M(this.state,t)},r}(o.Component);function F(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:M(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,o.createElement)(e,O({},t))}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(e.displayName||e.name)+")",r.t=!0,r}var j=o.options.__b;o.options.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),j&&j(e)};var _=function(e,t){return e?(0,o.toChildArray)(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},L={map:_,forEach:_,count:function(e){return e?(0,o.toChildArray)(e).length:0},only:function(e){if(1!==(e=(0,o.toChildArray)(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:o.toChildArray},D=o.options.__e;function A(e){return e&&((e=O({},e)).__c=null,e.__k=e.__k&&e.__k.map(A)),e}function E(){this.__u=0,this.o=null,this.__b=null}function H(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function P(){this.i=null,this.l=null}o.options.__e=function(e,t,n){if(e.then)for(var r,a=t;a=a.__;)if((r=a.__c)&&r.__c)return r.__c(e,t.__c);D(e,t,n)},(E.prototype=new o.Component).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=H(n.__v),a=!1,o=function(){a||(a=!0,r?r(i):i())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){o(),t.__c&&t.__c()};var i=function(){var e;if(! --n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(o,o)},E.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=A(this.__b),this.__b=null),[(0,o.createElement)(o.Component,null,t.u?null:e.children),t.u&&e.fallback]};var R=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(P.prototype=new o.Component).u=function(e){var t=this,n=H(t.__v),r=t.l.get(e);return r[0]++,function(a){var o=function(){t.props.revealOrder?(r.push(a),R(t,e,r)):a()};n?n(o):o()}},P.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,o.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},P.prototype.componentDidUpdate=P.prototype.componentDidMount=function(){var e=this;e.l.forEach((function(t,n){R(e,n,t)}))};var V=function(){function e(){}var t=e.prototype;return t.getChildContext=function(){return this.props.context},t.render=function(e){return e.children},e}();function $(e){var t=this,n=e.container,r=(0,o.createElement)(V,{context:t.context},e.vnode);return t.s&&t.s!==n&&(t.v.parentNode&&t.s.removeChild(t.v),(0,o._unmount)(t.h),t.p=!1),e.vnode?t.p?(n.__k=t.__k,(0,o.render)(r,n),t.__k=n.__k):(t.v=document.createTextNode(""),(0,o.hydrate)("",n),n.appendChild(t.v),t.p=!0,t.s=n,(0,o.render)(r,n,t.v),t.__k=t.v.__k):t.p&&(t.v.parentNode&&t.s.removeChild(t.v),(0,o._unmount)(t.h)),t.h=r,t.componentWillUnmount=function(){t.v.parentNode&&t.s.removeChild(t.v),(0,o._unmount)(t.h)},null}var z=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;o.Component.prototype.isReactComponent={};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function U(e,t,n){if(null==t.__k)for(;t.firstChild;)t.removeChild(t.firstChild);return(0,o.render)(e,t),"function"==typeof n&&n(),e?e.__c:null}var B=o.options.event;function W(e,t){e["UNSAFE_"+t]&&!e[t]&&Object.defineProperty(e,t,{configurable:!1,get:function(){return this["UNSAFE_"+t]},set:function(e){this["UNSAFE_"+t]=e}})}o.options.event=function(e){B&&(e=B(e)),e.persist=function(){};var t=!1,n=!1,r=e.stopPropagation;e.stopPropagation=function(){r.call(e),t=!0};var a=e.preventDefault;return e.preventDefault=function(){a.call(e),n=!0},e.isPropagationStopped=function(){return t},e.isDefaultPrevented=function(){return n},e.nativeEvent=e};var q={configurable:!0,get:function(){return this.class}},Y=o.options.vnode;o.options.vnode=function(e){e.$$typeof=N;var t=e.type,n=e.props;if(t){if(n.class!=n.className&&(q.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",q)),"function"!=typeof t){var r,a,i;for(i in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===t&&((0,o.toChildArray)(n.children).forEach((function(e){-1!=n.value.indexOf(e.props.value)&&(e.props.selected=!0)})),delete n.value),n)if(r=z.test(i))break;if(r)for(i in a=e.props={},n)a[z.test(i)?i.replace(/[A-Z0-9]/,"-$&").toLowerCase():i]=n[i]}!function(t){var n=e.type,r=e.props;if(r&&"string"==typeof n){var a={};for(var o in r)/^on(Ani|Tra|Tou)/.test(o)&&(r[o.toLowerCase()]=r[o],delete r[o]),a[o.toLowerCase()]=o;if(a.ondoubleclick&&(r.ondblclick=r[a.ondoubleclick],delete r[a.ondoubleclick]),a.onbeforeinput&&(r.onbeforeinput=r[a.onbeforeinput],delete r[a.onbeforeinput]),a.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(r.type))){var i=a.oninput||"oninput";r[i]||(r[i]=r[a.onchange],delete r[a.onchange])}}}(),"function"==typeof t&&!t.m&&t.prototype&&(W(t.prototype,"componentWillMount"),W(t.prototype,"componentWillReceiveProps"),W(t.prototype,"componentWillUpdate"),t.m=!0)}Y&&Y(e)};function Z(e){return!!e&&e.$$typeof===N}const K={useState:h,useReducer:m,useEffect:g,useLayoutEffect:v,useRef:f,useImperativeHandle:b,useMemo:y,useCallback:function(e,t){return i=8,y((function(){return e}),t)},useContext:w,useDebugValue:function(e,t){o.options.useDebugValue&&o.options.useDebugValue(t?t(e):e)},version:"16.8.0",Children:L,render:U,hydrate:U,unmountComponentAtNode:function(e){return!!e.__k&&((0,o.render)(null,e),!0)},createPortal:function(e,t){return(0,o.createElement)($,{vnode:e,container:t})},createElement:o.createElement,createContext:o.createContext,createFactory:function(e){return o.createElement.bind(null,e)},cloneElement:function(e){return Z(e)?o.cloneElement.apply(null,arguments):e},createRef:o.createRef,Fragment:o.Fragment,isValidElement:Z,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:o.Component,PureComponent:T,memo:F,forwardRef:function(e){function t(t){var n=O({},t);return delete n.ref,e(n,t.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},unstable_batchedUpdates:function(e,t){return e(t)},Suspense:E,SuspenseList:P,lazy:function(e){var t,n,r;function a(a){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,o.createElement)(n,a)}return a.displayName="Lazy",a.t=!0,a}};var G=n(7867),X=n(5877);const Q=()=>({updateTotalCardCount:(e,t,n)=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{lastModified:null!=n?n:e.cardFeed.lastModified,metadata:Object.assign(Object.assign({},e.cardFeed.metadata),{totalCards:t})})}),setStreamFilter:(e,t)=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{streamFilter:t})}),finishExternalAction(e,t){var n;return Object.assign(Object.assign({},e),{externalAction:(null===(n=e.externalAction)||void 0===n?void 0:n.actionId)===t?void 0:e.externalAction})}});var J=n(7292),ee=n(4798),te=n.n(ee),ne=n(1042);const re={application:{open:!1,windowOrigin:null,streamContainerId:"",containerInstanceId:"",isPreview:!1,cardListRefreshInterval:15e3,runtimeVariableResolutionTimeout:5e3,embedMode:"launcher",customStrings:{},firstLoadStyles:{backgroundColor:"#FFFFFF",textColor:"rgba(0,0,0,0.5)",loadingSpinnerColor:"#000000",buttonTextColor:"#000000"},enabledUiElements:{cardListToast:!0,customToastContainer:!1,cardListHeader:!0},interfaceStyle:"automatic"},cardFeed:{lastModified:"",cardInstances:[],runtimeVariables:{},runtimeVariableAnalyticsEnabled:!1,tutorialSeen:!0,status:{loaded:!1}},navigationStack:{items:[]},cardResponses:{},validationStates:{},theme:{},cardStates:{},messages:{lastMessageId:"0"}};let ae;const oe=(e,t)=>{var n,r,a;let{streamContainerId:o,instanceId:i,windowOrigin:s,subviewCardInstance:l,startingLayoutId:c,cardInstances:d,cardListRefreshInterval:u,runtimeVariableResolutionTimeout:p,embedMode:h,customStrings:m,cardListTutorialSeen:g,features:v,firstLoadStyles:f,enabledUiElements:b,interfaceStyle:y}=e;const w=t&&t.length?(0,ne.m)(...t):null,S="preview"===h,C=null==v?void 0:v.runtimeVariableAnalytics;return ae=te()(Object.assign(Object.assign({},re),{application:Object.assign(Object.assign({},re.application),{isPreview:S,streamContainerId:void 0!==o?o:re.application.streamContainerId,containerInstanceId:void 0!==i?i:re.application.containerInstanceId,windowOrigin:s||re.application.windowOrigin,cardListRefreshInterval:void 0!==u?u:re.application.cardListRefreshInterval,runtimeVariableResolutionTimeout:void 0!==p?p:re.application.runtimeVariableResolutionTimeout,embedMode:h,customStrings:m||re.application.customStrings,cardLimit:"single-card"===h?1:void 0,firstLoadStyles:{backgroundColor:(null==f?void 0:f.backgroundColor)||re.application.firstLoadStyles.backgroundColor,textColor:(null==f?void 0:f.textColor)||re.application.firstLoadStyles.textColor,loadingSpinnerColor:(null==f?void 0:f.loadingSpinnerColor)||re.application.firstLoadStyles.loadingSpinnerColor,buttonTextColor:(null==f?void 0:f.buttonTextColor)||re.application.firstLoadStyles.buttonTextColor},enabledUiElements:{cardListToast:null===(n=null==b?void 0:b.cardListToast)||void 0===n||n,customToastContainer:null!==(r=null==b?void 0:b.customToastContainer)&&void 0!==r&&r,toastConfig:null==b?void 0:b.toastConfig,cardListHeader:null===(a=null==b?void 0:b.cardListHeader)||void 0===a||a,customContainerHeader:null==b?void 0:b.customContainerHeader},interfaceStyle:void 0!==y?y:"automatic"}),navigationStack:{items:l&&c?[{cardInstance:l,cardInstanceId:l.instance.id,subviewId:c,kind:"subview"}]:re.navigationStack.items},cardFeed:Object.assign(Object.assign({},re.cardFeed),{cardInstances:d||re.cardFeed.cardInstances,tutorialSeen:void 0===g||g,runtimeVariableAnalyticsEnabled:void 0!==C&&C,cardVoting:null==v?void 0:v.cardVoting,cardMinimumHeight:null==v?void 0:v.cardMinimumHeight,horizontalContainerConfig:null==v?void 0:v.horizontalContainerConfig})}),w),ae},ie=()=>{if(!ae)throw new Error("You must initialise the store before accessing it.");return ae},se="YYYY-MM-DD[T]HH:mm:ssZZ",le=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,ce="displayedCards",de="cardDescription",ue="headline",pe="text",he="list",me="image",ge="video",ve="textInput",fe="numberInput",be="datePicker",ye="dropdown",we="checkbox",Se="stepper",Ce="switch",ke="upload",xe="form",Ie="actionButtonGroup",Oe="submitButton",Me="linkButton",Te="dismissButton",Fe="snoozeButton",je="voteUpButton",_e="voteDownButton";var Le=n(5576);const De=()=>({handleSubviewLinkPress:(e,t,n)=>Ae(e,t,n),finishSubview:e=>Ee(e),viewMedia(e,t,n){if(e.application.isPreview)return e;if(!n||!n.url||0===n.url.trim().length)return e;return Re(e,{kind:"media",cardInstanceId:t,item:n})},navigateBack(e){if(e.navigationStack.items.length){const r=e.navigationStack.items[e.navigationStack.items.length-1];let a=e.cardResponses[r.cardInstanceId]?Object.assign({},e.cardResponses[r.cardInstanceId]):void 0,o=e.validationStates[r.cardInstanceId]?Object.assign({},e.validationStates[r.cardInstanceId]):void 0;var t,n;if(r&&"subview"===r.kind)a&&(null===(t=a.subviews)||void 0===t||delete t[r.subviewId]),o&&(null===(n=o.subviews)||void 0===n||delete n[r.subviewId]),e.application.isPreview||window.AtomicUploadService.removeFilesForCardSubview(e.application.containerInstanceId,r.cardInstanceId,r.subviewId);return Object.assign(Object.assign({},Ve(e)),{cardResponses:Object.assign(Object.assign({},e.cardResponses),a?{[r.cardInstanceId]:a}:{}),validationStates:Object.assign(Object.assign({},e.validationStates),o?{[r.cardInstanceId]:o}:{}),messages:Object.assign(Object.assign({},e.messages),{subview:void 0})})}return e},clearSubviewsForCardInstance(e,t){const n=e.navigationStack.items.slice().filter((e=>e.cardInstanceId!==t));return Object.assign(Object.assign({},e),{navigationStack:{items:n}})},requestSnooze(e,t,n,r){if(e.application.isPreview)return e;const a=Object.assign({kind:"snooze",cardInstanceId:t,source:n},r?{cardExpiry:r}:{});return Re(e,a)},requestFeedback(e,t,n){if(e.application.isPreview)return e;const r={kind:"feedback",cardInstanceId:t,sentiment:n.sentiment,textFeedback:n.textFeedback,textFeedbackLabel:n.textFeedbackLabel,source:n.source};return Re(e,r)}}),Ae=(e,t,n)=>{const r=e.cardFeed.cardInstances;if(r){const a=r.find((e=>e.instance.id===t)),o=a&&a.subviews[n];if(a&&o){const t={kind:"subview",cardInstance:a,cardInstanceId:a.instance.id,subviewId:n};return Re(e,t)}}return e},Ee=e=>{const t=e.cardFeed.cardInstances;return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:t,status:{loaded:!0}}),navigationStack:{items:[]}})};let He;const Pe=()=>(He||(He=(0,G.kv)((0,G.Y2)(De),ie())),He),Re=(e,t)=>{let n=e.navigationStack.items.slice();for(const[e,r]of n.entries())switch(r.cardInstanceId!==t.cardInstanceId&&(n=[]),r.kind){case"subview":case"snooze":case"feedback":r.kind===t.kind&&n.splice(e,1);break;case"media":r.kind===t.kind&&r.item.url===t.item.url&&n.splice(e,1)}return Object.assign(Object.assign({},e),{navigationStack:{items:[...n,t]}})},Ve=e=>{const t=e.navigationStack.items.slice();return t.pop(),Object.assign(Object.assign({},e),{navigationStack:{items:t}})},$e=e=>e.navigationStack.items.length?e.navigationStack.items[e.navigationStack.items.length-1]:null;function ze(e){return void 0!==e&&"subview"===e.kind}function Ne(e){return void 0!==e&&"snooze"===e.kind}function Ue(e){return void 0!==e&&"feedback"===e.kind}function Be(e){return void 0!==e&&"media"===e.kind}var We=n(2807),qe=n.n(We);const Ye=e=>Object.keys(e).filter((t=>e[t])).join(" "),Ze=(e,t)=>{const n=((e,t)=>qe()(new Date(t,e-1)))(e,t),r=new Date(t,e-1,1).getDay()||7,a={week1:[],week2:[],week3:[],week4:[],week5:[],week6:[]};for(let o=0;o<n;o++){const n=new Date(t,e-1,o+1),i=Math.ceil((r+o)/7)-1,s=(r-1+o)%7+1;a[`week${Math.ceil((r+o)/7)}`].push({date:n,row:i,col:s,style:{gridRowStart:i,gridColumnStart:s}})}return a},Ke=(e,t)=>{let{isMax:n,isMin:r}=t;const a=new Date(e);return n?(0,J.endOfDay)((0,J.addMinutes)(a,a.getTimezoneOffset())):r?(0,J.addMinutes)(a,a.getTimezoneOffset()):a};var Ge=n(5616),Xe=n.n(Ge),Qe=n(623),Je=n.n(Qe);const et={required:"This field is required",minimumDate:e=>`Value must be after ${e}`,maximumDate:e=>`Value must be before ${e}`,regexp:"Value does not meet requirements",minimum:e=>`Value must be at least ${e}`,maximum:e=>`Value must be no more than ${e}`,minimumLength:e=>1===e?"Value must be at least 1 character":`Value must be at least ${e} characters`,maximumLength:e=>1===e?"Value must be no more than 1 character":`Value must be no more than ${e} characters`,minChecked:(e,t)=>1===t?"This option must be checked":1===e?"You must select at least one option":`At least ${e} options must be selected`,maxChecked:e=>1===e?"You cannot select more than one option":`You cannot select more than ${e} options`},tt={required:(e,t)=>{const n=e.errorMessage||et.required;return e.required&&(null==t||null==t||"string"==typeof t&&0==t.length)?{type:"invalid",errorMessage:n}:{type:"valid"}},minimumDate:(e,t)=>{const n=Ke(e.minimumDate,{isMin:!0}),r=e.errorMessage||et.minimumDate(Xe()(n,"DD MMM YYYY"));if(null==t||null==t)return{type:"invalid",errorMessage:r};const a=new Date(t);return!Je()(a)||a<n?{type:"invalid",errorMessage:r}:{type:"valid"}},maximumDate:(e,t)=>{const n=Ke(e.maximumDate,{isMax:!0}),r=e.errorMessage||et.maximumDate(Xe()(n,"DD MMM YYYY"));if(null==t||null==t)return{type:"invalid",errorMessage:r};const a=new Date(t);return!Je()(a)||a>n?{type:"invalid",errorMessage:r}:{type:"valid"}},regexp:(e,t)=>{const n=e.errorMessage||et.regexp;if(null==t||null==t)return{type:"invalid",errorMessage:n};try{if(!new RegExp(e.regexp).test(t))return{type:"invalid",errorMessage:n}}catch(e){}return{type:"valid"}},minimum:(e,t)=>{const n=e.errorMessage||et.minimum(e.minimum);return null==t||null==t||t<e.minimum?{type:"invalid",errorMessage:n}:{type:"valid"}},maximum:(e,t)=>{const n=e.errorMessage||et.maximum(e.maximum);return null==t||null==t||t>e.maximum?{type:"invalid",errorMessage:n}:{type:"valid"}},minimumLength:(e,t)=>{const n=e.errorMessage||et.minimumLength(e.minimumLength);return null==t||null==t||t.length<e.minimumLength?{type:"invalid",errorMessage:n}:{type:"valid"}},maximumLength:(e,t)=>{const n=e.errorMessage||et.maximumLength(e.maximumLength);return null==t||null==t?{type:"valid"}:t.length>e.maximumLength?{type:"invalid",errorMessage:n}:{type:"valid"}},minChecked:(e,t)=>{const n=e.errorMessage||et.minChecked(e.minChecked,Object.keys(t).length);return null==t||null==t||Object.values(t).filter((e=>e)).length<e.minChecked?{type:"invalid",errorMessage:n}:{type:"valid"}},maxChecked:(e,t)=>{const n=e.errorMessage||et.maxChecked(e.maxChecked);return null==t||null==t||Object.values(t).filter((e=>e)).length>e.maxChecked?{type:"invalid",errorMessage:n}:{type:"valid"}},maxSizeBytes:(e,t)=>{const n=Math.round(e.maxSizeBytes/1048576),r=e.errorMessage||`File size must be no more than ${n}MB`;return null==t||null==t?{type:"valid"}:t.size&&t.size>e.maxSizeBytes?{type:"invalid",errorMessage:r}:{type:"valid"}}},nt=["required","minimumLength","maximumLength","minimum","maximum","minimumDate","maximumDate","minChecked","maxChecked","maxSizeBytes","regexp"],rt=(e,t)=>{if(!t)return{type:"valid"};for(const n in nt){const r=nt[n],a=t[r];if(void 0===a)continue;const o=tt[r];if(o){const t=o(a.attributes,e);if("invalid"===t.type)return t}}return{type:"valid"}},at=()=>({handleImageLinkPress(e,t,n){const r=e.navigationStack.items.length?"subview":"topview",a=Object.assign(Object.assign({},n.currentSubviewId&&{subviewId:n.currentSubviewId}),n.currentSubviewTitle&&{subviewTitle:n.currentSubviewTitle});return n.layoutId?Ae(e,t,n.layoutId):n.payload&&!e.application.isPreview?it(e,"payload","image",t,r,n.payload,a):e},handleLinkButtonPress(e,t,n,r,a){const o=e.navigationStack.items.length?"subview":"topview";return r?Ae(e,t,r):a&&!e.application.isPreview?it(e,"payload","linkButton",t,o,a,n):e},handleSubmitButtonPayload(e,t,n,r){const a=e.navigationStack.items.length?"subview":"topview";return it(e,"payload","submitButton",t,a,r,n)},openExternalUrl:(e,t,n,r,a,o,i)=>(null==i?void 0:i.url)&&!e.application.isPreview?st(e,a,o,t,n,i,r):e,handleFormChange:(e,t,n,r,a)=>ot(e,t,{[n]:r},a),createResponseWithDefaults:(e,t,n,r)=>ot(e,t,n,r),clearCardForm(e,t){var n,r;return Object.assign(Object.assign({},e),{cardResponses:Object.assign(Object.assign({},e.cardResponses),{[t]:Object.assign(Object.assign({},(null===(n=e.cardResponses[t])||void 0===n?void 0:n.responses)?{responses:{}}:{}),(null===(r=e.cardResponses[t])||void 0===r?void 0:r.subviews)?{subviews:{}}:{})})})},validateField(e,t,n,r,a,o){var i,s,l,c;let d=rt(r,a);const u=d&&!o?{[n]:d}:{},p=d&&o?{[n]:d}:{},h=e.validationStates,m=null!==(i=null===(l=h[t])||void 0===l?void 0:l.validations)&&void 0!==i?i:{},g=null!==(s=null===(c=h[t])||void 0===c?void 0:c.subviews)&&void 0!==s?s:{};return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},h),{[t]:{validations:Object.assign(Object.assign({},m),u),subviews:Object.assign(Object.assign({},g),p&&o?{[o]:Object.assign(Object.assign({},g[o]),p)}:{})}})})},validateFieldCustomResult(e,t,n,r,a){var o,i,s,l;const c=r&&!a?{[n]:r}:{},d=r&&a?{[n]:r}:{},u=e.validationStates,p=null!==(o=null===(s=u[t])||void 0===s?void 0:s.validations)&&void 0!==o?o:{},h=null!==(i=null===(l=u[t])||void 0===l?void 0:l.subviews)&&void 0!==i?i:{};return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},u),{[t]:{validations:Object.assign(Object.assign({},p),c),subviews:Object.assign(Object.assign({},h),d&&a?{[a]:Object.assign(Object.assign({},h[a]),d)}:{})}})})},validateCurrentSubview(e,t){const n=$e(e);if(n&&ze(n)){const r=n.subviewId,a=n.cardInstance.subviews[r],o=lt(e,a.nodes,t,r);let i=e.validationStates;return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},i),{[t]:Object.assign(Object.assign({},e.validationStates[t]),{subviews:{[r]:o}})})})}return e},validateCardTopLevel(e,t){const[n]=e.cardFeed.cardInstances.filter((e=>e.instance.id===t));let r={};return n&&(r=lt(e,n.defaultView.nodes,t)),Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},e.validationStates),{[t]:Object.assign(Object.assign({},e.validationStates[t]),{validations:r})})})}}),ot=(e,t,n,r)=>{var a;const o=e.cardResponses[t]||{},i=r?null===(a=o.subviews)||void 0===a?void 0:a[r]:{};return Object.assign(Object.assign({},e),{cardResponses:Object.assign(Object.assign({},e.cardResponses),{[t]:{responses:Object.assign(Object.assign({},o.responses),r?{}:n),subviews:Object.assign(Object.assign({},o.subviews),r?{[r]:Object.assign(Object.assign({},i),n)}:{})}})})},it=(e,t,n,r,a,o,i)=>Object.assign(Object.assign({},e),{externalAction:Object.assign({actionId:(new Date).getTime(),linkMethod:t,trigger:n,cardInstanceId:r,cardViewState:a,subviewData:i},o?{payload:{actionPayload:o,cardInstanceId:r,streamContainerId:e.application.streamContainerId}}:{})}),st=(e,t,n,r,a,o,i)=>Object.assign(Object.assign({},e),{externalAction:{actionId:(new Date).getTime(),linkMethod:t,trigger:n,urlLink:o,cardInstanceId:r,cardViewState:a,subviewData:i}}),lt=(e,t,n,r)=>{var a;const o=Dc(t),i=r?null===(a=e.cardResponses[n].subviews)||void 0===a?void 0:a[r]:e.cardResponses[n].responses;let s={};for(const e in o){const t=o[e];t.attributes.name&&i&&(s[t.attributes.name]=rt(i[t.attributes.name],t.validations))}return s};let ct;const dt=()=>(ct||(ct=(0,G.kv)((0,G.Y2)(at),ie())),ct),ut=(e,t,n)=>{var r,a;const o=ie().getState().cardResponses,i=null===(r=o[e])||void 0===r||null===(a=r.responses)||void 0===a?void 0:a[t];return null!=i?i:n?null===(s=o[e])||void 0===s||null===(l=s.subviews)||void 0===l||null===(c=l[n])||void 0===c?void 0:c[t]:void 0;var s,l,c};function pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let ht;!function(e){e[e.DISABLED=0]="DISABLED",e[e.TRANSACTIONS=1]="TRANSACTIONS",e[e.PAYLOAD=2]="PAYLOAD",e[e.FULL_DETAIL=3]="FULL_DETAIL"}(ht||(ht={}));class mt{static debug(e){mt.logLevel!==ht.DISABLED&&(e.level1||e.level2||e.level3)&&console.log(...this.constructLogPayload(e))}static warn(e){mt.logLevel!==ht.DISABLED&&(e.level1||e.level2||e.level3)&&console.warn(...this.constructLogPayload(e))}static error(e){mt.logLevel!==ht.DISABLED&&(e.level1||e.level2||e.level3)&&console.error(...this.constructLogPayload(e))}}pt(mt,"logLevel",ht.DISABLED),pt(mt,"constructLogPayload",(e=>{const t=["AtomicSDK Web -"];return mt.logLevel>=ht.TRANSACTIONS&&e.level1&&t.push(...e.level1),mt.logLevel>=ht.PAYLOAD&&e.level2&&t.push(...e.level2),mt.logLevel>=ht.FULL_DETAIL&&e.level3&&t.push(...e.level3),t}));const gt="card-displayed",vt="user-redirected",ft="card-voted-up",bt="card-voted-down",yt="runtime-vars-updated",wt="stream-displayed",St="snooze-options-displayed",Ct="snooze-options-canceled",kt="card-subview-displayed",xt="card-subview-exited",It="video-played",Ot="video-completed",Mt="user-file-uploads-started",Tt="user-file-uploads-completed",Ft="user-file-uploads-failed";var jt=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))},_t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dt="AACUploadFailedError",At="AACUploadSignedUrlFailedError",Et="AACNoFileToUploadError",Ht="AACUploadCancelledError",Pt="Couldn't upload file(s)",Rt="Couldn't upload file(s)",Vt="No files to upload",$t="File upload cancelled";class zt{constructor(){Lt(this,"_fileStorage",void 0),Lt(this,"_uploadQueue",void 0),this._fileStorage=new Map,this._uploadQueue=new Map,zt._instance=this}static getInstance(){return zt._instance||(zt._instance=new zt),zt._instance}storeFile(e,t,n,r,a,o,i,s,l){var c,d,u,p;(this._fileStorage.get(a)||this._fileStorage.set(a,new Map),null===(c=this._fileStorage.get(a))||void 0===c?void 0:c.get(r))||(null===(p=this._fileStorage.get(a))||void 0===p||p.set(r,{topLevel:new Map,subviews:{}}));l&&!(null===(d=this._fileStorage.get(a))||void 0===d||null===(u=d.get(r))||void 0===u?void 0:u.subviews[l])&&(this._fileStorage.get(a).get(r).subviews[l]=new Map);const h={file:e,type:t,targetBucketId:n,destinationFilename:o,convertImage:i,size:e.size,uploaded:!1};l?this._fileStorage.get(a).get(r).subviews[l].set(s,h):this._fileStorage.get(a).get(r).topLevel.set(s,h)}getFile(e,t,n,r){var a,o,i,s,l,c;return r?(null===(s=this._fileStorage.get(e))||void 0===s||null===(l=s.get(t))||void 0===l||null===(c=l.subviews[r])||void 0===c?void 0:c.get(n))||null:(null===(a=this._fileStorage.get(e))||void 0===a||null===(o=a.get(t))||void 0===o||null===(i=o.topLevel)||void 0===i?void 0:i.get(n))||null}getAllFilesForCard(e,t){var n;return(null===(n=this._fileStorage.get(e))||void 0===n?void 0:n.get(t))||null}removeFile(e,t,n,r){var a,o,i,s,l,c,d,u;return r?null!==(a=null===(c=this._fileStorage.get(e))||void 0===c||null===(d=c.get(t))||void 0===d||null===(u=d.subviews[r])||void 0===u?void 0:u.delete(n))&&void 0!==a&&a:null!==(o=null===(i=this._fileStorage.get(e))||void 0===i||null===(s=i.get(t))||void 0===s||null===(l=s.topLevel)||void 0===l?void 0:l.delete(n))&&void 0!==o&&o}removeAllFilesForCard(e,t){var n;null===(n=this._fileStorage.get(e))||void 0===n||n.delete(t)}removeFilesForCardSubview(e,t,n){var r,a;null===(r=this._fileStorage.get(e))||void 0===r||(null===(a=r.get(t))||void 0===a||delete a.subviews[n])}removeFilesForContainer(e){this._fileStorage.delete(e)}getIsUploadingStatus(e){var t;const n=null===(t=this._uploadQueue.get(e))||void 0===t?void 0:t.size;return!!n&&n>0}uploadFile(e,t,n,r,a){return jt(this,void 0,void 0,(function*(){return new Promise(((o,i)=>jt(this,void 0,void 0,(function*(){var s;const{file:l,targetBucketId:c,destinationFilename:d}=n,u=null===(s=this._uploadQueue.get(t))||void 0===s?void 0:s.get(e);let p=!1;const h=new Error($t);h.name=Ht,u&&(u.uploadRequests[r]={abort:()=>{p=!0,mt.debug({level1:[`File upload for card: ${e} in container instance: ${t} was cancelled`,d]}),i({error:h,fieldname:r,filename:d})}});let m=`get-file-upload-url?filename=${encodeURIComponent(d)}&targetBucketId=${c}&card_instance_id=${e}`;n.convertImage&&(m+="&jpeg_convert=1");const{data:{uploadUrl:g},response:v}=yield sd.get(m,a);if(p)return;if(v.error){mt.error({level1:["Failed to get upload URL",v.error]});const e=new Error(Rt);return e.name=At,i({error:e,fieldname:r,filename:d})}const f=new XMLHttpRequest,b=new Error(Pt);b.name=Dt,f.onload=()=>{f.status>=200&&f.status<300?(mt.debug({level1:[`File upload for card: ${e} in container instance: ${t} was successful`,d]}),o(r)):(mt.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,d]}),i({error:b,fieldname:r,filename:d}))},f.onerror=()=>{mt.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,d]}),i({error:b,fieldname:r,filename:d})},f.onabort=()=>{mt.debug({level1:[`File upload for card: ${e} in container instance: ${t} was cancelled`,d]});const n=new Error($t);n.name=Ht,i({error:n,fieldname:r,filename:d})},u&&(u.uploadRequests[r]=f);try{f.open("PUT",g,!0);const e=new FormData;e.append("file",l,d),f.send(e.get("file"))}catch(n){mt.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,n]}),i({error:b,fieldname:r,filename:d})}}))))}))}uploadFilesForCard(e,t,n,r,a){return jt(this,void 0,void 0,(function*(){var o,i,s,l,c,d;const u=null==a?void 0:a.subviewData,p=(null==u?void 0:u.subviewId)?null===(o=this._fileStorage.get(t))||void 0===o||null===(i=o.get(e))||void 0===i?void 0:i.subviews[u.subviewId]:null===(s=this._fileStorage.get(t))||void 0===s||null===(l=s.get(e))||void 0===l?void 0:l.topLevel;if(!p){const e=new Error(Vt);return e.name=Et,{success:!1,error:e}}this._uploadQueue.set(t,(new Map).set(e,{cancelSubmitCallback:null==a?void 0:a.cancelSubmitCallback,uploadRequests:[]}));const h=[];for(const[e,t]of p)t.uploaded||h.push(Object.assign(Object.assign({},t),{fieldname:e}));const m=Object.assign({},(null==u?void 0:u.subviewId)?{subviewId:u.subviewId,subviewTitle:u.subviewTitle,subviewLevel:1}:{}),g=Object.assign({},m),v=h.map((r=>{const{fieldname:a}=r,o=_t(r,["fieldname"]);if(g[a]={filename:o.destinationFilename,targetBucketId:o.targetBucketId},"image"===o.type)return this.uploadFile(e,t,o,a,n)})),f={success:!1};return r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:Mt,properties:g}),yield Promise.allSettled(v).then((n=>{const a=[],o=[],i=Object.assign({},m),s=Object.assign({},m),l=n=>{var r,a,o,i,s;return(null==u?void 0:u.subviewId)?null===(r=this._fileStorage.get(t))||void 0===r||null===(a=r.get(e))||void 0===a||null===(o=a.subviews[u.subviewId])||void 0===o?void 0:o.get(n):null===(i=this._fileStorage.get(t))||void 0===i||null===(s=i.get(e))||void 0===s?void 0:s.topLevel.get(n)};n.forEach((n=>{var r;if("fulfilled"===n.status&&(null===(r=this._fileStorage.get(t))||void 0===r?void 0:r.get(e))){const e=l(n.value);e&&(e.uploaded=!0),i[n.value]={filename:null==e?void 0:e.destinationFilename,targetBucketId:null==e?void 0:e.targetBucketId}}else if("rejected"===n.status){const e=n.reason;if(e.error.name===Ht)o.push(n.reason);else{a.push(e);const t=l(e.fieldname);s[e.fieldname]={filename:null==t?void 0:t.destinationFilename,targetBucketId:null==t?void 0:t.targetBucketId},f.error=e.error}}})),a.length||o.length||(mt.debug({level1:[`All files successfully uploaded for card: ${e} in container instance: ${t}`]}),r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:Tt,properties:i}),f.success=!0),a.length&&(mt.error({level1:[`Failed to upload files for card: ${e} in container instance: ${t}`,...a]}),r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:Ft,properties:s}),f.failedUploads=a),o.length&&(f.cancelledUploads=o)})),null===(c=this._uploadQueue.get(t))||void 0===c||c.delete(e),(null===(d=this._uploadQueue.get(t))||void 0===d?void 0:d.size)||this._uploadQueue.delete(t),f}))}cancelUploadForCard(e,t){return jt(this,void 0,void 0,(function*(){var n,r,a;const o=null===(n=this._uploadQueue.get(e))||void 0===n?void 0:n.get(t);var i;o&&(Object.values(o.uploadRequests).forEach((e=>{e.abort()})),null===(i=o.cancelSubmitCallback)||void 0===i||i.call(o));null===(r=this._uploadQueue.get(e))||void 0===r||r.delete(t),(null===(a=this._uploadQueue.get(e))||void 0===a?void 0:a.size)||this._uploadQueue.delete(e)}))}cancelUploadsForContainer(e){return jt(this,void 0,void 0,(function*(){const t=this._uploadQueue.get(e);t&&(t.forEach((e=>{var t;Object.values(e.uploadRequests).forEach((e=>{e.abort()})),null===(t=e.cancelSubmitCallback)||void 0===t||t.call(e)})),this._uploadQueue.delete(e))}))}}Lt(zt,"_instance",void 0);zt.getInstance();var Nt=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Ut=(e,t)=>e?Object.keys(e).reduce(((n,r)=>{const a=e[r];return t.includes(a||"")||(n[r]=e[r]),n}),{}):e,Bt=e=>Ut(e,["submitted","dismissed","snoozed","submitted-subview","centering"]),Wt=(e,t,n)=>{var r,a;const o=null===(r=e.cardFeed.cardInstances.filter((e=>e.instance.id!==t))[0])||void 0===r||null===(a=r.instance)||void 0===a?void 0:a.id;return Object.assign(Object.assign({},e.cardStates),o&&{[o]:n})},qt=(e,t,n)=>(e||[]).reduce(((e,r,a)=>(n[r.instance.id]&&void 0===(t||[]).find((e=>e.instance.id===r.instance.id))&&e.splice(a,0,r),e)),[...t]),Yt=function(){let e=Number(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0);return""+ ++e},Zt=(e,t,n)=>{var r;if(!n)return e;switch(n.name){case Qc.noInternet:return"No internet connection";case Dt:case Et:case At:return(null==t||null===(r=t.toastMessages)||void 0===r?void 0:r.fileUploadFailed)||n.message;default:return e}},Kt=(e,t)=>{var n;return((null===(n=t.application.enabledUiElements.toastConfig)||void 0===n?void 0:n.toastMessages)||{})[e]},Gt=(e,t)=>{switch(t){case"cardList":return Object.assign(Object.assign({},e.messages),{cardList:void 0});case"subview":return Object.assign(Object.assign({},e.messages),{subview:void 0});default:return{lastMessageId:Yt(e.messages.lastMessageId),cardList:void 0,subview:void 0}}},Xt=()=>({updateAppOpen(e,t){const n="launcher"===e.application.embedMode&&!0===e.application.open&&!1===t;return Object.assign(Object.assign({},e),{application:Object.assign(Object.assign({},e.application),{open:t}),messages:n?Gt(e):e.messages})},startCardFileUpload:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"uploading-files"})}),finishCardFileUpload:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:null})}),submittingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"submitting"})}),submittedCard(e,t,n){const r=Kt("submittedCard",e),a=Yt(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:n?"submitted-subview":"submitted"}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=r?r:"Card submitted",messageId:a,cardInstanceId:t,action:"submitted"},lastMessageId:a})})},failedToSubmitCard(e,t,n,r,a,o){const i=Ut(e.cardStates,["centering","fixed-position"]),s=Yt(e.messages.lastMessageId),l=e.application.enabledUiElements.toastConfig,c=Object.assign({text:Zt("Couldn't submit",l,a),messageId:s,cardInstanceId:t,action:"submit-failed",responseValues:r},o||{});return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},i),{[t]:null}),messages:Object.assign(Object.assign({},n?{subview:c}:{cardList:c}),{lastMessageId:s})})},dismissingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"dismissing"})}),dismissedCard(e,t){const n=Kt("dismissedCard",e),r=Yt(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"dismissed"}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=n?n:"Card dismissed",messageId:r,cardInstanceId:t,action:"dismissed"},lastMessageId:r})})},failedToDismissCard(e,t,n,r){const a=Ut(e.cardStates,["centering","fixed-position"]),o=Yt(e.messages.lastMessageId),i=e.application.enabledUiElements.toastConfig;return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},a),{[t]:null}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:Zt("Couldn't dismiss",i,r),messageId:o,cardInstanceId:t,action:"dismiss-failed",source:n},lastMessageId:o})})},snoozingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"snoozing"})}),snoozedCard(e,t,n){const r=Kt("snoozedCard",e),a=Yt(e.messages.lastMessageId);let o;return o=(0,J.isToday)(n)?(0,J.format)(n,"h:mm A"):(0,J.format)(n,"D MMM YYYY, h:mm A"),Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"snoozed"}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=r?r:`Snoozed until ${o}`,messageId:a,cardInstanceId:t,action:"snoozed"},lastMessageId:a})})},failedToSnoozeCard(e,t,n,r,a){const o=Ut(e.cardStates,["centering","fixed-position"]),i=Yt(e.messages.lastMessageId),s=e.application.enabledUiElements.toastConfig;return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},o),{[t]:null}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:Zt("Couldn't snooze",s,a),messageId:i,cardInstanceId:t,action:"snooze-failed",snoozeDate:n,source:r},lastMessageId:i})})},fixPositionRemainingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:e.cardFeed.cardInstances.length<=2?Wt(e,t,"fixed-position"):Ut(e.cardStates,["centering","fixed-position"])}),centerRemainingCard(e,t){const n=e.cardFeed.cardInstances,r=n.filter((e=>e.instance.id!==t));return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:e.cardFeed.cardInstances.length<=2?r:n,status:{loaded:!0},updateId:(new Date).getTime()}),cardStates:e.cardFeed.cardInstances.length<=2?Wt(e,t,"centering"):Ut(e.cardStates,["centering","fixed-position"])})},removeCardState:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:null})}),removeCard(e,t){if(e.application.isPreview)return e;const n=e.cardFeed.cardInstances.filter((e=>e.instance.id!==t)),r=Object.assign({},e.cardStates);return delete r[t],Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:n,status:{loaded:!0},updateId:(new Date).getTime()}),cardStates:r})},queueCardFeedDeltaUpdate:(e,t)=>Object.assign(Object.assign({},e),{pendingCardFeedUpdates:[...e.pendingCardFeedUpdates||[],...t]}),clearCardFeedDeltaUpdateQueue:e=>Object.assign(Object.assign({},e),{pendingCardFeedUpdates:[]}),applyCardFeedDeltaUpdate(e,t,n,r){return Nt(this,void 0,void 0,(function*(){let a={cardFeed:{cardInstances:e.cardFeed.cardInstances,runtimeVariables:e.cardFeed.runtimeVariables},cardStates:e.cardStates,navigationStack:e.navigationStack},o=!1,i=[];if(t.forEach((t=>{switch(t.type){case"remove-card":{const{cardInstanceId:n,actionType:r}=t.data;if("limit"!==r&&(o=!0),e.application.isPreview)break;const i=a.cardFeed.cardInstances,s=e.application.isPreview?i:i.filter((e=>e.instance.id!==n));a.cardFeed.cardInstances=s;break}case"update-card":{const{cardInstance:e,actionType:n}=t.data;let r=!1;e.runtimeVariables&&i.push(e);const s=a.cardFeed.cardInstances.map((t=>(t.instance.id===e.instance.id&&(r=!0,t=Object.assign({},e)),t)));r||(o=!0,s.push(e)),"unsnooze"===n&&(a.cardStates[e.instance.id]=null),a.cardFeed.cardInstances=s;break}}})),i.length>0){const t=yield r(i),n=e.cardFeed.runtimeVariables.values;a.cardFeed.runtimeVariables={values:new Map([...n||new Map,...(null==t?void 0:t.values)||new Map]),updateId:(new Date).getTime()}}a.cardFeed.cardInstances=(e=>null==e?void 0:e.sort(((e,t)=>{const{priority:n,lastCardActiveTime:r,receivedAt:a}=e.metadata,{priority:o,lastCardActiveTime:i,receivedAt:s}=t.metadata;let l=0;return l=n-o,0===l&&(l=new Date(i).getTime()-new Date(r).getTime()),0===l&&(l=new Date(s).getTime()-new Date(a).getTime()),l})))(a.cardFeed.cardInstances),n(e.cardFeed.cardInstances.length!==a.cardFeed.cardInstances.length||o),"single-card"===e.application.embedMode&&(a.navigationStack={items:[]});const s=Ut(a.cardStates,["centering","fixed-position"]),l=Bt(s),c=qt(e.cardFeed.cardInstances,a.cardFeed.cardInstances,l);return a.cardFeed.cardInstances=c,{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:a.cardFeed.cardInstances,runtimeVariables:a.cardFeed.runtimeVariables,tutorialSeen:e.cardFeed.tutorialSeen||c.length>0,updateId:(new Date).getTime(),status:{loaded:!0}}),cardStates:s,navigationStack:a.navigationStack}}))},clearMessage:(e,t)=>Object.assign(Object.assign({},e),{messages:Gt(e,t)}),cardFeedLoading:e=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{status:{loaded:!1}})}),cardFeedLoaded(e,t){if(t.error){let n;if(t.error.name===Qc.noInternet)n="noInternet";else n="apiError";return mt.error({level1:["Error loading card feed"],level2:[n],level3:[t.error]}),Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{status:{loaded:!1,errorState:n}})})}if(!t.cardInstances)return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{status:Object.assign(Object.assign({},e.cardFeed.status),{loaded:!0})})});const n=Ut(e.cardStates,["centering","fixed-position"]),r=Bt(n),a=qt(e.cardFeed.cardInstances,t.cardInstances,r);return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{lastModified:t.lastModified,cardInstances:a,unfilteredCardInstanceCount:t.unfilteredCardInstanceCount||t.cardInstances.length,runtimeVariables:Object.assign(Object.assign({},t.runtimeVariables),{updateId:(new Date).getTime()}),tutorialSeen:e.cardFeed.tutorialSeen||t.cardInstances.length>0,status:{loaded:!0},updateId:(new Date).getTime(),metadata:t.metadata}),navigationStack:{items:"single-card"===e.application.embedMode?[]:e.navigationStack.items},cardStates:r})},setCardFeedOverlay:(e,t)=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{displayingOverlay:t})}),runtimeVariablesResolved:(e,t)=>t.values?Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{runtimeVariables:Object.assign(Object.assign({},e.cardFeed.runtimeVariables),{values:t.values,updateId:(new Date).getTime()})})}):e,runtimeVariableReplacement(e,t){var n,r;const a=null!==(n=null==t?void 0:t.values)&&void 0!==n?n:null===(r=e.cardFeed.runtimeVariables)||void 0===r?void 0:r.values;return e.cardFeed.cardInstances.map((e=>Ec(e,(null==a?void 0:a.get(e.instance.id))||new Map([])))),Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{runtimeVariables:null!=t?t:e.cardFeed.runtimeVariables})})},themeLoading:e=>Object.assign(Object.assign({},e),{theme:Object.assign(Object.assign({},e.theme),{status:{loaded:!1}})}),themeLoaded(e,t){if(t.error){let n;if(t.error.name===Qc.noInternet)n="noInternet";else n="apiError";return Object.assign(Object.assign({},e),{theme:Object.assign(Object.assign({},e.theme),{status:{loaded:!1,errorState:n}})})}return t.theme?Object.assign(Object.assign({},e),{theme:{themePayload:t.theme,status:{loaded:!0}}}):e},feedbackReceived(e,t){if(e.application.isPreview)return e;const n=Kt("feedbackReceived",e),r=Yt(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=n?n:"Feedback received",messageId:r,cardInstanceId:t,action:"other"},lastMessageId:r})})},userLoggedOut:e=>Object.assign(Object.assign({},e),{application:Object.assign(Object.assign({},e.application),{open:!1}),cardFeed:Object.assign(Object.assign({},e.cardFeed),{lastModified:"",cardInstances:[],runtimeVariables:{},status:{loaded:!0}}),navigationStack:{items:[]},cardResponses:{},validationStates:{},cardStates:{},messages:{lastMessageId:"0"}})});let Qt;const Jt=()=>(Qt||(Qt=(0,G.kv)((0,G.Y2)(Xt),ie())),Qt);var en=0,tn=document.head.appendChild(document.createElement("style")).sheet;function nn(e,t){var n="p"+en++,r=t+n;return e.forEach((function(e){if(/^@/.test(e)){var t=e.indexOf("{")+1;e=e.slice(0,t)+r+e.slice(t)}else e=r+e;try{tn.insertRule(e,tn.cssRules.length)}catch(e){}})),n}function rn(e,t){return t+"{"+e+"}"}function an(e,t){var n=[""];for(var r in t=t||0,e){var a=e[r];a&&(r=r.replace(/[A-Z]/g,"-$&").toLowerCase(),a.sub||Array.isArray(a)?(a=Array.isArray(a)?a:[a]).forEach((function(e){return n[0]+=r+":"+e+";"})):(r=r.replace(/&/g,""),n.push(rn(an(a,!/^@/.test(r)).join(""),r))))}return t||(n[0]=rn(n[0],"")),n}const on=function(e,t){var n={};return(t=t||{}).returnObject?{style:r,css:a}:r;function r(t){return function(n){return function(r,o){var i="function"==typeof n?n(r):n;return delete r.theme,r.class=[a(i),r.class].filter(Boolean).join(" "),e(t,r,r.children||[])}}}function a(e){var t=an(e),r=t.join("");return n[r]||(n[r]=nn(t,"."))}}(o.h),sn=function(e){return nn([rn(an(e,1).join(""),"")],"@keyframes ")};function ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const cn="rgba(0, 0, 0, 1)",dn="rgba(255, 255, 255, 1)",un='-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',pn={colors:{},typography:{},shape:{}},hn={icon:{switchOff:dn,switchOn:dn},background:{switchOff:"rgba(128, 128, 128, 1)",switchOn:cn}};class mn{constructor(e,t,n,r){ln(this,"theme",void 0),ln(this,"themeName",void 0),ln(this,"fontFamilies",void 0),ln(this,"hasSecondaryButtonStyle",!1),ln(this,"testSecondaryStyles",((e,t,n)=>{const r=e=>{null===e||"object"!=typeof e||Array.isArray(e)?"string"==typeof e&&e.match(/\w+/g)&&(this.hasSecondaryButtonStyle=!0):Object.values(e).length>0&&(this.hasSecondaryButtonStyle=!0)};for(const[l,c]of Object.entries(e)){switch(l){case"actionSecondary":case"buttonSecondary":case"buttonHoverSecondary":case"buttonActiveSecondary":case"actionIconSecondary":case"buttonIconSecondary":case"actionSecondaryTop":case"actionSecondaryRight":case"actionSecondaryBottom":case"actionSecondaryLeft":case"buttonSecondaryTop":case"buttonSecondaryRight":case"buttonSecondaryBottom":case"buttonSecondaryLeft":case"buttonHoverSecondaryTop":case"buttonHoverSecondaryRight":case"buttonHoverSecondaryBottom":case"buttonHoverSecondaryLeft":case"buttonActiveSecondaryTop":case"buttonActiveSecondaryRight":case"buttonActiveSecondaryBottom":case"buttonActiveSecondaryLeft":case"actionSecondaryShadow":case"buttonSecondaryShadow":case"buttonHoverSecondaryShadow":case"buttonActiveSecondaryShadow":case"actionSecondaryXAxis":case"actionSecondaryYAxis":case"buttonSecondaryXAxis":case"buttonHoverSecondaryXAxis":case"buttonActiveSecondaryXAxis":case"buttonSecondaryYAxis":case"buttonHoverSecondaryYAxis":case"buttonActiveSecondaryYAxis":if(t.includes("shadowOffsets")&&!l.includes("XAxis")&&!l.includes("YAxis")){var a,o;const e="true"===(null==n||null===(a=n.shape)||void 0===a||null===(o=a.equalShadowOffsets)||void 0===o?void 0:o[l]);"string"==typeof c&&c.match(/\w+/g)&&e&&(this.hasSecondaryButtonStyle=!0);break}if(t.includes("equalShadowOffsets")||t.includes("equalPaddings"))break;r(c);break;case"actionSecondaryWidth":case"buttonSecondaryWidth":case"buttonHoverSecondaryWidth":case"buttonActiveSecondaryWidth":{var i,s;const e=l.replace("Width",""),t="true"===(null==n||null===(i=n.shape)||void 0===i||null===(s=i.equalPaddings)||void 0===s?void 0:s[e]);"string"==typeof c&&c.match(/\w+/g)&&t&&(this.hasSecondaryButtonStyle=!0);break}}if(!this.hasSecondaryButtonStyle&&null!==c&&"object"==typeof c&&!Array.isArray(c)){const e=t?t+"."+l:l;this.testSecondaryStyles(c,e,n)}}}));let a,o=!1;switch(r){case"automatic":o="dark"===n&&window.matchMedia("not all and (prefers-color-scheme), (prefers-color-scheme)").matches;break;case"light":o=!1;break;case"dark":o=!0}var i;o?a=(null===(i=e.alternate)||void 0===i?void 0:i.dark)||e.theme||{}:a=e.theme||{};this.testSecondaryStyles(a.feed||{},"",a.feed),this.testSecondaryStyles(a.workflow||{},"",a.workflow),this.themeName=t,this.theme=a[t]||pn,this.fontFamilies=a.fontFamilies||[]}getShape(e,t){return vn(this.theme.shape,e,(null==t?void 0:t.skipFallback)?null:"")}getCSSShadowProperties(e,t){var n,r;const a=this.getShape(`blur.${e}Shadow`,t),o=this.getShape(`equalShadowOffsets.${e}`,t),i=this.getShape(`shadowOffsets.${e}`,t),s=this.getShape(`shadowOffsets.${e}XAxis`,t),l=this.getShape(`shadowOffsets.${e}YAxis`,t),c=this.getShape(`shadowOffsetType.${e}`,t),d=this.getCSSColor(`shadow.${e}`,{skipFallback:!0}),u="inset"===c?"inset":"",p=null!==(n="true"===o?i:s)&&void 0!==n?n:"0px",h=null!==(r="true"===o?i:l)&&void 0!==r?r:"0px";if(!d||d.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/))return"";return`${u} ${p} ${h} ${a||""} ${d}`.trim()}getPadding(e){var t,n,r,a;const o=null!==(t=null===(r=this.theme.shape)||void 0===r?void 0:r.padding)&&void 0!==t?t:{},i=null!==(n=null===(a=this.theme.shape)||void 0===a?void 0:a.equalPaddings)&&void 0!==n?n:{},s=vn(i,`${e}`,null),l=vn(o,`${e}Width`,null),c=vn(o,`${e}Top`,null),d=vn(o,`${e}Right`,null),u=vn(o,`${e}Bottom`,null),p=vn(o,`${e}Left`,null);return"true"===s&&l?`${l}`:c||d||u||p?`${c||0} ${d||0} ${u||0} ${p||0}`:""}getCSSColor(e,t){const n=vn(this.theme.colors,e,null);if(n&&(null==n?void 0:n.color)&&!(null==t?void 0:t.skipPrimaryStyle))return gn(n.color,n.opacity);if(null==t?void 0:t.skipFallback)return null;const r=vn(hn,e,null);return r||("workflow"===this.themeName?e.startsWith("background")?cn:dn:e.startsWith("background")?"rgba(0, 0, 0, 0)":cn)}getFontFamilies(){return this.fontFamilies}getTypographyStyle(e){var t;let n=vn(this.theme.typography,e,null),r={size:"17px",isDefaultTypography:!0};return null===(t=n)||void 0===t||t.align,n||r}getNumericFontSize(e,t){var n;const r=this.getTypographyStyle(e);return(null==t?void 0:t.skipFallback)&&r.isDefaultTypography?null:r&&r.size?(null===(n=r.scaling)||void 0===n?void 0:n.enabled)?this.getNumericScaledFontSize(r):Number(r.size.replace(/px/g,"")):null}getNumericScaledFontSize(e){const t=Number(window.getComputedStyle(document.documentElement).getPropertyValue("font-size").replace("px","")),n=t?t/16:1,r=e.size?Number(e.size.replace(/px/g,"")):17,a=r*n;if(e.scaling){const t=e.scaling.minimumSize?Number(e.scaling.minimumSize.replace(/px/g,"")):void 0,n=e.scaling.maximumSize?Number(e.scaling.maximumSize.replace(/px/g,"")):void 0;if(void 0===t&&void 0===n)return r;if(t&&a<t)return t;if(n&&a>n)return n}return a}getCSSFontProperties(e,t){var n,r;const a=this.getTypographyStyle(e);if(!a)return{};if((null==t?void 0:t.skipFallback)&&a.isDefaultTypography)return null;const o=a.transform?a.transform:(null==t?void 0:t.skipFontFallbacks)?null:"none",i=a.lineHeight||1,s=(null!==(n=this.getNumericFontSize(e,t))&&void 0!==n?n:17)*i+"px",l=(null===(r=a.scaling)||void 0===r?void 0:r.enabled)?`${this.getNumericScaledFontSize(a)}px`:a.size,c=a.fontFamily?`"${a.fontFamily}", ${un}`:un,d=a.weight||((null==t?void 0:t.skipFontFallbacks)?null:"normal"),u=a.style||((null==t?void 0:t.skipFontFallbacks)?null:"normal"),p=a.align;return Object.assign({textTransform:o,lineHeight:s,fontSize:l,fontFamily:c,fontWeight:d,fontStyle:u,fontSynthesis:"weight style"},p?{textAlign:p}:{})}getElementFocusCSSProperties(){return{outline:"none","&.focus-visible":{boxShadow:`0 0 0 2px ${this.getCSSColor("border.focus")} inset`}}}}const gn=(e,t)=>{const n=e.replace("#",""),r=parseInt(n,16);return`rgba(${[r>>16&255,r>>8&255,255&r].join(",")},${t})`},vn=(e,t,n)=>(e=e[(t=Array.isArray(t)?t:t.split("."))[0]])&&t.length>1?vn(e,t.slice(1),n):void 0!==e?e:n,fn=(e,t)=>n=>{let{themeMethod:r,primaryAccessor:a,secondaryAccessor:o,fallbackStyle:i,skipThemeHelperFallbacks:s,skipDefaultStyle:l}=n;const c=a?e[r](a,{skipFallback:s}):void 0,d=o?e[r](o,{skipFallback:!0}):void 0;let u="getCSSColor"===r?e.getCSSColor(a||o||"",{skipPrimaryStyle:!0}):e[r]("");return l&&(u=""),"secondary"===t&&d?d:c&&("primary"===t||"secondary"===t&&!e.hasSecondaryButtonStyle)?c:i||u||""},bn=e=>"string"!=typeof e?(mt.warn({level3:["Expected a string value for RGBA color, but received:",e]}),!1):null!==e.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/),yn=sn({from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}),wn=on("svg")((()=>({animation:`${yn} 1s infinite linear`}))),Sn=e=>{let{stopColor:t,size:n}=e;return(0,o.h)(wn,{width:n,height:n,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M31 16C31 7.71573 24.2843 1 16 1C7.71573 1 1 7.71573 1 16C1 24.2843 7.71573 31 16 31",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))},Cn=()=>(0,o.h)("style",null,"/*!\n * @license\n * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n */\n \n @font-face {\n font-family: 'Font Awesome 5 Free';\n font-style: normal;\n font-weight: 900;\n font-display: block;\n src: url('https://downloads.atomic.io/web-sdk/release/25.2.2/assets/fonts/font-awesome-5-15-4/fa-solid-900.woff');\n }\n "),kn={"500px":"","accessible-icon":"",accusoft:"","acquisitions-incorporated":"",ad:"","address-book":"","address-card":"",adjust:"",adn:"",adversal:"",affiliatetheme:"","air-freshener":"",airbnb:"",algolia:"","align-center":"","align-justify":"","align-left":"","align-right":"",alipay:"",allergies:"",amazon:"","amazon-pay":"",ambulance:"","american-sign-language-interpreting":"",amilia:"",anchor:"",android:"",angellist:"","angle-double-down":"","angle-double-left":"","angle-double-right":"","angle-double-up":"","angle-down":"","angle-left":"","angle-right":"","angle-up":"",angry:"",angrycreative:"",angular:"",ankh:"","app-store":"","app-store-ios":"",apper:"",apple:"","apple-alt":"","apple-pay":"",archive:"",archway:"","arrow-alt-circle-down":"","arrow-alt-circle-left":"","arrow-alt-circle-right":"","arrow-alt-circle-up":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-down":"","arrow-left":"","arrow-right":"","arrow-up":"","arrows-alt":"","arrows-alt-h":"","arrows-alt-v":"",artstation:"","assistive-listening-systems":"",asterisk:"",asymmetrik:"",at:"",atlas:"",atlassian:"",atom:"",audible:"","audio-description":"",autoprefixer:"",avianex:"",aviato:"",award:"",aws:"",baby:"","baby-carriage":"",backspace:"",backward:"",bacon:"",bacteria:"",bacterium:"",bahai:"","balance-scale":"","balance-scale-left":"","balance-scale-right":"",ban:"","band-aid":"",bandcamp:"",barcode:"",bars:"","baseball-ball":"","basketball-ball":"",bath:"","battery-empty":"","battery-full":"","battery-half":"","battery-quarter":"","battery-three-quarters":"","battle-net":"",bed:"",beer:"",behance:"","behance-square":"",bell:"","bell-slash":"","bezier-curve":"",bible:"",bicycle:"",biking:"",bimobject:"",binoculars:"",biohazard:"","birthday-cake":"",bitbucket:"",bitcoin:"",bity:"","black-tie":"",blackberry:"",blender:"","blender-phone":"",blind:"",blog:"",blogger:"","blogger-b":"",bluetooth:"","bluetooth-b":"",bold:"",bolt:"",bomb:"",bone:"",bong:"",book:"","book-dead":"","book-medical":"","book-open":"","book-reader":"",bookmark:"",bootstrap:"","border-all":"","border-none":"","border-style":"","bowling-ball":"",box:"","box-open":"","box-tissue":"",boxes:"",braille:"",brain:"","bread-slice":"",briefcase:"","briefcase-medical":"","broadcast-tower":"",broom:"",brush:"",btc:"",buffer:"",bug:"",building:"",bullhorn:"",bullseye:"",burn:"",buromobelexperte:"",bus:"","bus-alt":"","business-time":"","buy-n-large":"",buysellads:"",calculator:"",calendar:"","calendar-alt":"","calendar-check":"","calendar-day":"","calendar-minus":"","calendar-plus":"","calendar-times":"","calendar-week":"",camera:"","camera-retro":"",campground:"","canadian-maple-leaf":"","candy-cane":"",cannabis:"",capsules:"",car:"","car-alt":"","car-battery":"","car-crash":"","car-side":"",caravan:"","caret-down":"","caret-left":"","caret-right":"","caret-square-down":"","caret-square-left":"","caret-square-right":"","caret-square-up":"","caret-up":"",carrot:"","cart-arrow-down":"","cart-plus":"","cash-register":"",cat:"","cc-amazon-pay":"","cc-amex":"","cc-apple-pay":"","cc-diners-club":"","cc-discover":"","cc-jcb":"","cc-mastercard":"","cc-paypal":"","cc-stripe":"","cc-visa":"",centercode:"",centos:"",certificate:"",chair:"",chalkboard:"","chalkboard-teacher":"","charging-station":"","chart-area":"","chart-bar":"","chart-line":"","chart-pie":"",check:"","check-circle":"","check-double":"","check-square":"",cheese:"",chess:"","chess-bishop":"","chess-board":"","chess-king":"","chess-knight":"","chess-pawn":"","chess-queen":"","chess-rook":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-left":"","chevron-right":"","chevron-up":"",child:"",chrome:"",chromecast:"",church:"",circle:"","circle-notch":"",city:"","clinic-medical":"",clipboard:"","clipboard-check":"","clipboard-list":"",clock:"",clone:"","closed-captioning":"",cloud:"","cloud-download-alt":"","cloud-meatball":"","cloud-moon":"","cloud-moon-rain":"","cloud-rain":"","cloud-showers-heavy":"","cloud-sun":"","cloud-sun-rain":"","cloud-upload-alt":"",cloudflare:"",cloudscale:"",cloudsmith:"",cloudversify:"",cocktail:"",code:"","code-branch":"",codepen:"",codiepie:"",coffee:"",cog:"",cogs:"",coins:"",columns:"",comment:"","comment-alt":"","comment-dollar":"","comment-dots":"","comment-medical":"","comment-slash":"",comments:"","comments-dollar":"","compact-disc":"",compass:"",compress:"","compress-alt":"","compress-arrows-alt":"","concierge-bell":"",confluence:"",connectdevelop:"",contao:"",cookie:"","cookie-bite":"",copy:"",copyright:"","cotton-bureau":"",couch:"",cpanel:"","creative-commons":"","creative-commons-by":"","creative-commons-nc":"","creative-commons-nc-eu":"","creative-commons-nc-jp":"","creative-commons-nd":"","creative-commons-pd":"","creative-commons-pd-alt":"","creative-commons-remix":"","creative-commons-sa":"","creative-commons-sampling":"","creative-commons-sampling-plus":"","creative-commons-share":"","creative-commons-zero":"","credit-card":"","critical-role":"",crop:"","crop-alt":"",cross:"",crosshairs:"",crow:"",crown:"",crutch:"",css3:"","css3-alt":"",cube:"",cubes:"",cut:"",cuttlefish:"","d-and-d":"","d-and-d-beyond":"",dailymotion:"",dashcube:"",database:"",deaf:"",deezer:"",delicious:"",democrat:"",deploydog:"",deskpro:"",desktop:"",dev:"",deviantart:"",dharmachakra:"",dhl:"",diagnoses:"",diaspora:"",dice:"","dice-d20":"","dice-d6":"","dice-five":"","dice-four":"","dice-one":"","dice-six":"","dice-three":"","dice-two":"",digg:"","digital-ocean":"","digital-tachograph":"",directions:"",discord:"",discourse:"",disease:"",divide:"",dizzy:"",dna:"",dochub:"",docker:"",dog:"","dollar-sign":"",dolly:"","dolly-flatbed":"",donate:"","door-closed":"","door-open":"","dot-circle":"",dove:"",download:"",draft2digital:"","drafting-compass":"",dragon:"","draw-polygon":"",dribbble:"","dribbble-square":"",dropbox:"",drum:"","drum-steelpan":"","drumstick-bite":"",drupal:"",dumbbell:"",dumpster:"","dumpster-fire":"",dungeon:"",dyalog:"",earlybirds:"",ebay:"",edge:"","edge-legacy":"",edit:"",egg:"",eject:"",elementor:"","ellipsis-h":"","ellipsis-v":"",ello:"",ember:"",empire:"",envelope:"","envelope-open":"","envelope-open-text":"","envelope-square":"",envira:"",equals:"",eraser:"",erlang:"",ethereum:"",ethernet:"",etsy:"","euro-sign":"",evernote:"","exchange-alt":"",exclamation:"","exclamation-circle":"","exclamation-triangle":"",expand:"","expand-alt":"","expand-arrows-alt":"",expeditedssl:"","external-link-alt":"","external-link-square-alt":"",eye:"","eye-dropper":"","eye-slash":"",facebook:"","facebook-f":"","facebook-messenger":"","facebook-square":"",fan:"","fantasy-flight-games":"","fast-backward":"","fast-forward":"",faucet:"",fax:"",feather:"","feather-alt":"",fedex:"",fedora:"",female:"","fighter-jet":"",figma:"",file:"","file-alt":"","file-archive":"","file-audio":"","file-code":"","file-contract":"","file-csv":"","file-download":"","file-excel":"","file-export":"","file-image":"","file-import":"","file-invoice":"","file-invoice-dollar":"","file-medical":"","file-medical-alt":"","file-pdf":"","file-powerpoint":"","file-prescription":"","file-signature":"","file-upload":"","file-video":"","file-word":"",fill:"","fill-drip":"",film:"",filter:"",fingerprint:"",fire:"","fire-alt":"","fire-extinguisher":"",firefox:"","firefox-browser":"","first-aid":"","first-order":"","first-order-alt":"",firstdraft:"",fish:"","fist-raised":"",flag:"","flag-checkered":"","flag-usa":"",flask:"",flickr:"",flipboard:"",flushed:"",fly:"",folder:"","folder-minus":"","folder-open":"","folder-plus":"",font:"","font-awesome":"","font-awesome-alt":"","font-awesome-flag":"","font-awesome-logo-full":"",fonticons:"","fonticons-fi":"","football-ball":"","fort-awesome":"","fort-awesome-alt":"",forumbee:"",forward:"",foursquare:"","free-code-camp":"",freebsd:"",frog:"",frown:"","frown-open":"",fulcrum:"","funnel-dollar":"",futbol:"","galactic-republic":"","galactic-senate":"",gamepad:"","gas-pump":"",gavel:"",gem:"",genderless:"","get-pocket":"",gg:"","gg-circle":"",ghost:"",gift:"",gifts:"",git:"","git-alt":"","git-square":"",github:"","github-alt":"","github-square":"",gitkraken:"",gitlab:"",gitter:"","glass-cheers":"","glass-martini":"","glass-martini-alt":"","glass-whiskey":"",glasses:"",glide:"","glide-g":"",globe:"","globe-africa":"","globe-americas":"","globe-asia":"","globe-europe":"",gofore:"","golf-ball":"",goodreads:"","goodreads-g":"",google:"","google-drive":"","google-pay":"","google-play":"","google-plus":"","google-plus-g":"","google-plus-square":"","google-wallet":"",gopuram:"","graduation-cap":"",gratipay:"",grav:"","greater-than":"","greater-than-equal":"",grimace:"",grin:"","grin-alt":"","grin-beam":"","grin-beam-sweat":"","grin-hearts":"","grin-squint":"","grin-squint-tears":"","grin-stars":"","grin-tears":"","grin-tongue":"","grin-tongue-squint":"","grin-tongue-wink":"","grin-wink":"","grip-horizontal":"","grip-lines":"","grip-lines-vertical":"","grip-vertical":"",gripfire:"",grunt:"",guilded:"",guitar:"",gulp:"","h-square":"","hacker-news":"","hacker-news-square":"",hackerrank:"",hamburger:"",hammer:"",hamsa:"","hand-holding":"","hand-holding-heart":"","hand-holding-medical":"","hand-holding-usd":"","hand-holding-water":"","hand-lizard":"","hand-middle-finger":"","hand-paper":"","hand-peace":"","hand-point-down":"","hand-point-left":"","hand-point-right":"","hand-point-up":"","hand-pointer":"","hand-rock":"","hand-scissors":"","hand-sparkles":"","hand-spock":"",hands:"","hands-helping":"","hands-wash":"",handshake:"","handshake-alt-slash":"","handshake-slash":"",hanukiah:"","hard-hat":"",hashtag:"","hat-cowboy":"","hat-cowboy-side":"","hat-wizard":"",hdd:"","head-side-cough":"","head-side-cough-slash":"","head-side-mask":"","head-side-virus":"",heading:"",headphones:"","headphones-alt":"",headset:"",heart:"","heart-broken":"",heartbeat:"",helicopter:"",highlighter:"",hiking:"",hippo:"",hips:"","hire-a-helper":"",history:"",hive:"","hockey-puck":"","holly-berry":"",home:"",hooli:"",hornbill:"",horse:"","horse-head":"",hospital:"","hospital-alt":"","hospital-symbol":"","hospital-user":"","hot-tub":"",hotdog:"",hotel:"",hotjar:"",hourglass:"","hourglass-end":"","hourglass-half":"","hourglass-start":"","house-damage":"","house-user":"",houzz:"",hryvnia:"",html5:"",hubspot:"","i-cursor":"","ice-cream":"",icicles:"",icons:"","id-badge":"","id-card":"","id-card-alt":"",ideal:"",igloo:"",image:"",images:"",imdb:"",inbox:"",indent:"",industry:"",infinity:"",info:"","info-circle":"",innosoft:"",instagram:"","instagram-square":"",instalod:"",intercom:"","internet-explorer":"",invision:"",ioxhost:"",italic:"","itch-io":"",itunes:"","itunes-note":"",java:"",jedi:"","jedi-order":"",jenkins:"",jira:"",joget:"",joint:"",joomla:"","journal-whills":"",js:"","js-square":"",jsfiddle:"",kaaba:"",kaggle:"",key:"",keybase:"",keyboard:"",keycdn:"",khanda:"",kickstarter:"","kickstarter-k":"",kiss:"","kiss-beam":"","kiss-wink-heart":"","kiwi-bird":"",korvue:"",landmark:"",language:"",laptop:"","laptop-code":"","laptop-house":"","laptop-medical":"",laravel:"",lastfm:"","lastfm-square":"",laugh:"","laugh-beam":"","laugh-squint":"","laugh-wink":"","layer-group":"",leaf:"",leanpub:"",lemon:"",less:"","less-than":"","less-than-equal":"","level-down-alt":"","level-up-alt":"","life-ring":"",lightbulb:"",line:"",link:"",linkedin:"","linkedin-in":"",linode:"",linux:"","lira-sign":"",list:"","list-alt":"","list-ol":"","list-ul":"","location-arrow":"",lock:"","lock-open":"","long-arrow-alt-down":"","long-arrow-alt-left":"","long-arrow-alt-right":"","long-arrow-alt-up":"","low-vision":"","luggage-cart":"",lungs:"","lungs-virus":"",lyft:"",magento:"",magic:"",magnet:"","mail-bulk":"",mailchimp:"",male:"",mandalorian:"",map:"","map-marked":"","map-marked-alt":"","map-marker":"","map-marker-alt":"","map-pin":"","map-signs":"",markdown:"",marker:"",mars:"","mars-double":"","mars-stroke":"","mars-stroke-h":"","mars-stroke-v":"",mask:"",mastodon:"",maxcdn:"",mdb:"",medal:"",medapps:"",medium:"","medium-m":"",medkit:"",medrt:"",meetup:"",megaport:"",meh:"","meh-blank":"","meh-rolling-eyes":"",memory:"",mendeley:"",menorah:"",mercury:"",meteor:"",microblog:"",microchip:"",microphone:"","microphone-alt":"","microphone-alt-slash":"","microphone-slash":"",microscope:"",microsoft:"",minus:"","minus-circle":"","minus-square":"",mitten:"",mix:"",mixcloud:"",mixer:"",mizuni:"",mobile:"","mobile-alt":"",modx:"",monero:"","money-bill":"","money-bill-alt":"","money-bill-wave":"","money-bill-wave-alt":"","money-check":"","money-check-alt":"",monument:"",moon:"","mortar-pestle":"",mosque:"",motorcycle:"",mountain:"",mouse:"","mouse-pointer":"","mug-hot":"",music:"",napster:"",neos:"","network-wired":"",neuter:"",newspaper:"",nimblr:"",node:"","node-js":"","not-equal":"","notes-medical":"",npm:"",ns8:"",nutritionix:"","object-group":"","object-ungroup":"","octopus-deploy":"",odnoklassniki:"","odnoklassniki-square":"","oil-can":"","old-republic":"",om:"",opencart:"",openid:"",opera:"","optin-monster":"",orcid:"",osi:"",otter:"",outdent:"",page4:"",pagelines:"",pager:"","paint-brush":"","paint-roller":"",palette:"",palfed:"",pallet:"","paper-plane":"",paperclip:"","parachute-box":"",paragraph:"",parking:"",passport:"",pastafarianism:"",paste:"",patreon:"",pause:"","pause-circle":"",paw:"",paypal:"",peace:"",pen:"","pen-alt":"","pen-fancy":"","pen-nib":"","pen-square":"","pencil-alt":"","pencil-ruler":"","penny-arcade":"","people-arrows":"","people-carry":"","pepper-hot":"",perbyte:"",percent:"",percentage:"",periscope:"","person-booth":"",phabricator:"","phoenix-framework":"","phoenix-squadron":"",phone:"","phone-alt":"","phone-slash":"","phone-square":"","phone-square-alt":"","phone-volume":"","photo-video":"",php:"","pied-piper":"","pied-piper-alt":"","pied-piper-hat":"","pied-piper-pp":"","pied-piper-square":"","piggy-bank":"",pills:"",pinterest:"","pinterest-p":"","pinterest-square":"","pizza-slice":"","place-of-worship":"",plane:"","plane-arrival":"","plane-departure":"","plane-slash":"",play:"","play-circle":"",playstation:"",plug:"",plus:"","plus-circle":"","plus-square":"",podcast:"",poll:"","poll-h":"",poo:"","poo-storm":"",poop:"",portrait:"","pound-sign":"","power-off":"",pray:"","praying-hands":"",prescription:"","prescription-bottle":"","prescription-bottle-alt":"",print:"",procedures:"","product-hunt":"","project-diagram":"","pump-medical":"","pump-soap":"",pushed:"","puzzle-piece":"",python:"",qq:"",qrcode:"",question:"","question-circle":"",quidditch:"",quinscape:"",quora:"","quote-left":"","quote-right":"",quran:"","r-project":"",radiation:"","radiation-alt":"",rainbow:"",random:"","raspberry-pi":"",ravelry:"",react:"",reacteurope:"",readme:"",rebel:"",receipt:"","record-vinyl":"",recycle:"","red-river":"",reddit:"","reddit-alien":"","reddit-square":"",redhat:"",redo:"","redo-alt":"",registered:"","remove-format":"",renren:"",reply:"","reply-all":"",replyd:"",republican:"",researchgate:"",resolving:"",restroom:"",retweet:"",rev:"",ribbon:"",ring:"",road:"",robot:"",rocket:"",rocketchat:"",rockrms:"",route:"",rss:"","rss-square":"","ruble-sign":"",ruler:"","ruler-combined":"","ruler-horizontal":"","ruler-vertical":"",running:"","rupee-sign":"",rust:"","sad-cry":"","sad-tear":"",safari:"",salesforce:"",sass:"",satellite:"","satellite-dish":"",save:"",schlix:"",school:"",screwdriver:"",scribd:"",scroll:"","sd-card":"",search:"","search-dollar":"","search-location":"","search-minus":"","search-plus":"",searchengin:"",seedling:"",sellcast:"",sellsy:"",server:"",servicestack:"",shapes:"",share:"","share-alt":"","share-alt-square":"","share-square":"","shekel-sign":"","shield-alt":"","shield-virus":"",ship:"","shipping-fast":"",shirtsinbulk:"","shoe-prints":"",shopify:"","shopping-bag":"","shopping-basket":"","shopping-cart":"",shopware:"",shower:"","shuttle-van":"",sign:"","sign-in-alt":"","sign-language":"","sign-out-alt":"",signal:"",signature:"","sim-card":"",simplybuilt:"",sink:"",sistrix:"",sitemap:"",sith:"",skating:"",sketch:"",skiing:"","skiing-nordic":"",skull:"","skull-crossbones":"",skyatlas:"",skype:"",slack:"","slack-hash":"",slash:"",sleigh:"","sliders-h":"",slideshare:"",smile:"","smile-beam":"","smile-wink":"",smog:"",smoking:"","smoking-ban":"",sms:"",snapchat:"","snapchat-ghost":"","snapchat-square":"",snowboarding:"",snowflake:"",snowman:"",snowplow:"",soap:"",socks:"","solar-panel":"",sort:"","sort-alpha-down":"","sort-alpha-down-alt":"","sort-alpha-up":"","sort-alpha-up-alt":"","sort-amount-down":"","sort-amount-down-alt":"","sort-amount-up":"","sort-amount-up-alt":"","sort-down":"","sort-numeric-down":"","sort-numeric-down-alt":"","sort-numeric-up":"","sort-numeric-up-alt":"","sort-up":"",soundcloud:"",sourcetree:"",spa:"","space-shuttle":"",speakap:"","speaker-deck":"","spell-check":"",spider:"",spinner:"",splotch:"",spotify:"","spray-can":"",square:"","square-full":"","square-root-alt":"",squarespace:"","stack-exchange":"","stack-overflow":"",stackpath:"",stamp:"",star:"","star-and-crescent":"","star-half":"","star-half-alt":"","star-of-david":"","star-of-life":"",staylinked:"",steam:"","steam-square":"","steam-symbol":"","step-backward":"","step-forward":"",stethoscope:"","sticker-mule":"","sticky-note":"",stop:"","stop-circle":"",stopwatch:"","stopwatch-20":"",store:"","store-alt":"","store-alt-slash":"","store-slash":"",strava:"",stream:"","street-view":"",strikethrough:"",stripe:"","stripe-s":"",stroopwafel:"",studiovinari:"",stumbleupon:"","stumbleupon-circle":"",subscript:"",subway:"",suitcase:"","suitcase-rolling":"",sun:"",superpowers:"",superscript:"",supple:"",surprise:"",suse:"",swatchbook:"",swift:"",swimmer:"","swimming-pool":"",symfony:"",synagogue:"",sync:"","sync-alt":"",syringe:"",table:"","table-tennis":"",tablet:"","tablet-alt":"",tablets:"","tachometer-alt":"",tag:"",tags:"",tape:"",tasks:"",taxi:"",teamspeak:"",teeth:"","teeth-open":"",telegram:"","telegram-plane":"","temperature-high":"","temperature-low":"","tencent-weibo":"",tenge:"",terminal:"","text-height":"","text-width":"",th:"","th-large":"","th-list":"","the-red-yeti":"","theater-masks":"",themeco:"",themeisle:"",thermometer:"","thermometer-empty":"","thermometer-full":"","thermometer-half":"","thermometer-quarter":"","thermometer-three-quarters":"","think-peaks":"","thumbs-down":"","thumbs-up":"",thumbtack:"","ticket-alt":"",tiktok:"",times:"","times-circle":"",tint:"","tint-slash":"",tired:"","toggle-off":"","toggle-on":"",toilet:"","toilet-paper":"","toilet-paper-slash":"",toolbox:"",tools:"",tooth:"",torah:"","torii-gate":"",tractor:"","trade-federation":"",trademark:"","traffic-light":"",trailer:"",train:"",tram:"",transgender:"","transgender-alt":"",trash:"","trash-alt":"","trash-restore":"","trash-restore-alt":"",tree:"",trello:"",trophy:"",truck:"","truck-loading":"","truck-monster":"","truck-moving":"","truck-pickup":"",tshirt:"",tty:"",tumblr:"","tumblr-square":"",tv:"",twitch:"",twitter:"","twitter-square":"",typo3:"",uber:"",ubuntu:"",uikit:"",umbraco:"",umbrella:"","umbrella-beach":"",uncharted:"",underline:"",undo:"","undo-alt":"",uniregistry:"",unity:"","universal-access":"",university:"",unlink:"",unlock:"","unlock-alt":"",unsplash:"",untappd:"",upload:"",ups:"",usb:"",user:"","user-alt":"","user-alt-slash":"","user-astronaut":"","user-check":"","user-circle":"","user-clock":"","user-cog":"","user-edit":"","user-friends":"","user-graduate":"","user-injured":"","user-lock":"","user-md":"","user-minus":"","user-ninja":"","user-nurse":"","user-plus":"","user-secret":"","user-shield":"","user-slash":"","user-tag":"","user-tie":"","user-times":"",users:"","users-cog":"","users-slash":"",usps:"",ussunnah:"","utensil-spoon":"",utensils:"",vaadin:"","vector-square":"",venus:"","venus-double":"","venus-mars":"",vest:"","vest-patches":"",viacoin:"",viadeo:"","viadeo-square":"",vial:"",vials:"",viber:"",video:"","video-slash":"",vihara:"",vimeo:"","vimeo-square":"","vimeo-v":"",vine:"",virus:"","virus-slash":"",viruses:"",vk:"",vnv:"",voicemail:"","volleyball-ball":"","volume-down":"","volume-mute":"","volume-off":"","volume-up":"","vote-yea":"","vr-cardboard":"",vuejs:"",walking:"",wallet:"",warehouse:"","watchman-monitoring":"",water:"","wave-square":"",waze:"",weebly:"",weibo:"",weight:"","weight-hanging":"",weixin:"",whatsapp:"","whatsapp-square":"",wheelchair:"",whmcs:"",wifi:"","wikipedia-w":"",wind:"","window-close":"","window-maximize":"","window-minimize":"","window-restore":"",windows:"","wine-bottle":"","wine-glass":"","wine-glass-alt":"",wix:"","wizards-of-the-coast":"",wodu:"","wolf-pack-battalion":"","won-sign":"",wordpress:"","wordpress-simple":"",wpbeginner:"",wpexplorer:"",wpforms:"",wpressr:"",wrench:"","x-ray":"",xbox:"",xing:"","xing-square":"","y-combinator":"",yahoo:"",yammer:"",yandex:"","yandex-international":"",yarn:"",yelp:"","yen-sign":"","yin-yang":"",yoast:"",youtube:"","youtube-square":"",zhihu:""},xn=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,o.h)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":n},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 2H2V13.398L9.66274 8.25944C10.1695 7.91961 10.8316 7.92061 11.3374 8.26198L14 10.0593V2ZM14 14H2.89774L10.2197 9.08999C10.3886 8.97671 10.6093 8.97704 10.7779 9.09083L14 11.2657V14ZM2 1C1.44772 1 1 1.44772 1 2V14C1 14.5523 1.44772 15 2 15H14C14.5523 15 15 14.5523 15 14V2C15 1.44772 14.5523 1 14 1H2ZM6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4ZM5 6C5 5.44771 5.44771 5 6 5C6.55229 5 7 5.44771 7 6C7 6.55229 6.55229 7 6 7C5.44771 7 5 6.55229 5 6Z",fill:t}))},In=on("i")((e=>{let{size:t,styles:n}=e;return Object.assign({fontFamily:"'Font Awesome 5 Free'",fontWeight:"900",fontSize:`${t}px`,width:`${t}px`,textAlign:"center",fontStyle:"normal",fontVariant:"normal",textRendering:"auto","-moz-osx-font-smoothing":"grayscale","-webkit-font-smoothing":"antialiased"},n)})),On=on("div")((e=>{var t;let{color:n,size:r,styles:a}=e;return Object.assign(Object.assign(Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},n?{fill:n}:{}),a),{width:`${r}px`,height:null!==(t=a.lineHeight)&&void 0!==t?t:`${r}px`})})),Mn=e=>{let{iconName:t,iconUrl:n,size:r,color:a,fallbackColor:i,styles:s={}}=e;const[l,c]=h(!1),d=f(n);return g((()=>{n&&n!==d.current&&l&&(d.current=n,c(!1))}),[n,l]),n&&!l?(0,o.h)(On,{size:r,styles:s},(0,o.h)("svg",{"aria-hidden":"true","data-src":n,"data-replacement-color":a,"data-container-size":r,oniconloaderror:()=>{mt.error({level1:[`Error loading custom icon: ${n}`]}),c(!0)},style:Object.assign({maxWidth:`${r}px`,maxHeight:`${r}px`},a?{color:a}:{})})):t?(a&&(s.color=a),(0,o.h)(In,{styles:s,size:r,"aria-hidden":"true"},kn[t]||"")):(0,o.h)(On,{size:r,styles:s},(0,o.h)(xn,{ariaHidden:!0,fillColor:null!=a?a:i}))},Tn=e=>{let{theme:t,appearance:n}=e;const r=fn(t,n),a=(e,t)=>t?{[e]:t}:{},o=t.getShape("buttonWidth.global"),i=r({themeMethod:"getCSSFontProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:{}});return Object.assign(Object.assign(Object.assign({position:"relative",cursor:"pointer",width:"hugsLabel"===o?"auto":"100%",maxWidth:"100%",padding:r({themeMethod:"getPadding",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:"10px 20px"}),backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.button",secondaryAccessor:"background.buttonSecondary"}),color:r({themeMethod:"getCSSColor",primaryAccessor:"text.button",secondaryAccessor:"text.buttonSecondary"}),textAlign:"center"},i),{borderStyle:"solid",borderColor:r({themeMethod:"getCSSColor",primaryAccessor:"border.button",secondaryAccessor:"border.buttonSecondary",fallbackStyle:"transparent",skipThemeHelperFallbacks:!0}),borderWidth:r({themeMethod:"getShape",primaryAccessor:"border.button",secondaryAccessor:"border.buttonSecondary",fallbackStyle:"0px"}),borderRadius:r({themeMethod:"getShape",primaryAccessor:"borderRadius.button",secondaryAccessor:"borderRadius.buttonSecondary",fallbackStyle:"0px"}),boxShadow:r({themeMethod:"getCSSShadowProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",skipThemeHelperFallbacks:!0,fallbackStyle:"none"}),display:"flex",alignItems:"center",whiteSpace:"pre-wrap",":hover":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonHover",secondaryAccessor:"text.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("backgroundColor",r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonHover",secondaryAccessor:"background.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonHover",secondaryAccessor:"borderRadius.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),":active":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonActive",secondaryAccessor:"text.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),{backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonActive",secondaryAccessor:"background.buttonActiveSecondary",fallbackStyle:"rgba(0,0,0,0.1)",skipThemeHelperFallbacks:!0})}),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonActive",secondaryAccessor:"borderRadius.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})))}),t.getElementFocusCSSProperties())},Fn=on("button")((e=>Object.assign({},Tn(e)))),jn=on("a")((e=>Object.assign(Object.assign({},Tn(e)),{textDecoration:"none"}))),_n=on("div")((e=>{var t,n;let r,a,{labelAlignment:o,iconAlignment:i,visible:s}=e;return"right"===i?(r="row-reverse",a=null!==(t=null==o?void 0:o.replace("left","flex-end").replace("right","flex-start"))&&void 0!==t?t:"center"):(r="row",a=null!==(n=null==o?void 0:o.replace("left","flex-start").replace("right","flex-end"))&&void 0!==n?n:"center"),{width:"100%",display:"flex",justifyContent:a,alignItems:"center",flexDirection:r,visibility:s?"visible":"hidden"}})),Ln=on("div")({display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}),Dn=on("span")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),An=e=>{let{nodeKey:t,clickHandler:n,text:r,icon:a,iconUrl:i,theme:s,appearance:l,loading:c,type:d,urlLink:u}=e;const p=u?jn:Fn,h=fn(s,l),m=h({themeMethod:"getCSSFontProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:{}}),g=h({themeMethod:"getShape",primaryAccessor:"align.buttonIcon",secondaryAccessor:"align.buttonIconSecondary",fallbackStyle:"left",skipThemeHelperFallbacks:!0}),v=h({themeMethod:"getShape",primaryAccessor:"lineHeight.buttonIcon",secondaryAccessor:"lineHeight.buttonIconSecondary",fallbackStyle:"1",skipThemeHelperFallbacks:!0}),f=h({themeMethod:"getNumericFontSize",primaryAccessor:"button",secondaryAccessor:"buttonSecondary"}),b=Object.assign(Object.assign({},"left"===g?{marginRight:"10px"}:{marginLeft:"10px"}),{lineHeight:f*v+"px",color:h({themeMethod:"getCSSColor",primaryAccessor:"icon.button",secondaryAccessor:"icon.buttonSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),y=h({themeMethod:"getCSSColor",primaryAccessor:"icon.button",secondaryAccessor:"icon.buttonSecondary"});return(0,o.h)(p,{key:t,"data-element-key":t,class:"submit-button",onClick:n,theme:s,appearance:l,tabIndex:"0",type:d,href:null==u?void 0:u.url,target:null==u?void 0:u.target},(0,o.h)(o.Fragment,null,c&&(0,o.h)(Ln,null,(0,o.h)(Sn,{stopColor:s.getCSSColor("text.button"),size:22})),(0,o.h)(_n,{"data-testid":"button-content-wrapper",labelAlignment:null==m?void 0:m.textAlign,iconAlignment:g,visible:!c},(a||i)&&(0,o.h)(Mn,{iconName:a,iconUrl:i,size:f,color:b.color,fallbackColor:y,styles:Object.assign(Object.assign(Object.assign({},b),!r&&{marginLeft:0,marginRight:0}),{alignSelf:"center",justifySelf:"start"})}),(0,o.h)(Dn,null,r))))},En=e=>{let{theme:t,appearance:n}=e;const r=fn(t,n),a=(e,t)=>t?{[e]:t}:{},o=r({themeMethod:"getCSSFontProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:{}}),i=t.getShape("buttonWidth.global"),s=t.getShape("buttonLayout.global"),l=r({themeMethod:"getCSSColor",primaryAccessor:"background.action",secondaryAccessor:"background.actionSecondary"}),c="transparent"===l||l.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/);let d="100%";return c&&(d="calc(100% + 40px)"),Object.assign(Object.assign(Object.assign({cursor:"pointer",padding:r({themeMethod:"getPadding",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:"10px 20px"}),margin:c&&"horizontal"!==s?"0 -20px":"0px",color:r({themeMethod:"getCSSColor",primaryAccessor:"text.action",secondaryAccessor:"text.actionSecondary"}),display:"flex",alignItems:"center",textAlign:"left"},o),{maxWidth:d,width:"hugsLabel"===i?"auto":d,backgroundColor:l,borderStyle:"solid",borderColor:r({themeMethod:"getCSSColor",primaryAccessor:"border.action",secondaryAccessor:"border.actionSecondary",fallbackStyle:"transparent",skipThemeHelperFallbacks:!0}),borderWidth:r({themeMethod:"getShape",primaryAccessor:"border.action",secondaryAccessor:"border.actionSecondary",fallbackStyle:"0px"}),borderRadius:r({themeMethod:"getShape",primaryAccessor:"borderRadius.action",secondaryAccessor:"borderRadius.actionSecondary",fallbackStyle:"0px"}),boxShadow:r({themeMethod:"getCSSShadowProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",skipThemeHelperFallbacks:!0,fallbackStyle:"none"}),":hover":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonHover",secondaryAccessor:"text.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),{backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonHover",secondaryAccessor:"background.buttonHoverSecondary",fallbackStyle:"rgba(0,0,0,0.05)",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonHover",secondaryAccessor:"borderRadius.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),":active":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonActive",secondaryAccessor:"text.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),{backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonActive",secondaryAccessor:"background.buttonActiveSecondary",fallbackStyle:"rgba(0,0,0,0.1)",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonActive",secondaryAccessor:"borderRadius.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})))}),t.getElementFocusCSSProperties())},Hn=on("button")((e=>Object.assign({},En(e)))),Pn=on("a")((e=>Object.assign(Object.assign({},En(e)),{textDecoration:"none"}))),Rn=on("div")((e=>{var t,n;let r,a,{labelAlignment:o,iconAlignment:i}=e;return"right"===i?(r="row-reverse",a=null!==(t=null==o?void 0:o.replace("left","flex-end").replace("right","flex-start"))&&void 0!==t?t:"flex-start"):(r="row",a=null!==(n=null==o?void 0:o.replace("left","flex-start").replace("right","flex-end"))&&void 0!==n?n:"flex-start"),{width:"100%",display:"flex",justifyContent:a,alignItems:"center",flexDirection:r}})),Vn=on("span")((()=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),$n=e=>{let{nodeKey:t,clickHandler:n,text:r,icon:a,iconUrl:i,theme:s,appearance:l,type:c,urlLink:d}=e;const u=d?Pn:Hn,p=fn(s,l),h=p({themeMethod:"getCSSFontProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:{}}),m=p({themeMethod:"getShape",primaryAccessor:"align.actionIcon",secondaryAccessor:"align.actionIconSecondary",fallbackStyle:"left",skipThemeHelperFallbacks:!0}),g=p({themeMethod:"getShape",primaryAccessor:"lineHeight.actionIcon",secondaryAccessor:"lineHeight.actionIconSecondary",fallbackStyle:"1",skipThemeHelperFallbacks:!0}),v=p({themeMethod:"getNumericFontSize",primaryAccessor:"action",secondaryAccessor:"actionSecondary"}),f=Object.assign(Object.assign({},"left"===m?{marginRight:"10px"}:{marginLeft:"10px"}),{lineHeight:v*g+"px",color:p({themeMethod:"getCSSColor",primaryAccessor:"icon.action",secondaryAccessor:"icon.actionSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),b=p({themeMethod:"getCSSColor",primaryAccessor:"icon.action",secondaryAccessor:"icon.actionSecondary"});return(0,o.h)(u,{key:t,"data-element-key":t,class:"action-button",onClick:n,theme:s,appearance:l,tabIndex:"0",type:c,href:null==d?void 0:d.url,target:null==d?void 0:d.target},(0,o.h)(Rn,{labelAlignment:null==h?void 0:h.textAlign,iconAlignment:m},(a||i)&&(0,o.h)(Mn,{iconName:a,iconUrl:i,size:v,color:f.color,fallbackColor:b,styles:Object.assign(Object.assign(Object.assign({},f),!r&&{marginLeft:0,marginRight:0}),{alignSelf:"center",justifySelf:"start"})}),(0,o.h)(Vn,null,r)))},zn=e=>e.isWorkflow?(0,o.h)(An,e):(0,o.h)($n,e),Nn=e=>{let{fillColor:t,className:n,style:r,ariaHidden:a=!0}=e;return(0,o.h)("svg",{width:"14",height:"10",viewBox:"0 0 14 10",class:n,style:r,focusable:"false","aria-hidden":a},(0,o.h)("path",{d:"M13.7071 0.292893C14.0976 0.683417 14.0976 1.31658 13.7071 1.70711L5.70711 9.70711C5.31658 10.0976 4.68342 10.0976 4.29289 9.70711L0.292893 5.70711C-0.0976311 5.31658 -0.0976311 4.68342 0.292893 4.29289C0.683417 3.90237 1.31658 3.90237 1.70711 4.29289L5 7.58579L12.2929 0.292893C12.6834 -0.0976311 13.3166 -0.0976311 13.7071 0.292893Z",fill:t}))},Un=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,focusable:"false"},(0,o.h)("path",{d:"M11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13H11ZM13 7C13 6.44772 12.5523 6 12 6C11.4477 6 11 6.44772 11 7H13ZM9 2V1C8.73478 1 8.48043 1.10536 8.29289 1.29289L9 2ZM11 2L11.7071 1.29289C11.5196 1.10536 11.2652 1 11 1V2ZM3 2C2.44772 2 2 2.44772 2 3C2 3.55228 2.44772 4 3 4V2ZM17 4C17.5523 4 18 3.55228 18 3C18 2.44772 17.5523 2 17 2V4ZM5 7C5 6.44772 4.55228 6 4 6C3.44772 6 3 6.44772 3 7H5ZM17 7C17 6.44772 16.5523 6 16 6C15.4477 6 15 6.44772 15 7H17ZM9 7C9 6.44772 8.55228 6 8 6C7.44772 6 7 6.44772 7 7H9ZM7 13C7 13.5523 7.44772 14 8 14C8.55228 14 9 13.5523 9 13H7ZM13 13V7H11V13H13ZM9 3H11V1H9V3ZM15 7V16H17V7H15ZM15 16H5V18H15V16ZM5 16V7H3V16H5ZM3 4H8V2H3V4ZM8.29289 1.29289L7.29289 2.29289L8.70711 3.70711L9.70711 2.70711L8.29289 1.29289ZM8 4H12V2H8V4ZM12 4H17V2H12V4ZM10.2929 2.70711L11.2929 3.70711L12.7071 2.29289L11.7071 1.29289L10.2929 2.70711ZM7 7V13H9V7H7ZM5 16L5 16H3C3 17.1046 3.89543 18 5 18V16ZM15 16L15 16V18C16.1046 18 17 17.1046 17 16H15Z"}))},Bn=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,focusable:"false"},(0,o.h)("path",{d:"M10 7C10 6.44772 9.55228 6 9 6C8.44772 6 8 6.44772 8 7H10ZM9 11H8C8 11.5523 8.44772 12 9 12V11ZM13 12C13.5523 12 14 11.5523 14 11C14 10.4477 13.5523 10 13 10V12ZM10 17C6.13401 17 3 13.866 3 10H1C1 14.9706 5.02944 19 10 19V17ZM17 10C17 13.866 13.866 17 10 17V19C14.9706 19 19 14.9706 19 10H17ZM10 3C13.866 3 17 6.13401 17 10H19C19 5.02944 14.9706 1 10 1V3ZM10 1C5.02944 1 1 5.02944 1 10H3C3 6.13401 6.13401 3 10 3V1ZM8 7V11H10V7H8ZM9 12H13V10H9V12Z"}))},Wn=n(3054),qn=n(6756),Yn=n(1295),Zn=[];const Kn={},Gn=(e,t,n)=>{const{enableJs:r,disableUniqueIds:a,disableCssScoping:o,spriteIconId:i,replacementColor:s,containerSize:l}=t,c=!!i,d=(new DOMParser).parseFromString(n,"text/html"),u=c?d.getElementById(i):d.querySelector("svg"),p=(()=>{if(Zn.length)return Zn;for(const e in document.body)e.startsWith("on")&&Zn.push(e);return Zn.push("onbegin","onend","onrepeat"),Zn.push("onfocusin","onfocusout","onbounce","onfinish","onshow"),Zn})(),h=Kn[e.getAttribute("data-id")]||new Set,m=e.getAttribute("data-id")||`svg-loader_${Yn.incr()}`,g={};if(a||Array.from(u.querySelectorAll("[id]")).forEach((e=>{const t=e.getAttribute("id"),n=`${t}_${Yn.incr()}`;e.setAttribute("id",n),g[t]=n})),Array.from(u.querySelectorAll("*")).concat(u).forEach((t=>{if("script"===t.tagName){if(t.remove(),!r)return;{const n=document.createElement("script");n.appendChild(t.childNodes[0]),e.appendChild(n)}}const n=[];for(let e=0;e<t.attributes.length;e++){const{name:a,value:o}=t.attributes[e],i=qn(g,o,a);o!==i&&t.setAttribute(a,i),!p.includes(a.toLowerCase())||r?["href","xlink:href","values"].includes(a)&&o.startsWith("javascript")&&!r&&n.push(a):n.push(a)}if(n.forEach((e=>t.removeAttribute(e))),"style"===t.tagName&&!o){let e=Wn(t.innerHTML,`[data-id="${m}"]`,g);e=qn(g,e),e!==t.innerHTML&&(t.innerHTML=e)}})),e.innerHTML=i?u.outerHTML:u.innerHTML,!c)for(let t=0;t<u.attributes.length;t++){const{name:n,value:r}=u.attributes[t];e.getAttribute(n)&&!h.has(n)||(h.add(n),e.setAttribute(n,r))}Kn[m]=h,e.setAttribute("data-id",m),function(e,t){const n=e.querySelectorAll("*"),r=new Map,a=(e,t,n)=>{r.has(e)?r.get(e)?.set(t,n):r.set(e,(new Map).set(t,n))};n.forEach((e=>{const t=e.getAttribute("style");let n,r,o=e.getAttribute("fill"),i=e.getAttribute("stroke");t&&(n=t.match(/fill\s*:\s*([^;]+)/),r=t.match(/stroke\s*:\s*([^;]+)/));const s={...o?{fill:o}:{},...i?{stroke:i}:{},...n?{fillMatch:n}:{},...r?{strokeMatch:r}:{}};o&&a(o,e,s),i&&a(i,e,s),n&&a(n[1],e,s),r&&a(r[1],e,s)})),1===r.size&&t&&r.forEach(((e,n)=>{"currentcolor"===n.toLowerCase()&&e.forEach(((e,n)=>{if(e.fill&&n.setAttribute("fill",t),e.stroke&&n.setAttribute("stroke",t),e.fillMatch){const r=n.getAttribute("style")?.replace(e.fillMatch[0],`fill: ${t}`)??"";n.setAttribute("style",r)}if(e.strokeMatch){const r=n.getAttribute("style")?.replace(e.strokeMatch[0],`stroke: ${t}`)??"";n.setAttribute("style",r)}}))}))}(e,s),function(e,t){const n=e.getBBox({stroke:!0,fill:!0});(t&&n.width>t||t&&n.height>t)&&e.setAttribute("viewBox",`${n.x} ${n.y} ${n.width} ${n.height}`)}(e,l),function(e){const t=e.getBBox({stroke:!0,fill:!0});e.setAttribute("width",t.width),e.setAttribute("height",t.height)}(e);const v=new CustomEvent("iconload",{bubbles:!0});if(e.dispatchEvent(v),e.getAttribute("oniconload")){e.setAttribute("onauxclick",e.getAttribute("oniconload"));const t=new CustomEvent("auxclick",{bubbles:!1,view:window});e.dispatchEvent(t),e.removeAttribute("onauxclick")}},Xn={},Qn={},Jn=async e=>{const t=new URL(e.getAttribute("data-src"),globalThis.location),n=t.toString().replace(t.hash,""),r=t.hash.replace("#",""),a="enabled"===e.getAttribute("data-js"),o="disabled"===e.getAttribute("data-unique-ids"),i="disabled"===e.getAttribute("data-css-scoping"),s=e.getAttribute("data-replacement-color"),l=e.getAttribute("data-container-size"),c=Gn.bind(self,e,{enableJs:a,disableUniqueIds:o,disableCssScoping:i,spriteIconId:r,replacementColor:s,containerSize:l});if(Qn[n]){const e=Qn[n];c(e)}else{if(Xn[n])return void setTimeout((()=>Jn(e)),20);Xn[n]=!0,fetch(n).then((e=>{if(!e.ok)throw Error(`Request for '${n}' returned ${e.status} (${e.statusText})`);return e.text()})).then((e=>{const t=e.toLowerCase().trim();if(!(t.startsWith("<svg")||t.startsWith("<?xml")||t.startsWith("<!doctype")))throw Error(`Resource '${n}' returned an invalid SVG file`);Qn[n]=e,c(e)})).catch((t=>{console.error(t);const n=new CustomEvent("iconloaderror",{bubbles:!0,detail:t.toString()});if(e.dispatchEvent(n),e.getAttribute("oniconloaderror")){Function("error",e.getAttribute("oniconloaderror"))(t)}})).finally((()=>{delete Xn[n]}))}};let er;globalThis.IntersectionObserver&&(er=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(Jn(e.target),er.unobserve(e.target))}))}),{rootMargin:"1200px"}));const tr=[];function nr(){Array.from(document.querySelectorAll("svg[data-src]:not([data-id])")).forEach((e=>{-1===tr.indexOf(e)&&(tr.push(e),"lazy"===e.getAttribute("data-loading")?er.observe(e):Jn(e))}))}let rr=!1;if(globalThis.addEventListener){const Fd=setInterval((()=>{nr()}),100);function jd(){clearInterval(Fd),nr(),(()=>{if(rr)return;rr=!0,new MutationObserver((e=>{e.some((e=>Array.from(e.addedNodes).some((e=>e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("data-src")&&!e.getAttribute("data-id")||e.querySelector("svg[data-src]:not([data-id])"))))))&&nr(),e.forEach((e=>{"attributes"===e.type&&Jn(e.target)}))})).observe(document.documentElement,{attributeFilter:["data-src"],attributes:!0,childList:!0,subtree:!0})})()}"interactive"===document.readyState||"complete"===document.readyState?jd():globalThis.addEventListener("DOMContentLoaded",(()=>{jd()}))}globalThis.SVGLoader={},globalThis.SVGLoader.updateMemoryCache=async(e,t)=>{Qn[e]=t};const ar=()=>(0,o.h)("svg",{width:"3",height:"15",viewBox:"0 0 3 15",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M3 1.5C3 2.32843 2.32843 3 1.5 3C0.671573 3 0 2.32843 0 1.5C0 0.671573 0.671573 0 1.5 0C2.32843 0 3 0.671573 3 1.5Z"}),(0,o.h)("path",{d:"M3 7.5C3 8.32843 2.32843 9 1.5 9C0.671573 9 0 8.32843 0 7.5C0 6.67157 0.671573 6 1.5 6C2.32843 6 3 6.67157 3 7.5Z"}),(0,o.h)("path",{d:"M3 13.5C3 14.3284 2.32843 15 1.5 15C0.671573 15 0 14.3284 0 13.5C0 12.6716 0.671573 12 1.5 12C2.32843 12 3 12.6716 3 13.5Z"})),or=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",style:t},(0,o.h)("path",{d:"M11 8V9C10.5955 9 10.2309 8.75636 10.0761 8.38268C9.92134 8.00901 10.0069 7.57889 10.2929 7.29289L11 8ZM10.5 2.5L11.2071 3.20711L10.5 2.5ZM6 8V18H4V8H6ZM5 17H14.3604V19H5V17ZM15.341 16.1961L16.541 10.1961L18.5021 10.5884L17.3021 16.5883L15.341 16.1961ZM11.2071 3.20711L5.70711 8.70711L4.29289 7.29289L9.79289 1.79289L11.2071 3.20711ZM15.5604 9H11V7H15.5604V9ZM10.2929 7.29289L12.7929 4.79289L14.2071 6.20711L11.7071 8.70711L10.2929 7.29289ZM5 9H3V7H5V9ZM2 10V16H0V10H2ZM3 17H5V19H3V17ZM2 16C2 16.5523 2.44771 17 3 17V19C1.34315 19 0 17.6569 0 16H2ZM3 9C2.44772 9 2 9.44772 2 10H0C0 8.34315 1.34315 7 3 7V9ZM12.7929 4.79289C13.2308 4.35499 13.2308 3.64501 12.7929 3.20711L14.2071 1.79289C15.4261 3.01184 15.4261 4.98815 14.2071 6.20711L12.7929 4.79289ZM9.79289 1.79289C11.0118 0.573941 12.9882 0.573942 14.2071 1.79289L12.7929 3.20711C12.355 2.7692 11.645 2.7692 11.2071 3.20711L9.79289 1.79289ZM14.3604 17C14.8371 17 15.2475 16.6635 15.341 16.1961L17.3021 16.5883C17.0217 17.9906 15.7904 19 14.3604 19V17ZM16.541 10.1961C16.6647 9.57732 16.1914 9 15.5604 9V7C17.4535 7 18.8734 8.73198 18.5021 10.5884L16.541 10.1961Z"}))},ir=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t},(0,o.h)("path",{d:"M8 11V10C8.40446 10 8.7691 10.2436 8.92388 10.6173C9.07866 10.991 8.9931 11.4211 8.70711 11.7071L8 11ZM8.5 16.5L7.79289 15.7929L8.5 16.5ZM13 11L13 1H15L15 11H13ZM14 2H4.63961V0H14V2ZM3.65903 2.80388L2.45903 8.80388L0.497866 8.41165L1.69787 2.41165L3.65903 2.80388ZM7.79289 15.7929L13.2929 10.2929L14.7071 11.7071L9.20711 17.2071L7.79289 15.7929ZM3.43961 10H8V12H3.43961V10ZM8.70711 11.7071L6.20711 14.2071L4.79289 12.7929L7.29289 10.2929L8.70711 11.7071ZM14 10H16L16 12H14L14 10ZM17 9V3H19L19 9H17ZM16 2L14 2V0L16 0V2ZM17 3C17 2.44771 16.5523 2 16 2V0C17.6569 0 19 1.34315 19 3H17ZM16 10C16.5523 10 17 9.55228 17 9H19C19 10.6569 17.6569 12 16 12L16 10ZM6.20711 14.2071C5.7692 14.645 5.7692 15.355 6.20711 15.7929L4.79289 17.2071C3.57394 15.9882 3.57394 14.0118 4.79289 12.7929L6.20711 14.2071ZM9.20711 17.2071C7.98815 18.4261 6.01184 18.4261 4.79289 17.2071L6.20711 15.7929C6.64501 16.2308 7.35499 16.2308 7.79289 15.7929L9.20711 17.2071ZM4.63961 2C4.16293 2 3.75251 2.33646 3.65903 2.80388L1.69787 2.41165C1.97832 1.00938 3.20956 0 4.63961 0V2ZM2.45903 8.80388C2.33527 9.42268 2.80856 10 3.43961 10V12C1.54647 12 0.126591 10.268 0.497866 8.41165L2.45903 8.80388Z"}))},sr=e=>e&&e.current&&e.current.base,lr={top:35,right:25},cr=on("button")((e=>{let{open:t,theme:n}=e;return Object.assign({cursor:"pointer",position:"absolute",top:"10px",right:"10px",width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"0px",borderRadius:"30px",zIndex:rs.OVERFLOW_MENU_BUTTON,background:n.getCSSColor(t?"background.optionsActive":"background.options"),"&:hover":{background:n.getCSSColor("background.optionsHover")}," > svg":{fill:n.getCSSColor(t?"icon.optionsActive":"icon.options")},"&:hover > svg":{fill:n.getCSSColor("icon.optionsHover")}},n.getElementFocusCSSProperties())})),dr=on("button")((e=>{let{theme:t}=e;return Object.assign({cursor:"pointer",position:"absolute",top:"10px",right:"10px",width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"0px",borderRadius:"30px",zIndex:rs.OVERFLOW_MENU_BUTTON,background:t.getCSSColor("background.options")," > svg":{stroke:t.getCSSColor("icon.options")},"&:hover":{background:t.getCSSColor("background.optionsHover")},"&:active":{background:t.getCSSColor("background.optionsActive")},"&:hover > svg":{stroke:t.getCSSColor("icon.optionsHover")},"&:active > svg":{stroke:t.getCSSColor("icon.optionsActive")}},t.getElementFocusCSSProperties())})),ur=e=>{let{theme:t,open:n,feedOrientation:r,children:a,cardRef:i,ariaLabelledBy:s}=e;const l=f(null);let c={direction:"down",maxHeight:0,maxWidth:0};return n&&(c=((e,t,n)=>{if(sr(t)&&sr(n)){const r=t.current.base.offsetParent,a=r.offsetParent,o=n.current.base,i=10,s=10;if("horizontal"===e){const e=r.offsetLeft+o.offsetLeft-a.scrollLeft,t=a.clientWidth-e,n=200,i=e>=n||t<n;return{direction:i?"left":"right",maxWidth:i?e:t}}const l=o.offsetTop,c=a.scrollHeight-r.offsetTop-i-l,d=r.offsetTop,u=o.scrollHeight,p=c>=u||d<u;return{direction:p?"down":"up",maxHeight:p?c:d,maxWidth:r.clientWidth-2*s}}return{direction:"down",maxHeight:0,maxWidth:0}})(r,i,l),setTimeout((()=>{if(sr(l)){const e=l.current.base.querySelector('[tabindex="0"]');if(e){e.focus()}}}),0)),(0,o.h)(pr,{maxHeight:`${c.maxHeight}px`,maxWidth:`${c.maxWidth}px`,open:n,theme:t,ref:l,children:a,direction:c.direction,"aria-labelledBy":s})},pr=on("ul")((e=>{var t;let n,{theme:r,open:a,maxHeight:o,maxWidth:i,direction:s}=e;switch(s){case"up":n="translateY(-100%) translateY(-50px)";break;case"down":case"left":n="translateY(0)";break;case"right":n="translateX(90%)"}return{position:"absolute",top:"50px",right:"10px",width:"300px",flexShrink:"0",background:r.getCSSColor("background.sheet"),display:"flex",flexFlow:"column",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",borderRadius:null!==(t=r.getShape("borderRadius.sheet",{skipFallback:!0}))&&void 0!==t?t:"5px",padding:"10px 0",overflow:"auto",listStyle:"none",margin:"0",zIndex:rs.OVERFLOW_MENU,maxHeight:a?`${o}`:"0px",maxWidth:a?`${i}`:"0px",visibility:a?"visible":"hidden",transform:n}})),hr=on("button")((e=>{let{theme:t}=e;return Object.assign(Object.assign(Object.assign({padding:"15px 20px",cursor:"pointer",display:"flex",flexShrink:"0",alignItems:"center",background:"transparent"},t.getCSSFontProperties("sheetItem")),{color:t.getCSSColor("text.sheetItem"),width:"100%",margin:"0 0 0 0"," svg":{fill:t.getCSSColor("icon.sheetItem")},"&:hover":{background:t.getCSSColor("background.sheetItemActive"),color:t.getCSSColor("text.sheetItemActive")},"&:hover svg":{fill:t.getCSSColor("icon.sheetItemActive")},border:"0px"}),t.getElementFocusCSSProperties())})),mr=on("span")((()=>({maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),gr=on("li")((e=>{let{theme:t}=e;return{borderTop:`1px solid ${t.getCSSColor("border.sheetItemDivider")}`,height:"1px",margin:"10px 0"}})),vr=on("li")((()=>({flexShrink:"0"}))),fr=e=>{let{title:t,icon:n,onClick:r,theme:a,className:i}=e;const s={marginRight:"20px",minWidth:"20px"};return(0,o.h)(vr,{role:"none"},(0,o.h)(hr,{theme:a,tabIndex:"-1",onClick:r,className:i},"bin"===n&&(0,o.h)(Un,{style:s}),"clock"===n&&(0,o.h)(Bn,{style:s}),"thumbs-up"===n&&(0,o.h)(or,{style:s}),"thumbs-down"===n&&(0,o.h)(ir,{style:s}),(0,o.h)(mr,null,t)))},br=32,yr=38,wr=40,Sr=13,Cr=27,kr=-1,xr=e=>{switch(e){case"ArrowUp":case"Up":return yr;case"ArrowDown":case"Down":return wr;case"Enter":return Sr;case"Spacebar":case" ":return br;case"Escape":return Cr;default:return kr}},Ir="ArrowUp",Or="ArrowDown",Mr="ArrowLeft",Tr="ArrowRight",Fr="Enter",jr=" ",_r="Escape",Lr="PageUp",Dr="PageDown",Ar="Tab",Er=on("div")((e=>{let{theme:t}=e;return Object.assign({width:"100%",border:"0"},t.getElementFocusCSSProperties())})),Hr=(e,t)=>{try{const n=Pr(e)[t];return n&&"none"===n.getAttribute("role")&&n.childNodes.length>0?n.childNodes[0]:n}catch(e){return null}},Pr=e=>e&&e.current&&e.current.base&&e.current.base.childNodes?[...e.current.base.childNodes].filter((e=>"true"!==e.getAttribute("aria-hidden"))):[],Rr=e=>{let{defaultIndex:t,theme:n,children:r}=e;const[a,i]=h(t||0),s=(0,o.createRef)(),l=f(-1);g((()=>{l.current=a}));const c=l.current;return g((()=>{i(t||0)}),[t]),g((()=>{var e,t,n;-1!==c&&(null===(n=Hr(s,c))||void 0===n||n.setAttribute("tabIndex","-1"));null===(e=Hr(s,a))||void 0===e||e.setAttribute("tabIndex","0"),null===(t=Hr(s,a))||void 0===t||t.focus()}),[a]),(0,o.h)(Er,{theme:n,className:"supports-keyboard-navigation",ref:s,onKeyDown:e=>{var t;let n=null;switch(xr(e.key)){case wr:n=a+1;break;case yr:n=a-1;break;case Sr:case br:null===(t=Hr(s,a))||void 0===t||t.click(),e.stopPropagation(),e.preventDefault()}var r,o;null!==n&&(r=n,o=Pr(s).length,n=(r+o)%o,i(n),e.view.event.preventDefault())}},r)},Vr=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"12",height:"12",viewBox:"0 0 12 12"},(0,o.h)("path",{d:"M1 1L6 6L11 11M1 11L11 1","stroke-width":"2","stroke-linecap":"round",stroke:t}))},$r=on("div")((e=>{let{feedOrientation:t,rendersButton:n,cardElements:r}=e;const a=((e,t)=>{var n,r;if(!t||!e||0===e.length)return{top:0,right:0};const a=(e,t)=>{var n;if(!e)return{top:0,right:0};const r=Array.isArray(e)?e[0]:e;switch(null==r?void 0:r.type){case me:case ge:const e=null==r||null===(n=r.attributes)||void 0===n?void 0:n.format;return"banner"===e?null:"text"===e?{top:0,right:lr.right}:{top:lr.top,right:0};case ve:case fe:case be:case ye:case we:case Se:case Ce:case ke:case Oe:case Me:case Te:case Fe:case je:case _e:return{top:lr.top,right:0};case de:case ue:case pe:case he:return{top:0,right:lr.right};case xe:case Ie:return a(null==r?void 0:r.children,t);default:return null}},o=null===(n=e[0])||void 0===n||null===(r=n.props)||void 0===r?void 0:r.node;return a(o,t)})(r,n);return Object.assign(Object.assign({},"horizontal"===t?{height:"100%",display:"flex",flexDirection:"column"}:{}),a?{"& > *:nth-child(2)":{marginRight:`${a.right}px`,marginTop:`${a.top}px`}}:{})})),zr=on("div")((e=>{let{theme:t,margin:n,minHeight:r,feedOrientation:a,cardWidth:o}=e;const i={width:`${o}px`,marginLeft:`${n}px`};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({backgroundColor:t.getCSSColor("background.card"),marginBottom:`${n}px`,borderRadius:t.getShape("borderRadius.card"),boxShadow:n>0?`0 ${t.getShape("offset.cardShadow")} ${t.getShape("blur.cardShadow")} ${t.getCSSColor("shadow.card")}`:"none",padding:"10px 20px",border:`${t.getShape("border.card")} solid ${t.getCSSColor("border.card")}`,position:"relative",minHeight:r?`${r}px`:"0px"},"horizontal"===a?i:{}),Ts(a).cardCompletion),Ts(a).dismissal),Ts(a).snooze),{".submitting, .submitted, .submitted-subview":{border:"0"}})})),Nr=on("div")((e=>{let{dimensions:t,centerAlign:n,leftPosition:r,feedOrientation:a}=e;const o=Object.assign({width:t.width,display:"flex",flexShrink:"0",scrollSnapAlign:"center",".fixed-position":{position:"unset",left:`${r?r/2+r:0}px`}},n&&{left:"50%",transform:"translateX(-50%)"});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({height:t.height},"horizontal"===a?o:{}),Fs(a).cardCompletion),Fs(a).dismissal),Fs(a).snooze),Fs(a).center)})),Ur=on("div")((()=>({})));var Br;!function(e){e.menu="menu",e.dismiss="dismiss",e.hidden="hidden"}(Br||(Br={}));const Wr=F((e=>{let{containerInstanceId:t,cardInstanceId:n,children:r,theme:a,animationState:i,cardFeedOverlayDisplayed:s,onDismiss:l,onSnooze:c,onFeedbackSelected:d,removeCard:u,customStrings:p,margin:m,centerAlign:b,accessibilityRole:y,actions:w,votingOptions:S,cardMinimumHeight:C,horizontalContainerConfig:k}=e;const[x,I]=h(!1),O=f(x),M=e=>{O.current=e,I(e)},[T,F]=h({height:"auto",width:"auto"}),[j,_]=h(0),L=f(null),D=f(null),A=f(null),E=`card-overflow-menu-${n}`,H=Uc(k);v((()=>{D.current&&D.current.base&&("submitted"===i||"submitted-subview"===i||"dismissed"===i||"snoozed"===i?(F({height:D.current.base.offsetHeight+m-1+"px",width:`${D.current.base.offsetWidth+m}px`}),"horizontal"===Uc(k)&&"center"===(null==k?void 0:k.lastCardAlignment)?(Jt().fixPositionRemainingCard(n),_(A.current.base.offsetLeft),setTimeout((()=>{Jt().centerRemainingCard(n)}),200),setTimeout((()=>{u()}),Ds(i))):setTimeout((()=>{u()}),Ds(i))):F({height:"auto",width:"auto"})),A.current&&A.current.base&&(_("fixed-position"===i?A.current.base.offsetLeft:0),"centering"===i&&setTimeout((()=>{Jt().removeCardState(n)}),Ds(i)))}),[i,D.current,A.current]),g((()=>{const e=e=>{var t;(null===(t=L.current)||void 0===t?void 0:t.base)&&!L.current.base.contains(e.target)&&M(!1)};document.addEventListener("mousedown",e);const t=e=>{if(O.current&&("Tab"===e.key&&M(!1),"Escape"===e.key&&O.current)){const e=document.getElementById(E);M(!1),null==e||e.focus()}};return document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}}),[n]);const{dismiss:{overflow:P},snooze:{overflow:R},voteUp:{overflow:V,feedback:$,feedbackLabel:z},voteDown:{overflow:N,feedback:U,feedbackLabel:B}}=w,W={voteUp:!0===(null==S?void 0:S.canVoteUseful)||V,voteDown:!0===(null==S?void 0:S.canVoteNotUseful)||N};let q=Br.hidden;W.voteUp||W.voteDown||R?q=Br.menu:P&&(q=Br.dismiss);const Y=(W.voteUp||W.voteDown)&&(P||R);return(0,o.h)(Nr,{ref:A,id:n,dimensions:T,feedOrientation:H,centerAlign:b,leftPosition:j,class:i,role:y},(0,o.h)(zr,{theme:a,class:`card-content ${i||""}`,ref:D,margin:m,minHeight:C,feedOrientation:H,cardWidth:null==k?void 0:k.cardWidth,inert:s},(0,o.h)($r,{class:"card-nodes",feedOrientation:H,rendersButton:q!==Br.hidden,cardElements:r},q===Br.menu&&(0,o.h)(Ur,{ref:L},(0,o.h)(cr,{class:"overflow-action",theme:a,open:x,tabIndex:"0",ariaLabel:"Card overflow menu",id:E,ariaHasPopup:"true",ariaExpanded:x,onClick:e=>{e.target&&e.target.focus(),M(!x)}},(0,o.h)(ar,null)),(0,o.h)(ur,{theme:a,ariaLabelledBy:E,open:x,feedOrientation:H,cardRef:D},(0,o.h)(Rr,{theme:a},W.voteUp&&(0,o.h)(fr,{onClick:()=>{d({sentiment:"positive",textFeedback:$,textFeedbackLabel:z,source:"overflow-menu"}),M(!1)},theme:a,title:(null==p?void 0:p.votingUsefulTitle)||"This is useful",icon:"thumbs-up",className:"vote-up-action"}),W.voteDown&&(0,o.h)(fr,{onClick:()=>{d({sentiment:"negative",textFeedback:U,textFeedbackLabel:B,source:"overflow-menu"}),M(!1)},theme:a,title:(null==p?void 0:p.votingNotUsefulTitle)||"This isn't useful",icon:"thumbs-down",className:"vote-down-action"}),Y&&(0,o.h)(gr,{theme:a,className:"card-overflow-divider","aria-hidden":"true"}),R&&(0,o.h)(fr,{onClick:()=>{c(),M(!1)},theme:a,title:(null==p?void 0:p.cardSnoozeTitle)||"Remind me",icon:"clock",className:"snooze-action"}),P&&(0,o.h)(fr,{onClick:()=>{l(),M(!1)},theme:a,title:"Dismiss",icon:"bin",className:"dismiss-action"})))),q===Br.dismiss&&(0,o.h)(dr,{ariaLabel:"Dismiss card",theme:a,tabIndex:"0",onClick:l,className:"dismiss-button"},(0,o.h)(Vr,null)),r),(0,o.h)(ys,{theme:a,animationState:i})),(0,o.h)(Os,{viewState:"topview",onCancelUpload:()=>{window.AtomicUploadService.cancelUploadForCard(t,n),Jt().finishCardFileUpload(n),!window.AtomicUploadService.getIsUploadingStatus(t)&&Jt().setCardFeedOverlay(!1)},theme:a,renderOverlay:"uploading-files"===i}),(0,o.h)(ws,{theme:a,animationState:i}))}),((e,t)=>0==t.isPreview&&e.animationState===t.animationState&&e.cardInstanceId===t.cardInstanceId&&e.runtimeVariables===t.runtimeVariables&&e.theme===t.theme)),qr=on("div")((e=>{let{feedOrientation:t,snapScroll:n}=e;const r={position:"relative",display:"flex",flexDirection:"row nowrap",alignItems:"stretch",flexShrink:"0",padding:"10px 10px 10px 0",overflowX:"auto",scrollSnapType:n?"x mandatory":"none"};return Object.assign({},"horizontal"===t?r:{})})),Yr=K.forwardRef(((e,t)=>{let{cardInstances:n,theme:r,isPreview:a,onDismiss:i,onSnooze:s,onFeedbackSelected:l,removeCard:c,cardStates:d,margin:u,runtimeVariables:p,customStrings:h,votingOptions:m,cardMinimumHeight:g,horizontalContainerConfig:v}=e;const f=ie().getState();let b=n;f.application.cardLimit&&(b=b.slice(0,f.application.cardLimit));const y=Uc(v);return(0,o.h)(qr,{feedOrientation:y,snapScroll:"free"!==(null==v?void 0:v.scrollMode),class:"card-list",ref:t},b.map((e=>{if(e.defaultView){var t;let n=null==p||null===(t=p.values)||void 0===t?void 0:t.get(e.instance.id);n=n||new Map;const w=1===b.length&&"horizontal"===y&&"center"===(null==v?void 0:v.lastCardAlignment);return e.defaultView.nodes=Ac(e.defaultView.nodes),(0,o.h)(Wr,{key:e.instance.id,cardInstanceId:e.instance.id,containerInstanceId:f.application.containerInstanceId,theme:r,isPreview:a,animationState:d[e.instance.id],cardFeedOverlayDisplayed:f.cardFeed.displayingOverlay,onDismiss:()=>{i(e.instance.id)},onSnooze:()=>{s(e.instance.id,e.metadata.expires)},onFeedbackSelected:t=>{l(t,e.instance.id)},removeCard:()=>{c(e.instance.id)},runtimeVariables:n,customStrings:h,margin:u,centerAlign:w,accessibilityRole:"listitem",actions:e.actions,votingOptions:m,cardMinimumHeight:g,horizontalContainerConfig:v},e.defaultView.nodes.map((t=>(0,o.h)(Tc,{cardInstanceId:e.instance.id,cardMetadata:e.metadata,node:t,isWorkflow:!1,theme:r,runtimeVariables:n,feedOrientation:y,embedMode:f.application.embedMode}))))}return null})))})),Zr=on("button")((e=>{let{theme:t}=e;return Object.assign({justifySelf:"end",alignSelf:"center",border:"0px",borderRadius:"999px",width:"40px",height:"40px",display:"flex",flexBasis:"40px",flex:"none",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",":hover":{backgroundColor:"rgba(0, 0, 0, 0.05)",transition:"background-color 0.1s ease"},":active":{backgroundColor:"rgba(0, 0, 0, 0.1)"}},t.getElementFocusCSSProperties())})),Kr={settings:e=>{let{fillColor:t}=e;return(0,o.h)("svg",{fill:t,width:"18",height:"14",viewBox:"0 0 18 14"},(0,o.h)("path",{d:"M17 4C17.5523 4 18 3.55228 18 3C18 2.44772 17.5523 2 17 2V4ZM1 2C0.447715 2 0 2.44772 0 3C0 3.55228 0.447715 4 1 4V2ZM17 12C17.5523 12 18 11.5523 18 11C18 10.4477 17.5523 10 17 10V12ZM1 10C0.447715 10 0 10.4477 0 11C0 11.5523 0.447715 12 1 12V10ZM13 3C13 3.55228 12.5523 4 12 4V6C13.6569 6 15 4.65685 15 3H13ZM12 4C11.4477 4 11 3.55228 11 3H9C9 4.65685 10.3431 6 12 6V4ZM11 3C11 2.44772 11.4477 2 12 2V0C10.3431 0 9 1.34315 9 3H11ZM12 2C12.5523 2 13 2.44772 13 3H15C15 1.34315 13.6569 0 12 0V2ZM14 4H17V2H14V4ZM10 2H1V4H10V2ZM7 11C7 11.5523 6.55228 12 6 12V14C7.65685 14 9 12.6569 9 11H7ZM6 12C5.44772 12 5 11.5523 5 11H3C3 12.6569 4.34315 14 6 14V12ZM5 11C5 10.4477 5.44772 10 6 10V8C4.34315 8 3 9.34315 3 11H5ZM6 10C6.55228 10 7 10.4477 7 11H9C9 9.34315 7.65685 8 6 8V10ZM8 12H17V10H8V12ZM4 10H1V12H4V10Z"}))},arrowLeft:e=>{let{fillColor:t}=e;return(0,o.h)("svg",{stroke:t,width:"14",height:"12",viewBox:"0 0 14 12"},(0,o.h)("path",{d:"M6 11L1 6M1 6L6 1M1 6L13 6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},cross:Vr},Gr=e=>{let{title:t,iconName:n,onClick:r,theme:a}=e;const i=Kr[n];return(0,o.h)(Zr,{onClick:r,tabIndex:"0",ariaLabel:t,theme:a,className:`button-${n}`},(0,o.h)(i,{fillColor:a.getCSSColor("text.navigationAction")}))},Xr=on("div")((e=>{let{theme:t,feedOrientation:n}=e;return Object.assign({padding:"10px 20px 10px 15px",display:"flex",alignItems:"center",backgroundColor:t.getCSSColor("background.navigation"),zIndex:rs.HEADER,boxShadow:`0 ${t.getShape("offset.navigationShadow")} ${t.getShape("blur.navigationShadow")} ${t.getCSSColor("shadow.navigation")}`},"horizontal"===n?{padding:"10px"}:{})})),Qr=on("h1")((e=>{let{theme:t,feedOrientation:n,alignment:r="left"}=e;const a={paddingLeft:"0",textAlign:r};return Object.assign(Object.assign(Object.assign({},t.getCSSFontProperties("navigationTitle")),{alignSelf:"center",paddingLeft:"10px",flexGrow:"1",color:t.getCSSColor("text.navigationTitle")}),"horizontal"===n?a:{})})),Jr=K.forwardRef(((e,t)=>{let{theme:n,title:r,actionHandler:a,feedOrientation:i,alignment:s,inert:l}=e;return(0,o.h)(Xr,{theme:n,feedOrientation:i,ref:t,inert:l},a&&(0,o.h)(Gr,{title:"Back",onClick:a,iconName:"arrowLeft",theme:n}),(0,o.h)(Qr,{theme:n,feedOrientation:i,alignment:s},r))})),ea=e=>{let{theme:t,title:n,actionHandler:r,inert:a}=e;return(0,o.h)(Xr,{theme:t,inert:a},(0,o.h)(Qr,{theme:t},n),r&&(0,o.h)(Gr,{title:"Close",onClick:r,iconName:"cross",theme:t}))},ta="action-cards-sdk-toast-wrapper",na=on("div")((e=>{let{theme:t,hasRetry:n,feedOrientation:r}=e;const a={maxWidth:"380px",flexGrow:"1"};return Object.assign(Object.assign(Object.assign({},t.getElementFocusCSSProperties()),{margin:"10px",background:t.getCSSColor("background.toast"),padding:"20px",border:"0px",borderRadius:"10px",display:"flex",flexDirection:"row",pointerEvents:"auto",cursor:!n&&"pointer",transform:"translateY(100%) translateY(50px)",transition:"300ms transform ease-in-out 300ms",".visible":{transform:"translateY(0)"}}),"horizontal"===r?a:{})})),ra=on("div")((e=>{let{feedOrientation:t}=e;return Object.assign({position:"absolute",bottom:"0",left:"0",right:"0",overflow:"hidden",pointerEvents:"none",zIndex:rs.TOAST},"horizontal"===t?{display:"flex",justifyContent:"center"}:{})})),aa=on("p")((e=>{let{theme:t}=e;return Object.assign({flexGrow:"1",margin:"0",userSelect:"none",webkitUserSelect:"none",color:t.getCSSColor("text.toast")},t.getCSSFontProperties("toast"))})),oa=on("span")((e=>{let{theme:t,hasRetry:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign({border:"0px"},t.getElementFocusCSSProperties()),{color:t.getCSSColor("text.toastAction")}),t.getCSSFontProperties("toastAction")),{cursor:n&&"pointer",background:"transparent",padding:"0",userSelect:"none",webkitUserSelect:"none",display:"flex",alignItems:"center"})})),ia=(e,t)=>new Promise((n=>{t(setTimeout((()=>{n()}),e))})),sa=e=>{var t;let{theme:n,feedOrientation:r,message:a,actionTitle:i,actionHandler:s,onDismiss:l,delay:c=0}=e;const[d,u]=h(!1),[p,m]=h(""),[v,f]=h(null),[b,y]=h(""),w=null==a?void 0:a.messageId,S="Try again"===i,C=(null===(t=ie().getState().application.enabledUiElements.toastConfig)||void 0===t?void 0:t.timeout)||2e3;g((()=>{null!=(null==a?void 0:a.messageId)&&p!=a.messageId&&(m(a.messageId),a.text&&y(a.text),null!=v&&(clearTimeout(v),f(null)),ia(c,f).then((()=>(u(!0),ia(C+600,f)))).then((()=>(u(!1),ia(600,f)))).then((()=>{l&&(l(),y(""))})))}),[w]);const k=()=>{u(!1),s?s():y("")},x=e=>{const t=e.keyCode;13!==t&&32!==t||k()};return(0,o.h)(ra,{id:ta,class:"floating",feedOrientation:r},void 0!==a&&(0,o.h)(na,{id:"toast-body",theme:n,feedOrientation:r,hasRetry:S,onClick:S?void 0:k,onKeyUp:S?void 0:x,tabIndex:d&&!S?0:-1,class:d?"visible":"",role:d?"alert":void 0},(0,o.h)(aa,{theme:n,class:"toast-message"},b||""),S&&(0,o.h)(oa,{theme:n,class:"toast-action",hasRetry:S,onClick:S?k:void 0,onKeyUp:S?x:void 0,tabIndex:d&&S?0:-1},i)))},la=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"79",height:"53",viewBox:"0 0 79 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M20.0172 47.9056C20.0172 49.5625 21.3604 50.9056 23.0172 50.9056H73.0172C74.6741 50.9056 76.0172 49.5625 76.0172 47.9056V17.9056C76.0172 16.2488 74.6741 14.9056 73.0172 14.9056V12.9056C75.7786 12.9056 78.0172 15.1442 78.0172 17.9056V47.9056C78.0172 50.667 75.7786 52.9056 73.0172 52.9056H23.0172C20.2558 52.9056 18.0172 50.667 18.0172 47.9056H20.0172Z",fill:t}),(0,o.h)("path",{d:"M68.0172 9.90561H59.5V7.90561H68.0172C70.7786 7.90561 73.0172 10.1442 73.0172 12.9056V42.9056C73.0172 45.667 70.7786 47.9056 68.0172 47.9056H18.0172V45.9056H68.0172C69.6741 45.9056 71.0172 44.5625 71.0172 42.9056V12.9056C71.0172 11.2488 69.6741 9.90561 68.0172 9.90561Z",fill:t}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M54.5117 2.83786L5.27133 11.5203C3.63965 11.808 2.55015 13.3639 2.83786 14.9956L8.0473 44.5399C8.33501 46.1715 9.89098 47.2611 11.5227 46.9733L60.7631 38.2909C62.3947 38.0032 63.4842 36.4472 63.1965 34.8156L57.9871 5.27133C57.6994 3.63965 56.1434 2.55015 54.5117 2.83786ZM4.92404 9.55065C2.20457 10.0302 0.388724 12.6235 0.86824 15.3429L6.07769 44.8872C6.5572 47.6066 9.15049 49.4225 11.87 48.943L61.1104 40.2605C63.8298 39.781 65.6457 37.1877 65.1662 34.4683L59.9567 4.92404C59.4772 2.20457 56.8839 0.388724 54.1644 0.86824L4.92404 9.55065Z",fill:t}),(0,o.h)("path",{d:"M28.2341 24.1607C27.7817 23.8439 27.1582 23.9539 26.8414 24.4063C26.5246 24.8587 26.6346 25.4822 27.087 25.799L28.2341 24.1607ZM32.2944 28.2245L31.7208 29.0436C32.1732 29.3604 32.7967 29.2505 33.1135 28.7981L32.2944 28.2245ZM39.6028 19.5304C39.9196 19.078 39.8096 18.4545 39.3572 18.1377C38.9048 17.8209 38.2813 17.9309 37.9645 18.3833L39.6028 19.5304ZM27.087 25.799L31.7208 29.0436L32.8679 27.4053L28.2341 24.1607L27.087 25.799ZM33.1135 28.7981L39.6028 19.5304L37.9645 18.3833L31.4752 27.6509L33.1135 28.7981Z",fill:t}))},ca=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M40 21C40 31.4934 31.4934 40 21 40V42C32.598 42 42 32.598 42 21H40ZM21 40C10.5066 40 2 31.4934 2 21H0C0 32.598 9.40202 42 21 42V40ZM2 21C2 10.5066 10.5066 2 21 2V0C9.40202 0 0 9.40202 0 21H2ZM21 2C31.4934 2 40 10.5066 40 21H42C42 9.40202 32.598 0 21 0V2Z",fill:t}),(0,o.h)("path",{d:"M16.7071 20.2929C16.3166 19.9024 15.6834 19.9024 15.2929 20.2929C14.9024 20.6834 14.9024 21.3166 15.2929 21.7071L16.7071 20.2929ZM20 25L19.2929 25.7071C19.6834 26.0976 20.3166 26.0976 20.7071 25.7071L20 25ZM28.7071 17.7071C29.0976 17.3166 29.0976 16.6834 28.7071 16.2929C28.3166 15.9024 27.6834 15.9024 27.2929 16.2929L28.7071 17.7071ZM15.2929 21.7071L19.2929 25.7071L20.7071 24.2929L16.7071 20.2929L15.2929 21.7071ZM20.7071 25.7071L28.7071 17.7071L27.2929 16.2929L19.2929 24.2929L20.7071 25.7071Z",fill:t}))},da=on("div")((()=>({width:"100%",display:"flex",flexFlow:"column wrap",alignItems:"center",justifyContent:"center",minHeight:"250px"}))),ua=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({padding:"20px 20px 0 20px",color:t.getCSSColor("text.listEmptyState")},t.getCSSFontProperties("listEmptyState")),{textAlign:"center",width:"100%"})})),pa=e=>{let{hasSeenTutorial:t,tutorialMessage:n,emptyMessage:r,theme:a}=e;return(0,o.h)(da,null,t?(0,o.h)(o.Fragment,null,(0,o.h)(ca,{fillColor:a.getCSSColor("icon.listEmptyState")}),(0,o.h)(ua,{theme:a},r||"All caught up")):(0,o.h)(o.Fragment,null,(0,o.h)(la,{fillColor:a.getCSSColor("icon.listEmptyState")}),(0,o.h)(ua,{theme:a},n||"Cards will appear here when there’s something to action.")))},ha=e=>{let{title:t,textColor:n,buttonColor:r,theme:a,onRetry:i,tryAgainTitle:s}=e;return(0,o.h)(o.Fragment,null,(0,o.h)(ga,{textColor:n,theme:a},t),(0,o.h)(va,{textColor:r,theme:a,onClick:i},null!=s?s:"Try again"))},ma=on("div")((e=>{let{background:t,embedMode:n}=e;return{display:"flex",width:"100%",height:"launcher"===n?"350px":"100%",minHeight:"250px",alignItems:"center",justifyContent:"center",flexFlow:"column nowrap",background:t,font:`16px ${un}`}})),ga=on("p")((e=>{let{textColor:t,theme:n}=e;return Object.assign(Object.assign({color:(null==n?void 0:n.getCSSColor("text.errorOverlayTitle"))||t},(null==n?void 0:n.getCSSFontProperties("errorOverlayTitle"))||{}),{textAlign:"center"})})),va=on("button")((e=>{let{textColor:t,theme:n}=e;return Object.assign({color:(null==n?void 0:n.getCSSColor("text.errorOverlayAction"))||t,font:`16px ${un}`,background:"transparent",border:"0",outline:"none",fontWeight:"bold",cursor:"pointer"},(null==n?void 0:n.getCSSFontProperties("errorOverlayAction"))||{})})),fa=e=>{let{embedMode:t,state:n,onRetry:r,loadingIconColor:a,textColor:i,buttonColor:s,backgroundColor:l,theme:c,noInternetConnectionMessage:d,dataLoadFailedMessage:u,tryAgainTitle:p}=e;return"single-card"===t||"preview"===t||"modal-subview"===t?null:(0,o.h)(ma,{background:l,className:"loading-wrapper",embedMode:t},!n&&(0,o.h)(Sn,{stopColor:(null==c?void 0:c.getCSSColor("icon.loadingSpinner"))||a||"#000000",size:32}),"apiError"===n&&(0,o.h)(ha,{title:null!=u?u:"Couldn't load data",textColor:i,buttonColor:s,theme:c,onRetry:r,tryAgainTitle:p}),"noInternet"===n&&(0,o.h)(ha,{title:null!=d?d:"No internet connection",textColor:i,buttonColor:s,theme:c,onRetry:r,tryAgainTitle:p}))};let ba;!function(e){e.DISMISSED="dismissed",e.DISMISS_FAILED="dismiss-failed",e.SUBMITTED="submitted",e.SUBMIT_FAILED="submit-failed",e.SNOOZED="snoozed",e.SNOOZE_FAILED="snooze-failed",e.VOTED_USEFUL="voted-useful",e.VOTED_NOT_USEFUL="voted-not-useful"}(ba||(ba={}));const ya=(0,o.createContext)({cardEventDispatcher:{dispatchCardEvent:e=>{}},analyticsDispatcher:{sendEvent:e=>{}},authTokenProvider:{requestToken:()=>Promise.resolve(void 0)},runtimeVariableResolver:void 0});var wa=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Sa="action-cards-sdk-overflow-container",Ca=on("div")((e=>{let{theme:t,rendersBackground:n}=e;return{display:"flex",flexDirection:"column",height:"100%",backgroundColor:n?t.getCSSColor("background.default"):"transparent"}})),ka=on("div")((e=>{let{embedMode:t}=e;return{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",zIndex:rs.FEED_OVERLAY,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"launcher"===t?"20px":"0"}})),xa=on("div")((e=>{let{embedMode:t}=e;return{width:"100%",position:"absolute",top:"0px",left:"0px",zIndex:rs.CUSTOM_HEADER,overflow:"hidden",borderRadius:"launcher"===t?"20px 20px 0 0":"0"}})),Ia=on("div")((e=>{let{scrollPosition:t,scrollbarWidth:n,headerOffset:r}=e;return{width:"100%",marginTop:`${r}px`,paddingRight:`${n}px`,transform:`translateY(-${t}px)`}})),Oa=on("div")((e=>{let{embedMode:t,feedOrientation:n,headerPadding:r}=e;return Object.assign(Object.assign(Object.assign({padding:"single-card"===t?"0px":"10px 10px 0 10px"},r?{paddingTop:`${r+10}px`}:{}),{overflowX:"hidden",overflowY:"auto",maxHeight:"100%",height:"standalone"===t?"100%":"auto",position:"relative",overflowAnchor:"none"}),"horizontal"===n?{padding:"0",overflowY:"auto"}:{})})),Ma=on("div")((e=>{let{embedMode:t,feedOrientation:n,horizontalOffset:r}=e;const a={position:"relative",bottom:r&&`${r}px`};return Object.assign({height:"standalone"===t?"100%":"350px",display:"flex",flexFlow:"row wrap",justifyItems:"center",alignItems:"center"},"horizontal"===n?a:{})})),Ta={scrollTop:0,lastScrollTimeout:null,lastCardIds:[]},Fa=e=>{const t=e.messages.cardList,n=e.cardFeed.cardInstances,r=e.cardStates,{enabled:a,emptyStyle:o}=e.cardFeed.horizontalContainerConfig||{};return t&&1===n.length&&a&&"shrink"===o?0:t&&["submitted-subview"].includes(r[t.cardInstanceId]||"")?1100:800},ja=e=>{let{theme:t,onRetry:n}=e;const r=f(null),a=f(null),i=f(null),s=f(null),l=f(null),[c,d]=h(0),[u,p]=h(0),m=w(ya),v=m.analyticsDispatcher,b=m.cardEventDispatcher,y=m.authTokenProvider;return g((()=>(l.current=new IntersectionObserver(((e,t)=>{const n=Bc();let r=[];e.forEach((e=>{if(e.isIntersecting){const t=e.target.id;n.add(t),Ta.lastCardIds.includes(t)||r.push(t)}})),r.forEach((e=>{const t=ie().getState().cardFeed.cardInstances.find((t=>t.instance.id===e)),n=null==t?void 0:t.metadata.payloadMetadata;v.sendEvent(Object.assign({cardInstanceId:e,cardViewState:"topview",eventName:gt},n?{properties:n}:{}))}));const a=JSON.stringify(Array.from(n));sessionStorage.setItem(ce,a),Ta.lastCardIds=r}),{root:null,rootMargin:"0px",threshold:0}),()=>{var e;null===(e=l.current)||void 0===e||e.disconnect()})),[]),(0,o.h)(Le.lj,{actions:(0,G.Y2)(at,De,Xt)},(e=>{var h,m,f,w,S,C,k,x,I,O;const M="preview"===e.application.embedMode,T="single-card"===e.application.embedMode,F="single-card"!==e.application.embedMode,j=("standalone"===e.application.embedMode||"launcher"===e.application.embedMode)&&e.cardFeed.displayingOverlay,_=e.application.enabledUiElements,L=e.cardFeed.horizontalContainerConfig,D=!("standalone"===e.application.embedMode&&(null==L?void 0:L.enabled)&&"shrink"===(null==L?void 0:L.emptyStyle)),A=Uc(L),E=e.cardFeed.cardInstances.length,H="horizontal"===A&&_.cardListHeader&&"left"===(null==L?void 0:L.headerAlignment)&&(null!==(h=null===(m=a.current)||void 0===m||null===(f=m.base)||void 0===f?void 0:f.scrollHeight)&&void 0!==h?h:0)/2,P=()=>{if(s.current&&s.current.base&&l.current){var e;(null===(e=s.current)||void 0===e?void 0:e.base.childNodes).forEach((e=>{var t;null===(t=l.current)||void 0===t||t.observe(e)}))}};return g((()=>{e.application.open&&P()}),[e.cardFeed.updateId]),g((()=>{e.application.open&&(Ta.lastCardIds=[],P(),v.sendEvent({cardViewState:"topview",eventName:wt,properties:{displayMode:T?"single":"stream"}}))}),[e.application.open]),g((()=>{var e,t;p(null==a||null===(e=a.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.scrollHeight)}),[a]),g((()=>{const n=window.frameElement,r=t.getCSSColor("background.default");D||(n.style.backgroundColor=r);const a=()=>{"visible"===document.visibilityState&&e.application.open&&P()};return window.addEventListener("visibilitychange",a),()=>{window.removeEventListener("visibilitychange",a)}}),[]),g((()=>{Ta.lastCardIds=[];let e=e=>{let t=!1;t||(window.requestAnimationFrame((()=>{var n;const r=e.target;!1!==(null===(n=_.customContainerHeader)||void 0===n?void 0:n.scrollHeader)&&d(r.scrollTop),t=!1})),t=!0),Ta.scrollTop=e.target.scrollTop};return r.current&&r.current.base&&(r.current.base.scrollTop=Ta.scrollTop,r.current.base.addEventListener("scroll",e)),()=>{r.current&&r.current.base&&(Ta.scrollTop=r.current.base.scrollTop,r.current.base.removeEventListener("scroll",e))}}),[]),(0,o.h)(Ca,{theme:t,id:Sa,rendersBackground:F},j&&(0,o.h)(ka,{class:"use-offset",embedMode:e.application.embedMode}),F&&_.cardListHeader&&(0,o.h)(Jr,{title:e.application.customStrings.cardListTitle||"Cards",theme:t,feedOrientation:A,ref:a,alignment:null==L?void 0:L.headerAlignment}),_.customContainerHeader&&("standalone"===e.application.embedMode||"launcher"===e.application.embedMode)&&(0,o.h)(xa,{embedMode:e.application.embedMode},(0,o.h)(Ia,{ref:i,headerOffset:u,scrollbarWidth:(null==r||null===(w=r.current)||void 0===w||null===(S=w.base)||void 0===S?void 0:S.offsetWidth)-(null==r||null===(C=r.current)||void 0===C||null===(k=C.base)||void 0===k?void 0:k.clientWidth),scrollPosition:c,dangerouslySetInnerHTML:{__html:null===(x=document.getElementById("custom-container-header"))||void 0===x?void 0:x.innerHTML}})),(0,o.h)(Oa,{embedMode:e.application.embedMode,feedOrientation:A,headerPadding:null==i||null===(I=i.current)||void 0===I||null===(O=I.base)||void 0===O?void 0:O.scrollHeight,ref:r,cardCount:E,id:"action-cards-sdk-card-container",class:"card-container",role:"list"},!e.cardFeed.status.loaded&&(0,o.h)(fa,{embedMode:e.application.embedMode,state:e.cardFeed.status.errorState,backgroundColor:"transparent",theme:t,onRetry:n,noInternetConnectionMessage:e.application.customStrings.noInternetConnectionMessage,dataLoadFailedMessage:e.application.customStrings.dataLoadFailedMessage,tryAgainTitle:e.application.customStrings.tryAgainTitle}),e.cardFeed.status.loaded&&E>0&&(0,o.h)(Yr,{cardInstances:e.cardFeed.cardInstances,theme:t,isPreview:M,onDismiss:t=>wa(void 0,void 0,void 0,(function*(){Es(e,e,t,b,y,"overflow-menu")})),onSnooze:(t,n)=>{e.requestSnooze(t,"overflow-menu",n)},onFeedbackSelected:(t,n)=>{t.textFeedback||"negative"===t.sentiment?e.requestFeedback(n,t):"positive"===t.sentiment&&Rs(n,e,v,b,t.source)},removeCard:t=>{e.removeCard(t)},cardStates:e.cardStates,margin:T?0:10,runtimeVariables:e.cardFeed.runtimeVariables,customStrings:e.application.customStrings,votingOptions:e.cardFeed.cardVoting,cardMinimumHeight:e.cardFeed.cardMinimumHeight,horizontalContainerConfig:L,ref:s}),e.cardFeed.status.loaded&&0===E&&!T&&D&&(0,o.h)(Ma,{embedMode:e.application.embedMode,feedOrientation:A,horizontalOffset:H,class:"empty-state-wrapper"},(0,o.h)(pa,{theme:t,hasSeenTutorial:e.cardFeed.tutorialSeen,tutorialMessage:e.application.customStrings.awaitingFirstCard,emptyMessage:e.application.customStrings.allCardsCompleted}))),!e.application.isPreview&&!T&&!0===_.cardListToast&&!_.customToastContainer&&(0,o.h)(sa,{theme:t,feedOrientation:A,message:e.messages.cardList,delay:Fa(e),actionTitle:e.messages.cardList&&["submit-failed","dismiss-failed","snooze-failed"].includes(e.messages.cardList.action)?"Try again":"Dismiss",actionHandler:()=>wa(void 0,void 0,void 0,(function*(){var t,n,r,a,o,i,s,l,c,d;const u=null===(t=e.messages.cardList)||void 0===t?void 0:t.cardInstanceId,p=null===(n=e.messages.cardList)||void 0===n?void 0:n.action;if(u&&p)switch(p){case"submit-failed":Hs(e,e,u,!1,b,v,y,(null===(r=e.messages.cardList)||void 0===r?void 0:r.responseValues)||{},{payload:null===(a=e.messages.cardList)||void 0===a?void 0:a.payload,postSubmissionUrl:null===(o=e.messages.cardList)||void 0===o?void 0:o.postSubmissionUrl,subviewData:null===(i=e.messages.cardList)||void 0===i?void 0:i.subviewData,submitButtonName:null===(s=e.messages.cardList)||void 0===s?void 0:s.submitButtonName});break;case"dismiss-failed":const t=null===(l=e.messages.cardList)||void 0===l?void 0:l.source;t&&Es(e,e,u,b,y,t);break;case"snooze-failed":const n=null===(c=e.messages.cardList)||void 0===c?void 0:c.snoozeDate,p=null===(d=e.messages.cardList)||void 0===d?void 0:d.source;n&&p&&Ps(e,e,u,n,b,y,p)}})),onDismiss:()=>{e.clearMessage("cardList")}}))}))},_a=on("div")((e=>{let{yOffset:t}=e;return{position:"absolute",top:`${t}px`,left:"0",right:"0",zIndex:rs.BANNER,overflow:"hidden"}})),La=on("div")((e=>{let{theme:t}=e;return{position:"absolute",top:"0",left:"0",right:"0",background:t.getCSSColor("background.banner"),padding:"12px",transform:"translateY(-100%)",transition:"transform 300ms ease-in-out",".visible":{transform:"translateY(0)",position:"initial"},".animating":{position:"initial"}}})),Da=on("p")((e=>{let{theme:t}=e;return Object.assign(Object.assign({flexGrow:"1",margin:"0",color:t.getCSSColor("text.banner")},t.getCSSFontProperties("banner")),{textAlign:"center",overflow:"hidden"})})),Aa=e=>{let{theme:t,message:n,yOffset:r,onDismiss:a}=e;const[i,s]=h(null),[l,c]=h(null),[d,u]=h(!1);return g((()=>{null!=n&&null!=n.text?(null!=l&&(clearTimeout(l),c(null)),null!=i&&(clearTimeout(i),s(null)),u(!0),c(setTimeout((()=>{u(!1),c(null),s(setTimeout((()=>{a&&a(),s(null)}),300))}),3300))):u(!1)}),[n]),(0,o.h)(_a,{theme:t,yOffset:r},(0,o.h)(La,{theme:t,class:`${d?"visible":""} ${i?"animating":""}`},(0,o.h)(Da,{theme:t},n?n.text:"")))},Ea=on("div")((e=>{let{theme:t,isPreview:n}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:n?"relative":"static"}})),Ha=on("div")((e=>{let{theme:t,isPreview:n}=e;return{background:t.getCSSColor("background.default"),position:"relative",bottom:n?"auto":"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"visible",padding:"0 20px",boxSizing:"border-box",display:"flex",flex:"1"}})),Pa=on("div")({paddingTop:"10px"}),Ra={scrollTop:0,subviewId:""},Va=e=>{let{theme:t}=e;const n=f(null),r=w(ya).analyticsDispatcher;return(0,o.h)(Le.lj,{actions:(0,G.Y2)(De,Xt),mapToProps:e=>{const t=$e(e);return{containerInstanceId:e.application.containerInstanceId,cardStates:e.cardStates,customStrings:e.application.customStrings,subview:t&&ze(t)?t:null,isPreview:e.application.isPreview||!1,embedMode:e.application.embedMode,runtimeVariables:e.cardFeed.runtimeVariables,bannerMessage:e.messages.subview}}},(e=>{if(null===e.subview)return null;const{cardInstance:a,subviewId:i}=e.subview;if(a&&i){const l=a.subviews[i],{id:c}=a.instance,d=e.cardStates[c],u="modal-subview"===e.embedMode?ea:Jr;if(l){var s;let p=null===(s=e.runtimeVariables.values)||void 0===s?void 0:s.get(c);return p=p||new Map,g((()=>{var e;const t=()=>{let e=!1;e||(window.requestAnimationFrame((()=>{var t;const r=null==n||null===(t=n.current)||void 0===t?void 0:t.base;r&&(Ra.scrollTop=r.scrollTop,Ra.subviewId=i),e=!1})),e=!0)};return(null==n||null===(e=n.current)||void 0===e?void 0:e.base)&&(n.current.base.scrollTop=Ra.subviewId===i?Ra.scrollTop:0,n.current.base.addEventListener("scroll",t)),()=>{var e;(null==n||null===(e=n.current)||void 0===e?void 0:e.base)&&(n.current.base.scrollTop=Ra.subviewId===i?Ra.scrollTop:0,n.current.base.removeEventListener("scroll",t))}}),[]),g((()=>{r.sendEvent({cardInstanceId:c,cardViewState:"subview",eventName:kt,properties:{subviewId:i,subviewTitle:Rc(l.title,p),subviewLevel:1}})}),[i]),l.nodes=Ac(l.nodes),(0,o.h)(o.Fragment,null,(0,o.h)(Ea,{theme:t,id:Sa,isPreview:e.isPreview},(0,o.h)(Os,{viewState:"subview",onCancelUpload:()=>{window.AtomicUploadService.cancelUploadForCard(e.containerInstanceId,c),Jt().finishCardFileUpload(c),!window.AtomicUploadService.getIsUploadingStatus(e.containerInstanceId)&&Jt().setCardFeedOverlay(!1)},theme:t,renderOverlay:"uploading-files"===d}),(0,o.h)(u,{title:Rc(l.title,p),theme:t,actionHandler:()=>{e.navigateBack(),r.sendEvent({cardInstanceId:c,cardViewState:"subview",eventName:xt,properties:{subviewId:i,subviewTitle:Rc(l.title,p),subviewLevel:1}})},inert:"uploading-files"===d}),(0,o.h)(Ha,{theme:t,ref:n,isPreview:e.isPreview,class:"use-offset",id:"action-cards-subview-container",inert:"uploading-files"===d},(0,o.h)(Pa,{class:"offset-child"},l.nodes.map((n=>(0,o.h)(Tc,{cardInstanceId:c,cardMetadata:a.metadata,node:n,isWorkflow:!0,theme:t,runtimeVariables:p,subviewId:i,subviewTitle:Rc(l.title,p),embedMode:e.embedMode})))))),!e.isPreview&&(0,o.h)(Aa,{theme:t,message:e.bannerMessage,yOffset:60,onDismiss:()=>{e.clearMessage("subview")}}))}}return null}))},$a=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,o.h)("svg",{width:"19",height:"12",viewBox:"0 0 19 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"A blank video icon","aria-hidden":n},(0,o.h)("path",{d:"M12 1H2C1.44772 1 1 1.44772 1 2V10C1 10.5523 1.44772 11 2 11H12C12.5523 11 13 10.5523 13 10V2C13 1.44772 12.5523 1 12 1Z",stroke:t,strokeWidth:"2"}),(0,o.h)("path",{d:"M17.1464 1.85355L13.3536 5.64645C13.1583 5.84171 13.1583 6.15829 13.3536 6.35355L17.1464 10.1464C17.4614 10.4614 18 10.2383 18 9.79289V2.20711C18 1.76165 17.4614 1.53857 17.1464 1.85355Z",stroke:t,strokeWidth:"2"}))};class za extends o.Component{constructor(e){super(e),this.state={imageLoaded:!1,imageLoadFailed:!1}}preloadsImage(){return!0}onImageLoad(e){this.setState((t=>Object.assign(Object.assign({},t),{loadedDimensions:{width:e.naturalWidth,height:e.naturalHeight}})))}preloadImage(){if(this.preloadsImage()){const e=new Image;e.src=this.props.src,e.onload=()=>{this.setState({imageLoaded:!0}),this.onImageLoad(e)},e.onerror=()=>{this.setState({imageLoadFailed:!0})}}}getPreviewIcon(e){switch(e){case"image":case"imageWithoutSrc":return xn;case"video":case"videoWithoutSrc":return $a;default:return null}}getElementRole(e){switch(e){case"image":case"video":return"button";case"imageWithoutSrc":case"videoWithoutSrc":return"img"}}componentDidMount(){this.props.src&&this.preloadImage()}componentDidUpdate(e){this.props.src&&this.props.src!==e.src&&this.preloadImage()}handleKeyPress(e){e.charCode===br&&this.props.onClickImage&&(this.props.onClickImage(),e.preventDefault())}}const Na=on("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column"}})),Ua=on("div")({width:"100%",height:"100%",maxWidth:"100%",minHeight:"420px",overflow:"auto",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),Ba=on("div")((e=>{let{autoSizes:t}=e;return{overflow:"auto",flexGrow:t?"0":"1",height:t?"auto":"100%",display:"flex",flexDirection:"column",width:"100%"}})),Wa=on("div")((e=>{let{imageLoaded:t,theme:n}=e;return{width:"100%",height:"100%",backgroundColor:t?"":n.getCSSColor("background.media"),display:"flex",alignItems:"center",justifyContent:"center",flexGrow:"1"}})),qa=on("video")({maxWidth:"100%"}),Ya=on("img")({maxWidth:"100%",flexShrink:"0"});class Za extends za{render(){const{theme:e,src:t,label:n,alt:r}=this.props,{imageLoaded:a}=this.state;return(0,o.h)(o.Fragment,null,!a&&(0,o.h)(Wa,{imageLoaded:a,theme:e},(0,o.h)(xn,{fillColor:e.getCSSColor("icon.mediaBanner"),ariaHidden:!0})),a&&(0,o.h)(Ya,{src:t,alt:r||n}))}}const Ka=e=>{var t,n;let{src:r,alt:a,cardInstanceId:i}=e;const s=f(null),l=w(ya).analyticsDispatcher,c="string"==typeof r&&null!==(t=null===(n=r.match(/[^\/]*$/))||void 0===n?void 0:n[0])&&void 0!==t?t:"";return g((()=>{var e,t,n,a;const o=()=>{l.sendEvent({eventName:It,cardInstanceId:i,cardViewState:"subview",properties:{media:c,mediaURL:r}})},d=()=>{l.sendEvent({eventName:Ot,cardInstanceId:i,cardViewState:"subview",properties:{media:c,mediaURL:r}})};return null===(e=s.current)||void 0===e||null===(t=e.base)||void 0===t||t.addEventListener("play",o),null===(n=s.current)||void 0===n||null===(a=n.base)||void 0===a||a.addEventListener("ended",d),()=>{var e,t,n,r;null===(e=s.current)||void 0===e||null===(t=e.removeEventListener)||void 0===t||t.call(e,"play",o),null===(n=s.current)||void 0===n||null===(r=n.removeEventListener)||void 0===r||r.call(n,"ended",d)}}),[]),(0,o.h)(qa,{ref:s,src:r,alt:a||"video",autoplay:!0,controls:!0})},Ga=e=>{let{theme:t}=e;return(0,o.h)(Le.lj,{actions:De,mapToProps:e=>{const t=$e(e);return{embedMode:e.application.embedMode,cardInstanceId:null==t?void 0:t.cardInstanceId,currentMediaItem:t&&Be(t)?t.item:void 0}}},(e=>{const n=e.currentMediaItem;if(!n)return null;const r="modal-subview"===e.embedMode?ea:Jr,a="launcher"===e.embedMode;return(0,o.h)(Na,{theme:t,id:Sa},(0,o.h)(r,{title:`View ${n.type}`,theme:t,actionHandler:e.navigateBack}),(0,o.h)(Ba,{autoSizes:a},(0,o.h)(Ua,{theme:t},"image"==n.type&&(0,o.h)(Za,{mediaType:n.type,src:n.url,label:n.title,alt:n.alt,theme:t}),"video"==n.type&&(0,o.h)(Ka,{src:n.url,alt:n.alt,cardInstanceId:e.cardInstanceId}))))}))};var Xa=n(6083),Qa=n.n(Xa),Ja=n(9331),eo=n.n(Ja),to=n(5932),no=n.n(to),ro=n(4844),ao=n.n(ro),oo=n(4801),io=n.n(oo),so=n(7754),lo=n.n(so),co=n(6254),uo=n.n(co),po=n(5886),ho=n.n(po);const mo=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M1 1L5.96464 5.96464C5.98417 5.98417 5.98417 6.01583 5.96464 6.03536L1 11",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},go=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M6.16235 11L1.16235 6L6.16235 1",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},vo=on("button")((e=>{let{theme:t}=e;return Object.assign({height:"100%",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",justifySelf:"center",border:"none",backgroundColor:"transparent"},t.getElementFocusCSSProperties())})),fo=on("div")((e=>{var t;let{theme:n}=e;return{"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none",display:"grid",gridTemplate:"auto / 42px 1fr 42px",alignItems:"center",margin:"0 auto",width:"100%",color:null!==(t=n.getCSSColor("text.datePickerCalendarMonthYear",{skipFallback:!0}))&&void 0!==t?t:"black","> h1":{textAlign:"center",textTransform:"none",lineHeight:"30px",margin:"0 0 10px",gridColumn:"2"},"> input":{display:"block",fontSize:"small",fontWeight:"bold",textAlign:"center",lineHeight:"15px",height:"18px",width:"60px",margin:"0 auto",backgroundColor:"transparent",fontFamily:"inherit",border:"1px solid lightgray",paddingLeft:"11px"},"> div:first-of-type":{gridColumn:"1"},"> div:last-of-type":{gridColumn:"3"}}})),bo=on("span")({fontSize:"15px"}),yo=on("span")({fontSize:"15px",fontWeight:"normal"}),wo=e=>{var t,n;let{theme:r,month:a,year:i="",onBack:s,onForward:l,locale:c}=e;return(0,o.h)(fo,{theme:r},(0,o.h)(vo,{theme:r,onClick:s,"aria-label":"previous month"},(0,o.h)(go,{fillColor:null!==(t=r.getCSSColor("background.datePickerCalendarMonthNavArrows",{skipFallback:!0}))&&void 0!==t?t:"rgba(0,0,0,0.5)"})),(0,o.h)("h1",{className:"MonthDisplay","aria-live":"assertive"},(0,o.h)(bo,null,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return window.months=window.months||[...Array(12)].map(((t,n)=>new Date(2017,n,1).toLocaleDateString(e,{month:"long"}))),window.months}(c)[a-1]+" "),(0,o.h)(yo,null,i)),(0,o.h)(vo,{theme:r,onClick:l,"aria-label":"next month"},(0,o.h)(mo,{fillColor:null!==(n=r.getCSSColor("background.datePickerCalendarMonthNavArrows",{skipFallback:!0}))&&void 0!==n?n:"rgba(0,0,0,0.5)"})))};var So=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};const Co=on("button")((e=>{var t,n,r,a,o,i,s;let{isDisabled:l,isSelected:c,isToday:d,isFocused:u,theme:p}=e,h=null!==(t=p.getCSSColor("text.datePickerCalendarDateItem",{skipFallback:!0}))&&void 0!==t?t:"rgba(0, 0, 0, 1)",m=p.getCSSColor("text.datePickerCalendarHoverDateItem",{skipFallback:!0}),g="transparent",v=null!==(n=p.getCSSColor("background.datePickerCalendarHoverDateItem",{skipFallback:!0}))&&void 0!==n?n:"rgba(0, 0, 0, 0.05)";const f="#1E6EFA";d&&!c?h=null!==(r=p.getCSSColor("text.datePickerCalendarCurrentDate",{skipFallback:!0}))&&void 0!==r?r:f:c?(h=null!==(a=p.getCSSColor("text.datePickerCalendarSelectedDateItem",{skipFallback:!0}))&&void 0!==a?a:"white",g=null!==(o=p.getCSSColor("background.datePickerCalendarSelectedDateItem",{skipFallback:!0}))&&void 0!==o?o:f,v=g):u?g="rgba(0, 0, 0, 0.05)":l&&(h="rgba(0, 0, 0, 0.2)",v="transparent");const b=null!==(i=p.getShape("borderRadius.datePickerCalendarDateItem",{skipFallback:!0}))&&void 0!==i?i:"99px";return{userSelect:"none",display:"flex",justifySelf:"center",alignItems:"center",justifyContent:"center",fontFamily:"inherit",fontSize:"small",lineHeight:"15px",margin:"0",position:"relative",width:"string"==typeof b&&(null===(s=b.match(new RegExp(/([1-9])+/g)))||void 0===s?void 0:s.length)?"40px":"100%",height:"40px",outline:"none",border:"2px solid transparent",cursor:l?"initial":"pointer",backgroundColor:g,borderRadius:b,":hover":Object.assign(Object.assign({},m?{color:m}:{}),{backgroundColor:v}),color:h}})),ko=e=>{let{theme:t,date:n,dateLabel:r,style:a,col:i,onSelect:s,onHover:l,onFocus:c}=e,d=So(e,["theme","date","dateLabel","style","col","onSelect","onHover","onFocus"]);const u=f(null);return(0,o.h)(Co,{"data-testid":"calendar-day-button",ref:u,title:r,"aria-label":r,"aria-selected":d.isSelected?"true":"false","aria-disabled":d.isDisabled?"true":"false","aria-colindex":i,role:"gridcell",key:n,style:a,class:`CalendarDay ${Ye(d)}`,isToday:ho()(n),isDisabled:d.isDisabled,isSelected:d.isSelected,isFocused:d.isFocused,theme:t,tabIndex:"-1",onMouseDown:e=>{e.stopPropagation(),d.isDisabled||(u.current&&document.activeElement!==u.current&&u.current.base.focus(),s(n))},onMouseEnter:()=>{d.isDisabled||l(n)},onMouseLeave:()=>{d.isDisabled||l(null)},onFocus:()=>{d.isDisabled||c(n)}},n.getDate())},xo=on("div")((e=>{var t;let{theme:n}=e;return{cursor:"default",borderWidth:"1px",backgroundColor:null!==(t=n.getCSSColor("background.datePickerCalendar",{skipFallback:!0}))&&void 0!==t?t:"white",width:"100%",margin:"0",padding:"10px",borderRadius:"5px",boxSizing:"border-box","> div:focus":{outline:"none"},"> .focus-visible":{outline:"none",boxShadow:`0 0 0 2px ${n.getCSSColor("border.focus")} inset`}}})),Io=on("div")({padding:"5px"}),Oo=on("div")({}),Mo=on("div")({display:"grid",gridTemplate:"auto / repeat(7, 1fr)"}),To=on("div")((e=>{var t;let{theme:n}=e;return{userSelect:"none",textAlign:"center",textTransform:"none",color:null!==(t=n.getCSSColor("text.datePickerCalendarDaysSubHeading",{skipFallback:!0}))&&void 0!==t?t:"rgba(0,0,0,0.5)",fontSize:"13px"}})),Fo=on("div")({display:"grid",gridTemplate:"auto / repeat(7, 1fr)","-ms-grid-rows":"auto","-ms-grid-columns":"(1fr)[7]",marginBottom:"5px"}),jo=e=>{const{month:t,year:n,isDateHovered:r,isDateFocused:a,isDateSelected:i,isDateInRange:s,isDateEnabled:l,onDateFocused:c,onDateHovered:d,onDateSelected:u,onChangeMonth:p,onChangeYear:h,calendarRef:m,disabled:g,locale:v,theme:f}=e,b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return window.days=window.days||[...Array(7)].map(((t,n)=>{const r=n+1;return{dayName:new Date(Date.UTC(2017,0,n+2)).toLocaleDateString(e,{weekday:"long"}),col:r,style:{gridColumnStart:r}}})),window.days}(v),y=Ze(t,n||0),w=e=>{let{date:t,style:n,col:p}=e;return(0,o.h)(ko,{key:t,theme:f,date:t,col:p,dateLabel:Xe()(t,"dddd, MMMM D, YYYY"),style:n,isToday:ho()(t),isHovered:r(t),isFocused:a(t),isSelected:i(t),isInRange:s(t),isDisabled:g||!l(t),onSelect:u,onHover:d,onFocus:c})};return(0,o.h)(xo,{theme:f},(0,o.h)(wo,{theme:f,month:t,year:n,onBack:p(-1),onForward:p(1),onChangeYear:h,locale:v,disabled:g}),(0,o.h)(Io,{className:"Calendar",role:"grid",ref:m,tabIndex:0,"aria-colcount":7,"aria-rowcount":6,"aria-label":"Calendar picker"},(0,o.h)(Fo,{role:"row"},b.map((e=>{let{dayName:t,style:n,col:r}=e;return(0,o.h)(To,{key:t,theme:f,style:n,role:"columnheader","aria-colindex":r,"aria-label":t},(0,o.h)("abbr",null,t.slice(0,1)))}))),(0,o.h)(Oo,{role:"rowgroup"},(0,o.h)(Mo,{role:"row","aria-rowIndex":1},y.week1.map(w)),(0,o.h)(Mo,{role:"row","aria-rowIndex":2},y.week2.map(w)),(0,o.h)(Mo,{role:"row","aria-rowIndex":3},y.week3.map(w)),(0,o.h)(Mo,{role:"row","aria-rowIndex":4},y.week4.map(w)),(0,o.h)(Mo,{role:"row","aria-rowIndex":5},y.week5.map(w)),(0,o.h)(Mo,{role:"row","aria-rowIndex":6},y.week6.map(w)))))};function _o(){return _o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_o.apply(this,arguments)}const Lo="DatePicker",Do="DateRangePicker";class Ao extends o.Component{constructor(e){var t,n,r;super(e),r=void 0,(n="calendar")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;const a=e.date||new Date,i=a.getMonth()+1,s=a.getFullYear();this.state={month:i,year:s,focused:a,hovered:new Date},this.calendar=(0,o.createRef)(),this.handleKeyPress=this.handleKeyPress.bind(this),this.onDateHovered=this.onDateHovered.bind(this),this.onDateSelected=this.onDateSelected.bind(this),this.onDateFocused=this.onDateFocused.bind(this),this.isDateHovered=this.isDateHovered.bind(this),this.isDateFocused=this.isDateFocused.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.isDateInRange=this.isDateInRange.bind(this),this.isDateEnabled=this.isDateEnabled.bind(this),this.onChangeMonth=this.onChangeMonth.bind(this),this.onChangeYear=this.onChangeYear.bind(this)}componentDidMount(){window.addEventListener("keydown",this.handleKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.handleKeyPress)}handleKeyPress(e){var t,n;if(!(null===(n=this.calendar)||void 0===n?void 0:n.current.base.contains(document.activeElement)))return;if(e.key===Ar)return void(this.props.onCancel&&this.props.onCancel());e.preventDefault();const{shiftKey:r,key:a}=e,o=a===Fr,i=a===_r,s=a===Lr,l=a===Dr,c=a===Mr,d=a===Ir,u=a===Tr,p=a===Or,h=a===jr,m=null!==(t=this.props.isDateEnabled)&&void 0!==t?t:function(){return!0};let{focused:g}=this.state;if(o)m(g)&&this.onDateSelected(g);else if(r&&s){const e=Qa()(g,-1);m(e)&&this.onDateFocused(e)}else if(r&&l){const e=Qa()(g,1);m(e)&&this.onDateFocused(e)}else if(s){const e=eo()(g,-1);m(e)&&this.onDateFocused(e)}else if(l){const e=eo()(g,1);m(e)&&this.onDateFocused(e)}else if(d){const e=no()(g,-1);m(e)&&this.onDateFocused(e)}else if(p){const e=no()(g,1);m(e)&&this.onDateFocused(e)}else if(c){const e=ao()(g,-1);m(e)&&this.onDateFocused(e)}else if(u){const e=ao()(g,1);m(e)&&this.onDateFocused(e)}else h?this.onDateSelected(g):i&&this.props.onCancel&&this.props.onCancel()}onChangeYear(e){e.preventDefault(),this.setState({year:parseInt(e.target.value)||void 0})}onChangeMonth(e){let{month:t,year:n=0}=this.state,r=t+e,a=n;return r<1&&(r=12+r,a-=1),r>12&&(r-=12,a+=1),()=>{this.setState({month:r,year:a})}}onDateSelected(e){const{type:t,onDateSelected:n,onStartDateSelected:r,onEndDateSelected:a}=this.props;if(t===Lo)n&&n(e);else if(t===Do){const t=!this.props.startDate,n=this.props.startDate&&this.props.endDate,o=this.props.startDate&&this.props.startDate>e;t||n||o?(r&&r(e),a&&a(null)):a&&a(e)}}onDateHovered(e){const{onDateHovered:t}=this.props;e&&this.state.hovered&&this.state.hovered.getDate()!==e.getDate()&&this.setState({hovered:e},(()=>{t&&t(e)}))}onDateFocused(e){const{onDateFocused:t}=this.props,n=e.getMonth()+1,r=e.getFullYear();this.state.focused&&this.state.focused!==e&&this.setState({focused:e,month:n,year:r},(()=>{t&&t(e)}))}isDateEnabled(e){var t;return(null!==(t=this.props.isDateEnabled)&&void 0!==t?t:function(){return!0})(e)}isDateFocused(e){return io()(e,this.state.focused)}isDateHovered(e){return io()(e,this.state.hovered)}isDateSelected(e){return(this.props.type===Lo?[this.props.date]:[this.props.startDate,this.props.endDate]).some((t=>!!t&&io()(t,e)))}isDateInRange(e){if(this.props.type===Lo)return!1;const{startDate:t,endDate:n}=this.props,{focused:r,hovered:a}=this.state,o=n||(t&&r&&!io()(t,r)?r:a);return!(!t||!o||lo()(o,t))&&uo()(e,t,o)}componentWillReceiveProps(e){var t;e&&e.open!==this.props.open&&!0===e.open&&((null===(t=this.calendar)||void 0===t?void 0:t.current)&&this.calendar.current.base.focus())}render(){return(0,o.h)(jo,{calendarRef:this.calendar,month:this.state.month,year:this.state.year,isDateHovered:this.isDateHovered,isDateFocused:this.isDateFocused,isDateSelected:this.isDateSelected,isDateInRange:this.isDateInRange,isDateEnabled:this.isDateEnabled,onDateSelected:this.onDateSelected,onDateHovered:this.onDateHovered,onDateFocused:this.onDateFocused,onChangeMonth:this.onChangeMonth,onChangeYear:this.onChangeYear,locale:this.props.locale||"en-US",disabled:this.props.disabled||!1,theme:this.props.theme})}}const Eo=e=>(0,o.h)(Ao,_o({type:Lo},e));function Ho(){return Ho=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ho.apply(this,arguments)}const Po=on("div")((e=>{let{theme:t,mode:n,cursor:r,hPadding:a}=e;return Object.assign(Object.assign({minHeight:"stacked"===n?"70px":"50px",borderRadius:"4px",border:`1px solid ${t.getCSSColor("border.component")}`},t.getElementFocusCSSProperties()),{backgroundColor:t.getCSSColor("background.component"),display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px",padding:`10px ${void 0!==a?a:20}px`,flexGrow:"1",cursor:r||"pointer"})})),Ro=e=>{let{nodeKey:t,children:n,mode:r,cursor:a,ref:i,theme:s,onClick:l,tabFocusable:c,innerRef:d,hPadding:u,accessibleAttributes:p}=e;const h=c?e=>{e.charCode===br&&l&&(e.preventDefault(),l())}:void 0;return(0,o.h)("div",{ref:i},(0,o.h)(Po,Ho({key:t,"data-element-key":t,mode:r,theme:s,cursor:a,class:"component-field-wrapper",onClick:l,onKeyPress:h,tabIndex:c?0:void 0,ref:d,hPadding:u},p),n))},Vo=on("div")((e=>{let{thumbnailUrl:t,theme:n}=e;return{backgroundColor:n.getCSSColor("background.media"),borderRadius:n.getShape("borderRadius.media"),width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",marginRight:"10px",backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",alignSelf:"start"}})),$o=e=>{let{thumbnailUrl:t,theme:n}=e;return(0,o.h)(Vo,{thumbnailUrl:t,theme:n})},zo=on("div")((e=>{let{theme:t,mode:n}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===n?"pinned":"primary")),{flexGrow:"1",whiteSpace:"pre-wrap",color:"stacked"===n?t.getCSSColor("text.pinned"):t.getCSSColor("text.primary"),paddingBottom:"stacked"===n?"2px":"0px"})})),No=e=>{let{theme:t,children:n,mode:r,name:a}=e;return(0,o.h)(zo,{theme:t,mode:r,id:a,"aria-hidden":!n},n)},Uo=e=>{let{fillColor:t,ariaHidden:n}=e;return(0,o.h)("svg",{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":n},(0,o.h)("path",{d:"M1 1L6 6L11 1",stroke:t,"stroke-opacity":"1","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},Bo=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.error")},t.getCSSFontProperties("error")),{margin:"-10px 0 30px 0"})})),Wo=e=>{let{theme:t,cardInstanceId:n,subviewId:r,name:a,variableResolver:i}=e;return(0,o.h)(Le.lj,{mapToProps:e=>{let{validationStates:t}=e;return{validationStates:t}}},(e=>{let{validationStates:s}=e;const l=s[n]||{};let c;var d,u,p;r?c=null===(d=l.subviews)||void 0===d||null===(u=d[r])||void 0===u?void 0:u[a]:c=null===(p=l.validations)||void 0===p?void 0:p[a];return c&&c.errorMessage?(0,o.h)(Bo,{theme:t,role:"alert","data-testid":"validation"},i(c.errorMessage)):null}))},qo=on("div")((e=>{let{theme:t,mode:n}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===n?"pinned":"primary")),{display:"stacked"===n?"block":"inherit",flexGrow:"1",cursor:"pointer"})})),Yo=on("div")((()=>({justifyContent:"space-between",alignItems:"center"}))),Zo=on("div")((()=>({"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}))),Ko=on("div")((e=>{let{open:t,openPosition:n,height:r,theme:a}=e;return Object.assign(Object.assign({position:"absolute",top:`${n}px`,left:t?"20px":"-999px",width:"calc(100% - 40px)",marginBottom:"20px",backgroundColor:"white",boxShadow:"0px 2px 10px 0px rgba(0, 0, 0, 0.2)",cursor:"pointer",height:`${r}px`,maxHeight:"335px",overflow:"auto",zIndex:rs.DROPDOWN,borderRadius:"5px",color:"black"},a.getCSSFontProperties("primary")),{visibility:t?"visible":"hidden"})})),Go=on("div")((e=>{let{theme:t,disabled:n}=e;return Object.assign({padding:"20px",":hover":{backgroundColor:"rgba(0,0,0,0.05)"},":active":{backgroundColor:"rgba(0,0,0,0.1)"},border:"0px",color:n?"rgba(0,0,0,0.3)":"initial"},t.getElementFocusCSSProperties())})),Xo=on("div")((e=>{let{theme:t,mode:n}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===n?"primary":"secondary")),{marginRight:"10px",color:"stacked"===n?t.getCSSColor("text.primary"):t.getCSSColor("text.secondary"),paddingTop:"stacked"===n?"2px":"0px"})})),Qo=e=>{let{onClick:t,children:n,ref:r,theme:a,disabled:i,isSelected:s}=e;return(0,o.h)(Go,{onClick:t,ref:r,tabIndex:"-1",theme:a,disabled:i,"aria-disabled":i,"aria-selected":s,role:"option"},n)},Jo=e=>{let{children:t,mode:n,theme:r,ariaLabel:a}=e;return(0,o.h)(Xo,{theme:r,mode:n,class:"dropdown-selected-value","aria-label":a},t)},ei=(e,t,n,r)=>{var a,o,i,s,l,c;let d=0,u=0,p=0,h=0,m=null;const g=null===(s=window.frameElement)||void 0===s?void 0:s.parentElement,v=document.querySelector("#action-cards-sdk-card-container"),f=(null==g?void 0:g.scrollHeight)!==(null==g?void 0:g.clientHeight),b=(null==v?void 0:v.scrollHeight)!==(null==v?void 0:v.clientHeight);if("launcher"!==r&&g&&f&&!b)m=g;else if(n){m=document.querySelector("#action-cards-subview-container")}else null!==v&&(m=v);if(null!==window.frameElement){var y,w;const e=t.getBoundingClientRect(),n=null===(y=m)||void 0===y?void 0:y.getBoundingClientRect();d=e.top-(n?null==n?void 0:n.top:0),u=e.bottom-(n?null==n?void 0:n.top:0),p=null!==(a=null===(w=m)||void 0===w?void 0:w.scrollHeight)&&void 0!==a?a:window.innerHeight}else{const e=document.querySelector("#workbench-card-preview");if(e){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();h=e.scrollTop,d=r.top-n.top-h,u=d+t.offsetHeight,p=e.offsetHeight}}e.style.height="auto";const S=d-20+(m?m.scrollTop:0),C=p-u-20,k=S-(null!==(o=null===(l=m)||void 0===l?void 0:l.scrollTop)&&void 0!==o?o:0),x=(null!==(i=null===(c=m)||void 0===c?void 0:c.offsetHeight)&&void 0!==i?i:p)-k-20-t.offsetHeight,I=e.offsetHeight;e.style.height="";const O=t.offsetTop,M={openPosition:O+t.offsetHeight+10,height:I},T={openPosition:O-I-10,height:I};return I<=x?M:I<=k?T:I<=C?M:I<=S?T:{openPosition:O,height:Math.min(I,C+t.offsetHeight)}},ti=K.forwardRef(((e,t)=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,embedMode:i,attributes:{format:s,defaultValue:l,thumbnailSrc:c,label:d,name:u,values:p,placeholder:m},validations:v,theme:y,variableResolver:w,onValueChanged:S}=e;const[C,k]=h(!1),[x,I]=h(0),[O,M]=h(0),[T,F]=h(l?w(l.toString()):null),[j,_]=h(-1),L=f(null),D=f(null),A=f(null),E=f(null),H=f(l?w(l.toString()):null),P=p.find((e=>{let{value:t}=e;return T===t}));b(t,(()=>({getCurrentValue:()=>T,setCurrentValue:e=>F(e)}))),g((()=>{const e=e=>{L.current&&!L.current.base.contains(e.target)&&(C&&dt().validateField(r,u,T,v),k(!1))},t=e=>{var t,n;(null==A||null===(t=A.current)||void 0===t||null===(n=t.base)||void 0===n?void 0:n.contains(document.activeElement))&&e.key===_r&&(k(!1),D.current.base.focus())};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}})),g((()=>{if(S)S(T);else{const e=ut(r,u,a);e?(H.current=e.toString(),F(e)):dt().handleFormChange(r,u,T,a)}A.current&&E.current&&(A.current.base.scrollTop=E.current.base.offsetTop)}),[]),g((()=>{const e=l?w(l.toString()):null;e!==H.current&&(T===H.current&&(S?S(e):dt().handleFormChange(r,u,e,a),F(e)),H.current=l?w(l.toString()):null)}),[l]),g((()=>{if(C){const e=p.findIndex((e=>T===e.value));_(Math.max(0,e))}else _(-1)}),[C]);const R=`dropdown-label-${u}`;return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(0,o.h)(Zo,null,(0,o.h)(Ro,{nodeKey:n,ref:L,innerRef:D,mode:s,theme:y,tabFocusable:!0,accessibleAttributes:{role:"combobox","aria-haspopup":"listbox","aria-expanded":C,"aria-controls":`${u}-dropdown-body`,"aria-labelledby":R},onClick:()=>{if(L.current){const{openPosition:t,height:n}=ei(A.current.base,L.current.base,!!a,i);I(t),M(n),k((t=>(t&&e.validateField(r,u,T,v,a),!t)))}}},c&&(0,o.h)(Yo,null,(0,o.h)($o,{thumbnailUrl:w(c),theme:y})),(0,o.h)(qo,{mode:s,theme:y},(0,o.h)(No,{theme:y,mode:s,name:R},w(d)),(0,o.h)(Jo,{theme:y,mode:s},P?P.title:w(m))),(0,o.h)(Uo,{fillColor:y.getCSSColor("icon.dropdown"),ariaHidden:!0}),(0,o.h)(Ko,{ref:A,open:C,openPosition:x,theme:y,height:O,className:"dropdown-body",id:`${u}-dropdown-body`,role:"listbox"},(0,o.h)(Rr,{defaultIndex:j,theme:y},p.map(((t,n)=>(0,o.h)(Qo,{onClick:()=>{t.disabled||(F(t.value),S?S(t.value):e.handleFormChange(r,u,t.value,a),e.validateField(r,u,t.value,v,a),D&&D.current&&D.current.base&&D.current.base.focus(),_(n))},ref:t.value===T?E:null,theme:y,disabled:t.disabled,isSelected:t.value===T},t.title)))))),(0,o.h)(Wo,{name:u,cardInstanceId:r,subviewId:a,theme:y,variableResolver:w}))))})),ni=on("div")((e=>{let{mode:t,theme:n}=e;return Object.assign(Object.assign({},n.getCSSFontProperties("stacked"===t?"pinned":"primary")),{display:"stacked"===t?"block":"inherit",flexGrow:"1",cursor:"pointer"})})),ri=on("div")((()=>({justifyContent:"space-between",alignItems:"center"}))),ai=on("div")((()=>({"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}))),oi=e=>{var t,n,r,a,i,s,l,c,d,u,p,m;let{nodeKey:v,cardInstanceId:b,subviewId:y,attributes:{format:w,defaultValue:S,thumbnailSrc:C,label:k,name:x,placeholder:I},controlledDateValidator:O,validations:M,theme:T,variableResolver:F,onValueChanged:j,embedMode:_}=e;const L=S?new Date(S):void 0,D=f(L?(0,J.addMinutes)(L,L.getTimezoneOffset()):null),[A,E]=h(!1),[H,P]=h(0),[R,V]=h(0),[$,z]=h(D.current),N=f(null),U=f(null),B=f(null),W=(null==M||null===(t=M.maximumDate)||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.maximumDate)?new Date(null==M||null===(r=M.maximumDate)||void 0===r||null===(a=r.attributes)||void 0===a?void 0:a.maximumDate):void 0,q=(null==M||null===(i=M.minimumDate)||void 0===i||null===(s=i.attributes)||void 0===s?void 0:s.minimumDate)?new Date(null==M||null===(l=M.minimumDate)||void 0===l||null===(c=l.attributes)||void 0===c?void 0:c.minimumDate):void 0,Y=new Date;let Z=new Date;if(W&&q){if(!(Y<=W&&Y>=q)){Z=Math.abs((0,J.differenceInSeconds)(Y,W))<Math.abs((0,J.differenceInSeconds)(Y,q))?W:q}}else if(q){Y>=q||(Z=q)}else if(W){Y<=W||(Z=W)}const K=$?new Date($):new Date(Z);K.setHours(0,0,0,0);const G=()=>{A&&dt().validateField(b,x,$,M,y),E(!1)};let X;g((()=>{const e=e=>{B.current&&!B.current.base.contains(e.target)&&N.current&&!N.current.base.contains(e.target)&&G()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}})),g((()=>{const e=$?$.toISOString():void 0,t=$?Xe()($,se):null;if(j)j(e);else{const e=ut(b,x,y);e?(D.current=new Date(e),z(e)):dt().handleFormChange(b,x,t,y)}}),[]),g((()=>{var e;const t=S?new Date(S):void 0,n=t?(0,J.addMinutes)(t,t.getTimezoneOffset()):null;if((null==n?void 0:n.toDateString())!==(null===(e=D.current)||void 0===e?void 0:e.toDateString())){if($===D.current){const e=n?n.toISOString():void 0,t=n?Xe()(n,se):null;j?j(e):dt().handleFormChange(b,x,t,y),z(n)}D.current=n}}),[S]),O?X=O:((null==M||null===(d=M.maximumDate)||void 0===d||null===(u=d.attributes)||void 0===u?void 0:u.maximumDate)||(null==M||null===(p=M.minimumDate)||void 0===p||null===(m=p.attributes)||void 0===m?void 0:m.minimumDate))&&(X=e=>{var t,n,r,a;const o=null===(t=M.maximumDate)||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.maximumDate,i=null===(r=M.minimumDate)||void 0===r||null===(a=r.attributes)||void 0===a?void 0:a.minimumDate,s=o?Ke(o,{isMax:!0}):void 0,l=i?Ke(i,{isMin:!0}):void 0;return(!s||e<=s)&&(!l||e>=l)});const Q=`datepicker-label-${x}`,ee=$?Xe()($,"DD MMM YYYY"):F(I),te=()=>{U&&U.current&&U.current.base&&U.current.base.focus()};return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(0,o.h)(ai,null,(0,o.h)(Ro,{nodeKey:v,ref:N,innerRef:U,mode:w,theme:T,tabFocusable:!0,accessibleAttributes:{role:"button","aria-haspopup":"dialog","aria-expanded":A,"aria-labelledby":Q},onClick:()=>{if(N.current){const{openPosition:t,height:n}=ei(B.current.base,N.current.base,!!y,_);P(t),V(n),E((t=>(t&&e.validateField(b,x,$,M,y),!t)))}}},C&&(0,o.h)(ri,{mode:w},(0,o.h)($o,{thumbnailUrl:F(C),theme:T})),(0,o.h)(ni,{mode:w,theme:T},(0,o.h)(No,{theme:T,mode:w,name:Q},F(k)),(0,o.h)(Jo,{theme:T,mode:w,ariaLabel:ee},ee)),(0,o.h)(Uo,{fillColor:T.getCSSColor("icon.dropdown"),ariaHidden:!0})),(0,o.h)(Ko,{ref:B,open:A,openPosition:H,theme:T,height:R},(0,o.h)(Eo,{date:K,open:A,theme:T,onDateSelected:t=>{z(t);const n=t?Xe()(t,se):void 0,r=t?t.toISOString():void 0;j?j(r):e.handleFormChange(b,x,n,y),e.validateField(b,x,r,M,y),E(!1),te()},onCancel:()=>{G(),te()},isDateEnabled:X})),(0,o.h)(Wo,{theme:T,name:x,cardInstanceId:b,subviewId:y,variableResolver:F}))))},ii=15,si=(0,J.startOfDay)(new Date),li=e=>{let{cardInstanceId:t,attributes:{format:n,name:r,label:a,defaultValue:i},validations:s,theme:l,maxDateTime:c,selectedDate:d,selectedTime:u,isWorkflow:p,variableResolver:m,onValueChanged:v}=e;const b=new Date(i),[y,w]=h(""),S=f(null),C=f([...Array(96).keys()].map((e=>({title:(0,J.format)((0,J.addMinutes)(si,e*ii),"h:mm A"),value:""+e*ii,disabled:!1})))),k=e=>{let t="";return e.forEach((e=>{e.disabled||(t=e.value)})),t};g((()=>{if(d){const t=C.current.map(((e,t)=>{const n=(0,J.addMinutes)(d,t*ii);return e.disabled=!!(c&&n>=c),e}));if(C.current=t,u&&c){if((0,J.addMinutes)(d,u||0)>c){const t=k(C.current);var e;if(t)null==v||v(t),null===(e=S.current)||void 0===e||e.setCurrentValue(t)}}}}),[c,d]);return(0,o.h)(ti,{ref:S,attributes:{name:r,label:a,format:n,values:C.current,defaultValue:(()=>{const e=ci(b);if(c){var t;const n=(0,J.differenceInMinutes)(c,(0,J.startOfDay)(b)),r=k(C.current);if(b>c)return Number(r);if(e<n)return e;const a=(0,J.differenceInMinutes)(c,(0,J.startOfDay)(c));return w((0,J.format)((0,J.addMinutes)(si,a),"h:mm A")),null===(t=S.current)||void 0===t||t.setCurrentValue(""),null==v||v(a.toString()),a}return e})(),placeholder:y},cardInstanceId:t,variableResolver:m,theme:l,validations:s,isWorkflow:p,onValueChanged:v})},ci=e=>Math.ceil(((0,J.differenceInMinutes)(e,(0,J.startOfDay)(e))+5)/ii)*ii,di=on("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"static"}})),ui=on("div")((()=>({position:"static",top:"60px",bottom:"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"hidden",padding:"0 20px"}))),pi=on("div")({overflow:"auto",paddingTop:"10px","> button":{marginBottom:"20px"}}),hi=e=>{let{theme:t}=e;const n=w(ya),r=n.analyticsDispatcher,a=n.cardEventDispatcher,i=n.authTokenProvider,[s,l]=h(void 0),[c,d]=h(0),u=new Date;return(0,o.h)(Le.lj,{actions:(0,G.Y2)(De,Xt),mapToProps:e=>{const t=$e(e);let n,r,a;return t&&Ne(t)&&(n=t.cardInstanceId,r=t.source,a=t.cardExpiry),{screenTitle:e.application.customStrings.cardSnoozeTitle||"Remind me",embedMode:e.application.embedMode,snoozeCardInstanceId:n,source:r,snoozeCardExpiry:a}}},(e=>{const[n,p]=h(u),[m,v]=h(0),f=e.snoozeCardInstanceId,b=e.snoozeCardExpiry,y=e.source;if(!f||!y)return null;const w=e.screenTitle,S="modal-subview"===e.embedMode?ea:Jr;g((()=>{r.sendEvent({eventName:St,cardInstanceId:f,cardViewState:"subview"})}),[]);return(0,o.h)(di,{theme:t,id:Sa},(0,o.h)(S,{title:w,theme:t,actionHandler:()=>{r.sendEvent({eventName:Ct,cardInstanceId:f,cardViewState:"subview"}),e.navigateBack()}}),(0,o.h)(ui,{class:"use-offset"},(0,o.h)(pi,{class:"offset-child"},(0,o.h)(oi,{cardInstanceId:f,attributes:{name:"snoozeDate",label:"Date",defaultValue:Xe()(u,"YYYY-MM-DD[T]00:00:00.000[Z]"),format:"inline"},isWorkflow:!0,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{p(new Date(e))},controlledDateValidator:b?e=>{if(b){return e<=new Date(b)}return!0}:void 0}),(0,o.h)(li,{attributes:{name:"snoozeTime",label:"Time",defaultValue:u.toISOString(),format:"inline"},isWorkflow:!0,cardInstanceId:f,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{v(Number.parseInt(e))},selectedDate:n,selectedTime:m,maxDateTime:b?new Date(b):void 0}),(0,o.h)(Ns,{isWorkflow:!0,clickHandler:()=>()=>{const t=mi(n,m);if((0,J.isPast)(t)){const e=c+1;d(e),l({text:"Date must be in the future",messageId:`${e}`,cardInstanceId:f,action:"other"})}else e.navigateBack(),Ps(ie().getState(),e,f,t,a,i,y)},text:"Done",theme:t,appearance:"primary"}))),(0,o.h)(sa,{theme:t,message:s,actionTitle:"Dismiss",onDismiss:()=>{}}))}))},mi=(e,t)=>(0,J.addMinutes)((0,J.startOfDay)(e),t),gi=(e,t,n)=>({getTheme:r=>new mn(e,r,t,n)});var vi=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const fi="theme_cache",bi=()=>new Promise(((e,t)=>{const n=window.parent.indexedDB.open("AtomicSDK",1);n.onerror=e=>{t(e)},n.onsuccess=()=>{e(n.result)},n.onupgradeneeded=()=>{const r=n.result;n.transaction&&(n.transaction.oncomplete=()=>{e(n.result)},n.transaction.onerror=e=>{t(e)},n.transaction.onabort=e=>{t(e)});r.createObjectStore(fi).createIndex("stream_container_id","stream_container_id",{unique:!0})}}));var yi=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const wi=(e,t)=>yi(void 0,void 0,void 0,(function*(){const n=`theme/${e}`,{data:r,response:a}=yield sd.get(n,void 0,t,{streamContainerId:e});if(200===a.status){if(r&&r.theme){try{yield((e,t,n)=>vi(void 0,void 0,void 0,(function*(){const r=yield bi();return new Promise(((a,o)=>{const i=r.transaction(fi,"readwrite").objectStore(fi).put({themePayload:t,eTag:n},e);i.onsuccess=()=>{r.close();const t=i.result;a({streamContainerId:e,themePayload:t.themePayload,eTag:t.eTag})},i.onerror=e=>{r.close(),o(e)}}))})))(e,r,a.etag||"")}catch(e){console.warn("Failed to update cached theme.",e)}return{theme:r||{}}}return{error:new Error("Invalid theme returned. Missing `theme` key in payload.")}}return{error:a.error}})),Si=e=>yi(void 0,void 0,void 0,(function*(){try{const t=yield(e=>vi(void 0,void 0,void 0,(function*(){const t=yield bi();return new Promise(((n,r)=>{const a=t.transaction(fi,"readonly").objectStore(fi).get(e);a.onsuccess=()=>{t.close(),n(a.result)},a.onerror=e=>{t.close(),r(e)}}))})))(e);return t&&t.themePayload&&t.themePayload.theme?{theme:t.themePayload,eTag:t.eTag}:null}catch(e){return console.warn("Failed to fetch cached theme.",e),null}}));class Ci extends o.Component{componentDidCatch(e){this.props.onError?this.props.onError(e):console.error(e)}render(){return this.props.children}}const ki=e=>{let{fontFamilies:t}=e;return(0,o.h)("style",{dangerouslySetInnerHTML:{__html:t.map((e=>Ii(e))).join("\n")}})},xi={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"},Ii=e=>{let{fontFamily:t,weight:n,style:r,src:a}=e;if(a&&0===a.split(".").length)throw new Error("Invalid file url provided for font.");const o=a?new URL(a).pathname:null;if(!o)return"";const i=o.split("."),s=i[i.length-1],l=xi[s];if(!l)return"";if(!t)return"";return`\n @font-face {\n font-family: "${t}";\n ${(a?`src: url('${a}') format('${l}');`:"")||""}\n font-weight: ${n||"normal"};\n font-style: ${r||"normal"};\n font-display: swap;\n }\n `},Oi=e=>Object.assign(Object.assign({backgroundColor:e.getCSSColor("background.component"),color:e.getCSSColor("text.primary")},e.getCSSFontProperties("primary")),{border:"none",boxSizing:"border-box",height:"100%",width:"100%",display:"flex",flexGrow:"1",overflow:"hidden",":focus":{outline:"none"},"::placeholder":{color:e.getCSSColor("text.hint")},whiteSpace:"pre-wrap"}),Mi=on("textarea")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},Oi(t)),{resize:"none",boxSizing:"content-box",paddingLeft:"0px",paddingRight:"0px"})})),Ti=on("input")((e=>{let t,{theme:n}=e,r=n.getNumericFontSize("primary"),a=n.getCSSFontProperties("primary");if(a&&a.lineHeight&&r){const e=Math.ceil(.05*r);t=Number(a.lineHeight.replace("px",""))+e}return Object.assign(Object.assign({},Oi(n)),t?{lineHeight:`${t}px`}:{})})),Fi=(e,t,n)=>{let r=0;"getComputedStyle"in window&&document.defaultView&&(r=parseInt(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height"))),e.style.height="auto",n&&(e.style.minHeight=n*r+"px"),1===t?e.style.height="auto":t>0?e.style.height=t*r+"px":(e.style.height=`${e.scrollHeight}px`,e.style.paddingTop="4px")};let ji=null;const _i=K.forwardRef(((e,t)=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,attributes:{defaultValue:i,numberOfLines:s,name:l,thumbnailSrc:c,placeholder:d,maxLength:u},minimumLines:p,validations:m,theme:v,variableResolver:y,onValueChanged:w}=e;const S=f(null),C=f(i),[k,x]=h(y(i)),I=1===s?Ti:Mi;g((()=>{const{current:{base:e}}=S;Fi(e,s,p)})),g((()=>{const e=ut(r,l,a);e?(C.current=e,x(e)):dt().handleFormChange(r,l,k,a)}),[]),g((()=>{if(i!==C.current){if(k===y(C.current)){const e=y(i);x(e),dt().handleFormChange(r,l,e,a)}C.current=i}}),[i]);const O=y(d);return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(b(t,(()=>({clearInput:()=>{x(""),S.current.base&&Fi(S.current.base,s),e.handleFormChange(r,l,"",a)}}))),(0,o.h)(o.Fragment,null,(0,o.h)(Ro,{nodeKey:n,mode:"inline",theme:v},c&&(0,o.h)($o,{thumbnailUrl:y(c),theme:v}),(0,o.h)(I,{theme:v,ref:S,placeholder:O,value:k,maxlength:u,className:"input-text",onInput:t=>{const{current:{base:n}}=S,{value:o}=t.target;x(o),Fi(n,s),((e,t)=>{null!==ji&&(clearTimeout(ji),ji=null),ji=setTimeout((()=>{t(r,l,null!=e?e:void 0,m,a)}),200)})(o,e.validateField),e.handleFormChange(r,l,o,a),w&&w(o)},rows:"1"})),(0,o.h)(Wo,{name:l,cardInstanceId:r,subviewId:a,theme:v,variableResolver:y})))))})),Li=on("div")((e=>{let{theme:t}=e;return Object.assign({padding:"10px 20px",display:"flex",width:"100%",alignItems:"center",border:"0px"},t.getElementFocusCSSProperties())})),Di=on("p")((e=>{let{theme:t}=e;return Object.assign({padding:"0 10px 0 0",margin:"0",flexGrow:"1",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t.getCSSColor("text.primary")},t.getCSSFontProperties("primary"))})),Ai=on("div")((e=>{let{checked:t,theme:n}=e;return{width:"22px",height:"22px",border:t?`7px solid ${n.getCSSColor("icon.selectionIndicatorActive")}`:`1px solid ${n.getCSSColor("icon.selectionIndicator")}`,flexShrink:"0",borderRadius:"100%"}})),Ei=e=>{let{title:t,value:n,checked:r,onValueSelected:a,theme:i}=e;return(0,o.h)(Li,{onClick:()=>{a(n)},role:"radio","aria-checked":r,theme:i,tabIndex:"-1"},(0,o.h)(Di,{theme:i},t),(0,o.h)(Ai,{checked:r,theme:i}))},Hi=on("div")((e=>{let{}=e;return{display:"flex",flexFlow:"column wrap",width:"100%"}})),Pi=on("div")((e=>{let{}=e;return{display:"none"}})),Ri=e=>{let{attributes:{items:t,title:n,name:r},theme:a,onValueChanged:i}=e;const[s,l]=h(null),c=`radio-group-${r}`;return(0,o.h)(Ro,{mode:"inline",theme:a,hPadding:0},(0,o.h)(Pi,{id:c},n),(0,o.h)(Hi,{role:"radiogroup","aria-labelledby":c},(0,o.h)(Rr,{theme:a},t.map((e=>(0,o.h)(Ei,{title:e.title,value:e.value,theme:a,checked:s===e.value,onValueSelected:e=>{l(e),i&&i(e)}}))))))},Vi=on("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"static"}})),$i=on("div")((()=>({position:"static",top:"60px",bottom:"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"hidden",padding:"0 20px"}))),zi=on("div")({overflow:"auto",paddingTop:"10px","> button":{marginBottom:"20px"}}),Ni=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.error")},t.getCSSFontProperties("error")),{margin:"-10px 0 30px 0"})})),Ui=e=>{let{theme:t}=e;const n=w(ya),r=n.analyticsDispatcher,a=n.cardEventDispatcher,i=f(),[s,l]=h(null),[c,d]=h(null),[u,p]=h(!1);return(0,o.h)(Le.lj,{actions:(0,G.Y2)(De,Xt),mapToProps:e=>{const t=$e(e),n=t&&Ue(t)?t:void 0;return{embedMode:e.application.embedMode,screenTitle:e.application.customStrings.votingFeedbackTitle||"Send feedback",validationMessage:e.application.customStrings.votingFeedbackValidationMessage||"Feedback is limited to 280 characters.",feedbackSentiment:null==n?void 0:n.sentiment,feedbackCardInstanceId:null==n?void 0:n.cardInstanceId,feedbackSource:null==n?void 0:n.source,textFeedback:null==n?void 0:n.textFeedback,textFeedbackLabel:null==n?void 0:n.textFeedbackLabel}}},(e=>{const n="modal-subview"===e.embedMode?ea:Jr,h=e.screenTitle,m=e.feedbackCardInstanceId,g=e.feedbackSource,v="positive"===e.feedbackSentiment&&e.textFeedback,f=[{title:"It's not relevant",value:"not-relevant"},{title:"I see this too often",value:"too-often"}];if(e.textFeedback&&f.push({title:"Something else",value:"other"}),!m||!g)return null;const b="positive"===e.feedbackSentiment?"Add optional feedback...":"Add your feedback...";return(0,o.h)(Vi,{theme:t,id:Sa},(0,o.h)(n,{title:h,theme:t,actionHandler:()=>{var t;d(null),null===(t=i.current)||void 0===t||t.clearInput(),e.navigateBack()}}),(0,o.h)($i,{class:"use-offset"},(0,o.h)(zi,{class:"offset-child"},"negative"===e.feedbackSentiment&&(0,o.h)(Ri,{attributes:{title:h,name:"feedback-reason",items:f},isWorkflow:!0,cardInstanceId:m,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{l(e)}}),("other"===s||v)&&(0,o.h)(o.Fragment,null,(0,o.h)(_i,{ref:i,attributes:{name:"feedback-message",defaultValue:"",placeholder:e.textFeedbackLabel&&e.textFeedbackLabel.length>0?e.textFeedbackLabel:b,numberOfLines:0,maxLength:280},minimumLines:3,isWorkflow:!0,cardInstanceId:m,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{if(e.length>=280)return p(!0);p(!1),d(e)}}),u&&(0,o.h)(Ni,{theme:t,"data-testid":"feedback-validation-error"},e.validationMessage)),(0,o.h)(Ns,{isWorkflow:!0,clickHandler:()=>()=>{var t;if(!v&&null===s)return;if("other"===s&&(null===c||null==c||0===c.trim().length))return;const n="other"===s||v&&c?{message:c}:{};r.sendEvent({cardViewState:"topview",eventName:v?ft:bt,cardInstanceId:m,properties:Object.assign(Object.assign({source:g},"negative"===e.feedbackSentiment||null!==c?{reason:v?"other":s}:{}),n)}),e.feedbackReceived(m),a.dispatchCardEvent({type:v?ba.VOTED_USEFUL:ba.VOTED_NOT_USEFUL}),d(null),null===(t=i.current)||void 0===t||t.clearInput(),e.navigateBack()},text:"Submit",theme:t,appearance:"primary"}))))}))};var Bi=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Wi=()=>window.matchMedia("(prefers-color-scheme: dark)"),qi=on("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.toast")}})),Yi=e=>{let{store:t,onAnalyticsEvent:n,onCardEvent:r,onAuthTokenRequested:a,onError:i}=e;const s=y((()=>({analyticsDispatcher:{sendEvent:(e,t)=>Bi(void 0,void 0,void 0,(function*(){n&&(void 0===t?yield n(e):yield n(e,t))}))},cardEventDispatcher:{dispatchCardEvent:e=>{r&&r(e)}},authTokenProvider:{requestToken:()=>Bi(void 0,void 0,void 0,(function*(){return yield a()}))},runtimeVariableResolver:void 0})),[n,r,a]);return(0,o.h)(Ci,{onError:i},(0,o.h)(ya.Provider,{value:s},(0,o.h)(Le.zt,{store:t},(0,o.h)(Le.lj,{actions:(0,G.Y2)(De,Xt,at,De)},Zi))))},Zi=e=>{const{cardFeed:t,messages:n,themeLoading:r,themeLoaded:a,clearMessage:i,application:{interfaceStyle:s,streamContainerId:l},theme:c}=e,[d,u]=h(Wi().matches?"dark":"light");if(g((()=>{!function(){Bi(this,void 0,void 0,(function*(){const e=yield Si(l);if(e)a({theme:e.theme}),wi(l,e.eTag);else{r();const e=yield wi(l);a(e)}}))}()}),[]),g((()=>{const e=e=>{u(e.matches?"dark":"light")};return Wi().addEventListener("change",e),()=>{Wi().removeEventListener("change",e)}}),[]),!c.status||!1===c.status.loaded)return null;const p=c.themePayload?gi(c.themePayload,d,s):void 0;if(!p)return null;const m=p.getTheme("feed"),v=w(ya),f=v.cardEventDispatcher,b=v.analyticsDispatcher,y=v.authTokenProvider;return(0,o.h)(qi,{theme:m},(0,o.h)(sa,{theme:m,feedOrientation:Uc(t.horizontalContainerConfig),message:n.cardList,actionTitle:n.cardList&&["submit-failed","dismiss-failed","snooze-failed"].includes(n.cardList.action)?"Try again":"Dismiss",actionHandler:()=>{var t,r,a,o,i,s,l,c,d,u;const p=null===(t=n.cardList)||void 0===t?void 0:t.cardInstanceId,h=null===(r=n.cardList)||void 0===r?void 0:r.action;if(p&&h)switch(h){case"submit-failed":Hs(e,e,p,!1,f,b,y,(null===(a=e.messages.cardList)||void 0===a?void 0:a.responseValues)||{},{payload:null===(o=e.messages.cardList)||void 0===o?void 0:o.payload,postSubmissionUrl:null===(i=e.messages.cardList)||void 0===i?void 0:i.postSubmissionUrl,subviewData:null===(s=e.messages.cardList)||void 0===s?void 0:s.subviewData,submitButtonName:null===(l=e.messages.cardList)||void 0===l?void 0:l.submitButtonName});break;case"dismiss-failed":const t=null===(c=e.messages.cardList)||void 0===c?void 0:c.source;t&&Es(e,e,p,f,y,t);break;case"snooze-failed":const n=null===(d=e.messages.cardList)||void 0===d?void 0:d.snoozeDate,r=null===(u=e.messages.cardList)||void 0===u?void 0:u.source;n&&r&&Ps(e,e,p,n,f,y,r)}},onDismiss:()=>{i("cardList")},delay:500}))};function Ki(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let Gi;!function(e){e.STATE="state-update",e.ANALYTICS_EVENT="analytics-event-dispatched"}(Gi||(Gi={}));class Xi{constructor(){Ki(this,"channel",void 0),Ki(this,"isOpen",!1),Ki(this,"eventListeners",new Map),this.channel=new BroadcastChannel("stream-container-broadcast-channel"),this.isOpen=!0,window.addEventListener("pagehide",(()=>{this.close()}))}addEventListener(e,t,n){if(!("BroadcastChannel"in window))return mt.error({level1:["BroadcastChannel API not supported in this browser"]});const r=n=>{n.type===e&&t(n)},a=n||`${e}-${Date.now().toString()}-${this.eventListeners.size}`;return this.channel.addEventListener(e,r),this.eventListeners.set(a,r),a}removeEventListener(e){if(!("BroadcastChannel"in window))return mt.error({level1:["BroadcastChannel API not supported in this browser"]});const t=this.eventListeners.get(e);return!!t&&(this.channel.removeEventListener("message",t),this.eventListeners.delete(e),!0)}postMessage(e){if(!("BroadcastChannel"in window))return mt.error({level1:["BroadcastChannel API not supported in this browser"]});this.channel.postMessage(e)}close(){this.channel.close(),this.isOpen=!1}}var Qi=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))},Ji=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function es(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ts=()=>window.matchMedia("(prefers-color-scheme: dark)"),ns=()=>window.getComputedStyle(document.documentElement).getPropertyValue("font-size"),rs={FEED_OVERLAY:"100",CARD_OVERLAY:"110",DROPDOWN:"40",HEADER:"30",BANNER:"20",TOAST:"11",OVERFLOW_MENU:"11",OVERFLOW_MENU_BUTTON:"10",CUSTOM_HEADER:"2"},as=on("div")((e=>{let{embedMode:t,feedOrientation:n}=e;const r={};return"launcher"===t?Object.assign({width:"calc(100% - 40px)",height:"0px",position:"absolute",bottom:"100px",right:"20px",left:"20px",transition:"height 0.2s"},"horizontal"===n?r:{}):{width:"100%",height:"100%"}})),os={fontFamily:'-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',height:"100%",overflow:"hidden"},is=on("div")((e=>{let{embedMode:t}=e;return"launcher"===t?Object.assign(Object.assign({},os),{borderRadius:"20px",boxShadow:"0 2px 20px 0 rgba(0, 0, 0, 0.1)"}):Object.assign({},os)})),ss=K.forwardRef(((e,t)=>{let{store:n,embedMode:r,applyCardFeedDeltaUpdates:a,cardCountChanged:i,onReady:s,runtimeVariableResolver:l,linkButtonPressed:c,submitButtonPressed:d,onCardListTutorialSeen:u,onAnalyticsEvent:p,onCardEvent:m,onError:v,onAuthTokenRequested:w,onCardFeedSubscribe:S,requestWebSocketReconnect:C,webSocketDisabled:k}=e;const[x,I]=h(ts().matches?"dark":"light"),[,O]=h(ns);g((()=>{const e=e=>{I(e.matches?"dark":"light")};ts().addEventListener("change",e);const t=()=>{O(ns)};return window.addEventListener("browser-font-changed",t),window.addEventListener("pageshow",(e=>{var t;e.persisted&&!(null===(t=M.containersBroadcastChannel)||void 0===t?void 0:t.isOpen)&&(M.containersBroadcastChannel=new Xi)})),()=>{ts().removeEventListener("change",e),window.removeEventListener("browser-font-changed",t)}}),[]);const M=y((()=>({analyticsDispatcher:{sendEvent:(e,t)=>Qi(void 0,void 0,void 0,(function*(){p&&(void 0===t?yield p(e):yield p(e,t))}))},cardEventDispatcher:{dispatchCardEvent:e=>{m&&m(e)}},authTokenProvider:{requestToken:()=>Qi(void 0,void 0,void 0,(function*(){return yield w()}))},runtimeVariableResolver:l,containersBroadcastChannel:"BroadcastChannel"in window?new Xi:void 0})),[p,m,w]),T=f();return b(t,(()=>({pollCardList:()=>{var e;mt.debug({level3:["Card feed polling initiated"]}),null===(e=T.current)||void 0===e||e.loadCards(!1)},cancelCardListPolling:()=>{var e;null===(e=T.current)||void 0===e||e.cancelCardListPolling()}}))),"toast"===r?(0,o.h)(Yi,{store:n,onAuthTokenRequested:w}):(0,o.h)(Ci,{onError:v},(0,o.h)(ya.Provider,{value:M},(0,o.h)(Le.zt,{store:n},(0,o.h)(Le.lj,{actions:(0,G.Y2)(Xt,Q),mapToProps:e=>{const{cardResponses:t}=e;return Ji(e,["cardResponses"])}},(e=>{let{cardFeed:t,pendingCardFeedUpdates:n,cardStates:r,navigationStack:p,cardFeedLoading:h,cardFeedLoaded:m,themeLoading:g,themeLoaded:v,finishExternalAction:f,application:{open:b,cardListRefreshInterval:y,streamContainerId:w,runtimeVariableResolutionTimeout:I,isPreview:O,embedMode:M,customStrings:F,cardLimit:j,firstLoadStyles:_,interfaceStyle:L},externalAction:D,theme:{themePayload:A}}=e;const E=p.items.length?p.items[p.items.length-1]:void 0;let H;switch(null==E?void 0:E.kind){case"media":H="Media";break;case"subview":H="Card Subview";break;case"snooze":H="Snooze Date & Time Selector";break;case"feedback":H="Send Feedback"}return(0,o.h)(as,{embedMode:M,feedOrientation:Uc(t.horizontalContainerConfig),id:"action-cards-sdk-app-root",class:"atomic-sdk-root","data-contentLabel":H},(0,o.h)(cs,{ref:T,streamContainerId:w,runtimeVariableResolutionTimeout:I,runtimeVariablesResolver:l,themePayload:A,cardFeed:t,pendingCardFeedUpdates:n,cardStates:r,cardLimit:j,onThemeLoading:g,onThemeLoaded:v,onCardFeedLoading:h,onCardFeedLoaded:m,onCardFeedSubscribe:S,streamFilter:t.streamFilter,requestWebSocketReconnect:C,webSocketDisabled:k,currentNavigationItem:E,applicationOpen:b,onReady:s,onCardCountChanged:i,applyCardFeedDeltaUpdates:a,cardListRefreshInterval:y,isPreview:O,cardListTitle:F.cardListTitle,embedMode:M,externalAction:D,finishExternalAction:f,onLinkButtonPressed:c,onSubmitButtonPressed:d,cardListTutorialSeen:t.tutorialSeen,onCardListTutorialSeen:u,firstLoadStyles:_,colourScheme:x,interfaceStyle:L,noInternetConnectionMessage:F.noInternetConnectionMessage,dataLoadFailedMessage:F.dataLoadFailedMessage,tryAgainTitle:F.tryAgainTitle}))})))))})),ls=e=>"modal-subview"!==e;class cs extends o.Component{constructor(e){super(e),es(this,"pollCounter",0),es(this,"poll",void 0),this.poll=null}componentDidMount(){return Qi(this,void 0,void 0,(function*(){this.props.onReady(),ls(this.props.embedMode)&&this.loadTheme()}))}componentWillUnmount(){this.cancelCardListPolling()}componentDidUpdate(e){var t,n;const{cardFeed:r,externalAction:a}=e,{cardFeed:o,pendingCardFeedUpdates:i,cardStates:s,onCardCountChanged:l,externalAction:c,embedMode:d}=this.props;if("modal-subview"===d||"toast"===d)return;const u=o.cardInstances.map((e=>e.instance.id)),p=r.cardInstances.map((e=>e.instance.id));var h;Yc(u,p)&&(null===(t=r.metadata)||void 0===t?void 0:t.totalCards)===(null===(n=o.metadata)||void 0===n?void 0:n.totalCards)||this.poll&&l&&l(o.cardInstances.length,null===(h=o.metadata)||void 0===h?void 0:h.totalCards);if(!r.tutorialSeen&&o.tutorialSeen&&this.props.onCardListTutorialSeen&&this.props.onCardListTutorialSeen(),c&&c.actionId!==(null==a?void 0:a.actionId)&&this.handleExternalAction(c),r.runtimeVariables.updateId!==o.runtimeVariables.updateId&&this.trackRuntimeVariablesChanged(o),Object.values(s).every((e=>null===e))&&i&&i.length>0){const e=(0,G.kv)((0,G.Y2)(Xt,Q),ie());this.props.applyCardFeedDeltaUpdates(e,i)}}trackRuntimeVariablesChanged(e){const t=this.context.analyticsDispatcher,n=!1===e.runtimeVariableAnalyticsEnabled;e.cardInstances.forEach((r=>{if(r.runtimeVariables&&r.runtimeVariables.values){var a;const o=null===(a=e.runtimeVariables.values)||void 0===a?void 0:a.get(r.instance.id);t.sendEvent({cardInstanceId:r.instance.id,cardViewState:"topview",eventName:yt,properties:{resolvedVariables:r.runtimeVariables.reduce(((e,t)=>(e[t.name]=(null==o?void 0:o.get(t.name))||"",e)),{})}},n)}}))}loadTheme(){return Qi(this,void 0,void 0,(function*(){const{streamContainerId:e,onThemeLoading:t,onThemeLoaded:n}=this.props,r=yield Si(e);if(r)n({theme:r.theme}),wi(e,r.eTag);else{t();n(yield wi(e))}const a=ie().getState().theme.status;a&&a.loaded&&this.subscribeToCardFeedUpdates()}))}loadCards(e){return Qi(this,void 0,void 0,(function*(){const t=this.context,{onCardFeedLoading:n,onCardFeedLoaded:r,streamContainerId:a,runtimeVariableResolutionTimeout:o,cardFeed:i,runtimeVariablesResolver:s,cardLimit:l,streamFilter:c}=this.props;e||n();const d=yield hd(a,t.authTokenProvider,o,i.lastModified,s,l,c);e&&d.error||r(d),ie().getState().cardFeed.status.loaded&&this.pollForNewCards()}))}handleExternalAction(e){return Qi(this,void 0,void 0,(function*(){const t=this.context,n=t.analyticsDispatcher,r=t.containersBroadcastChannel,a=()=>Qi(this,void 0,void 0,(function*(){var t;return n.sendEvent({cardInstanceId:e.cardInstanceId,cardViewState:e.cardViewState,eventName:vt,properties:Object.assign(Object.assign(Object.assign(Object.assign({linkMethod:e.linkMethod},(null===(t=e.urlLink)||void 0===t?void 0:t.url)?{url:e.urlLink.url}:{}),e.payload?{payload:e.payload.actionPayload}:{}),e.trigger?{detail:e.trigger}:{}),e.subviewData.subviewId?Object.assign(Object.assign({},e.subviewData),{subviewLevel:1}):{})})})),o=()=>{var t;e.payload?(this.props.finishExternalAction(e.actionId),"linkButton"!==e.trigger&&"image"!==e.trigger||!this.props.onLinkButtonPressed?"submitButton"===e.trigger&&this.props.onSubmitButtonPressed&&this.props.onSubmitButtonPressed(e.payload):this.props.onLinkButtonPressed(e.payload)):e.urlLink&&(this.props.finishExternalAction(e.actionId),window.open(e.urlLink.url,null!==(t=e.urlLink.target)&&void 0!==t?t:"_blank"))};if(r){const t=`${e.actionId}-app-external-action`;r.addEventListener("message",(n=>{var a;if(n.data.type!==Gi.ANALYTICS_EVENT)return;const i=null===(a=n.data)||void 0===a?void 0:a.eventQueued;i.eventName===vt&&i.cardInstanceId===e.cardInstanceId&&r&&(r.removeEventListener(t),o())}),t),yield a()}else yield a(),o()}))}subscribeToCardFeedUpdates(){return this.props.webSocketDisabled?this.loadCards(!1):this.props.onCardFeedSubscribe()}pollForNewCards(){const{isPreview:e,cardListRefreshInterval:t,embedMode:n}=this.props;!e&&0!==t&&ls(n)&&(this.poll=setTimeout((()=>Qi(this,void 0,void 0,(function*(){this.props.webSocketDisabled?yield this.loadCards(!0):this.pollCounter<9?(this.pollCounter++,yield this.loadCards(!0)):(this.pollCounter=0,mt.debug({level3:["Attempt to reconnect websocket initiated"]}),this.props.requestWebSocketReconnect())}))),t))}cancelCardListPolling(){this.poll&&mt.debug({level3:["Card feed polling cancelled"]}),clearTimeout(this.poll),this.poll=null,this.pollCounter=0}render(e){var t;let{currentNavigationItem:n,embedMode:r,cardFeed:a,firstLoadStyles:i,colourScheme:s,interfaceStyle:l,noInternetConnectionMessage:c,dataLoadFailedMessage:d,tryAgainTitle:u}=e;const p=ie().getState(),h="modal-subview"===r;if(!p.theme.status)return h?null:(0,o.h)(is,{embedMode:r,id:Sa});if(!1===p.theme.status.loaded)return h?null:(0,o.h)(is,{embedMode:r,id:Sa},(0,o.h)(fa,{embedMode:r,textColor:i.textColor,loadingIconColor:i.loadingSpinnerColor,buttonColor:i.buttonTextColor,backgroundColor:i.backgroundColor,onRetry:()=>{this.loadTheme()},state:p.theme.status.errorState,noInternetConnectionMessage:c,dataLoadFailedMessage:d,tryAgainTitle:u}));const{applicationOpen:m,themePayload:g}=this.props;let v;v="standalone"===r&&(null===(t=a.horizontalContainerConfig)||void 0===t?void 0:t.enabled)||"single-card"===r?"feed":Be(n)?"media":ze(n)?"subview":Ne(n)?"snooze":Ue(n)?"feedback":h?void 0:"feed";const f=g?gi(g,s,l):void 0;if(!v||!f)return null;const b=f.getTheme("feed"),y=f.getTheme("workflow");return(0,o.h)(o.Fragment,null,(0,o.h)(is,{theme:b,visible:m,embedMode:r,className:"feed-container",role:"main"},"subview"===v&&(0,o.h)(Va,{theme:y}),"media"===v&&(0,o.h)(Ga,{theme:y}),"feed"===v&&(0,o.h)(ja,{theme:b,onRetry:()=>(this.props.onCardFeedLoading(),this.subscribeToCardFeedUpdates())}),"snooze"===v&&(0,o.h)(hi,{theme:y}),"feedback"===v&&(0,o.h)(Ui,{theme:y})),(0,o.h)(ki,{fontFamilies:b.getFontFamilies()}),(0,o.h)(Cn,null))}}es(cs,"contextType",ya);const ds=sn({to:{opacity:"0"}}),us=sn({to:{opacity:"1"}}),ps=sn({to:{opacity:"1",width:"400%",paddingTop:"400%"}}),hs=sn({to:{opacity:"0",transform:"scale(0.9)"}}),ms=sn({from:{opacity:"1",transform:"scale(1)"},to:{opacity:"0",transform:"scale(0)"}}),gs=sn({to:{transform:"translateX(-120%)"}}),vs=sn({from:{left:"100%"},to:{left:"50%"}}),fs=sn({from:{},to:{height:"0px"}}),bs=sn({from:{},to:{width:"0px"}}),ys=e=>{let{theme:t,animationState:n}=e;return(0,o.h)(o.Fragment,null,(0,o.h)(Ms,{theme:t,class:n,"aria-hidden":"true"}),(0,o.h)(Nn,{fillColor:t.getCSSColor("icon.cardCompletion"),className:"tick-icon",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},"aria-hidden":!0}))},ws=e=>{let{animationState:t,theme:n}=e;return(0,o.h)(o.Fragment,null,(0,o.h)("div",{class:`${t||""} dismiss-icon`,style:{background:n.getCSSColor("background.quickActionPrimary")},"aria-hidden":"true"},(0,o.h)(Un,{style:{fill:n.getCSSColor("icon.quickActionPrimary")}})),(0,o.h)("div",{class:`${t||""} clock-icon`,style:{background:n.getCSSColor("background.quickActionSecondary")},"aria-hidden":"true"},(0,o.h)(Bn,{style:{fill:n.getCSSColor("icon.quickActionSecondary")}})))},Ss=on("div")((e=>{let{theme:t,topAlign:n,viewState:r,useHorizontalStyles:a}=e,o="rgba(255,255,255,1)";"subview"===r?o=(bn(t.getCSSColor("background.default")),t.getCSSColor("background.default")):bn(t.getCSSColor("background.card"))&&!bn(t.getCSSColor("background.default"))?o=t.getCSSColor("background.default"):bn(t.getCSSColor("background.card"))||(o=t.getCSSColor("background.card")),o=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(\d*(?:\.\d+)?)?\s*\)$/);if(t){const[,e,n,r]=t;return`rgba(${e},${n},${r},1)`}return mt.warn({level3:["Expected a valid RGBA color string, but received:",e,"Returning the original value."]}),e})(o);return Object.assign(Object.assign({position:"absolute",top:"0",left:"0",right:"0",bottom:"0",zIndex:rs.CARD_OVERLAY,padding:"15px 10px",backgroundColor:o,border:`${t.getShape("border.card")} solid ${t.getCSSColor("border.card")}`,borderRadius:t.getShape("borderRadius.card")},n?{}:{display:"flex"}),a?{marginLeft:"10px",marginBottom:"10px"}:{})})),Cs=on("div")((e=>{let{topAlign:t}=e;return Object.assign({width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},t?{marginTop:"15vh"}:{})})),ks=on("div")({}),xs=on("div")((e=>{let{theme:t,maxLines:n}=e;return Object.assign({width:"100%",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:`${n}`,textAlign:"center",marginTop:"20px",color:t.getCSSColor("text.processingStateMessage")},t.getCSSFontProperties("processingStateMessage",{skipFallback:!0})||{})})),Is=on("button")((e=>{let{theme:t}=e;return Object.assign({width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"15px",padding:"8px",background:"transparent",border:"0",outline:"none",fontWeight:"bold",cursor:"pointer",color:t.getCSSColor("text.processingStateButtonLabel")},t.getCSSFontProperties("processingStateButtonLabel",{skipFallback:!0})||{})})),Os=e=>{let{viewState:t,onCancelUpload:n,theme:r,renderOverlay:a}=e;return a?(0,o.h)(Le.lj,{mapToProps:e=>{var t;const n=$e(e),r=n&&ze(n);return{customStrings:e.application.customStrings,embedMode:e.application.embedMode,presentingSubview:r,horizontalStreamContainer:!!(null===(t=e.cardFeed.horizontalContainerConfig)||void 0===t?void 0:t.enabled)}}},(e=>{var a,i,s,l;const c=f(null),d=f(null),u=f(null),p=f(null),[m,v]=h(0),b=null!==(a=null===(s=e.customStrings)||void 0===s?void 0:s.processingStateMessage)&&void 0!==a?a:"Sending, please wait...",y=null!==(i=null===(l=e.customStrings)||void 0===l?void 0:l.processingStateCancelButtonTitle)&&void 0!==i?i:"Cancel process";if(g((()=>{var e,t,n,r,a,o,i,s;const l=null===(e=c.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.clientHeight,h=null===(n=d.current)||void 0===n||null===(r=n.base)||void 0===r?void 0:r.clientHeight,m=null===(a=u.current)||void 0===a||null===(o=a.base)||void 0===o?void 0:o.clientHeight,g=null===(i=p.current)||void 0===i||null===(s=i.base)||void 0===s?void 0:s.clientHeight;if(l&&h&&m&&g){const e=l-h-g-30-20-15,t=parseFloat(getComputedStyle(u.current.base).lineHeight),n=Math.floor(e/t);v(n)}}),[b,y]),"single-card"===e.embedMode&&e.presentingSubview)return null;if("standalone"===e.embedMode&&e.horizontalStreamContainer&&e.presentingSubview)return null;const w="subview"===t&&"standalone"===e.embedMode;return(0,o.h)(Ss,{theme:r,class:"subview"===t?"use-offset":"",topAlign:w,viewState:t,useHorizontalStyles:e.horizontalStreamContainer&&!e.presentingSubview},(0,o.h)(Cs,{ref:c,theme:r,topAlign:w},(0,o.h)(ks,{ref:d},(0,o.h)(Sn,{stopColor:r.getCSSColor("icon.processingStateSpinner"),size:30})),(0,o.h)(xs,{ref:u,theme:r,maxLines:Math.max(1,m)},b),(0,o.h)(Is,{ref:p,theme:r,onClick:n},y)))})):null},Ms=on("div")((e=>{let{theme:t}=e;return{background:t.getCSSColor("background.cardCompletion"),position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",transformOrigin:"center",borderRadius:"999px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",opacity:"0",width:"0px",paddingTop:"0px",".submitting":{animation:`${ps} 0.6s ease 0.2s forwards`},".submitted":{animation:`${ps} 0s ease forwards`},".submitted-subview":{animation:`${ps} 0.6s ease 0.2s forwards`}}})),Ts=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vertical";return{cardCompletion:{" .tick-icon":{opacity:"0"},".submitting":{overflow:"hidden",padding:"11px 21px"},".submitting .tick-icon":{animation:`${us} 0.2s ease 0.2s forwards`},".submitting .card-nodes":{animation:`${ds} 0.2s ease forwards`},".submitted":Object.assign(Object.assign(Object.assign({},"vertical"===e?{animation:`${hs} 0.4s ease forwards`}:{}),{overflow:"hidden"}),"horizontal"===e?{transform:"translateX(-120%)",opacity:"0"}:{}),".submitted .tick-icon":{animation:`${us} 0.2s ease forwards`},".submitted .card-nodes":{opacity:"0"},".submitted-subview":Object.assign({animation:`${hs} 0.4s ease 0.8s forwards`,overflow:"hidden"},"horizontal"===e?{transform:"translateX(-120%)",opacity:"0"}:{}),".submitted-subview .tick-icon":{animation:`${us} 0.2s ease 0.2s forwards`},".submitted-subview .card-nodes":{animation:`${ds} 0.2s ease forwards`}},dismissal:{".dismissing":{animation:"vertical"===e?`${gs} 0.4s ease forwards`:`${ds} 0.3s ease forwards`},".dismissed":Object.assign({transform:"translateX(-120%)"},"horizontal"===e?{animation:`${fs}`,opacity:"0"}:{})},snooze:{".snoozing":{animation:"vertical"===e?`${gs} 0.4s ease forwards`:`${ds} 0.3s ease forwards`},".snoozed":Object.assign({transform:"translateX(-120%)"},"horizontal"===e?{animation:`${fs}`,opacity:"0"}:{})}}},Fs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vertical";return{cardCompletion:{".submitted":{overflow:"hidden",animation:`${"vertical"===e?fs:bs} 0.4s ease 0.2s forwards`},".submitted .clock-icon":Object.assign({},"horizontal"===e?{width:"0"}:{}),".submitted .dismiss-icon":Object.assign({},"horizontal"===e?{width:"0"}:{}),".submitted-subview":{overflow:"hidden",animation:"vertical"===e?`${fs} 0.4s ease 1.0s forwards`:`${bs} 0.4s ease 0.2s forwards`}},dismissal:{position:"relative"," .dismiss-icon":Object.assign({position:"absolute",left:"vertical"===e?"120%":"50%",top:"50%",width:"50px",height:"50px",margin:"vertical"===e?"-25px 0 0 -25px":"-29px 0 0 -20px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},"vertical"===e?{}:{opacity:"0"}),".dismissing .dismiss-icon":{animation:"vertical"===e?`${vs} 0.4s ease forwards`:`${us} 0.3s ease 0.3s forwards`},".dismissed":{overflow:"hidden",animation:"vertical"===e?`${fs} 0.4s ease 0.4s forwards`:`${bs} 0.3s ease 0.3s forwards`},".dismissed .dismiss-icon":{left:"50%",animation:"vertical"===e?`${ms} 0.4s ease forwards`:`${ms} 0.3s ease forwards`},".dismissed .clock-icon":Object.assign({},"horizontal"===e?{width:"0"}:{})},snooze:{position:"relative"," .clock-icon":Object.assign({position:"absolute",left:"vertical"===e?"120%":"50%",top:"50%",width:"50px",height:"50px",margin:"vertical"===e?"-25px 0 0 -25px":"-29px 0 0 -20px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},"vertical"===e?{}:{opacity:"0"}),".snoozing .clock-icon":{animation:"vertical"===e?`${vs} 0.4s ease forwards`:`${us} 0.3s ease 0.3s forwards`},".snoozed":{overflow:"hidden",animation:"vertical"===e?`${fs} 0.4s ease 0.4s forwards`:`${bs} 0.3s ease 0.3s forwards`},".snoozed .clock-icon":{left:"50%",animation:"vertical"===e?`${ms} 0.4s ease forwards`:`${ms} 0.3s ease forwards`},".snoozed .dismiss-icon":Object.assign({},"horizontal"===e?{width:"0"}:{})},center:{position:"relative",".centering":{position:"relative",left:"50%",transform:"translateX(-50%)",transition:"left 0.4s ease-out"}}}},js=600,_s=600,Ls=600,Ds=e=>{switch(e){case"submitted":return 400;case"submitted-subview":return 1200;case"dismissed":case"snoozed":return 800;case"centering":return 500;default:return 0}};var As=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Es=(e,t,n,r,a,o)=>As(void 0,void 0,void 0,(function*(){const{dismissingCard:i,dismissedCard:s,failedToDismissCard:l}=t;if(e.application.isPreview)return;i(n);const c=new Promise((e=>setTimeout(e,_s)));mt.debug({level1:["Dismiss card sent by HTTP"]});const d=yield gd(e.application.streamContainerId,n,a);yield Promise.allSettled([c,d]),d.ok?(mt.debug({level1:["Dismiss card sent by HTTP: success"]}),s(n),Pe().clearSubviewsForCardInstance(n),window.AtomicUploadService.cancelUploadForCard(e.application.containerInstanceId,n),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),r.dispatchCardEvent({type:ba.DISMISSED,eventPayload:d.event})):(mt.error({level1:["Dismiss card sent by HTTP: failed"]}),l(n,o,d.error),r.dispatchCardEvent({type:ba.DISMISS_FAILED}))})),Hs=function(e,t,n){return As(this,arguments,void 0,(function*(){var r,a,o;let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4?arguments[4]:void 0,l=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0,d=arguments.length>7?arguments[7]:void 0,u=arguments.length>8?arguments[8]:void 0;const{submittingCard:p,submittedCard:h,failedToSubmitCard:m,finishSubview:g,openExternalUrl:v,handleSubmitButtonPayload:f}=t,{postSubmissionUrl:b,payload:y,subviewData:w,submitButtonName:S,cancelSubmitCallback:C}=u||{};if(e.application.isPreview)return;const k=e=>{m(n,i,d,e,{postSubmissionUrl:b,subviewData:w,payload:y,submitButtonName:S}),s.dispatchCardEvent({type:ba.SUBMIT_FAILED})};let x=!1;const I=(null==w?void 0:w.subviewId)?null===(r=e.cardResponses[n])||void 0===r||null===(a=r.subviews)||void 0===a?void 0:a[null==w?void 0:w.subviewId]:null===(o=e.cardResponses[n])||void 0===o?void 0:o.responses,O=Object.assign(Object.assign({},d),I||{});for(const[e,t]of Object.entries(I||{}))t&&"object"==typeof t&&"image"===t.type&&"string"==typeof t.destinationFilename&&"string"==typeof t.targetBucketId&&(x=!0,O&&(O[e]={filename:t.destinationFilename,targetBucketId:t.targetBucketId}));if(x){const r=window.frameElement,a=r.classList.contains("modal-subview");a&&r.classList.add("uploading-files"),t.startCardFileUpload(n),t.setCardFeedOverlay(!0);const o=yield window.AtomicUploadService.uploadFilesForCard(n,e.application.containerInstanceId,c,l,{subviewData:w,cancelSubmitCallback:C});if(t.finishCardFileUpload(n),!window.AtomicUploadService.getIsUploadingStatus(e.application.containerInstanceId)&&t.setCardFeedOverlay(!1),a&&r.classList.remove("uploading-files"),!o.success)return o.cancelledUploads?null:(mt.error({level1:[`Submit of card ${n} failed due to file upload failure`]}),k(o.error))}p(n);const M=new Promise((e=>setTimeout(e,js)));mt.debug({level1:["Submit card sent by HTTP"]});const T=yield md(e.application.streamContainerId,n,Object.assign(Object.assign({},O),S?{[S]:null}:{}),c);yield Promise.allSettled([M,T]),T.ok?(mt.debug({level1:["Submit card sent by HTTP: success"]}),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),g(),(null==b?void 0:b.url)&&v(n,i?"subview":"topview",w||{},"url","submitButton",b),y&&f(n,w||{},y),h(n,i),Pe().clearSubviewsForCardInstance(n),s.dispatchCardEvent({type:ba.SUBMITTED,eventPayload:T.event})):(mt.error({level1:["Submit card sent by HTTP: failed"]}),k(T.error))}))},Ps=(e,t,n,r,a,o,i)=>As(void 0,void 0,void 0,(function*(){const s=(0,J.differenceInSeconds)(r,new Date),{snoozingCard:l,snoozedCard:c,failedToSnoozeCard:d}=t;if(e.application.isPreview)return;l(n);const u=new Promise((e=>setTimeout(e,Ls)));mt.debug({level1:["Snooze card sent by HTTP"]});const p=yield vd(e.application.streamContainerId,n,s,o);yield Promise.allSettled([u,p]),p.ok?(mt.debug({level1:["Snooze card sent by HTTP: success"]}),c(n,r),Pe().clearSubviewsForCardInstance(n),dt().clearCardForm(n),window.AtomicUploadService.cancelUploadForCard(e.application.containerInstanceId,n),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),a.dispatchCardEvent({type:ba.SNOOZED,eventPayload:p.event})):(mt.error({level1:["Snooze card sent by HTTP: failed"]}),d(n,r,i,p.error),a.dispatchCardEvent({type:ba.SNOOZE_FAILED}))})),Rs=(e,t,n,r,a)=>{n.sendEvent({cardInstanceId:e,cardViewState:"topview",eventName:ft,properties:{source:a}}),t.feedbackReceived(e),r.dispatchCardEvent({type:ba.VOTED_USEFUL})};var Vs=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};function $s(){return $s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$s.apply(this,arguments)}const zs=(e,t,n,r)=>Vs(void 0,void 0,void 0,(function*(){var a;const o=null===(a=(yield fd([n],t,e)).values)||void 0===a?void 0:a.get(n.instance.id);o&&Object.entries(r).forEach((a=>{let[i,s]=a;"string"==typeof s?r[i]=Rc(s,o):Wc(s)&&zs(e,t,n,s)}))})),Ns=e=>{let{nodeKey:t,isWorkflow:n,clickHandler:r,text:a,icon:i,iconUrl:s,theme:l,appearance:c,loading:d,type:u,urlLink:p}=e;return(0,o.h)(Le.lj,{actions:(0,G.Y2)(at,De,Xt),mapToProps:()=>{}},(e=>(0,o.h)(zn,$s({},t&&{nodeKey:t},{isWorkflow:n,clickHandler:r(e),text:a,icon:i,iconUrl:s,theme:l,appearance:c,loading:d,type:u,urlLink:p}))))},Us=on("div")((e=>{let{isWorkflow:t,feedOrientation:n}=e;return Object.assign({},t||"horizontal"!==n?{}:{display:"flex",flexDirection:"column",flexGrow:"1",justifyContent:"flex-end"})})),Bs=e=>{let{children:t,isWorkflow:n,feedOrientation:r,initializeFormStore:a}=e;return g((()=>{a()}),[]),(0,o.h)(Us,{isWorkflow:n,feedOrientation:r},t)},Ws=(e,t,n,r)=>()=>{e.createResponseWithDefaults(t,n,r)},qs=on("div")((e=>{let{theme:t,headlineFontProperties:n}=e;return{color:t.getCSSColor("text.headline"),display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${n.lineHeight} 1fr`,padding:"10px 0"}})),Ys=on("h2")((e=>{let{theme:t}=e;return Object.assign(Object.assign({gridColumnStart:"2",gridRowStart:"span 2"},t.getCSSFontProperties("headline")),{margin:"0",whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"})})),Zs="22px",Ks=e=>Object.assign(Object.assign({margin:"0",paddingLeft:"0",listStyleType:"none"},e.getCSSFontProperties("body")),{color:e.getCSSColor("text.body")}),Gs=e=>{let t;return qc(t)||(t=e.getCSSFontProperties("bullet")),{"> li":{display:"flex",margin:"0 0 5px"},"> li.without-icon:before":Object.assign({content:'"•"',textAlign:"center",flexBasis:Zs,minWidth:Zs,marginRight:"10px",color:e.getCSSColor("icon.bullet")},t?{fontSize:t.fontSize,lineHeight:t.lineHeight}:{}),"> li.with-icon i":{flexBasis:Zs,minWidth:Zs,textAlign:"center"},"> li:last-child":{marginBottom:"10px"}}},Xs=on("ul")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},Ks(t)),Gs(t))})),Qs=on("ol")((e=>{let{theme:t}=e;return Object.assign(Object.assign(Object.assign({},Ks(t)),Gs(t)),{counterReset:"item","> li.without-icon:before":Object.assign(Object.assign(Object.assign({},Ks(t)["> li.without-icon:before"]),Gs(t)["> li.without-icon:before"]),{content:'counter(item) "."',counterIncrement:"item"})})})),Js=on("ul")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},Ks(t)),{margin:"5px 20px 5px 0"," li":{display:"inline"}," li:before":{content:'", "'}," li:first-child:before":{content:'""'}})}));class el{constructor(){this.tagState=new Map,this.tagState.set("__",{open:!1}),this.tagState.set("**",{open:!1}),this.tagState.set("_",{open:!1}),this.tagState.set("*",{open:!1})}toggle(e){const t=this.tagState.get(e);t&&(t.open=!t.open,this.tagState.set(e,t))}}const tl={"":["<em>","</em>"],_:["<strong>","</strong>"],"\n":["</p><p>"]," ":["<br />"]};function nl(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function rl(e){return("<p>"+al(e)+"</p>").replace(/<p><\/p>/g,"")}function al(e,t){const n=new el;let r,a,o,i,s,l=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([*+-]|\d+\.)\s+.*)+)|(?:\!\[([^\]]*?)\]\(([^\)]+?)\))|(\[)|(\](?:\(([^\)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(\-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|(__|\*\*|[_*])|( \n\n*|\n{2,})/gm,c=[],d="",u=t||{},p=0;function h(e){var t=tl[e.replace(/\*/g,"_")[1]||""],n=c[c.length-1]==e;return t?t[1]?(c[n?"pop":"push"](e),t[0|n]):t[0]:e}function m(){let e="";for(;c.length;)e+=h(c[c.length-1]);return e}function g(e){return e.replace(/&%[0-9]+%;/g,(e=>String.fromCharCode(+e.substring(2,e.length-2))))}for(e=e.replace(/\\([*_[\]{}`<>()#+\-!|.])/g,(e=>`&%${e.charCodeAt(1)}%;`)),e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,(function(e,t,n){return u[t.toLowerCase()]=n,""})).replace(/^\n+|\n+$/g,"");o=l.exec(e);){a=e.substring(p,o.index),p=l.lastIndex,r=o[0];let t=!1;if(a.match(/[^\\](\\\\)*\\$/));else if(o[6])s=o[6],s.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=al((f=o[5].replace(/^\s*[>*+.-]/gm,"")).replace(RegExp("^"+(f.match(/^(\t| )+/)||"")[0],"gm"),"")),">"!==s&&(t=!0,s=s.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"<li><span>$1</span></li>")),r="<"+s+">"+i+"</"+s+">";else if(o[10]){const e=(o[11]||"").match(/subview:(?<viewId>.*)/);if(e){const t=((e||{}).groups||{}).viewId?e.groups.viewId:"";d=d.replace("<a>",`<a tabindex="0" class="md-subview-link" data-subview-id="${t}">`)}else d=d.replace("<a>",'<a tabindex="0" target="_blank" class="md-web-link" href="'+nl(o[11]||u[a.toLowerCase()])+'">');r=m()+"</a>"}else if(o[9])r="<a>";else if(o[12])r="<p>"+o[12]+"\n"+o[13]+"</p>",t=!0;else if(o[14])r="<p>"+o[14]+" "+o[15]+"</p>",t=!0;else if(o[17]){const e=o[17];var v=tl[e.replace(/\*/g,"_")[1]||""];r=n.tagState.has(e)&&n.tagState.get(e).open?v[1]:v[0],n.toggle(e)}else if(o[18]){const e=o[18];r=e?h(e):r}else o[4]&&(r="<p>"+o[4]+"</p>",t=!0);d+=a,d+=t?"</p>"+r+"<p>":r}var f;return n.tagState.forEach(((e,t)=>{if(n.tagState.get(t).open){const e=tl[t.replace(/\*/g,"_")[1]||""][0],n=d.lastIndexOf(e);-1!==n&&(d=d.slice(0,n)+t+d.slice(n+e.length))}})),(g(d)+g(e.substring(p))+m()).trim()}const ol=on("li")((e=>{let{theme:t}=e;return{color:t.getCSSColor("text.body"),whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"}})),il=on("span")((e=>{let{theme:t}=e;return{" p":{margin:"0",display:"inline"}," a":{color:t.getCSSColor("text.link")}," em":{fontStyle:"italic"}," strong":{fontWeight:"bold"}," .md-subview-link":{textDecoration:"underline",cursor:"pointer"}}})),sl=on("a")((e=>{let{isLinkEnabled:t,theme:n,url:r}=e;return{border:`1px solid ${n.getCSSColor("border.mediaThumb")}`,borderRadius:n.getShape("borderRadius.mediaThumb"),overflow:"hidden",display:"flex",margin:"10px 0",backgroundColor:n.getCSSColor("background.mediaThumbnail"),cursor:t||r?"pointer":"default"}})),ll=on("div")((e=>{let{thumbnail:t,theme:n}=e;return{display:"flex",width:"100px",minWidth:"100px",height:"100px",backgroundColor:n.getCSSColor("background.media"),backgroundSize:"cover",backgroundPosition:"center",backgroundImage:`url('${t}')`,alignItems:"center",justifyContent:"center"}})),cl=on("div")((()=>({padding:"12px 15px 10px 15px",display:"flex",flexFlow:"row wrap",minWidth:"0px"}))),dl=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("mediaTitle")),{color:t.getCSSColor("text.mediaTitle"),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginBottom:"0px",width:"100%"})})),ul=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("mediaSubtitle")),{color:t.getCSSColor("text.mediaSubtitle"),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%"})})),pl=on("a")((e=>{let{isLinkEnabled:t,theme:n}=e;return Object.assign(Object.assign(Object.assign({border:"0px"},n.getElementFocusCSSProperties()),n.getCSSFontProperties("mediaAction")),{color:n.getCSSColor("text.mediaAction"),textDecoration:"none",display:"block",marginTop:"auto",width:"100%",cursor:t?"pointer":"default",visibility:t?"visible":"hidden",userSelect:"none"})}));class hl extends za{render(){const{nodeKey:e,children:t,mediaType:n,src:r,theme:a,label:i,description:s,customStrings:l,onClickImage:c,url:d,alt:u}=this.props,{imageLoaded:p,imageLoadFailed:h}=this.state,m=p?r:"",g=this.getPreviewIcon(n),v=n.includes("video"),f=v&&h,b="image"===n||"video"===n,y=this.getElementRole(n),w=v?(null==l?void 0:l.thumbnailVideoActionLinkTitle)||"Watch":(null==l?void 0:l.thumbnailImageActionLinkTitle)||"View",S=v?"A video":"An image";let C="";return b&&(C=(v?"Plays a video":"Displays an image")+": "),C=`${C}${u?u+".":""}`,(0,o.h)(sl,{key:e,"data-element-key":e,theme:a,onClick:c,isLinkEnabled:b,url:d},(0,o.h)(ll,{thumbnail:m,theme:a,role:y,"aria-label":C||S},!p&&!f&&g&&(0,o.h)(g,{fillColor:a.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(p||h)&&t),(0,o.h)(cl,null,(0,o.h)(dl,{theme:a,class:"thumbnail-header","aria-label":`${i}.`},i),(0,o.h)(ul,{theme:a,class:"thumbnail-format","aria-label":`${s}.`},s),(0,o.h)(pl,{theme:a,isLinkEnabled:"image"===n||"video"===n,tabIndex:"0",class:"thumbnail-link",onKeyPress:this.handleKeyPress.bind(this)},w)))}}const ml=on("div")((e=>{let{backgroundImage:t,theme:n,dimensions:r,loadedDimensions:a,url:o,isLinkEnabled:i}=e;const s=`calc(${n.getShape("borderRadius.card")} - ${n.getShape("border.card")})`;return Object.assign(Object.assign({width:"calc(100% + 40px)",border:"0px",borderRadius:`${s} ${s} 0 0`,backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:n.getCSSColor("background.media"),display:"flex",alignItems:"center",justifyContent:"center",margin:"-10px -20px 10px -20px",overflow:"hidden",cursor:i||o?"pointer":"default"},Sl({dimensions:r,naturalDimensions:a})),n.getElementFocusCSSProperties())}));class gl extends za{onImageLoad(e){super.onImageLoad(e),this.props.onLoad&&this.props.onLoad({width:e.naturalWidth,height:e.naturalHeight})}render(){const{nodeKey:e,children:t,mediaType:n,src:r,theme:a,onClickImage:i,dimensions:s,url:l,alt:c}=this.props,{imageLoaded:d,imageLoadFailed:u}=this.state,p=d?r:"",h=this.getPreviewIcon(n),m=n.includes("video")&&u,g="image"===n||"video"===n,v=this.getElementRole(n),f=n.includes("video")?"A banner video":"A banner image";let b="";return g&&(b=(n.includes("video")?"Plays a video":"Displays an image")+": "),b+=c,(0,o.h)(ml,{key:e,"data-element-key":e,backgroundImage:p,theme:a,mediaType:n,url:l,dimensions:s,loadedDimensions:this.state.loadedDimensions,onClick:i,onKeyPress:this.handleKeyPress.bind(this),tabIndex:"0",className:"image-banner",role:v,isLinkEnabled:g,"aria-label":b||f},!d&&!m&&h&&(0,o.h)(h,{fillColor:a.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(d||u)&&t)}}const vl=on("div")((e=>{let{backgroundImage:t,theme:n,dimensions:r,loadedDimensions:a,url:o,isLinkEnabled:i}=e;const s=n.getCSSColor("border.media");return Object.assign(Object.assign(Object.assign(Object.assign({},bn(s)?{}:{border:`1px solid ${n.getCSSColor("border.media")}`}),{borderRadius:`${n.getShape("borderRadius.media")}`,backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundColor:n.getCSSColor("background.media"),margin:"10px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:i||o?"pointer":"default",overflow:"hidden"}),Sl({dimensions:r,naturalDimensions:a})),n.getElementFocusCSSProperties())}));class fl extends za{onImageLoad(e){super.onImageLoad(e),this.props.onLoad&&this.props.onLoad({width:e.naturalWidth,height:e.naturalHeight})}render(){const{nodeKey:e,children:t,mediaType:n,src:r,dimensions:a,url:i,onClickImage:s,theme:l,alt:c}=this.props,{imageLoaded:d,imageLoadFailed:u}=this.state,p=d?r:"",h=this.getPreviewIcon(n),m=n.includes("video")&&u,g="image"===n||"video"===n,v=this.getElementRole(n),f=n.includes("video")?"A video":"An image";let b="";return g&&(b=(n.includes("video")?"Plays a video":"Displays an image")+": "),b+=c,(0,o.h)(vl,{key:e,"data-element-key":e,backgroundImage:p,dimensions:a,loadedDimensions:this.state.loadedDimensions,mediaType:n,url:i,onClick:s,onKeyPress:this.handleKeyPress.bind(this),theme:l,tabIndex:"0",className:"image-inline",role:v,isLinkEnabled:g,ariaLabel:b||f},!d&&!m&&h&&(0,o.h)(h,{fillColor:l.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(d||u)&&t)}}const bl=on("p")({padding:"10px 0",margin:"0",overflow:"hidden",textOverflow:"ellipsis"}),yl=on("a")((e=>{let{theme:t,mediaType:n,url:r}=e;return Object.assign(Object.assign(Object.assign(Object.assign({border:"0px"},t.getElementFocusCSSProperties()),{color:t.getCSSColor("text.link")}),t.getCSSFontProperties("body")),{textDecoration:"none",cursor:"image"===n||"video"===n||r?"pointer":"default","&:hover":{textDecoration:"underline"},whiteSpace:"pre-wrap"})}));class wl extends za{preloadsImage(){return!1}render(){const{nodeKey:e,theme:t,label:n,onClickImage:r,mediaType:a,url:i}=this.props;return(0,o.h)(bl,{key:e,"data-element-key":e},(0,o.h)(yl,{theme:t,onClick:r,onKeyPress:this.handleKeyPress.bind(this),tabIndex:"0",className:"image-text",mediaType:a,url:i},n))}}const Sl=e=>{var t,n;let{dimensions:r,naturalDimensions:a}=e;if(null==r?void 0:r.height)switch(null==r?void 0:r.height){case"short":return{height:"50px"};case"medium":return{height:"120px"};case"tall":default:return{height:"200px"};case"original":const e=(null==r||null===(t=r.originalDimensions)||void 0===t?void 0:t.width)||(null==a?void 0:a.width),o=(null==r||null===(n=r.originalDimensions)||void 0===n?void 0:n.height)||(null==a?void 0:a.height);return e&&o?{aspectRatio:`${e} / ${o}`}:{height:"200px"}}return{height:"200px"}},Cl=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,o.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"A play button icon","aria-hidden":n},(0,o.h)("path",{d:"M6 15.1958V3.80425C6 3.01881 6.86395 2.53997 7.53 2.95625L16.6432 8.652C17.2699 9.04367 17.2699 9.95633 16.6432 10.348L7.53 16.0438C6.86395 16.46 6 15.9812 6 15.1958Z",stroke:t,strokeWidth:"2"}))},kl=on("div")((e=>{let{theme:t}=e;return{borderRadius:"40px",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",background:t.getCSSColor("background.mediaControl")}})),xl=e=>{let{onClick:t,theme:n}=e;return(0,o.h)(kl,{onClick:t,theme:n},(0,o.h)(Cl,{fillColor:n.getCSSColor("icon.mediaControl"),ariaHidden:!0}))},Il={objectFit:"contain",width:"100%",height:"100%",background:"black"},Ol=on("video")(Object.assign({},Il)),Ml=on("video")((()=>Object.assign({},Il))),Tl=on("div")((e=>{let{maskRadius:t,dimensions:n,loadedDimensions:r,format:a}=e;return Object.assign({borderRadius:"banner"===a?`${t} ${t} 0 0`:t,overflow:"hidden",margin:"banner"===a?"-10px -20px 10px -20px":"10px 0"},n?Sl({dimensions:n,naturalDimensions:r}):{height:"200px"})})),Fl=on("div")((e=>{let{theme:t}=e;return{background:t.getCSSColor("overlay.mediaBanner"),display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"}})),jl=e=>{let t,{nodeKey:n,cardInstanceId:r,label:a,description:i,format:s,src:l,altText:c,theme:d,thumbnailSrc:u,dimensions:p,setPlaying:h,onLoad:m}=e,g=!1,v=!1;switch(s){case"banner":t=gl,g=!0,v=!0;break;case"inline":t=fl,g=!0,v=!0;break;case"thumbnail":t=hl,g=!0;break;case"text":t=wl}return(0,o.h)(Le.lj,{actions:De,mapToProps:e=>({customStrings:e.application.customStrings})},(e=>(0,o.h)(t,{nodeKey:n,theme:d,customStrings:e.customStrings,src:u,dimensions:p,onLoad:m,alt:null==c?void 0:c.src,label:a,description:i,mediaType:null!==l&&l.length>0?"video":"videoWithoutSrc",onClickImage:()=>{v?h(!0):e.viewMedia(r,{type:"video",url:l,title:a,alt:null==c?void 0:c.src})}},g&&(0,o.h)(Fl,{theme:d},(0,o.h)(xl,{onClick:()=>v&&h(!0),theme:d})))))},_l=e=>{var t,n;let{format:r,theme:a,src:i,cardInstanceId:s,dimensions:l,loadedDimensions:c,isWorkflow:d}=e;const u=f(null),p=w(ya).analyticsDispatcher,h="string"==typeof i&&null!==(t=null===(n=i.match(/[^\/]*$/))||void 0===n?void 0:n[0])&&void 0!==t?t:"";switch(g((()=>{var e,t,n,r;const a=()=>{p.sendEvent({eventName:It,cardInstanceId:s,cardViewState:d?"subview":"topview",properties:{media:h,mediaURL:i}})},o=()=>{p.sendEvent({eventName:Ot,cardInstanceId:s,cardViewState:d?"subview":"topview",properties:{media:h,mediaURL:i}})};return null===(e=u.current)||void 0===e||null===(t=e.base)||void 0===t||t.addEventListener("play",a),null===(n=u.current)||void 0===n||null===(r=n.base)||void 0===r||r.addEventListener("ended",o),()=>{var e,t,n,r;null===(e=u.current)||void 0===e||null===(t=e.removeEventListener)||void 0===t||t.call(e,"play",a),null===(n=u.current)||void 0===n||null===(r=n.removeEventListener)||void 0===r||r.call(n,"ended",o)}}),[]),r){case"banner":return(0,o.h)(Le.lj,{mapToProps:e=>({applicationOpen:e.application.open})},(e=>{var t;let{applicationOpen:n}=e;return!n&&(null==u||null===(t=u.current)||void 0===t?void 0:t.base)&&u.current.base.pause(),(0,o.h)(Tl,{format:r,dimensions:l,loadedDimensions:c,maskRadius:a.getShape("borderRadius.card")},(0,o.h)(Ol,{ref:u,src:i,playsInline:!0,autoplay:!0,controls:!0}))}));case"inline":return(0,o.h)(Le.lj,{mapToProps:e=>({applicationOpen:e.application.open})},(e=>{var t;let{applicationOpen:n}=e;return!n&&(null==u||null===(t=u.current)||void 0===t?void 0:t.base)&&u.current.base.pause(),(0,o.h)(Tl,{format:r,dimensions:l,loadedDimensions:c,maskRadius:a.getShape("borderRadius.media")},(0,o.h)(Ml,{ref:u,src:i,playsInline:!0,autoplay:!0,controls:!0}))}));default:return null}},Ll=(e,t)=>{let n;return qc(n)||(n=e.getCSSFontProperties("bullet")),{[`>${t} > li`]:Object.assign({display:"flex",margin:"0 0 5px"},"ol"===t?{counterIncrement:"count"}:{}),[`>${t} > li:before`]:Object.assign({content:"ol"===t?'counter(count)"."':'"•"',textAlign:"center",marginRight:"10px",flexBasis:"22px",minWidth:"22px",color:e.getCSSColor("icon.bullet")},n?{fontSize:n.fontSize,lineHeight:n.lineHeight}:{}),[`>${t} > li:last-child`]:{marginBottom:"10px"}}},Dl=(e,t)=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.getCSSColor("text.body"),gridColumnStart:"2",gridRowStart:"span 2"},e.getCSSFontProperties("body")),{marginRight:"10px"," em":{fontStyle:"italic"}," strong":{fontWeight:"bold"}," code":{borderRadius:"3px",padding:"5px",backgroundColor:"rgba(0,0,0,0.05)"},"> ul":Object.assign({},{paddingLeft:"0",margin:"0",whiteSpace:"pre-wrap",listStyleType:"none"})}),Ll(e,"ul")),{"> ol":Object.assign(Object.assign({},{paddingLeft:"0",margin:"0",whiteSpace:"pre-wrap",listStyleType:"none"}),{counterReset:"count"})}),Ll(e,"ol")),{" a":{color:e.getCSSColor("text.link")}," p":Object.assign(Object.assign({margin:"10px 0 0 0",whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"},e.getCSSFontProperties("body")),{overflow:"hidden"})," p:first-child":{marginTop:"0"}," .md-subview-link":{textDecoration:"underline",cursor:"pointer"}}),t),Al=on("div")((e=>{let{theme:t}=e;return Dl(t)})),El=on("div")({position:"absolute",top:"-1000px",left:"-1000px",width:"1px",height:"1px",overflow:"hidden"}),Hl=on("div")((e=>{let{bodyFontProperties:t}=e;return{position:"fixed",visibility:"hidden",pointerEvents:"none",display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${t.lineHeight} 1fr`}})),Pl=on("div")((e=>{let{theme:t}=e;return Dl(t,{"& *":{marginTop:"0!important",marginBottom:"0!important"}})})),Rl=on("div")((e=>{let{theme:t,bodyFontProperties:n,isWorkflow:r}=e;return{display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${n.lineHeight} 1fr`,color:t.getCSSColor("text.body"),padding:r?"0 0 20px 0":"10px 0px"}})),Vl=()=>window.matchMedia("(prefers-color-scheme: dark)");function $l(){var e;const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t);const n=document.createElement("div");t.appendChild(n);const r=t.offsetWidth-n.offsetWidth;return null===(e=t.parentNode)||void 0===e||e.removeChild(t),r}function zl(e,t,n,r,a){var o,i,s,l,c,d,u,p,h,m,g,v;const f=document.createElement("button"),b=document.createElement("span"),y=document.createElement("span");y.innerHTML="&#8230; ";const w=t.getCSSFontProperties("expandCollapse",{skipFallback:!0,skipFontFallbacks:!0}),S=t.getCSSFontProperties("body"),C=t.getShape("padding.expandCollapseLeft")||"0px",k="expand"===n?"Show more":"Show less",x="expand"===n;return f.style.fontFamily="inherit",f.style.fontSize="inherit",f.style.lineHeight="inherit",b.style.paddingLeft=x?C:"0px",b.style.color=null!==(o=t.getCSSColor("text.expandCollapse",{skipFallback:!0}))&&void 0!==o?o:t.getCSSColor("text.body"),f.style.color=null!==(i=t.getCSSColor("text.expandCollapse",{skipFallback:!0}))&&void 0!==i?i:t.getCSSColor("text.body"),b.style.fontWeight=null!==(s=null==w?void 0:w.fontWeight)&&void 0!==s?s:null==S?void 0:S.fontWeight,f.style.fontWeight=null!==(l=null==w?void 0:w.fontWeight)&&void 0!==l?l:null==S?void 0:S.fontWeight,b.style.fontStyle=null!==(c=null==w?void 0:w.fontStyle)&&void 0!==c?c:null==S?void 0:S.fontStyle,f.style.fontStyle=null!==(d=null==w?void 0:w.fontStyle)&&void 0!==d?d:null==S?void 0:S.fontStyle,b.style.textTransform=null!==(u=null==w?void 0:w.textTransform)&&void 0!==u?u:null==S?void 0:S.textTransform,f.style.textTransform=null!==(p=null==w?void 0:w.textTransform)&&void 0!==p?p:null==S?void 0:S.textTransform,b.style.fontSynthesis=null!==(h=null==w?void 0:w.fontSynthesis)&&void 0!==h?h:null==S?void 0:S.fontSynthesis,f.style.fontSynthesis=null!==(m=null==w?void 0:w.fontSynthesis)&&void 0!==m?m:null==S?void 0:S.fontSynthesis,b.textContent=e&&e.length?e:k,y.style.color=t.getCSSColor("text.body"),y.style.fontWeight=null!==(g=null==S?void 0:S.fontWeight)&&void 0!==g?g:"normal",y.style.fontStyle=null!==(v=null==S?void 0:S.fontStyle)&&void 0!==v?v:"normal",f.innerHTML=`${x?y.outerHTML:""}${b.outerHTML}`,f.style.display="inline",f.style.border="none",f.style.background="none",f.style.margin="0",f.style.padding="0",f.style.cursor="pointer",f.style.maxWidth=a,f.style.textAlign="left",x&&(f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis"),f.id=r,f.setAttribute("data-testid","text-expand-collapse-button"),f}function Nl(e,t,n,r,a,o){var i,s;n.innerHTML="";const l=e.cloneNode(!0);n.appendChild(l);const c=document.createTreeWalker(l,NodeFilter.SHOW_TEXT),d=[];let u=null;for(;u=c.nextNode();){var p;u&&(null===(p=u.textContent)||void 0===p?void 0:p.trim())&&d.push(u)}let h=null,m=0,g=!1;for(let s=d.length;s>0;s--){const l=d[s-1],c=null!==(i=l.textContent)&&void 0!==i?i:"";let u=0,p=c.length,S=0;if(l.parentElement){for(;u<=p;){var v,f;let e=Math.floor((u+p)/2);l.textContent=c.slice(0,e);const i=zl(null!=o?o:"Show more",a,"expand",`expand-text-${r}`,n.getBoundingClientRect().width+"px");i.style.marginRight=$l()+"px",null===(v=l.parentElement)||void 0===v||v.appendChild(i);Math.ceil(n.getBoundingClientRect().height)<=t?(S=e,u=e+1):p=e-1,null===(f=l.parentElement)||void 0===f||f.removeChild(i)}var b,y;if("ol"===e.tagName.toLowerCase()||"ul"===e.tagName.toLowerCase())if(0===S&&"li"===(null===(b=l.parentElement)||void 0===b||null===(y=b.parentElement)||void 0===y?void 0:y.tagName.toLowerCase())){var w;null===(w=l.parentElement)||void 0===w||w.parentElement.remove();continue}if(1===s||S>0){h=l,h.textContent=c,m=S,g=S<4;break}}}if(h){const e=null!==(s=h.textContent)&&void 0!==s?s:"";let t=0;if(h.textContent=e.slice(0,g?4:m).trimEnd(),g){var S,C;const n=document.createElement("span");n.textContent=e.slice(0,4).trimEnd(),null===(S=h.parentElement)||void 0===S||S.appendChild(n),t=n.getBoundingClientRect().width,null===(C=h.parentElement)||void 0===C||C.removeChild(n)}const i=zl(null!=o?o:"Show more",a,"expand",`expand-text-${r}`,n.getBoundingClientRect().width-t-$l()+"px"),l=h.parentElement;"p"!==(null==l?void 0:l.tagName.toLowerCase())||(null==l?void 0:l.textContent)||(l.style.marginTop="0px"),"a"===(null==l?void 0:l.tagName.toLowerCase())&&l.parentElement?l.parentElement.insertBefore(i,l.nextSibling):null==l||l.appendChild(i)}return l.outerHTML}const Ul=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M15 10V20M20 15H15H10",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))},Bl=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M20 15H10",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))},Wl=on("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.component"),color:t.getCSSColor("text.primary"),display:"flex",":focus":{outline:"none"},"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}})),ql=on("button")((e=>{let{theme:t,disabled:n}=e;return Object.assign(Object.assign({backgroundColor:n?t.getCSSColor("background.stepperDisabled"):t.getCSSColor("background.stepper"),border:"0px",borderRadius:"99px",width:"24px",height:"24px",display:"flex",padding:"0",alignItems:"center",cursor:n?"initial":"pointer"},t.getElementFocusCSSProperties()),{" svg":{height:"100%"}})})),Yl=on("input")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.primary")},t.getCSSFontProperties("primary")),{backgroundColor:t.getCSSColor("background.component"),width:"40px",maxWidth:"40px",minWidth:"40px",paddingTop:"1px",textAlign:"center",border:"0","-moz-appearance":"textfield",":focus":{outline:"none"},"::-webkit-inner-spin-button, ::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:"0"}})})),Zl=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("primary")),{color:t.getCSSColor("text.primary"),flexGrow:"1",whiteSpace:"pre-wrap"})})),Kl=(e,t,n)=>e-n>=t,Gl=(e,t,n)=>e+n<=t;let Xl=null;const Ql=on("button")((e=>{let{on:t,theme:n}=e;return Object.assign({backgroundColor:n.getCSSColor(t?"background.switchOn":"background.switchOff"),transition:"0.25s ease-in-out",position:"relative",border:"0px",borderRadius:"99px",width:"40px",height:"22px",cursor:"pointer",flexShrink:"0"},n.getElementFocusCSSProperties())})),Jl=on("div")((e=>{let{on:t,theme:n}=e;return{transition:"0.25s ease-in-out",position:"absolute",top:"2px",left:t?"50%":"2px",backgroundColor:n.getCSSColor(t?"icon.switchOn":"icon.switchOff"),width:"18px",height:"18px",borderRadius:"99px"}})),ec=on("p")((e=>{let{theme:t}=e;return Object.assign(Object.assign({display:"grid",gridTemplateColumns:"auto minmax(0,1fr)",color:t.getCSSColor("text.category")},t.getCSSFontProperties("category")),{padding:"10px 0px 8px 0px",margin:"0"})})),tc=on("span")({whiteSpace:"pre-wrap",overflow:"hidden",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"});let nc=null;const rc=e=>{let{fillColor:t,ariaHidden:n}=e;return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":null!=n&&n},(0,o.h)("path",{d:"M12 13V7M3 3H8M17 3H12M4 7V16C4 16.5523 4.44772 17 5 17H15C15.5523 17 16 16.5523 16 16V7M8 3L9 2H11L12 3M8 3H12M8 7V13",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},ac=e=>{let{fillColor:t,ariaHidden:n}=e;return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":null!=n&&n},(0,o.h)("path",{d:"M15 7V13.5C15 15.9853 12.9853 18 10.5 18V18C8.01472 18 6 15.9853 6 13.5V5C6 3.34315 7.34315 2 9 2V2C10.6569 2 12 3.34315 12 5V13.5C12 14.3284 11.3284 15 10.5 15V15C9.67157 15 9 14.3284 9 13.5V7",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))};var oc=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const ic={jpeg:{signatures:[[255,216,255]],offset:0},png:{signatures:[[137,80,78,71,13,10,26,10]],offset:0},webp:{signatures:[[82,73,70,70,,,,,87,69,66,80]],offset:0},avif:{signatures:[[32,102,116,121,112,97,118,105,102]],offset:3}},sc={tif:{signatures:[[73,73,42,0],[77,77,0,42]],offset:0},tiff:{signatures:[[73,73,43,0],[73,73,0,43]],offset:0},heic:{signatures:[[102,116,121,112,104,101,105,99]],offset:4}};var lc=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const cc=on("label")((()=>({position:"relative",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",display:"flex",alignItems:"center",width:"100%",cursor:"pointer"}))),dc=on("div")((e=>{let{theme:t,enabledThumbnailIcon:n,preview:r}=e;const a=n||(null==r?void 0:r.url)?"30px":"0",o={background:`url(${null==r?void 0:r.url})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"};return Object.assign({width:a,height:a,minWidth:a,minHeight:a,padding:n||(null==r?void 0:r.url)?"7px":"0",marginRight:n||(null==r?void 0:r.url)?"10px":"0",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:t.getShape("borderRadius.uploadPlaceholder"),backgroundColor:t.getCSSColor("background.uploadPlaceholder")},(null==r?void 0:r.url)&&r.webCompatible?o:{})})),uc=on("span")((e=>{let{theme:t,placeholder:n,yPadding:r}=e;return Object.assign(Object.assign({width:"100%",overflow:"hidden",textOverflow:"ellipsis",padding:`${r}px 0`,color:n?t.getCSSColor("text.hint"):t.getCSSColor("text.secondary")},t.getCSSFontProperties("secondary")),{userSelect:"none","-webkit-user-select":"none","-moz-user-select":"none"})})),pc=on("input")({position:"absolute",visibility:"hidden",width:"100%",height:"100%"}),hc=on("button")((()=>({display:"flex",justifyContent:"center",alignItems:"center",border:"0",padding:"0",margin:"0",textDecoration:"none",cursor:"pointer",textAlign:"center",background:"none","-webkit-appearance":"none","-moz-appearance":"none"}))),mc=on("button")((()=>({display:"flex",justifyContent:"center",alignItems:"center",border:"0",padding:"0",margin:"0",textDecoration:"none",cursor:"pointer",textAlign:"center",background:"none","-webkit-appearance":"none","-moz-appearance":"none"}))),gc=e=>{let{theme:t,cardInstanceId:n,subviewId:r,name:a,label:i,validations:s,enabledThumbnailIcon:l,targetBucketId:c,variableResolver:d}=e;const u=f(null),p=f(null),m=ut(n,a,r),[v,b]=h(null),[y,w]=h(null),[S,C]=h(0),k=ie().getState();g((()=>{if(k.application.isPreview)return;const e=window.AtomicUploadService.getFile(k.application.containerInstanceId,n,a);m&&e?(I(e),w(m.filename)):dt().handleFormChange(n,a,void 0,r)}),[]),g((()=>{if(u.current&&p.current&&!S){var e,t,n,r;const a=(null===(e=u.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.offsetHeight)||0,o=(null===(n=p.current)||void 0===n||null===(r=n.base)||void 0===r?void 0:r.offsetHeight)||0;if(a>0&&o>0&&a>o){const e=Math.round((a-o)/2);C(e)}}}),[u]);const x=(e,t)=>{b({url:URL.createObjectURL(e),webCompatible:!t})},I=e=>{const t=u.current.base;if(t){x(e.file,e.convertImage);const n=new DataTransfer;n.items.add(e.file),t.files=n.files}},O=()=>{k.application.isPreview||(window.AtomicUploadService.removeFile(k.application.containerInstanceId,n,a,r),dt().handleFormChange(n,a,void 0,r),dt().validateField(n,a,void 0,s,r),u.current&&(b(null),w(null),u.current.base.value=null))},M=`upload-label=${n}-${a}`;return(0,o.h)(o.Fragment,null,(0,o.h)(dc,{theme:t,enabledThumbnailIcon:l,preview:v},!v&&l&&(0,o.h)(xn,{fillColor:t.getCSSColor("icon.uploadPlaceholder"),ariaHidden:!0}),v&&!v.webCompatible&&(0,o.h)(Nn,{fillColor:t.getCSSColor("icon.uploadPlaceholder"),ariaHidden:!0})),(0,o.h)(cc,{htmlFor:M},(0,o.h)(uc,{ref:p,theme:t,placeholder:!y,yPadding:S},y||d(i.length?i:"")),(0,o.h)(pc,{id:M,ref:u,type:"file",accept:"image/jpeg, image/png, image/webp, image/avif",onChange:e=>lc(void 0,void 0,void 0,(function*(){if(k.application.isPreview)return;const t=e.target;if(t.files&&t.files.length){b(null),w(null);const[e]=Array.from(t.files),o=yield(e=>oc(void 0,void 0,void 0,(function*(){const t=yield e.slice(0,(()=>{const e=Object.assign(Object.assign({},ic),sc);return Object.values(e).reduce(((e,t)=>{let n=0;return t.signatures.forEach((e=>n=Math.max(n,e.length))),n+=t.offset,Math.max(e,n)}),0)})()).arrayBuffer(),n=new Uint8Array(t),r=(e,t)=>e.every(((e,r)=>n[t+r]===e||void 0===e));for(const{signatures:e,offset:t}of Object.values(ic))for(const n of e)if(r(n,t))return{requiresConversion:!1,isValidImage:!0};for(const{signatures:e,offset:t}of Object.values(sc))for(const n of e)if(r(n,t))return{requiresConversion:!0,isValidImage:!0};return{requiresConversion:!1,isValidImage:!1}})))(e);if(!o.isValidImage)return O(),void dt().validateFieldCustomResult(n,a,{type:"invalid",errorMessage:"Invalid file or unsupported image format selected"},r);const i=`${(0,X.v4)()}_${e.name}`,l={filename:e.name,destinationFilename:i,size:e.size,type:"image",targetBucketId:c};window.AtomicUploadService.storeFile(e,"image",c,n,k.application.containerInstanceId,i,o.requiresConversion,a,r),dt().handleFormChange(n,a,l,r),x(e,o.requiresConversion),w(e.name),dt().validateField(n,a,l,s,r)}}))})),y?(0,o.h)(mc,{onClick:O,"aria-label":"remove image"},(0,o.h)(rc,{fillColor:t.getCSSColor("icon.inputButton"),ariaHidden:!0})):(0,o.h)(hc,{onClick:()=>{var e,t;return null==u||null===(e=u.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.click()},"aria-label":"attach image"},(0,o.h)(ac,{fillColor:t.getCSSColor("icon.inputButton"),ariaHidden:!0})))},vc=F((e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{label:a,name:i,type:s,enabledThumbnailIcon:l,targetBucketId:c},theme:d,validations:u,variableResolver:p}=e;const h="image"===s?(0,o.h)(gc,{theme:d,cardInstanceId:n,subviewId:r,name:i,validations:u,label:a,enabledThumbnailIcon:l,targetBucketId:c||"DEFAULT",variableResolver:p}):null;return(0,o.h)(o.Fragment,null,(0,o.h)(Ro,{nodeKey:t,theme:d,cursor:"default",mode:"inline"},h),(0,o.h)(Wo,{name:i,cardInstanceId:n,subviewId:r,theme:d,variableResolver:p}))}),((e,t)=>e.nodeKey===t.nodeKey&&e.cardInstanceId===t.cardInstanceId&&e.subviewId===t.subviewId&&e.attributes===t.attributes&&e.theme===t.theme&&e.validations===t.validations)),fc=on("div")((e=>{var t,n,r,a,o;let{theme:i,feedOrientation:s,isWorkflow:l,transparencies:c}=e;const d=i.getShape("buttonLayout.global"),u=i.getShape("buttonAlignment.global"),p=c.finalButtonTransparent?"0":l?"20px":"10px",h=c.primaryButtonTransparent||c.secondaryButtonTransparent?"0px":"10px",m=!1===c.primaryButtonTransparent,g=!1===c.secondaryButtonTransparent;let v,f;m||g?(v="10px",f="20px"):(v="0px",f="10px");const b=Object.assign({flexGrow:"1",flexDirection:"column"},"horizontal"===d?{alignItems:"flex-end"}:{justifyContent:"flex-end"}),y={paddingBottom:l?f:v,flexDirection:"row",overflowX:"scroll",margin:"0 -20px",paddingLeft:"20px",paddingRight:"20px",marginRight:"-20px","::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none",scrollbarWidth:"none","> button:not(:last-child)":{marginRight:null!==(t=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==t?t:h},"> a:not(:last-child)":{marginRight:null!==(n=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==n?n:h}},w={flexDirection:"column",alignItems:null!==(r={left:"flex-start",center:"center",right:"flex-end"}[u])&&void 0!==r?r:"flex-start","> button:not(:last-child)":{marginBottom:null!==(a=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==a?a:h},"> button:last-child":{marginBottom:p},"> a:not(:last-child)":{marginBottom:null!==(o=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==o?o:h},"> a:last-child":{marginBottom:p}};return Object.assign(Object.assign({paddingTop:c.firstButtonTransparent?"0px":"10px",display:"flex",alignItems:"center"},"horizontal"===s?b:{}),"horizontal"===d?y:w)})),bc=on("div")({marginBottom:"20px"}),yc=on("ul")({listStyle:"none",padding:"0",margin:"0","> li":{marginBottom:"10px"},"> :last-child":{marginBottom:"0"}}),wc=e=>{let{fillColor:t,style:n,ariaHidden:r}=e;return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",height:"8",viewBox:"0 0 11 8",width:"11",style:n,"aria-hidden":r},(0,o.h)("path",{"clip-rule":"evenodd",d:"m10.7071.292893c.3905.390524.3905 1.023687 0 1.414217l-5.99999 6c-.39053.39052-1.02369.39052-1.41422 0l-2.999997-3c-.3905241-.39053-.3905241-1.02369 0-1.41422.390524-.39052 1.023687-.39052 1.414217 0l2.29289 2.2929 5.29289-5.292897c.39053-.3905241 1.02371-.3905241 1.41421 0z",fill:null!=t?t:"#000","fill-rule":"evenodd"}))},Sc=on("label")((e=>{let{labelFontProperties:t}=e;return{cursor:"pointer",display:"grid",gridTemplateColumns:"auto minmax(0, 1fr)",gridTemplateRows:`${(null==t?void 0:t.lineHeight)||"auto"} 1fr`,alignItems:"center",width:"fit-content",userSelect:"none"}})),Cc=on("input")((e=>{let{theme:t}=e;return{position:"absolute",appearance:"none","&:focus-visible + span":{boxShadow:`0 0 0 2px ${t.getCSSColor("border.focus")} inset`}}})),kc=on("span")((e=>{let{theme:t,isChecked:n}=e;const r={backgroundColor:t.getCSSColor("background.checkedCheckbox",{skipFallback:!0})||"#000",borderColor:t.getCSSColor("border.checkedCheckbox",{skipFallback:!0})||"#000",borderWidth:t.getShape("border.checkedCheckbox")||"1px",borderStyle:"solid",borderRadius:t.getShape("borderRadius.checkedCheckbox",{skipFallback:!0})||"4px"},a={backgroundColor:t.getCSSColor("background.uncheckedCheckbox",{skipFallback:!0})||"#FFF",borderColor:t.getCSSColor("border.uncheckedCheckbox",{skipFallback:!0})||"#000",borderWidth:t.getShape("border.uncheckedCheckbox")||"1px",borderStyle:"solid",borderRadius:t.getShape("borderRadius.uncheckedCheckbox",{skipFallback:!0})||"4px"};return Object.assign({height:"20px",width:"20px",padding:"6px 4px 6px 5px",position:"relative",marginRight:"10px",display:"inline-block"},n?r:a)})),xc=on("span")((e=>{let{theme:t,labelFontProperties:n}=e;return Object.assign(Object.assign({},n||{}),{gridColumnStart:"2",gridRowStart:"span 2",whiteSpace:"pre-wrap",color:t.getCSSColor("text.primary"),cursor:"pointer",userSelect:"none",webkitUserSelect:"none",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"})}));function Ic(){return Ic=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ic.apply(this,arguments)}const Oc={linkButton:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,subviewTitle:a,isWorkflow:i,theme:s,attributes:l,variableResolver:c}=e;const{text:d,icon:u,iconUrl:p,appearance:h}=l,m=l.url,g=l.target,v=Object.assign(Object.assign({},r&&{subviewId:r}),a&&{subviewTitle:a}),f=w(ya),b=f.runtimeVariableResolver,y=f.containersBroadcastChannel;return(0,o.h)(Ns,{nodeKey:t,theme:s,appearance:h,isWorkflow:i,text:c(d),icon:u,iconUrl:p,clickHandler:e=>{const r=ie().getState();return a=>Vs(void 0,void 0,void 0,(function*(){let o,i,s;if(l.action){s=l.action;const e=r.cardFeed.cardInstances.find((e=>e.instance.id===n));s&&b&&e&&(yield zs(b,r.application.runtimeVariableResolutionTimeout,e,s))}else if(l.layoutId)o=l.layoutId;else if(l.url){if(a.preventDefault(),i={url:c(m),target:a.ctrlKey||a.metaKey?"_blank":null!=g?g:"_blank"},f.analyticsDispatcher.sendEvent({cardInstanceId:n,cardViewState:r.navigationStack.items.length?"subview":"topview",eventName:vt,properties:Object.assign({linkMethod:"url",url:i.url,trigger:"linkButton"},v.subviewId?Object.assign(Object.assign({},v),{subviewLevel:1}):{})}),"_top"===i.target&&y){const e=`${t}-link-button`;return y.addEventListener("message",(t=>{if(t.data.type===Gi.ANALYTICS_EVENT){var r;const a=null===(r=t.data)||void 0===r?void 0:r.eventQueued;a.eventName===vt&&a.cardInstanceId===n&&y&&i&&(y.removeEventListener(e),window.open(i.url,i.target))}}),e)}return window.open(i.url,i.target)}return e.handleLinkButtonPress(n,v,o,s)}))},urlLink:m?{url:c(m),target:g}:void 0})},submitButton:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,subviewTitle:a,isWorkflow:i,theme:s,attributes:{name:l,text:c,appearance:d,icon:u,iconUrl:p,values:m,url:g,action:v,target:f},variableResolver:b}=e;const[y,S]=h(!1),C=w(ya),k=C.cardEventDispatcher,x=C.authTokenProvider,I=C.analyticsDispatcher,O=C.runtimeVariableResolver;return(0,o.h)(Ns,{nodeKey:t,theme:s,appearance:d,isWorkflow:i,text:b(c),icon:u,iconUrl:p,clickHandler:e=>{const t=ie().getState();return()=>Vs(void 0,void 0,void 0,(function*(){var o,s;if(t.application.isPreview)return void e.finishSubview();if(y)return;S(!0);const c=t.cardFeed.cardInstances.find((e=>e.instance.id===n));v&&O&&c&&(yield zs(O,t.application.runtimeVariableResolutionTimeout,c,v));let d={};var u,p;i?(e.validateCurrentSubview(n),d=r&&null!==(o=null===(u=ie().getState().validationStates[n])||void 0===u||null===(p=u.subviews)||void 0===p?void 0:p[r])&&void 0!==o?o:{}):(e.validateCardTopLevel(n),d=null!==(s=ie().getState().validationStates[n].validations)&&void 0!==s?s:{});const h=ie().getState(),w=(e=>!!e.navigationStack.items.length)(t);(e=>{for(var t in e)if("invalid"===e[t].type)return!1;return!0})(d)&&(yield Hs(h,e,n,w,k,I,x,m,{postSubmissionUrl:g?{url:b(g),target:f}:void 0,payload:v,subviewData:{subviewId:r,subviewTitle:a},submitButtonName:l,cancelSubmitCallback:()=>S(!1)}),i&&I.sendEvent({cardInstanceId:n,cardViewState:"subview",eventName:xt,properties:{subviewId:r,subviewTitle:a,subviewLevel:1}})),S(!1)}))},loading:y,type:"submit"})},dismissButton:e=>{let{nodeKey:t,isWorkflow:n,attributes:r,theme:a,cardInstanceId:i,variableResolver:s}=e;const{text:l,icon:c,iconUrl:d,appearance:u}=r,p=w(ya);return(0,o.h)(Ns,{nodeKey:t,theme:a,appearance:u,isWorkflow:n,text:s(l),icon:c,iconUrl:d,clickHandler:e=>()=>{Es(ie().getState(),e,i,p.cardEventDispatcher,p.authTokenProvider,"card-button")}})},snoozeButton:e=>{let{nodeKey:t,isWorkflow:n,attributes:r,theme:a,cardInstanceId:i,cardMetadata:s,variableResolver:l}=e;const{text:c,icon:d,iconUrl:u,snoozePeriod:p,appearance:h}=r,m=w(ya);return(0,o.h)(Ns,{nodeKey:t,theme:a,appearance:h,isWorkflow:n,text:l(c),icon:d,iconUrl:u,clickHandler:e=>()=>{if(void 0===p||null===$c(p))e.requestSnooze(i,"card-button",null==s?void 0:s.expires);else{const t=zc(p,new Date);(0,J.isPast)(t)||Ps(ie().getState(),e,i,t,m.cardEventDispatcher,m.authTokenProvider,"card-button")}}})},voteUpButton:e=>{let{nodeKey:t,isWorkflow:n,attributes:r,theme:a,cardInstanceId:i,variableResolver:s}=e;const{text:l,icon:c,iconUrl:d,appearance:u}=r,p=w(ya);return(0,o.h)(Ns,{nodeKey:t,theme:a,appearance:u,isWorkflow:n,text:s(l),icon:c,iconUrl:d,clickHandler:e=>()=>{Rs(i,e,p.analyticsDispatcher,p.cardEventDispatcher,"card-button")}})},voteDownButton:e=>{let{nodeKey:t,isWorkflow:n,attributes:r,theme:a,cardInstanceId:i,variableResolver:s}=e;const{text:l,icon:c,iconUrl:d,appearance:u}=r;return(0,o.h)(Ns,{nodeKey:t,theme:a,appearance:u,isWorkflow:n,text:s(l),icon:c,iconUrl:d,clickHandler:e=>()=>{e.requestFeedback(i,{sentiment:"negative",source:"card-button",textFeedback:!0})}})},actionButtonGroup:e=>{let{children:t,theme:n,feedOrientation:r,isWorkflow:a}=e;const i=f(null),[s,l]=h({primaryButtonTransparent:void 0,secondaryButtonTransparent:void 0,firstButtonTransparent:!1,finalButtonTransparent:!1});return g((()=>{var e,t,n;const r=null===(t=i.current)||void 0===t||null===(n=t.base)||void 0===n?void 0:n.childNodes;if(r)for(let t=0;t<r.length;t++){var a;const n=r[t],o=n.getAttribute("appearance"),i=null!==(e=null===(a=window.getComputedStyle(n).backgroundColor.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/))||void 0===a?void 0:a.length)&&void 0!==e?e:0;"primary"!==o||s.primaryButtonTransparent?"secondary"!==o||s.secondaryButtonTransparent||l((e=>Object.assign(Object.assign({},e),{secondaryButtonTransparent:i>0}))):l((e=>Object.assign(Object.assign({},e),{primaryButtonTransparent:i>0}))),0===t&&l((e=>Object.assign(Object.assign({},e),{firstButtonTransparent:i>0}))),t===r.length-1&&l((e=>Object.assign(Object.assign({},e),{finalButtonTransparent:i>0})))}}),[i]),(0,o.h)(fc,{ref:i,theme:n,feedOrientation:r,isWorkflow:a,transparencies:s},t)},cardDescription:e=>{var t;let{attributes:{text:n,icon:r,iconUrl:a},theme:i,variableResolver:s}=e;const l=i.getCSSFontProperties("category"),c=i.getNumericFontSize("category"),d=i.getCSSColor("icon.category",{skipFallback:!0}),u=i.getCSSColor("icon.category");return(0,o.h)(ec,{theme:i,"data-testid":"card-category"},(r||a)&&(0,o.h)(Mn,{iconName:r,iconUrl:a,size:null!=c?c:20,color:null!==d?d:void 0,fallbackColor:u,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null==l?void 0:l.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${c}px`,minWidth:`${c}px`,textAlign:"center"}}),(0,o.h)(tc,null,s(n)))},headline:e=>{var t;let{nodeKey:n,attributes:{text:r,icon:a,iconUrl:i},theme:s,variableResolver:l}=e;const c=s.getCSSFontProperties("headline"),d=s.getNumericFontSize("headline"),u=s.getCSSColor("icon.headline",{skipFallback:!0}),p=s.getCSSColor("icon.headline");return(0,o.h)(qs,{theme:s,headlineFontProperties:c},(a||i)&&(0,o.h)(Mn,{iconName:a,iconUrl:i,size:null!=d?d:20,color:null!==u?u:void 0,fallbackColor:p,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null==c?void 0:c.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${d}px`,minWidth:`${d}px`,textAlign:"center"}}),(0,o.h)(Ys,{key:n,theme:s,"data-testid":"card-headline","data-element-key":n},l(r)))},text:e=>{var t,n,r,a,i,s;let{nodeKey:l,theme:c,attributes:{icon:d,iconUrl:u,text:p,clickToExpandEnabled:m,maxDisplayLines:v,showTextLabel:b,hideTextLabel:y},isWorkflow:S,variableResolver:C,cardInstanceId:k,subviewId:x,subviewTitle:I}=e;const O=f(null),M=f(null),[T,F]=h(!1),[j,_]=h(null),[L,D]=h(null),[A,E]=h(Vl().matches?"dark":"light"),H=f((0,X.v4)()),P=null===(r=O.current)||void 0===r?void 0:r.base.querySelector(`#expand-text-${H.current}`),R=null===(a=O.current)||void 0===a?void 0:a.base.querySelector(`#collapse-text-${H.current}`),V=rl(Hc(C(p))),$=w(ya).analyticsDispatcher;let z;qc(c.getCSSFontProperties("body"))||(z=c.getCSSFontProperties("body"));const N=c.getNumericFontSize("body"),U=Object.assign(Object.assign(Object.assign({},x&&{subviewId:x}),I&&{subviewTitle:I}),x&&{subviewLevel:1}),B=c.getCSSColor("icon.body",{skipFallback:!0}),W=c.getCSSColor("icon.body"),q=()=>{if(!(O.current&&M.current&&v&&m))return _(null),F(!1),D(!1);const e=M.current.base;e.style.width=getComputedStyle(O.current.base).width;const t=getComputedStyle(O.current.base).lineHeight,n=getComputedStyle(O.current.base).fontSize;let r;r=isNaN(parseFloat(t))?Math.ceil((parseFloat(n)+1)*v):Math.ceil((parseFloat(t)+1)*v);let a=0,o="",i=!1;const s=document.createElement("div");s.innerHTML=V;const l=Array.from(s.children);for(let t=0;t<l.length;t++){const n=l[t].cloneNode(!0);e.innerHTML="",e.appendChild(n);const s=e.getBoundingClientRect().height;if(!(Math.ceil(a+s)<r)){if(Math.ceil(a+s)===r){a+=s,o+=n.outerHTML;if(t<l.length-1){const t=Nl(n,Math.ceil(s),e,H.current,c,b);o=o.replace(n.outerHTML,t),i=!0}break}if(t<l.length-1||n.textContent.length>0){o+=Nl(n,Math.ceil(r-a),e,H.current,c,b),i=!0}else o+=n.outerHTML;break}a+=s,o+=n.outerHTML}i?(_(o),D(!0)):D(!1)};g((()=>{let e;if(m){const t=()=>{q()};document.fonts.onloadingdone=t,"ResizeObserver"in window&&(e=new ResizeObserver(q),e.observe(document.body))}const t=e=>{E(e.matches?"dark":"light")};return Vl().addEventListener("change",t),()=>{var n;null===(n=e)||void 0===n||n.disconnect(),document.fonts.onloadingdone=null,Vl().removeEventListener("change",t)}}),[V]),g(q,[V,v,m,A,b,y]),g((()=>{const e=()=>F(!0),t=()=>F(!1),n=O.current.base;if(!n)return;const r=n.querySelector(`#expand-text-${H.current}`),a=n.querySelector(`#collapse-text-${H.current}`);return r&&r.addEventListener("click",e),a&&a.addEventListener("click",t),()=>{r&&r.removeEventListener("click",e),a&&a.removeEventListener("click",t)}}),[P,R,j,T,L]),g((()=>{const e=document.querySelector(`#markdown-${H.current}`);if(e){Array.from(e.querySelectorAll(".md-subview-link")).forEach((e=>{e.addEventListener("click",(()=>{var t;F(!1),D(!1),_(null),Pe().handleSubviewLinkPress(k,null==e||null===(t=e.dataset)||void 0===t?void 0:t.subviewId)})),e.addEventListener("keydown",(t=>{var n;xr(t.key)===Sr&&(F(!1),D(!1),_(null),Pe().handleSubviewLinkPress(k,null==e||null===(n=e.dataset)||void 0===n?void 0:n.subviewId))}))}));Array.from(e.querySelectorAll(".md-web-link")).forEach((e=>{e.addEventListener("click",(e=>{var t;const n=null===(t=e.target.attributes.getNamedItem("href"))||void 0===t?void 0:t.value;$.sendEvent({cardInstanceId:k,cardViewState:S?"subview":"topview",eventName:vt,properties:Object.assign({linkMethod:"url",url:null!=n?n:"",detail:"textLink"},U)})}))}))}}),[V,L,T]);return(0,o.h)(o.Fragment,null,(0,o.h)(Rl,{key:l,theme:c,bodyFontProperties:z,isWorkflow:S,"data-element-key":l,"data-testid":"text-block"},(d||u)&&(0,o.h)(Mn,{iconName:d,iconUrl:u,size:null!=N?N:20,color:null!==B?B:void 0,fallbackColor:W,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null===(i=z)||void 0===i?void 0:i.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${N}px`,minWidth:`${N}px`,textAlign:"center"}}),(0,o.h)(Al,{id:`markdown-${H.current}`,"data-testid":"text-markdown",theme:c,ref:O,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:V&&0!==V.length&&null!==L?T||!j?function(e,t,n,r){if(!t||!n||!r)return e;const a=n.cloneNode(!0);a.innerHTML=e;const o=document.createTreeWalker(a,NodeFilter.SHOW_TEXT),i=[];let s=null;for(;s=o.nextNode();){var l;s&&(null===(l=s.textContent)||void 0===l?void 0:l.trim())&&i.push(s)}if(i.length>0){const e=i[i.length-1],t=e.parentElement;"a"===(null==t?void 0:t.tagName.toLowerCase())&&t.parentElement?(r.style.paddingLeft="5px",t.parentElement.insertBefore(r,t.nextSibling)):(e.textContent=e.textContent+" ",null==t||t.appendChild(r))}return a.innerHTML}(V,L,null===(Y=M.current)||void 0===Y?void 0:Y.base,zl(null!=y?y:"Show less",c,"collapse",`collapse-text-${H.current}`,(null===(Z=O.current)||void 0===Z?void 0:Z.base.getBoundingClientRect().width)+"px")):j:"<p></p>"}}),(0,o.h)(El,{dangerouslySetInnerHTML:{__html:V}})),(0,o.h)(Hl,{bodyFontProperties:z,isWorkflow:S,"aria-hidden":"true"},(d||u)&&(0,o.h)(Mn,{iconName:d,iconUrl:u,size:null!=N?N:20,color:null!==B?B:void 0,fallbackColor:W,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(n=null===(s=z)||void 0===s?void 0:s.lineHeight)&&void 0!==n?n:"initial",marginRight:"10px",width:`${N}px`,minWidth:`${N}px`,textAlign:"center"}}),(0,o.h)(Pl,{theme:c,ref:M})));var Y,Z},list:e=>{let t,{nodeKey:n,attributes:{type:r},children:a,theme:i}=e;switch(r){case"bullet":t=Xs;break;case"number":t=Qs;break;case"comma":t=Js}return t?(0,o.h)(t,{key:n,"data-element-key":n,theme:i},a):null},listItem:e=>{let{nodeKey:t,attributes:{text:n,icon:r},theme:a,isWorkflow:i,variableResolver:s,cardInstanceId:l,subviewId:c,subviewTitle:d}=e;const u=f((0,X.v4)()),p=w(ya).analyticsDispatcher,h=rl(Hc(s(n))),m=Object.assign(Object.assign(Object.assign({},c&&{subviewId:c}),d&&{subviewTitle:s(d)}),c&&{subviewLevel:1});let v;g((()=>{const e=document.querySelector(`#markdown-${u.current}`);if(e){Array.from(e.querySelectorAll(".md-subview-link")).forEach((e=>{const t=()=>{var t,n;Pe().handleSubviewLinkPress(l,null==e||null===(t=e.dataset)||void 0===t?void 0:t.subviewId),c&&(null==e||null===(n=e.dataset)||void 0===n?void 0:n.subviewId)!==c&&p.sendEvent({cardInstanceId:l,cardViewState:"subview",eventName:xt,properties:m})};e.addEventListener("click",t),e.addEventListener("keydown",(e=>{xr(e.key)===Sr&&t()}))}));Array.from(e.querySelectorAll(".md-web-link")).forEach((e=>{e.addEventListener("click",(e=>{var t;const n=null===(t=e.target.attributes.getNamedItem("href"))||void 0===t?void 0:t.value;p.sendEvent({cardInstanceId:l,cardViewState:i?"subview":"topview",eventName:vt,properties:Object.assign({linkMethod:"url",url:null!=n?n:"",detail:"textLink"},m)})}))}))}}),[h]),qc(v)||(v=a.getCSSFontProperties("bullet"));const b=a.getCSSColor("icon.bullet",{skipFallback:!0}),y=a.getCSSColor("icon.bullet");return(0,o.h)(ol,{key:t,"data-element-key":t,theme:a,class:r?"with-icon":"without-icon"},r&&(0,o.h)(Mn,{iconName:r,size:v?v.fontSize:20,color:null!==b?b:void 0,fallbackColor:y,styles:{lineHeight:v?v.lineHeight:"initial",marginRight:"10px",width:"22px",minWidth:"22px",textAlign:"center"}}),(0,o.h)(il,{id:`markdown-${u.current}`,theme:a,"data-testid":"list-item-text",dangerouslySetInnerHTML:{__html:h}}))},image:e=>{let t,{nodeKey:n,cardInstanceId:r,subviewId:a,subviewTitle:i,theme:s,attributes:{format:l,thumbnailSrc:c,description:d,label:u,src:p,dimensions:h,altText:m,behaviour:g,url:v,target:f,layoutId:b,payload:S},variableResolver:C}=e;const k=w(ya),x=k.containersBroadcastChannel;switch(l){case"inline":t=fl;break;case"banner":t=gl;break;case"thumbnail":t=hl;break;case"text":t=wl}const I=p&&p.length>0?"image":"imageWithoutSrc";return t?(0,o.h)(Le.lj,{actions:(0,G.Y2)(De,at),mapToProps:e=>({customStrings:e.application.customStrings})},(e=>{const l=y((()=>{switch(g){case"url":return v?e=>{e.preventDefault();const t={url:C(v),target:e.ctrlKey||e.metaKey?"_blank":null!=f?f:"_blank"};if(k.analyticsDispatcher.sendEvent({cardInstanceId:r,cardViewState:a?"subview":"topview",eventName:vt,properties:Object.assign({linkMethod:"url",url:t.url,trigger:"image"},a?{subviewId:a,subviewTitle:i,subviewLevel:1}:{})}),"_top"===t.target&&x){const e=`${n}-image-link`;return x.addEventListener("message",(n=>{if(n.data.type===Gi.ANALYTICS_EVENT){var a;const o=null===(a=n.data)||void 0===a?void 0:a.eventQueued;o.eventName===vt&&o.cardInstanceId===r&&x&&t&&(x.removeEventListener(e),window.open(t.url,t.target))}}),e)}return window.open(t.url,t.target)}:()=>{mt.error({level2:[`url type image link for card: ${r} has no url`]})};case"subview":return b?()=>{e.handleImageLinkPress(r,{layoutId:b,currentSubviewId:a,currentSubviewTitle:i})}:()=>{mt.error({level2:[`subview type image link for card: ${r} has no subview id`]})};case"payload":return S?()=>{e.handleImageLinkPress(r,{payload:S,currentSubviewId:a,currentSubviewTitle:i})}:()=>{mt.error({level2:[`payload type image link for card: ${r} has no payload`]})};case"none":return;default:return()=>{e.viewMedia(r,Object.assign({type:I,url:C(p),title:C(u)},(null==m?void 0:m.src)?{alt:C(m.src)}:{}))}}}),[g,r,x]);return(0,o.h)(t,{nodeKey:n,mediaType:I,theme:s,customStrings:e.customStrings,src:C(c),dimensions:h,url:v,label:C(u),description:C(d),alt:C(null==m?void 0:m.thumbnailSrc),onClickImage:l})})):null},video:e=>{let{nodeKey:t,cardInstanceId:n,attributes:r,theme:a,isWorkflow:i,variableResolver:s}=e;const[l,c]=h(!1),[d,u]=h(void 0);return l?(0,o.h)(_l,{nodeKey:t,cardInstanceId:n,isWorkflow:i,format:r.format,src:s(r.src),thumbnailSrc:s(r.thumbnailSrc),dimensions:r.dimensions,loadedDimensions:d,theme:a,label:s(r.label),description:s(r.description)}):(0,o.h)(jl,{nodeKey:t,cardInstanceId:n,isWorkflow:i,format:r.format,src:s(r.src),thumbnailSrc:s(r.thumbnailSrc),dimensions:r.dimensions,onLoad:u,theme:a,label:s(r.label),description:s(r.description),altText:{src:s(null===(p=r.altText)||void 0===p?void 0:p.src),thumbnailSrc:s(null===(m=r.altText)||void 0===m?void 0:m.thumbnailSrc)},setPlaying:c});var p,m},form:e=>{let{cardInstanceId:t,subviewId:n,attributes:{defaultValues:r},isWorkflow:a,feedOrientation:i,children:s}=e;return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(0,o.h)(Bs,{isWorkflow:a,feedOrientation:i,initializeFormStore:Ws(e,t,r,n)},s)))},textInput:_i,numberInput:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{defaultValue:a,thumbnailSrc:i,placeholder:s,name:l},theme:c,validations:d,variableResolver:u}=e;const p=f(null),m=f(a&&_c(a.toString())?a.toString():""),[v,b]=h(m.current);g((()=>{const e=ut(n,l,r);if(e)m.current=e.toString(),b(e.toString());else{const e=_c(v);dt().handleFormChange(n,l,null!=e?e:void 0,r)}}),[]),g((()=>{const e=a&&_c(a.toString())?a.toString():"";if(e!==m.current){if(v===m.current){const t=_c(e);dt().handleFormChange(n,l,null!=t?t:void 0,r),b(e)}m.current=e}}),[a]);const y=u(s);return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(0,o.h)(o.Fragment,null,(0,o.h)(Ro,{nodeKey:t,mode:"inline",theme:c},i&&(0,o.h)($o,{thumbnailUrl:u(i),theme:c}),(0,o.h)(Ti,{theme:c,ref:p,placeholder:y,value:v,title:y,className:"input-number",inputmode:"decimal",onInput:t=>{const{value:a}=t.target,o=v;let i;b(a),i=Lc(a)?a.trim():o,b(i);const s=_c(i);((e,t)=>{null!==nc&&(clearTimeout(nc),nc=null),nc=setTimeout((()=>{t(n,l,null!=e?e:void 0,d,r)}),200)})(s,e.validateField),e.handleFormChange(n,l,null!=s?s:void 0,r)}})),(0,o.h)(Wo,{name:l,cardInstanceId:n,subviewId:r,theme:c,variableResolver:u}))))},stepper:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{defaultValue:a,minimumValue:i,maximumValue:s,stepValue:l,thumbnailSrc:c,label:d,name:u},validations:p,theme:m,variableResolver:v}=e;const b=i||0,y=s||100,w=l&&l>0?l:1,S=f(a&&a>=b&&a<=y?a:b),[C,k]=h(S.current),[x,I]=h(S.current),[O,M]=h(!0),T=m.getCSSColor("icon.stepper"),F=m.getCSSColor("icon.stepperDisabled"),j=null==C||!Gl(C,y,w)||!O,_=null==C||!Kl(C,b,w)||!O;g((()=>{const e=ut(n,u,r);e?(S.current=e,k(e),I(e)):dt().handleFormChange(n,u,C,r)}),[]),g((()=>{const e=a&&a>=b&&a<=y?a:b;e!==S.current&&(x===S.current&&(dt().handleFormChange(n,u,e,r),k(e),I(e)),S.current=e)}),[a]);const L=v(d),D=(e,t)=>{null!==Xl&&(clearTimeout(Xl),Xl=null),Xl=setTimeout((()=>{t(n,u,null!=e?e:void 0,p,r)}),400)};return(0,o.h)(Le.lj,{actions:at,mapToProps:e=>{let{}=e}},(e=>(0,o.h)(o.Fragment,null,(0,o.h)(Ro,{nodeKey:t,mode:"inline",theme:m,cursor:"default"},c&&(0,o.h)($o,{thumbnailUrl:v(c),theme:m}),(0,o.h)(Zl,{theme:m},L),(0,o.h)(Wl,{theme:m},(0,o.h)(ql,{theme:m,disabled:_,tabIndex:"0","aria-label":`Decrease value by ${w}`,class:"stepper-decrement",onClick:()=>{if(null==C||!Kl(C,b,w)||!O)return;const t=((e,t,n)=>e-t<n?n:e-t)(C,w,b);I(t),k(t),e.handleFormChange(n,u,t,r),D(t,e.validateField)}},(0,o.h)(Bl,{fillColor:_?F:T})),(0,o.h)(Yl,{type:"number",theme:m,tabIndex:"0",title:L,className:"stepper-value",onInput:t=>{const{value:a}=t.target,o=x;let i;I(a),i=Lc(a)?a.trim():o,M(((e,t,n)=>e>=t&&e<=n)(i,b,y)),I(i);const s=_c(i);k(s),e.handleFormChange(n,u,null!=s?s:void 0,r),D(s,e.validateField)},onBlur:()=>{e.validateField(n,u,C,p,r)},value:x}),(0,o.h)(ql,{theme:m,disabled:j,tabIndex:"0","aria-label":`Increase value by ${w}`,class:"stepper-increment",onClick:()=>{if(null==C||!Gl(C,y,w)||!O)return;const t=((e,t,n)=>e+t>n?n:e+t)(C,w,y);I(t),k(t),e.handleFormChange(n,u,t,r),D(t,e.validateField)}},(0,o.h)(Ul,{fillColor:j?F:T})))),(0,o.h)(Wo,{name:u,cardInstanceId:n,subviewId:r,theme:m,variableResolver:v}))))},checkbox:e=>{let{nodeKey:t,children:n,cardInstanceId:r,subviewId:a,attributes:{name:i},theme:s,variableResolver:l}=e;return(0,o.h)(o.Fragment,null,(0,o.h)(bc,{key:t,"data-element-key":t,role:"group"},(0,o.h)(yc,{"aria-label":"checkbox group"},n)),(0,o.h)(Wo,{name:i,cardInstanceId:r,subviewId:a,theme:s,variableResolver:l}))},checkboxItem:e=>{var t,n;let{nodeKey:r,cardInstanceId:a,subviewId:i,attributes:{label:s,key:l,checked:c},theme:d,variableResolver:u,parentFieldName:p,parentValidations:m}=e;const v=f(c),b=f(`${a}-${l}`),[y,w]=h(null!==(t=v.current)&&void 0!==t&&t),S=null!==(n=d.getCSSColor("icon.checkedCheckbox",{skipFallback:!0}))&&void 0!==n?n:"#FFF";let C;qc(C)||(C=d.getCSSFontProperties("primary"),parseInt(C.lineHeight)<20&&(C.lineHeight="20px"));const k=e=>{const t=ut(a,p,i)||{};return dt().handleFormChange(a,p,Object.assign(Object.assign({},t),{[l]:e}),i),Object.assign(Object.assign({},t),{[l]:e})};return g((()=>{const e=ut(a,p,i);void 0!==e&&void 0!==e[l]?(v.current=e[l],w(e[l])):k(y)}),[]),g((()=>{void 0!==c&&c!==v.current&&(y===v.current&&(w(c),k(c)),v.current=c)}),[c]),(0,o.h)("li",null,(0,o.h)(Sc,{key:r,"data-element-key":r,labelFontProperties:C,role:"checkbox","aria-labelledby":b.current,"aria-checked":y},(0,o.h)(Cc,{type:"checkbox",checked:y,theme:d,onChange:()=>{w(!y);const e=k(!y);dt().validateField(a,p,e,m,i)},"aria-hidden":"true"}),(0,o.h)(kc,{theme:d,isChecked:y},y&&(0,o.h)(wc,{fillColor:S,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},ariaHidden:!0})),(0,o.h)(xc,{theme:d,id:b.current,"data-testid":"checkbox-label",labelFontProperties:C,"aria-hidden":"true"},u(s))))},switch:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{defaultValue:a,thumbnailSrc:i,label:s,name:l},theme:c,variableResolver:d}=e;const u=f(a),[p,m]=h(u.current);g((()=>{const e=ut(n,l,r);void 0!==e?(u.current=e,m(e)):dt().handleFormChange(n,l,p,r)}),[]),g((()=>{a!==u.current&&(p===u.current&&(dt().handleFormChange(n,l,a,r),m(a)),u.current=a)}),[a]);const v=`switch-label-${l}`;return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(0,o.h)(Ro,{nodeKey:t,mode:"inline",theme:c},i&&(0,o.h)($o,{thumbnailUrl:d(i),theme:c}),(0,o.h)(No,{theme:c,name:v},d(s)),(0,o.h)(Ql,{on:p,theme:c,tabIndex:"0",role:"switch","aria-checked":p,"aria-labelledby":v,className:"switch-toggle",onClick:()=>{m(!p),e.handleFormChange(n,l,!p,r)}},(0,o.h)(Jl,{on:p,theme:c})))))},dropdown:ti,datePicker:oi,upload:vc},Mc=["linkButton","submitButton","dismissButton","snoozeButton","voteUpButton","voteDownButton"],Tc=e=>{let{node:t,cardInstanceId:n,cardMetadata:r,isWorkflow:a,theme:i,runtimeVariables:s,feedOrientation:l,subviewId:c,subviewTitle:d,embedMode:u,parentFieldName:p,parentValidations:h}=e;const m=Oc[t.type];return m?(0,o.h)(m,Ic({},t.key&&{nodeKey:t.key},{cardInstanceId:n,cardMetadata:r,subviewId:c,subviewTitle:d,attributes:t.attributes,validations:t.validations,isWorkflow:a,theme:i,variableResolver:e=>Rc(e,s),feedOrientation:l,embedMode:u,parentFieldName:p,parentValidations:h}),t.children&&t.children.map((e=>{var l;return(0,o.h)(Tc,{cardInstanceId:n,cardMetadata:r,subviewId:c,subviewTitle:d,node:e,isWorkflow:a,theme:i,runtimeVariables:s,embedMode:u,parentFieldName:null===(l=t.attributes)||void 0===l?void 0:l.name,parentValidations:t.validations})}))):null},Fc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"},jc=/[&<>"'\/]/g,_c=e=>{if(""===e)return null;const t=Number(e);return Number.isNaN(t)?null:t},Lc=e=>null!==_c(e)||""===e||"-"===e,Dc=e=>{let t=Array();for(var n in e){const r=e[n];t.push(r),r.children&&(t=t.concat(Dc(r.children)))}return t},Ac=e=>{const t=[],n=(e,r)=>{const a=[];for(let r=0;r<e.length;r++){var o;const i=e[r];"actionButtonGroup"!==i.type&&i.children&&(null===(o=i.children)||void 0===o?void 0:o.length)>0&&(i.children=n(i.children,i)),Mc.includes(i.type)?t.push(i):a.push(i)}if("form"===(null==r?void 0:r.type)){var i;let e=!1;null===(i=r.children)||void 0===i||i.forEach((t=>{"actionButtonGroup"===t.type&&(e=!0)})),!e&&a.push({type:"actionButtonGroup",attributes:{},children:t})}return a};return n(e)},Ec=(e,t)=>{const n=e=>{for(let r in e){const a=e[r];"string"==typeof a&&(e[r]=Rc(a,t)),"object"==typeof a&&n(a)}},r=e=>{const t=[];for(let o=0;o<e.length;o++){var a;const i=e[o];i.children&&(null===(a=i.children)||void 0===a?void 0:a.length)>0&&(i.children=r(i.children)),i.attributes&&n(i.attributes),t.push(i)}return t};e.defaultView.nodes=r(e.defaultView.nodes);for(let n in e.subviews){const a=e.subviews[n];e.subviews[n].nodes=r(a.nodes),a.title&&(e.subviews[n].title=Rc(a.title,t))}},Hc=e=>e?e.replace(jc,(e=>Fc[e]||e)):"",Pc=/!\{([\w\.]+?)\}/g,Rc=(e,t)=>e&&t&&"string"==typeof e?e.replace(Pc,((e,n)=>t.get(n)||"")):e||"",Vc={years:J.addYears,months:J.addMonths,weeks:J.addWeeks,days:J.addDays,hours:J.addHours,minutes:J.addMinutes,seconds:J.addSeconds},$c=e=>{if("string"!=typeof e)return null;const t=e.match(le);if(t){const[,,e,n,r,a,o,i,s]=t.map((e=>void 0!==e?Number(e):void 0));return{years:e,months:n,weeks:r,days:a,hours:o,minutes:i,seconds:s}}return null},zc=(e,t)=>{const n=$c(e);return n?Object.entries(Vc).reduce(((e,t)=>{let[r,a]=t;const o=n[r];return o?a(e,o):e}),t):t},Nc=e=>!!e.match(/^[\w-]+\.[\w-]+\.[\w-]*$/),Uc=e=>{const t=ie().getState().application.embedMode;return(null==e?void 0:e.enabled)&&"standalone"===t?"horizontal":"vertical"},Bc=()=>{const e=sessionStorage.getItem(ce),t=e?JSON.parse(e):void 0;return new Set(t)},Wc=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),qc=e=>e&&Wc(e)&&0===Object.keys(e).length,Yc=(e,t)=>e.length===t.length&&(e.sort(),t.sort(),e.every(((e,n)=>e===t[n])));const Zc=(e,t)=>{if(!e)return null;let n;try{n=(e=>{if(!Nc(e))throw new Error("JWT supplied has an incorrect format");try{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=atob(t);return JSON.parse(n)}catch(e){throw new Error("JWT payload could not be parsed")}})(e)}catch(e){return null}if(t)return n[t]&&["number","string"].includes(typeof n[t])?String(n[t]):null;const r=["atomic_sub","atomic_id","sub","id"];for(const e of r)if(n[e]&&["number","string"].includes(typeof n[e]))return String(n[e]);return null};const Kc=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;let r=new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t});n.dispatchEvent(r)};var Gc=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};function Xc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qc={noInternet:"AACNoInternetError",missingApiHost:"AACMissingApiHostError",apiError:"AACApiError",invalidParameters:"AACInvalidParametersError",notPermitted:"AACOperationNotPermittedError",authTokenError:"AACAuthTokenError"},Jc="Device is not connected to the internet",ed="API host was not specified for the request.",td="An API error occurred.",nd="Failed to retrieve an authentication token for request.",rd={method:"GET",mode:"cors"},ad=e=>Gc(void 0,void 0,void 0,(function*(){const t=yield e.text();try{return{text:t,json:JSON.parse(t)}}catch(e){}return{text:t}})),od=e=>e<400,id=(e,t,n,r,a)=>{var o,i;const s=null!==(o=Zc(n,a))&&void 0!==o?o:void 0;Kc("request-failed",{request:{path:e,statusCode:t,streamContainerId:"string"==typeof(null==r?void 0:r.streamContainerId)?null==r?void 0:r.streamContainerId:void 0,streamContainerIds:null==r||null===(i=r.streamContainerIds)||void 0===i?void 0:i.filter((e=>"string"==typeof e)),cardInstanceId:"string"==typeof(null==r?void 0:r.cardInstanceId)?null==r?void 0:r.cardInstanceId:void 0,endUserId:s}})};class sd{static initialise(e,t,n){this.apiHost=e,this.apiKey=t,this.environmentId=n,this.instanceId=(0,X.v4)()}static reset(){this.apiHost="https://client-api.atomic.io",this.apiKey=void 0,this.environmentId=void 0}static setTestHostHeader(e){this.testHost=e}static setTokenUserIdAttribute(e){this.tokenUserIdAttribute=e}static setClientAppVersion(e){this.clientAppVersion=e}static verifyInitialised(){if(!this.isInitialised())throw new Error("The Atomic SDK has not been initialised with an API host, API key and environment ID. Call `AtomicSDK.initialise(apiHost, apiKey, environmentId)` before attempting to use the SDK.")}static isInitialised(){return void 0!==this.apiKey&&void 0!==this.environmentId}static get(e,t,n,r){return Gc(this,void 0,void 0,(function*(){let a,o;if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Jc);return e.name=Qc.noInternet,{response:{error:e}}}{const i=dd(this.apiHost,e,this.environmentId);if(!i){const e=new Error(ed);return e.name=Qc.missingApiHost,{response:{error:e}}}let s;if(t)try{s=yield t.requestToken()}catch(e){const t=new Error(`${nd} ${e}`);return t.name=Qc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},rd),{headers:ld({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,lastModified:n,testHost:this.testHost,clientAppVersion:this.clientAppVersion})});try{const t=yield fetch(i,l);o=t.status;const n=yield ad(t);if(n.json&&(a=n.json),!od(t.status))throw id(e,o,s,r,this.tokenUserIdAttribute),new Error(`GET request failed with status code ${t.status}.`);return{data:a,response:{status:t.status,etag:t.headers.get("etag")}}}catch(e){const t=new Error(`${td} ${e}`);return t.name=Qc.apiError,{data:a,response:{status:o,error:t}}}}}))}static post(e,t,n,r){return Gc(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Jc);return e.name=Qc.noInternet,{response:{error:e}}}{let a,o;const i=dd(this.apiHost,e,this.environmentId);if(!i){const e=new Error(ed);return e.name=Qc.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${nd} ${e}`);return t.name=Qc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},rd),{method:"POST",headers:ld({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(i,l);o=t.status;const n=yield ad(t);if(n.json&&(a=n.json),!od(t.status))throw id(e,o,s,r,this.tokenUserIdAttribute),new Error(`POST request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${td} ${e}`);return t.name=Qc.apiError,{data:a,response:{status:o,error:t}}}}}))}static put(e,t,n,r){return Gc(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Jc);return e.name=Qc.noInternet,{response:{error:e}}}{let a,o;const i=dd(this.apiHost,e,this.environmentId);if(!i){const e=new Error(ed);return e.name=Qc.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${nd} ${e}`);return t.name=Qc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},rd),{method:"PUT",headers:ld({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(i,l);o=t.status;const n=yield ad(t);if(n.json&&(a=n.json),!od(t.status))throw id(e,o,s,r,this.tokenUserIdAttribute),new Error(`PUT request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${td} ${e}`);return t.name=Qc.apiError,{data:a,response:{status:o,error:t}}}}}))}static delete(e,t,n,r){return Gc(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Jc);return e.name=Qc.noInternet,{response:{error:e}}}{let a,o;const i=dd(this.apiHost,e,this.environmentId);if(!i){const e=new Error(ed);return e.name=Qc.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${nd} ${e}`);return t.name=Qc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},rd),{method:"DELETE",headers:ld({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(i,l);o=t.status;const n=yield ad(t);if(n.json&&(a=n.json),!od(t.status))throw id(e,o,s,r,this.tokenUserIdAttribute),new Error(`DELETE request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${td} ${e}`);return t.name=Qc.apiError,{data:a,response:{status:o,error:t}}}}}))}}Xc(sd,"apiHost","https://client-api.atomic.io"),Xc(sd,"apiKey",void 0),Xc(sd,"environmentId",void 0),Xc(sd,"instanceId",void 0),Xc(sd,"testHost",void 0),Xc(sd,"clientAppVersion","unknown"),Xc(sd,"tokenUserIdAttribute",void 0);const ld=e=>cd("header",Object.assign({},e)),cd=(e,t)=>{const n="header"===e;let r={"x-atomic-sdk-platform":"Web","x-atomic-sdk-version":"25.2.2","x-atomic-sdk-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone,"x-atomic-sdk-device":navigator.userAgent};if(t.instanceId&&(r["x-atomic-sdk-instance-id"]=t.instanceId),n&&(r["Content-Type"]="application/json"),t.apiKey){r["ws"===t.scheme?"api-key":"x-atomic-sdk-api-key"]=t.apiKey}return t.authToken&&(n?r.Authorization=`Bearer ${t.authToken}`:r.Token=t.authToken),t.lastModified&&n&&(r["If-None-Match"]=t.lastModified),t.testHost&&(r["x-atomic-test-host"]=t.testHost),t.clientAppVersion&&(r["x-atomic-sdk-client-app-version"]=t.clientAppVersion),t.error&&(r.error=t.error),r},dd=(e,t,n)=>{if(!e||0==e.trim().length)return null;return`${e.endsWith("/")?e:`${e}/`}${n&&n.trim().length>0?`${n}/`:""}${t}`};var ud=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const pd=e=>{switch(e.type){case"string":return e.defaultValue;case"number":return e.defaultValue.toString();case"boolean":return e.defaultValue?"true":"false";case"list":return e.defaultValue.join(", ");case"date":const t=new Date(e.defaultValue);return isNaN(t.getTime())?e.defaultValue:(0,J.format)(t,e.defaultFormatterOption||"");default:return String(e.defaultValue)}},hd=(e,t,n,r,a,o,i)=>ud(void 0,void 0,void 0,(function*(){const s=`feed/${e}${i?"?filters="+JSON.stringify(i):""}`,l=yield sd.get(s,t,r||"",{streamContainerId:e});if(304===l.response.status)return mt.debug({level1:["Feed unchanged response received by HTTP"]}),{};if(200===l.response.status){mt.debug({level1:["Feed update received by HTTP"]});let e=l.data.cardInstances,t=l.data.metadata;const r=e.length;o&&e.length>o&&(e=e.slice(0,o));const i=yield fd(e,n,a);return{lastModified:l.response.etag,cardInstances:e,metadata:t,unfilteredCardInstanceCount:r,runtimeVariables:i}}return{error:l.response.error}})),md=(e,t,n,r)=>ud(void 0,void 0,void 0,(function*(){const a=yield sd.post("response",{streamContainerId:e,cardInstanceId:t,values:n},r,{streamContainerId:e,cardInstanceId:t});return{ok:a.data&&1==a.data.ok,event:a.data&&a.data.event,error:a.response&&a.response.error}})),gd=(e,t,n)=>ud(void 0,void 0,void 0,(function*(){const r=yield sd.post("dismiss",{streamContainerId:e,cardInstanceId:t},n,{streamContainerId:e,cardInstanceId:t});return{ok:r.data&&1==r.data.ok,event:r.data&&r.data.event,error:r.response.error}})),vd=(e,t,n,r)=>ud(void 0,void 0,void 0,(function*(){const a=yield sd.post("snooze",{streamContainerId:e,cardInstanceId:t,interval:`PT${Math.max(0,n)}S`},r,{streamContainerId:e,cardInstanceId:t});return{ok:a.data&&!0===a.data.ok,event:a.data&&a.data.event,error:a.response.error}})),fd=(e,t,n)=>ud(void 0,void 0,void 0,(function*(){let r=e.filter((e=>e.runtimeVariables&&e.runtimeVariables.length)).map((e=>{const t=e.runtimeVariables||[];return{eventName:e.instance.eventName,lifecycleId:e.instance.lifecycleId,id:e.instance.id,runtimeVariables:new Map(t.map((e=>[e.name,pd(e)])))}}));if(r.length){let e=r;if(n){let a=!1;const o=new Promise((e=>{setTimeout((()=>{a||(console.error(`Resolution of runtime variables exceeded the timeout (${t}ms). Falling back to default values.`),e(r))}),t)})),i=r.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:new Map(e.runtimeVariables)})));e=yield Promise.race([o,n(i).then((e=>(a=!0,e)))])}const a=e.reduce(((e,t)=>(r.filter((e=>e.id===t.id)).length>0&&e.set(t.id,t.runtimeVariables),e)),new Map);return{values:a}}return{}})),bd="AtomicStreamContainersTutorialSeen";class yd{static setCardListTutorialSeen(e){const t=this.containersCardListTutorialSeenIn();t.includes(e)||(t.push(e),localStorage.setItem(bd,t.join(",")))}static hasCardListTutorialBeenSeen(e){return this.containersCardListTutorialSeenIn().includes(e)}static containersCardListTutorialSeenIn(){const e=localStorage.getItem(bd);return e?e.split(","):[]}}var wd,Sd,Cd=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};function kd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xd=120,Id=null===(wd=Array.from(document.getElementsByTagName("script")).filter((e=>{var t;return null==e||null===(t=e.dataset)||void 0===t?void 0:t.config}))[0])||void 0===wd||null===(Sd=wd.dataset)||void 0===Sd?void 0:Sd.config,Od=Id?JSON.parse(Id):void 0,Md="onpageshow"in window;class Td{constructor(){kd(this,"domListener",void 0),kd(this,"resizeObserver",void 0),kd(this,"messageReceivedCallback",void 0),kd(this,"requestFailedCallback",void 0),kd(this,"resizedCallback",void 0),kd(this,"outsideClickCallback",void 0),kd(this,"keyDownCallback",void 0),kd(this,"containersBroadcastChannel",void 0),kd(this,"variableResolutionRequests",{}),kd(this,"authTokenRequests",{}),kd(this,"lastVariableResolutionRequestId",1),kd(this,"streamContainerId",void 0),kd(this,"feedSubscriptionId",void 0),kd(this,"containerInstanceId",void 0),kd(this,"applicationRef",K.createRef()),kd(this,"subscriptionRetryCount",0),kd(this,"subscriptionRetryLimit",3)}startCardFeed(e){var t;if(!e.apiHost||!e.apiKey||!e.environmentId)throw new Error("The Atomic SDK must be initialised before launching a stream container. Call `AtomicSDK.initialise` to configure the API host, API key and environment ID.");window.AtomicUploadService||(window.AtomicUploadService=window.parent.AtomicUploadService),mt.logLevel=e.logLevel||ht.DISABLED,this.containerInstanceId=e.instanceId,sd.initialise(e.apiHost,e.apiKey,e.environmentId);const{testHost:n,clientAppVersion:r,tokenUserIdAttribute:a}=e;n&&sd.setTestHostHeader(n),r&&sd.setClientAppVersion(r),a&&sd.setTokenUserIdAttribute(a),this.messageReceivedCallback=this.onMessageReceived.bind(this),this.requestFailedCallback=this.onRequestFailed.bind(this);const i=()=>{this.destroy.bind(this)(),window.removeEventListener("pagehide",i),this.containerInstanceId&&(window.AtomicUploadService.cancelUploadsForContainer(this.containerInstanceId),window.AtomicUploadService.removeFilesForContainer(this.containerInstanceId))},s=()=>{this.initialiseIframeBroadcastChannel(),window.addEventListener("message",this.messageReceivedCallback),window.addEventListener("request-failed",this.requestFailedCallback),window.addEventListener("pagehide",i)};if(Md?window.addEventListener("pageshow",s):s(),"launcher"===e.embedMode){this.domListener=new MutationObserver((()=>{this.resizeHandler()}));const e=()=>{this.resizedCallback=this.resizeHandler.bind(this),window.addEventListener("resize",this.resizedCallback),this.outsideClickCallback=this.outsideClickHandler.bind(this),document.addEventListener("mousedown",this.outsideClickCallback),this.keyDownCallback=this.keyDownHandler.bind(this),document.addEventListener("keydown",this.keyDownCallback)};Md?window.addEventListener("pageshow",e):e()}if(("single-card"===e.embedMode||"standalone"===e.embedMode&&!0===e.autosizeFrame)&&(this.domListener=new MutationObserver((()=>{var t;this.autoResizingFrameHandler(e.embedMode,null===(t=e.features)||void 0===t?void 0:t.horizontalContainerConfig)})),document.fonts.onloadingdone=()=>{var t;mt.debug({level3:["Font loading completed, resizing frame"]}),this.autoResizingFrameHandler(e.embedMode,null===(t=e.features)||void 0===t?void 0:t.horizontalContainerConfig)},"ResizeObserver"in window)){const t=window.parent.document;t&&(this.resizeObserver=new ResizeObserver((()=>{var t;this.autoResizingFrameHandler(e.embedMode,null===(t=e.features)||void 0===t?void 0:t.horizontalContainerConfig)})),this.resizeObserver.observe(t.body))}"modal-subview"===e.embedMode&&(this.domListener=new MutationObserver((()=>{this.modalViewResizeHandler()}))),"toast"===e.embedMode&&(this.domListener=new MutationObserver((()=>{this.toastViewResizeHandler()}))),(null===(t=e.enabledUiElements)||void 0===t?void 0:t.customContainerHeader)&&(e.enabledUiElements.customContainerHeader.headerElement=decodeURI(e.enabledUiElements.customContainerHeader.headerElement)),this.domListener&&this.domListener.observe(document.body,{attributes:!0,childList:!0,characterData:!0,subtree:!0});const l=oe(Object.assign(Object.assign({},e),{cardListTutorialSeen:!e.streamContainerId||yd.hasCardListTutorialBeenSeen(e.streamContainerId)}),[(()=>e=>e=>t=>{const n=e(t);return this.synchroniseStores(),n})()]);this.streamContainerId=e.streamContainerId,(0,o.render)((0,o.h)(ss,{ref:this.applicationRef,store:l,embedMode:e.embedMode,applyCardFeedDeltaUpdates:this.applyCardFeedDeltaUpdates.bind(this),cardCountChanged:this.cardCountChanged.bind(this),linkButtonPressed:this.linkButtonPressed.bind(this),submitButtonPressed:this.submitButtonPressed.bind(this),onReady:this.onReady.bind(this),runtimeVariableResolver:this.runtimeVariablesRequested.bind(this),onCardListTutorialSeen:this.cardListTutorialSeen.bind(this),onAnalyticsEvent:this.sendAnalyticsEvent.bind(this),onCardEvent:this.dispatchCardEvent.bind(this),onError:this.onError.bind(this),onAuthTokenRequested:this.onAuthTokenRequested.bind(this),onCardFeedSubscribe:this.cardFeedSubscribe.bind(this),requestWebSocketReconnect:this.requestWebSocketReconnect.bind(this),webSocketDisabled:e.webSocketDisabled}),document.body)}synchroniseStores(){if(this.containersBroadcastChannel){let e=Object.assign({},ie().getState());this.containersBroadcastChannel.postMessage({type:Gi.STATE,state:e,instanceId:this.containerInstanceId})}else mt.error({level1:["BroadcastChannel API unavailable"]})}sendMessageToParent(e,t){const n=window.parent;n&&n.postMessage(Object.assign({action:e},t),ie().getState().application.windowOrigin||"")}onReady(){this.sendMessageToParent("io.atomic.events.ready")}cardCountChanged(e,t){this.sendMessageToParent("io.atomic.events.cardCountChanged",{cardCount:e,totalCards:t})}cardFeedSubscribe(){var e;this.subscriptionRetryCount>=this.subscriptionRetryLimit?(null===(e=this.applicationRef.current)||void 0===e||e.pollCardList(),this.sendMessageToParent("io.atomic.events.subscriptionRetryExceeded"),this.subscriptionRetryCount=0):(this.subscriptionRetryCount++,this.sendMessageToParent("io.atomic.events.cardFeedSubscribeRequested",{streamContainerId:this.streamContainerId}))}cardFeedUnsubscribe(){this.sendMessageToParent("io.atomic.events.cardFeedUnsubscribeRequested",{subscriptionId:this.feedSubscriptionId})}checkWebSocketConnection(){this.sendMessageToParent("io.atomic.events.socketConnectionHealthcheck")}requestWebSocketReconnect(){this.sendMessageToParent("io.atomic.events.socketReconnectionRequested")}cardFeedUpdated(e,t){return Cd(this,void 0,void 0,(function*(){const n=ie().getState();let r;const a=t.filter((e=>("replace-feed"===e.type&&(r=e),"replace-feed"!==e.type)));if(r){const{instances:t,totalCards:a}=r.data.cardInstances,o=yield fd(t,n.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this)),i={cardInstances:t,unfilteredCardInstanceCount:t.length,runtimeVariables:o,metadata:{totalCards:a}};e.cardFeedLoaded(i),this.cardCountChanged(i.cardInstances.length,i.metadata.totalCards)}a.length&&(Object.values(n.cardStates).length?e.queueCardFeedDeltaUpdate(a):yield this.applyCardFeedDeltaUpdates(e,a))}))}applyCardFeedDeltaUpdates(e,t){return Cd(this,void 0,void 0,(function*(){const n=ie().getState();e.clearCardFeedDeltaUpdateQueue(),yield e.applyCardFeedDeltaUpdate(t,(t=>Cd(this,void 0,void 0,(function*(){if(t){const t=yield(r=n.application.streamContainerId,a={requestToken:()=>Cd(this,void 0,void 0,(function*(){return yield this.onAuthTokenRequested()}))},ud(void 0,void 0,void 0,(function*(){const e=yield sd.get(`feed/${r}`,a,void 0,{streamContainerId:r});var t,n;return 200===e.response.status&&e.data&&e.data.metadata?{cardCount:null===(t=e.data.cardInstances)||void 0===t?void 0:t.length,totalCards:null===(n=e.data.metadata)||void 0===n?void 0:n.totalCards,lastModified:e.response.etag}:{error:e.response.error}})));if(t.error)mt.error({level1:["error retrieving total card count after card feed updated"],level2:[t.error]});else{const{cardCount:n,totalCards:r,lastModified:a}=t;r&&e.updateTotalCardCount(r,a),this.cardCountChanged(n,r)}}var r,a}))),(e=>Cd(this,void 0,void 0,(function*(){return yield fd(e,n.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this))}))))}))}linkButtonPressed(e){this.sendMessageToParent("io.atomic.events.linkButtonPressed",{payload:e}),this.checkWebSocketConnection()}submitButtonPressed(e){this.sendMessageToParent("io.atomic.events.submitButtonPressed",{payload:e}),this.checkWebSocketConnection()}cardListTutorialSeen(){this.streamContainerId&&yd.setCardListTutorialSeen(this.streamContainerId)}onError(e){this.sendMessageToParent("io.atomic.events.errorReceived",{error:{name:e.name,message:e.message,stack:e.stack}})}onAuthTokenRequested(){const e=(0,X.v4)();return new Promise(((t,n)=>{this.authTokenRequests[e]=(e,r)=>r?n(r):t(e),this.sendMessageToParent("io.atomic.events.authTokenRequested",{requestId:e})}))}runtimeVariablesRequested(e){const t=this.lastVariableResolutionRequestId++;return this.sendMessageToParent("io.atomic.events.resolveRuntimeVariables",{cards:e.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:Array.from(e.runtimeVariables.entries())}))),requestId:t}),new Promise((e=>{this.variableResolutionRequests[t]=t=>{const n=t.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:new Map(e.runtimeVariables)})));e(n)}}).bind(this))}feedOverflowHeight(){const e=window.document.getElementById(Sa);return e?Array.from(e.children).reduce(((e,t)=>{const n=t;if(-1!==n.className.indexOf("use-offset"))return e+Array.from(n.querySelectorAll(".offset-child")).reduce(((e,t)=>e+t.offsetHeight),0);const r=t;return e+(r.className.indexOf("floating")>-1?0:r.scrollHeight)}),0):0}toastViewHeight(){const e=window.document.getElementById("toast-body"),t=window.document.getElementById(ta);if(e){return Array.from(e.children).reduce(((e,t)=>t.clientHeight+e),0)?null==t?void 0:t.offsetHeight:0}return 0}resizeHandler(){const e=document.querySelector(".atomic-sdk-root");if(!e)return;const t=this.feedOverflowHeight(),n=t>window.innerHeight-xd?window.innerHeight-xd:t,r=60>window.innerHeight-xd?window.innerHeight-xd:60;e.style.height=`${n>r?n:r}px`}autoResizingFrameHandler(e,t){const n=document.querySelector(".atomic-sdk-root"),r=window.frameElement;if(r){n.style.height="auto";const o=r.style.display;if(r.style.display="block","standalone"===e&&(null==t?void 0:t.enabled)&&"shrink"===t.emptyStyle&&r.classList.contains("standalone")){var a;!r.classList.contains("shrink")&&r.classList.add("shrink");const e=null===(a=ie().getState().cardFeed.cardInstances)||void 0===a?void 0:a.length;e||r.classList.contains("collapsed")?e&&r.classList.contains("collapsed")?(r.classList.remove("collapsed"),r.style.maxHeight="2000px",r.style.height=`${n.scrollHeight}px`):!e&&n.scrollHeight?r.style.maxHeight=`${n.scrollHeight}px`:e?r.style.height=`${n.scrollHeight}px`:r.style.maxHeight="0px":(r.classList.add("collapsed"),r.style.maxHeight=`${n.scrollHeight}px`)}else r.style.height=`${n.scrollHeight}px`;"single-card"===e&&(0===n.scrollHeight?r.classList.remove("has-card"):r.classList.add("has-card")),r.style.display=o,this.sendMessageToParent("io.atomic.events.frameHeightChanged",{height:n.scrollHeight})}}modalViewResizeHandler(){const e=window.frameElement;if(e){var t;const n=document.querySelector(".atomic-sdk-root"),r=e.style.display;e.style.display="block",e.style.height="auto";const a=this.feedOverflowHeight();e.style.height=`${a}px`;const o=null==n||null===(t=n.dataset)||void 0===t?void 0:t.contentlabel;o&&e.setAttribute("title",o),n.children.length?e.classList.contains("has-subview")||(e.classList.add("has-subview"),e.setAttribute("aria-hidden","false"),e.focus()):(e.classList.remove("has-subview"),e.setAttribute("aria-hidden","true"),e.setAttribute("title","Empty Modal"),e.blur()),e.style.display=r}}toastViewResizeHandler(){const e=window.frameElement;if(e){const t=this.toastViewHeight();e.style.height=`${t}px`,t?e.setAttribute("aria-hidden","false"):e.setAttribute("aria-hidden","true")}}outsideClickHandler(e){const t=document.querySelector(".atomic-sdk-root");t&&!t.contains(e.target)&&this.closeLauncher()}keyDownHandler(e){xr(e.key)===Cr&&this.closeLauncher()}closeLauncher(){window.postMessage({action:"updateAppOpen",values:{open:!1}},ie().getState().application.windowOrigin||"")}sendAnalyticsEvent(e){return Cd(this,arguments,void 0,(function*(){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.checkWebSocketConnection();const n=ie().getState(),r=n.cardFeed.cardInstances||[],a=r.filter((t=>t.instance.id===e.cardInstanceId)),o=a.length?a[0]:null,i=o?r.indexOf(o)+1:0;let s;try{s=yield this.onAuthTokenRequested()}catch(e){mt.error({level1:["Error requesting auth token to send analytics event"],level2:[e]})}const l=Object.assign(Object.assign({},e),{endUserId:Zc(s,sd.tokenUserIdAttribute)||"",cardInstanceStatus:o?o.instance.status:"",containerId:n.application.streamContainerId,timestamp:new Date,streamCardPosition:i,streamLength:n.cardFeed.unfilteredCardInstanceCount,streamLengthVisible:r.length});this.sendMessageToParent("io.atomic.events.analyticsEventReceived",{event:l,sdkOnlyEvent:t})}))}dispatchCardEvent(e){this.sendMessageToParent("io.atomic.events.cardEventReceived",{event:e,streamContainerId:this.streamContainerId})}onMessageReceived(e){return Cd(this,void 0,void 0,(function*(){var t,n;const r=ie().getState(),a=r.application.windowOrigin;if(o=a||"",i=e.origin,"*"===o||o===i){const o=(0,G.kv)((0,G.Y2)(Xt,Q),ie());switch(e.data.action){case"didResolveRuntimeVariables":this.variableResolutionRequests[e.data.values.requestId](e.data.values.cards);break;case"io.atomic.events.requestRuntimeVariables":const i=yield fd(r.cardFeed.cardInstances,r.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this));o.runtimeVariablesResolved(i);break;case"updateAppOpen":this.onUpdateAppOpen(e),parent.postMessage({action:"io.atomic.events.didUpdateAppOpen",values:{open:e.data.values.open}},a||"");break;case"io.atomic.events.authTokenReceived":const s=e.data;if(s.values){const{requestId:e,authToken:t}=s.values;e&&void 0!==this.authTokenRequests[e]&&(this.authTokenRequests[e](t),delete this.authTokenRequests[e])}break;case"io.atomic.events.authTokenError":const l=e.data;if(l.values){const{requestId:e,error:t}=l.values;e&&void 0!==this.authTokenRequests[e]&&(this.authTokenRequests[e](void 0,t),delete this.authTokenRequests[e])}break;case"io.atomic.events.cardFeedSubscriptionId":this.feedSubscriptionId=e.data.values.subscriptionId;break;case"io.atomic.events.cardFeedUpdateReceived":this.subscriptionRetryCount=0;const c=e.data.values.cardFeedUpdates;this.cardFeedUpdated(o,c);break;case"io.atomic.events.pollingFallbackEnabled":null===(t=this.applicationRef.current)||void 0===t||t.pollCardList();break;case"io.atomic.events.pollingFallbackDisabled":null===(n=this.applicationRef.current)||void 0===n||n.cancelCardListPolling();break;case"io.atomic.events.invalidStreamContainerId":case"io.atomic.events.invalidFilter":case"io.atomic.events.invalidToken":case"io.atomic.events.expiredToken":case"io.atomic.events.socketAuthenticationError":case"io.atomic.events.feedSubscribeError":o.cardFeedLoaded({error:e.data.values});break;case"io.atomic.events.streamFilterApplied":o.setStreamFilter(e.data.values.filter);break;case"io.atomic.events.logLevelUpdate":mt.logLevel=e.data.values.logLevel;break;case"io.atomic.events.sdkLogout":this.onLogout()}}var o,i}))}onRequestFailed(e){Kc("request-failed",e.detail,window.parent)}onUpdateAppOpen(e){this.checkWebSocketConnection(),Jt().updateAppOpen(e.data.values.open)}initialiseIframeBroadcastChannel(){var e;(null===(e=this.containersBroadcastChannel)||void 0===e?void 0:e.isOpen)||(this.containersBroadcastChannel=new Xi,this.containersBroadcastChannel.addEventListener("message",this.onBroadcastChannelMessageReceived.bind(this)))}onBroadcastChannelMessageReceived(e){if(e.data.type!==Gi.STATE)return;const t=ie().getState();let n=e.data.state;e.data.instanceId===this.containerInstanceId&&(n=Object.assign(Object.assign({},n),{application:Object.assign(Object.assign({},n.application),{embedMode:t.application.embedMode,cardLimit:t.application.cardLimit})}),n!==t&&ie().setState(n))}onLogout(){var e;sd.reset(),window.removeEventListener("request-failed",this.requestFailedCallback),Jt().userLoggedOut(),this.cardCountChanged(0,0),null===(e=this.applicationRef.current)||void 0===e||e.cancelCardListPolling()}destroy(){var e;window.removeEventListener("resize",this.resizedCallback),window.removeEventListener("message",this.messageReceivedCallback),window.removeEventListener("request-failed",this.requestFailedCallback),document.removeEventListener("mousedown",this.outsideClickCallback),document.removeEventListener("keydown",this.keyDownCallback),null===(e=this.resizeObserver)||void 0===e||e.disconnect()}}if(Od)try{(new Td).startCardFeed(Od)}catch(_d){console.error("Could not initialize IframeManager",_d)}else console.error("Error starting stream container, invalid config supplied")})(),r=r.default})()));
9
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AtomicSDK=t():e.AtomicSDK=t()}(globalThis,(()=>(()=>{var e={4963:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},7722:(e,t,n)=>{var r=n(6314)("unscopables"),a=Array.prototype;null==a[r]&&n(7728)(a,r,{}),e.exports=function(e){a[r][e]=!0}},7007:(e,t,n)=>{var r=n(5286);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},9315:(e,t,n)=>{var r=n(2110),a=n(875),o=n(2337);e.exports=function(e){return function(t,n,i){var s,l=r(t),c=a(l.length),d=o(i,c);if(e&&n!=n){for(;c>d;)if((s=l[d++])!=s)return!0}else for(;c>d;d++)if((e||d in l)&&l[d]===n)return e||d||0;return!e&&-1}}},2032:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},5645:e=>{var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},741:(e,t,n)=>{var r=n(4963);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}}},1355:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},7057:(e,t,n)=>{e.exports=!n(4253)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},2457:(e,t,n)=>{var r=n(5286),a=n(3816).document,o=r(a)&&r(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},4430:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},2985:(e,t,n)=>{var r=n(3816),a=n(5645),o=n(7728),i=n(3415),s=n(741),l="prototype",c=function(e,t,n){var d,u,p,h,m=e&c.F,g=e&c.G,v=e&c.S,f=e&c.P,b=e&c.B,y=g?r:v?r[t]||(r[t]={}):(r[t]||{})[l],w=g?a:a[t]||(a[t]={}),S=w[l]||(w[l]={});for(d in g&&(n=t),n)p=((u=!m&&y&&void 0!==y[d])?y:n)[d],h=b&&u?s(p,r):f&&"function"==typeof p?s(Function.call,p):p,y&&i(y,d,p,e&c.U),w[d]!=p&&o(w,d,h),f&&S[d]!=p&&(S[d]=p)};r.core=a,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},4253:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},18:(e,t,n)=>{e.exports=n(3825)("native-function-to-string",Function.toString)},3816:e=>{var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},9181:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},7728:(e,t,n)=>{var r=n(9275),a=n(681);e.exports=n(7057)?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},639:(e,t,n)=>{var r=n(3816).document;e.exports=r&&r.documentElement},1734:(e,t,n)=>{e.exports=!n(7057)&&!n(4253)((function(){return 7!=Object.defineProperty(n(2457)("div"),"a",{get:function(){return 7}}).a}))},9797:(e,t,n)=>{var r=n(2032);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},5286:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},9988:(e,t,n)=>{"use strict";var r=n(2503),a=n(681),o=n(2943),i={};n(7728)(i,n(6314)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(i,{next:a(1,n)}),o(e,t+" Iterator")}},2923:(e,t,n)=>{"use strict";var r=n(4461),a=n(2985),o=n(3415),i=n(7728),s=n(7234),l=n(9988),c=n(2943),d=n(468),u=n(6314)("iterator"),p=!([].keys&&"next"in[].keys()),h="keys",m="values",g=function(){return this};e.exports=function(e,t,n,v,f,b,y){l(n,t,v);var w,S,C,k=function(e){if(!p&&e in M)return M[e];switch(e){case h:case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",I=f==m,O=!1,M=e.prototype,T=M[u]||M["@@iterator"]||f&&M[f],F=T||k(f),j=f?I?k("entries"):F:void 0,_="Array"==t&&M.entries||T;if(_&&(C=d(_.call(new e)))!==Object.prototype&&C.next&&(c(C,x,!0),r||"function"==typeof C[u]||i(C,u,g)),I&&T&&T.name!==m&&(O=!0,F=function(){return T.call(this)}),r&&!y||!p&&!O&&M[u]||i(M,u,F),s[t]=F,s[x]=g,f)if(w={values:I?F:k(m),keys:b?F:k(h),entries:j},y)for(S in w)S in M||o(M,S,w[S]);else a(a.P+a.F*(p||O),t,w);return w}},5436:e=>{e.exports=function(e,t){return{value:t,done:!!e}}},7234:e=>{e.exports={}},4461:e=>{e.exports=!1},2503:(e,t,n)=>{var r=n(7007),a=n(5588),o=n(4430),i=n(9335)("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=n(2457)("iframe"),r=o.length;for(t.style.display="none",n(639).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c[l][o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=r(e),n=new s,s[l]=null,n[i]=e):n=c(),void 0===t?n:a(n,t)}},9275:(e,t,n)=>{var r=n(7007),a=n(1734),o=n(1689),i=Object.defineProperty;t.f=n(7057)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),a)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},5588:(e,t,n)=>{var r=n(9275),a=n(7007),o=n(7184);e.exports=n(7057)?Object.defineProperties:function(e,t){a(e);for(var n,i=o(t),s=i.length,l=0;s>l;)r.f(e,n=i[l++],t[n]);return e}},468:(e,t,n)=>{var r=n(9181),a=n(508),o=n(9335)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=a(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},189:(e,t,n)=>{var r=n(9181),a=n(2110),o=n(9315)(!1),i=n(9335)("IE_PROTO");e.exports=function(e,t){var n,s=a(e),l=0,c=[];for(n in s)n!=i&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~o(c,n)||c.push(n));return c}},7184:(e,t,n)=>{var r=n(189),a=n(4430);e.exports=Object.keys||function(e){return r(e,a)}},681:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},3415:(e,t,n)=>{var r=n(3816),a=n(7728),o=n(9181),i=n(3953)("src"),s=n(18),l="toString",c=(""+s).split(l);n(5645).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(o(n,"name")||a(n,"name",t)),e[t]!==n&&(l&&(o(n,i)||a(n,i,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,l,(function(){return"function"==typeof this&&this[i]||s.call(this)}))},2943:(e,t,n)=>{var r=n(9275).f,a=n(9181),o=n(6314)("toStringTag");e.exports=function(e,t,n){e&&!a(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},9335:(e,t,n)=>{var r=n(3825)("keys"),a=n(3953);e.exports=function(e){return r[e]||(r[e]=a(e))}},3825:(e,t,n)=>{var r=n(5645),a=n(3816),o="__core-js_shared__",i=a[o]||(a[o]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(4461)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},2337:(e,t,n)=>{var r=n(1467),a=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?a(e+t,0):o(e,t)}},1467:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},2110:(e,t,n)=>{var r=n(9797),a=n(1355);e.exports=function(e){return r(a(e))}},875:(e,t,n)=>{var r=n(1467),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},508:(e,t,n)=>{var r=n(1355);e.exports=function(e){return Object(r(e))}},1689:(e,t,n)=>{var r=n(5286);e.exports=function(e,t){if(!r(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!r(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},3953:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+n).toString(36))}},6314:(e,t,n)=>{var r=n(3825)("wks"),a=n(3953),o=n(3816).Symbol,i="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=i&&o[e]||(i?o:a)("Symbol."+e))}).store=r},6997:(e,t,n)=>{"use strict";var r=n(7722),a=n(5436),o=n(7234),i=n(2110);e.exports=n(2923)(Array,"Array",(function(e,t){this._t=i(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,a(1)):a(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},1181:(e,t,n)=>{for(var r=n(6997),a=n(7184),o=n(3415),i=n(3816),s=n(7728),l=n(7234),c=n(6314),d=c("iterator"),u=c("toStringTag"),p=l.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=a(h),g=0;g<m.length;g++){var v,f=m[g],b=h[f],y=i[f],w=y&&y.prototype;if(w&&(w[d]||s(w,d,p),w[u]||s(w,u,f),l[f]=p,b))for(v in r)w[v]||o(w,v,r[v],!0)}},3561:e=>{e.exports=function(e){var t=new Date(e.getTime()),n=t.getTimezoneOffset();return t.setSeconds(0,0),6e4*n+t.getTime()%6e4}},4844:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setDate(n.getDate()+a),n}},2680:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,36e5*n)}},7538:(e,t,n)=>{var r=n(2385),a=n(1138);e.exports=function(e,t){var n=Number(t);return a(e,r(e)+n)}},2951:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),a=Number(t);return new Date(n+a)}},1318:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,6e4*n)}},9331:(e,t,n)=>{var r=n(1884),a=n(2807);e.exports=function(e,t){var n=r(e),o=Number(t),i=n.getMonth()+o,s=new Date(0);s.setFullYear(n.getFullYear(),i,1),s.setHours(0,0,0,0);var l=a(s);return n.setMonth(i,Math.min(l,n.getDate())),n}},1482:(e,t,n)=>{var r=n(9331);e.exports=function(e,t){var n=Number(t);return r(e,3*n)}},9723:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,1e3*n)}},5932:(e,t,n)=>{var r=n(4844);e.exports=function(e,t){var n=Number(t);return r(e,7*n)}},6083:(e,t,n)=>{var r=n(9331);e.exports=function(e,t){var n=Number(t);return r(e,12*n)}},6739:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n,a){var o=r(e).getTime(),i=r(t).getTime(),s=r(n).getTime(),l=r(a).getTime();if(o>i||s>l)throw new Error("The start of the range cannot be after the end of the range");return o<l&&s<i}},7886:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){if(!(t instanceof Array))throw new TypeError(toString.call(t)+" is not an instance of Array");var n,a,o=r(e).getTime();return t.forEach((function(e,t){var i=r(e),s=Math.abs(o-i.getTime());(void 0===n||s<a)&&(n=t,a=s)})),n}},3806:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){if(!(t instanceof Array))throw new TypeError(toString.call(t)+" is not an instance of Array");var n,a,o=r(e).getTime();return t.forEach((function(e){var t=r(e),i=Math.abs(o-t.getTime());(void 0===n||i<a)&&(n=t,a=i)})),n}},3374:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),a=r(t).getTime();return n<a?-1:n>a?1:0}},3558:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),a=r(t).getTime();return n>a?-1:n<a?1:0}},6656:(e,t,n)=>{var r=n(6579);e.exports=function(e,t){var n=r(e),a=r(t),o=n.getTime()-6e4*n.getTimezoneOffset(),i=a.getTime()-6e4*a.getTimezoneOffset();return Math.round((o-i)/864e5)}},6554:(e,t,n)=>{var r=n(1971);e.exports=function(e,t){var n=r(e),a=r(t),o=n.getTime()-6e4*n.getTimezoneOffset(),i=a.getTime()-6e4*a.getTimezoneOffset();return Math.round((o-i)/6048e5)}},7051:(e,t,n)=>{var r=n(2385);e.exports=function(e,t){return r(e)-r(t)}},1924:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return 12*(n.getFullYear()-a.getFullYear())+(n.getMonth()-a.getMonth())}},9729:(e,t,n)=>{var r=n(21),a=n(1884);e.exports=function(e,t){var n=a(e),o=a(t);return 4*(n.getFullYear()-o.getFullYear())+(r(n)-r(o))}},9871:(e,t,n)=>{var r=n(5344);e.exports=function(e,t,n){var a=r(e,n),o=r(t,n),i=a.getTime()-6e4*a.getTimezoneOffset(),s=o.getTime()-6e4*o.getTimezoneOffset();return Math.round((i-s)/6048e5)}},8509:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getFullYear()-a.getFullYear()}},6056:(e,t,n)=>{var r=n(1884),a=n(6656),o=n(3374);e.exports=function(e,t){var n=r(e),i=r(t),s=o(n,i),l=Math.abs(a(n,i));return n.setDate(n.getDate()-s*l),s*(l-(o(n,i)===-s))}},298:(e,t,n)=>{var r=n(8081);e.exports=function(e,t){var n=r(e,t)/36e5;return n>0?Math.floor(n):Math.ceil(n)}},9973:(e,t,n)=>{var r=n(1884),a=n(7051),o=n(3374),i=n(9883);e.exports=function(e,t){var n=r(e),s=r(t),l=o(n,s),c=Math.abs(a(n,s));return n=i(n,l*c),l*(c-(o(n,s)===-l))}},8081:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()-a.getTime()}},604:(e,t,n)=>{var r=n(8081);e.exports=function(e,t){var n=r(e,t)/6e4;return n>0?Math.floor(n):Math.ceil(n)}},1387:(e,t,n)=>{var r=n(1884),a=n(1924),o=n(3374);e.exports=function(e,t){var n=r(e),i=r(t),s=o(n,i),l=Math.abs(a(n,i));return n.setMonth(n.getMonth()-s*l),s*(l-(o(n,i)===-s))}},9403:(e,t,n)=>{var r=n(1387);e.exports=function(e,t){var n=r(e,t)/3;return n>0?Math.floor(n):Math.ceil(n)}},7977:(e,t,n)=>{var r=n(8081);e.exports=function(e,t){var n=r(e,t)/1e3;return n>0?Math.floor(n):Math.ceil(n)}},4496:(e,t,n)=>{var r=n(6056);e.exports=function(e,t){var n=r(e,t)/7;return n>0?Math.floor(n):Math.ceil(n)}},760:(e,t,n)=>{var r=n(1884),a=n(8509),o=n(3374);e.exports=function(e,t){var n=r(e),i=r(t),s=o(n,i),l=Math.abs(a(n,i));return n.setFullYear(n.getFullYear()-s*l),s*(l-(o(n,i)===-s))}},3332:(e,t,n)=>{var r=n(3558),a=n(1884),o=n(7977),i=n(1387),s=n(7479),l=43200;e.exports=function(e,t,n){var c=n||{},d=r(e,t),u=c.locale,p=s.distanceInWords.localize;u&&u.distanceInWords&&u.distanceInWords.localize&&(p=u.distanceInWords.localize);var h,m,g={addSuffix:Boolean(c.addSuffix),comparison:d};d>0?(h=a(e),m=a(t)):(h=a(t),m=a(e));var v,f=o(m,h),b=m.getTimezoneOffset()-h.getTimezoneOffset(),y=Math.round(f/60)-b;if(y<2)return c.includeSeconds?f<5?p("lessThanXSeconds",5,g):f<10?p("lessThanXSeconds",10,g):f<20?p("lessThanXSeconds",20,g):f<40?p("halfAMinute",null,g):p(f<60?"lessThanXMinutes":"xMinutes",1,g):0===y?p("lessThanXMinutes",1,g):p("xMinutes",y,g);if(y<45)return p("xMinutes",y,g);if(y<90)return p("aboutXHours",1,g);if(y<1440)return p("aboutXHours",Math.round(y/60),g);if(y<2520)return p("xDays",1,g);if(y<l)return p("xDays",Math.round(y/1440),g);if(y<86400)return p("aboutXMonths",v=Math.round(y/l),g);if((v=i(m,h))<12)return p("xMonths",Math.round(y/l),g);var w=v%12,S=Math.floor(v/12);return w<3?p("aboutXYears",S,g):w<9?p("overXYears",S,g):p("almostXYears",S+1,g)}},7666:(e,t,n)=>{var r=n(3558),a=n(1884),o=n(7977),i=n(7479),s=525600;e.exports=function(e,t,n){var l=n||{},c=r(e,t),d=l.locale,u=i.distanceInWords.localize;d&&d.distanceInWords&&d.distanceInWords.localize&&(u=d.distanceInWords.localize);var p,h,m,g={addSuffix:Boolean(l.addSuffix),comparison:c};c>0?(p=a(e),h=a(t)):(p=a(t),h=a(e));var v=Math[l.partialMethod?String(l.partialMethod):"floor"],f=o(h,p),b=h.getTimezoneOffset()-p.getTimezoneOffset(),y=v(f/60)-b;if("s"===(m=l.unit?String(l.unit):y<1?"s":y<60?"m":y<1440?"h":y<43200?"d":y<s?"M":"Y"))return u("xSeconds",f,g);if("m"===m)return u("xMinutes",y,g);if("h"===m)return u("xHours",v(y/60),g);if("d"===m)return u("xDays",v(y/1440),g);if("M"===m)return u("xMonths",v(y/43200),g);if("Y"===m)return u("xYears",v(y/s),g);throw new Error("Unknown unit: "+m)}},6272:(e,t,n)=>{var r=n(3332);e.exports=function(e,t){return r(Date.now(),e,t)}},5411:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n){var a=r(e),o=void 0!==n?n:1,i=r(t).getTime();if(a.getTime()>i)throw new Error("The first date cannot be after the second date");var s=[],l=a;for(l.setHours(0,0,0,0);l.getTime()<=i;)s.push(r(l)),l.setDate(l.getDate()+o);return s}},549:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setHours(23,59,59,999),t}},2653:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMinutes(59,59,999),t}},6718:(e,t,n)=>{var r=n(1322);e.exports=function(e){return r(e,{weekStartsOn:1})}},5648:(e,t,n)=>{var r=n(2385),a=n(1971);e.exports=function(e){var t=r(e),n=new Date(0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);var o=a(n);return o.setMilliseconds(o.getMilliseconds()-1),o}},9877:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setSeconds(59,999),t}},9356:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}},5661:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth(),a=n-n%3+3;return t.setMonth(a,0),t.setHours(23,59,59,999),t}},6415:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMilliseconds(999),t}},4404:(e,t,n)=>{var r=n(549);e.exports=function(){return r(new Date)}},7410:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r+1),a.setHours(23,59,59,999),a}},1322:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,a=r(e),o=a.getDay(),i=6+(o<n?-7:0)-(o-n);return a.setDate(a.getDate()+i),a.setHours(23,59,59,999),a}},782:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}},4106:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r-1),a.setHours(23,59,59,999),a}},5616:(e,t,n)=>{var r=n(8612),a=n(6563),o=n(2385),i=n(1884),s=n(623),l=n(7479);var c={M:function(e){return e.getMonth()+1},MM:function(e){return p(e.getMonth()+1,2)},Q:function(e){return Math.ceil((e.getMonth()+1)/3)},D:function(e){return e.getDate()},DD:function(e){return p(e.getDate(),2)},DDD:function(e){return r(e)},DDDD:function(e){return p(r(e),3)},d:function(e){return e.getDay()},E:function(e){return e.getDay()||7},W:function(e){return a(e)},WW:function(e){return p(a(e),2)},YY:function(e){return p(e.getFullYear(),4).substr(2)},YYYY:function(e){return p(e.getFullYear(),4)},GG:function(e){return String(o(e)).substr(2)},GGGG:function(e){return o(e)},H:function(e){return e.getHours()},HH:function(e){return p(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(e){return p(c.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return p(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return p(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return p(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return p(e.getMilliseconds(),3)},Z:function(e){return u(e.getTimezoneOffset(),":")},ZZ:function(e){return u(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()}};function d(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|]$/g,""):e.replace(/\\/g,"")}function u(e,t){t=t||"";var n=e>0?"-":"+",r=Math.abs(e),a=r%60;return n+p(Math.floor(r/60),2)+t+p(a,2)}function p(e,t){for(var n=Math.abs(e).toString();n.length<t;)n="0"+n;return n}e.exports=function(e,t,n){var r=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",a=(n||{}).locale,o=l.format.formatters,u=l.format.formattingTokensRegExp;a&&a.format&&a.format.formatters&&(o=a.format.formatters,a.format.formattingTokensRegExp&&(u=a.format.formattingTokensRegExp));var p=i(e);return s(p)?function(e,t,n){var r,a,o=e.match(n),i=o.length;for(r=0;r<i;r++)a=t[o[r]]||c[o[r]],o[r]=a||d(o[r]);return function(e){for(var t="",n=0;n<i;n++)o[n]instanceof Function?t+=o[n](e,c):t+=o[n];return t}}(r,o,u)(p):"Invalid Date"}},5540:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getDate()}},2476:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getDay()}},8612:(e,t,n)=>{var r=n(1884),a=n(9834),o=n(6656);e.exports=function(e){var t=r(e);return o(t,a(t))+1}},2807:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getFullYear(),a=t.getMonth(),o=new Date(0);return o.setFullYear(n,a+1,0),o.setHours(0,0,0,0),o.getDate()}},4789:(e,t,n)=>{var r=n(1164);e.exports=function(e){return r(e)?366:365}},7921:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getHours()}},6373:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e).getDay();return 0===t&&(t=7),t}},6563:(e,t,n)=>{var r=n(1884),a=n(1971),o=n(3892);e.exports=function(e){var t=r(e),n=a(t).getTime()-o(t).getTime();return Math.round(n/6048e5)+1}},7098:(e,t,n)=>{var r=n(3892),a=n(5932);e.exports=function(e){var t=r(e),n=r(a(t,60)).valueOf()-t.valueOf();return Math.round(n/6048e5)}},2385:(e,t,n)=>{var r=n(1884),a=n(1971);e.exports=function(e){var t=r(e),n=t.getFullYear(),o=new Date(0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);var i=a(o),s=new Date(0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);var l=a(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}},8597:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getMilliseconds()}},3362:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getMinutes()}},3503:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getMonth()}},5541:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n,a){var o=r(e).getTime(),i=r(t).getTime(),s=r(n).getTime(),l=r(a).getTime();if(o>i||s>l)throw new Error("The start of the range cannot be after the end of the range");if(!(o<l&&s<i))return 0;var c=(l>i?i:l)-(s<o?o:s);return Math.ceil(c/864e5)}},21:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return Math.floor(t.getMonth()/3)+1}},8780:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getSeconds()}},2482:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getTime()}},8194:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getFullYear()}},7292:(e,t,n)=>{e.exports={addDays:n(4844),addHours:n(2680),addISOYears:n(7538),addMilliseconds:n(2951),addMinutes:n(1318),addMonths:n(9331),addQuarters:n(1482),addSeconds:n(9723),addWeeks:n(5932),addYears:n(6083),areRangesOverlapping:n(6739),closestIndexTo:n(7886),closestTo:n(3806),compareAsc:n(3374),compareDesc:n(3558),differenceInCalendarDays:n(6656),differenceInCalendarISOWeeks:n(6554),differenceInCalendarISOYears:n(7051),differenceInCalendarMonths:n(1924),differenceInCalendarQuarters:n(9729),differenceInCalendarWeeks:n(9871),differenceInCalendarYears:n(8509),differenceInDays:n(6056),differenceInHours:n(298),differenceInISOYears:n(9973),differenceInMilliseconds:n(8081),differenceInMinutes:n(604),differenceInMonths:n(1387),differenceInQuarters:n(9403),differenceInSeconds:n(7977),differenceInWeeks:n(4496),differenceInYears:n(760),distanceInWords:n(3332),distanceInWordsStrict:n(7666),distanceInWordsToNow:n(6272),eachDay:n(5411),endOfDay:n(549),endOfHour:n(2653),endOfISOWeek:n(6718),endOfISOYear:n(5648),endOfMinute:n(9877),endOfMonth:n(9356),endOfQuarter:n(5661),endOfSecond:n(6415),endOfToday:n(4404),endOfTomorrow:n(7410),endOfWeek:n(1322),endOfYear:n(782),endOfYesterday:n(4106),format:n(5616),getDate:n(5540),getDay:n(2476),getDayOfYear:n(8612),getDaysInMonth:n(2807),getDaysInYear:n(4789),getHours:n(7921),getISODay:n(6373),getISOWeek:n(6563),getISOWeeksInYear:n(7098),getISOYear:n(2385),getMilliseconds:n(8597),getMinutes:n(3362),getMonth:n(3503),getOverlappingDaysInRanges:n(5541),getQuarter:n(21),getSeconds:n(8780),getTime:n(2482),getYear:n(8194),isAfter:n(2849),isBefore:n(7754),isDate:n(4286),isEqual:n(9601),isFirstDayOfMonth:n(1364),isFriday:n(2350),isFuture:n(9593),isLastDayOfMonth:n(4399),isLeapYear:n(1164),isMonday:n(126),isPast:n(798),isSameDay:n(4801),isSameHour:n(3344),isSameISOWeek:n(8029),isSameISOYear:n(7877),isSameMinute:n(4465),isSameMonth:n(248),isSameQuarter:n(5347),isSameSecond:n(1742),isSameWeek:n(4868),isSameYear:n(2130),isSaturday:n(2687),isSunday:n(2978),isThisHour:n(1587),isThisISOWeek:n(657),isThisISOYear:n(6106),isThisMinute:n(7980),isThisMonth:n(2767),isThisQuarter:n(1687),isThisSecond:n(7391),isThisWeek:n(147),isThisYear:n(576),isThursday:n(7999),isToday:n(5886),isTomorrow:n(7962),isTuesday:n(6330),isValid:n(623),isWednesday:n(5999),isWeekend:n(7455),isWithinRange:n(6254),isYesterday:n(9099),lastDayOfISOWeek:n(1944),lastDayOfISOYear:n(9312),lastDayOfMonth:n(4949),lastDayOfQuarter:n(3146),lastDayOfWeek:n(106),lastDayOfYear:n(2674),max:n(1489),min:n(3185),parse:n(1884),setDate:n(6130),setDay:n(1110),setDayOfYear:n(1418),setHours:n(6574),setISODay:n(8212),setISOWeek:n(570),setISOYear:n(1138),setMilliseconds:n(3934),setMinutes:n(4809),setMonth:n(6059),setQuarter:n(4059),setSeconds:n(1670),setYear:n(3821),startOfDay:n(6579),startOfHour:n(555),startOfISOWeek:n(1971),startOfISOYear:n(3892),startOfMinute:n(5580),startOfMonth:n(5130),startOfQuarter:n(9309),startOfSecond:n(9966),startOfToday:n(9978),startOfTomorrow:n(7743),startOfWeek:n(5344),startOfYear:n(9834),startOfYesterday:n(6441),subDays:n(5627),subHours:n(7413),subISOYears:n(9883),subMilliseconds:n(8502),subMinutes:n(3350),subMonths:n(1141),subQuarters:n(6607),subSeconds:n(9256),subWeeks:n(9862),subYears:n(8524)}},2849:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()>a.getTime()}},7754:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()<a.getTime()}},4286:e=>{e.exports=function(e){return e instanceof Date}},9601:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},1364:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 1===r(e).getDate()}},2350:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 5===r(e).getDay()}},9593:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getTime()>(new Date).getTime()}},4399:(e,t,n)=>{var r=n(1884),a=n(549),o=n(9356);e.exports=function(e){var t=r(e);return a(t).getTime()===o(t).getTime()}},1164:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e).getFullYear();return t%400==0||t%4==0&&t%100!=0}},126:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 1===r(e).getDay()}},798:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getTime()<(new Date).getTime()}},4801:(e,t,n)=>{var r=n(6579);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},3344:(e,t,n)=>{var r=n(555);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},8029:(e,t,n)=>{var r=n(4868);e.exports=function(e,t){return r(e,t,{weekStartsOn:1})}},7877:(e,t,n)=>{var r=n(3892);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},4465:(e,t,n)=>{var r=n(5580);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},248:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}},5347:(e,t,n)=>{var r=n(9309);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},1742:(e,t,n)=>{var r=n(9966);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},4868:(e,t,n)=>{var r=n(5344);e.exports=function(e,t,n){var a=r(e,n),o=r(t,n);return a.getTime()===o.getTime()}},2130:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getFullYear()===a.getFullYear()}},2687:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 6===r(e).getDay()}},2978:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 0===r(e).getDay()}},1587:(e,t,n)=>{var r=n(3344);e.exports=function(e){return r(new Date,e)}},657:(e,t,n)=>{var r=n(8029);e.exports=function(e){return r(new Date,e)}},6106:(e,t,n)=>{var r=n(7877);e.exports=function(e){return r(new Date,e)}},7980:(e,t,n)=>{var r=n(4465);e.exports=function(e){return r(new Date,e)}},2767:(e,t,n)=>{var r=n(248);e.exports=function(e){return r(new Date,e)}},1687:(e,t,n)=>{var r=n(5347);e.exports=function(e){return r(new Date,e)}},7391:(e,t,n)=>{var r=n(1742);e.exports=function(e){return r(new Date,e)}},147:(e,t,n)=>{var r=n(4868);e.exports=function(e,t){return r(new Date,e,t)}},576:(e,t,n)=>{var r=n(2130);e.exports=function(e){return r(new Date,e)}},7999:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 4===r(e).getDay()}},5886:(e,t,n)=>{var r=n(6579);e.exports=function(e){return r(e).getTime()===r(new Date).getTime()}},7962:(e,t,n)=>{var r=n(6579);e.exports=function(e){var t=new Date;return t.setDate(t.getDate()+1),r(e).getTime()===r(t).getTime()}},6330:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 2===r(e).getDay()}},623:(e,t,n)=>{var r=n(4286);e.exports=function(e){if(r(e))return!isNaN(e);throw new TypeError(toString.call(e)+" is not an instance of Date")}},5999:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 3===r(e).getDay()}},7455:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e).getDay();return 0===t||6===t}},6254:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n){var a=r(e).getTime(),o=r(t).getTime(),i=r(n).getTime();if(o>i)throw new Error("The start of the range cannot be after the end of the range");return a>=o&&a<=i}},9099:(e,t,n)=>{var r=n(6579);e.exports=function(e){var t=new Date;return t.setDate(t.getDate()-1),r(e).getTime()===r(t).getTime()}},1944:(e,t,n)=>{var r=n(106);e.exports=function(e){return r(e,{weekStartsOn:1})}},9312:(e,t,n)=>{var r=n(2385),a=n(1971);e.exports=function(e){var t=r(e),n=new Date(0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);var o=a(n);return o.setDate(o.getDate()-1),o}},4949:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}},3146:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth(),a=n-n%3+3;return t.setMonth(a,0),t.setHours(0,0,0,0),t}},106:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,a=r(e),o=a.getDay(),i=6+(o<n?-7:0)-(o-n);return a.setHours(0,0,0,0),a.setDate(a.getDate()+i),a}},2674:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(0,0,0,0),t}},8854:e=>{var t=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];e.exports=function(e){var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push(r);var a=t.concat(n).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+a.join("|")+"|.)","g")}},2894:e=>{e.exports=function(){var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};return{localize:function(t,n,r){var a;return r=r||{},a="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),r.addSuffix?r.comparison>0?"in "+a:a+" ago":a}}}},664:(e,t,n)=>{var r=n(8854);e.exports=function(){var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Su","Mo","Tu","We","Th","Fr","Sa"],a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=["AM","PM"],s=["am","pm"],l=["a.m.","p.m."],c={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return a[e.getDay()]},dddd:function(e){return o[e.getDay()]},A:function(e){return e.getHours()/12>=1?i[1]:i[0]},a:function(e){return e.getHours()/12>=1?s[1]:s[0]},aa:function(e){return e.getHours()/12>=1?l[1]:l[0]}};return["M","D","DDD","d","Q","W"].forEach((function(e){c[e+"o"]=function(t,n){return function(e){var t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"}(n[e](t))}})),{formatters:c,formattingTokensRegExp:r(c)}}},7479:(e,t,n)=>{var r=n(2894),a=n(664);e.exports={distanceInWords:r(),format:a()}},1489:(e,t,n)=>{var r=n(1884);e.exports=function(){var e=Array.prototype.slice.call(arguments).map((function(e){return r(e)})),t=Math.max.apply(null,e);return new Date(t)}},3185:(e,t,n)=>{var r=n(1884);e.exports=function(){var e=Array.prototype.slice.call(arguments).map((function(e){return r(e)})),t=Math.min.apply(null,e);return new Date(t)}},1884:(e,t,n)=>{var r=n(3561),a=n(4286),o=36e5,i=6e4,s=/[T ]/,l=/:/,c=/^(\d{2})$/,d=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],u=/^(\d{4})/,p=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],h=/^-(\d{2})$/,m=/^-?(\d{3})$/,g=/^-?(\d{2})-?(\d{2})$/,v=/^-?W(\d{2})$/,f=/^-?W(\d{2})-?(\d{1})$/,b=/^(\d{2}([.,]\d*)?)$/,y=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,w=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,S=/([Z+-].*)$/,C=/^(Z)$/,k=/^([+-])(\d{2})$/,x=/^([+-])(\d{2}):?(\d{2})$/;function I(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var a=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+a),r}e.exports=function(e,t){if(a(e))return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var n=(t||{}).additionalDigits;n=null==n?2:Number(n);var O=function(e){var t,n={},r=e.split(s);l.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1]);if(t){var a=S.exec(t);a?(n.time=t.replace(a[1],""),n.timezone=a[1]):n.time=t}return n}(e),M=function(e,t){var n,r=d[t],a=p[t];if(n=u.exec(e)||a.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=c.exec(e)||r.exec(e)){var i=n[1];return{year:100*parseInt(i,10),restDateString:e.slice(i.length)}}return{year:null}}(O.date,n),T=M.year,F=function(e,t){if(null===t)return null;var n,r,a;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=h.exec(e))return r=new Date(0),a=parseInt(n[1],10)-1,r.setUTCFullYear(t,a),r;if(n=m.exec(e)){r=new Date(0);var o=parseInt(n[1],10);return r.setUTCFullYear(t,0,o),r}if(n=g.exec(e)){r=new Date(0),a=parseInt(n[1],10)-1;var i=parseInt(n[2],10);return r.setUTCFullYear(t,a,i),r}if(n=v.exec(e))return I(t,parseInt(n[1],10)-1);if(n=f.exec(e)){return I(t,parseInt(n[1],10)-1,parseInt(n[2],10)-1)}return null}(M.restDateString,T);if(F){var j,_=F.getTime(),L=0;if(O.time&&(L=function(e){var t,n,r;if(t=b.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*o;if(t=y.exec(e))return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),n%24*o+r*i;if(t=w.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var a=parseFloat(t[3].replace(",","."));return n%24*o+r*i+1e3*a}return null}(O.time)),O.timezone)j=function(e){var t,n;if(t=C.exec(e))return 0;if(t=k.exec(e))return n=60*parseInt(t[2],10),"+"===t[1]?-n:n;if(t=x.exec(e))return n=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-n:n;return 0}(O.timezone)*i;else{var D=_+L,A=new Date(D);j=r(A);var E=new Date(D);E.setDate(A.getDate()+1);var H=r(E)-r(A);H>0&&(j+=H)}return new Date(_+L+j)}return new Date(e)}},6130:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setDate(a),n}},1110:(e,t,n)=>{var r=n(1884),a=n(4844);e.exports=function(e,t,n){var o=n&&Number(n.weekStartsOn)||0,i=r(e),s=Number(t),l=i.getDay();return a(i,((s%7+7)%7<o?7:0)+s-l)}},1418:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setMonth(0),n.setDate(a),n}},6574:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setHours(a),n}},8212:(e,t,n)=>{var r=n(1884),a=n(4844),o=n(6373);e.exports=function(e,t){var n=r(e),i=Number(t),s=o(n);return a(n,i-s)}},570:(e,t,n)=>{var r=n(1884),a=n(6563);e.exports=function(e,t){var n=r(e),o=Number(t),i=a(n)-o;return n.setDate(n.getDate()-7*i),n}},1138:(e,t,n)=>{var r=n(1884),a=n(3892),o=n(6656);e.exports=function(e,t){var n=r(e),i=Number(t),s=o(n,a(n)),l=new Date(0);return l.setFullYear(i,0,4),l.setHours(0,0,0,0),(n=a(l)).setDate(n.getDate()+s),n}},3934:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setMilliseconds(a),n}},4809:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setMinutes(a),n}},6059:(e,t,n)=>{var r=n(1884),a=n(2807);e.exports=function(e,t){var n=r(e),o=Number(t),i=n.getFullYear(),s=n.getDate(),l=new Date(0);l.setFullYear(i,o,15),l.setHours(0,0,0,0);var c=a(l);return n.setMonth(o,Math.min(s,c)),n}},4059:(e,t,n)=>{var r=n(1884),a=n(6059);e.exports=function(e,t){var n=r(e),o=Number(t)-(Math.floor(n.getMonth()/3)+1);return a(n,n.getMonth()+3*o)}},1670:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setSeconds(a),n}},3821:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setFullYear(a),n}},6579:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setHours(0,0,0,0),t}},555:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMinutes(0,0,0),t}},1971:(e,t,n)=>{var r=n(5344);e.exports=function(e){return r(e,{weekStartsOn:1})}},3892:(e,t,n)=>{var r=n(2385),a=n(1971);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),a(n)}},5580:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setSeconds(0,0),t}},5130:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setDate(1),t.setHours(0,0,0,0),t}},9309:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth(),a=n-n%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}},9966:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMilliseconds(0),t}},9978:(e,t,n)=>{var r=n(6579);e.exports=function(){return r(new Date)}},7743:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r+1),a.setHours(0,0,0,0),a}},5344:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,a=r(e),o=a.getDay(),i=(o<n?7:0)+o-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}},9834:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}},6441:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r-1),a.setHours(0,0,0,0),a}},5627:(e,t,n)=>{var r=n(4844);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},7413:(e,t,n)=>{var r=n(2680);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},9883:(e,t,n)=>{var r=n(7538);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},8502:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},3350:(e,t,n)=>{var r=n(1318);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},1141:(e,t,n)=>{var r=n(9331);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},6607:(e,t,n)=>{var r=n(1482);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},9256:(e,t,n)=>{var r=n(9723);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},9862:(e,t,n)=>{var r=n(5932);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},8524:(e,t,n)=>{var r=n(6083);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},5202:function(){!function(){"use strict";function e(e){var t=!0,n=!1,r=null,a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function o(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function i(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!a[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function l(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}function c(n){n.metaKey||n.altKey||n.ctrlKey||(o(e.activeElement)&&s(e.activeElement),t=!0)}function d(e){t=!1}function u(e){o(e.target)&&(t||i(e.target))&&s(e.target)}function p(e){o(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(r),r=window.setTimeout((function(){n=!1}),100),l(e.target))}function h(e){"hidden"===document.visibilityState&&(n&&(t=!0),m())}function m(){document.addEventListener("mousemove",v),document.addEventListener("mousedown",v),document.addEventListener("mouseup",v),document.addEventListener("pointermove",v),document.addEventListener("pointerdown",v),document.addEventListener("pointerup",v),document.addEventListener("touchmove",v),document.addEventListener("touchstart",v),document.addEventListener("touchend",v)}function g(){document.removeEventListener("mousemove",v),document.removeEventListener("mousedown",v),document.removeEventListener("mouseup",v),document.removeEventListener("pointermove",v),document.removeEventListener("pointerdown",v),document.removeEventListener("pointerup",v),document.removeEventListener("touchmove",v),document.removeEventListener("touchstart",v),document.removeEventListener("touchend",v)}function v(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,g())}document.addEventListener("keydown",c,!0),document.addEventListener("mousedown",d,!0),document.addEventListener("pointerdown",d,!0),document.addEventListener("touchstart",d,!0),document.addEventListener("visibilitychange",h,!0),m(),e.addEventListener("focus",u,!0),e.addEventListener("blur",p,!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}()},6400:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Component:()=>w,Fragment:()=>y,_unmount:()=>A,cloneElement:()=>R,createContext:()=>V,createElement:()=>v,createRef:()=>b,h:()=>v,hydrate:()=>P,isValidElement:()=>a,options:()=>r,render:()=>H,toChildArray:()=>O});var r,a,o,i,s,l,c,d,u={},p=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function m(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var r,a=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(a[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return f(e,o,t&&t.key,t&&t.ref,null)}function f(e,t,n,a,o){var i={type:e,props:t,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o};return null==o&&(i.__v=i),r.vnode&&r.vnode(i),i}function b(){return{}}function y(e){return e.children}function w(e,t){this.props=e,this.context=t}function S(e,t){if(null==t)return e.__?S(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?S(e):null}function C(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return C(e)}}function k(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!i++||l!==r.debounceRendering)&&((l=r.debounceRendering)||s)(x)}function x(){for(var e;i=o.length;)e=o.sort((function(e,t){return e.__v.__b-t.__v.__b})),o=[],e.some((function(e){var t,n,r,a,o,i,s;e.__d&&(i=(o=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=m({},o)).__v=r,a=j(s,o,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==i?S(o):i),_(n,o),a!=i&&C(o)))}))}function I(e,t,n,r,a,o,i,s,l){var c,d,h,m,v,f,b,y=n&&n.__k||p,w=y.length;if(s==u&&(s=null!=o?o[0]:w?S(n,0):null),c=0,t.__k=O(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(h=y[c])||h&&n.key==h.key&&n.type===h.type)y[c]=void 0;else for(d=0;d<w;d++){if((h=y[d])&&n.key==h.key&&n.type===h.type){y[d]=void 0;break}h=null}if(m=j(e,n,h=h||u,r,a,o,i,s,l),(d=n.ref)&&h.ref!=d&&(b||(b=[]),h.ref&&b.push(h.ref,null,n),b.push(d,n.__c||m,n)),null!=m){var p;if(null==f&&(f=m),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(o==h||m!=s||null==m.parentNode){e:if(null==s||s.parentNode!==e)e.appendChild(m),p=null;else{for(v=s,d=0;(v=v.nextSibling)&&d<w;d+=2)if(v==m)break e;e.insertBefore(m,s),p=s}"option"==t.type&&(e.value="")}s=void 0!==p?p:m.nextSibling,"function"==typeof t.type&&(t.__d=s)}else s&&h.__e==s&&s.parentNode!=e&&(s=S(h))}return c++,n})),t.__e=f,null!=o&&"function"!=typeof t.type)for(c=o.length;c--;)null!=o[c]&&g(o[c]);for(c=w;c--;)null!=y[c]&&A(y[c],y[c]);if(b)for(c=0;c<b.length;c++)D(b[c],b[++c],b[++c])}function O(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)O(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?f(null,e,null,null,e):null!=e.__e||null!=e.__c?f(e.type,e.props,e.key,null,e.__v):e):e);return n}function M(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===h.test(t)?n+"px":null==n?"":n}function T(e,t,n,r,a){var o,i,s,l,c;if(a?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(l in r)n&&l in n||M(o,l,"");if(n)for(c in n)r&&n[c]===r[c]||M(o,c,n[c])}else"o"===t[0]&&"n"===t[1]?(i=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,F,i),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,F,i)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!a&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function F(e){this.l[e.type](r.event?r.event(e):e)}function j(e,t,n,a,o,i,s,l,c){var d,u,p,h,g,v,f,b,S,C,k=t.type;if(void 0!==t.constructor)return null;(d=r.__b)&&d(t);try{e:if("function"==typeof k){if(b=t.props,S=(d=k.contextType)&&a[d.__c],C=d?S?S.props.value:d.__:a,n.__c?f=(u=t.__c=n.__c).__=u.__E:("prototype"in k&&k.prototype.render?t.__c=u=new k(b,C):(t.__c=u=new w(b,C),u.constructor=k,u.render=E),S&&S.sub(u),u.props=b,u.state||(u.state={}),u.context=C,u.__n=a,p=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=k.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=m({},u.__s)),m(u.__s,k.getDerivedStateFromProps(b,u.__s))),h=u.props,g=u.state,p)null==k.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==k.getDerivedStateFromProps&&b!==h&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(b,C),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(b,u.__s,C)||t.__v===n.__v&&!u.__){for(u.props=b,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,u.__h.length&&s.push(u),d=0;d<t.__k.length;d++)t.__k[d]&&(t.__k[d].__=t);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(b,u.__s,C),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(h,g,v)}))}u.context=C,u.props=b,u.state=u.__s,(d=r.__r)&&d(t),u.__d=!1,u.__v=t,u.__P=e,d=u.render(u.props,u.state,u.context),t.__k=null!=d&&d.type==y&&null==d.key?d.props.children:Array.isArray(d)?d:[d],null!=u.getChildContext&&(a=m(m({},a),u.getChildContext())),p||null==u.getSnapshotBeforeUpdate||(v=u.getSnapshotBeforeUpdate(h,g)),I(e,t,n,a,o,i,s,l,c),u.base=t.__e,u.__h.length&&s.push(u),f&&(u.__E=u.__=null),u.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,a,o,i,s,c);(d=r.diffed)&&d(t)}catch(e){t.__v=null,r.__e(e,t,n)}return t.__e}function _(e,t){r.__c&&r.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){r.__e(e,t.__v)}}))}function L(e,t,n,r,a,o,i,s){var l,c,d,h,m,g=n.props,v=t.props;if(a="svg"===t.type||a,null!=o)for(l=0;l<o.length;l++)if(null!=(c=o[l])&&((null===t.type?3===c.nodeType:c.localName===t.type)||e==c)){e=c,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(v);e=a?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,v.is&&{is:v.is}),o=null,s=!1}if(null===t.type)g!==v&&e.data!=v&&(e.data=v);else{if(null!=o&&(o=p.slice.call(e.childNodes)),d=(g=n.props||u).dangerouslySetInnerHTML,h=v.dangerouslySetInnerHTML,!s){if(g===u)for(g={},m=0;m<e.attributes.length;m++)g[e.attributes[m].name]=e.attributes[m].value;(h||d)&&(h&&d&&h.__html==d.__html||(e.innerHTML=h&&h.__html||""))}(function(e,t,n,r,a){var o;for(o in n)"children"===o||"key"===o||o in t||T(e,o,null,n[o],r);for(o in t)a&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||T(e,o,t[o],n[o],r)})(e,v,g,a,s),h?t.__k=[]:(t.__k=t.props.children,I(e,t,n,r,"foreignObject"!==t.type&&a,o,i,u,s)),s||("value"in v&&void 0!==(l=v.value)&&l!==e.value&&T(e,"value",l,g.value,!1),"checked"in v&&void 0!==(l=v.checked)&&l!==e.checked&&T(e,"checked",l,g.checked,!1))}return e}function D(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){r.__e(e,n)}}function A(e,t,n){var a,o,i;if(r.unmount&&r.unmount(e),(a=e.ref)&&(a.current&&a.current!==e.__e||D(a,null,t)),n||"function"==typeof e.type||(n=null!=(o=e.__e)),e.__e=e.__d=void 0,null!=(a=e.__c)){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(e){r.__e(e,t)}a.base=a.__P=null}if(a=e.__k)for(i=0;i<a.length;i++)a[i]&&A(a[i],t,n);null!=o&&g(o)}function E(e,t,n){return this.constructor(e,n)}function H(e,t,n){var a,o,i;r.__&&r.__(e,t),o=(a=n===c)?null:n&&n.__k||t.__k,e=v(y,null,[e]),i=[],j(t,(a?t:n||t).__k=e,o||u,u,void 0!==t.ownerSVGElement,n&&!a?[n]:o?null:p.slice.call(t.childNodes),i,n||u,a),_(i,e)}function P(e,t){H(e,t,c)}function R(e,t){var n,r;for(r in t=m(m({},e.props),t),arguments.length>2&&(t.children=p.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return f(e.type,n,t.key||e.key,t.ref||e.ref,null)}function V(e){var t={},n={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,a=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=a,t},this.shouldComponentUpdate=function(e){a.props.value!==e.value&&r.some((function(t){t.context=e.value,k(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}r={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return k(n.__E=n)}catch(t){e=t}throw e}},a=function(e){return null!=e&&void 0===e.constructor},w.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),k(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},w.prototype.render=y,o=[],i=0,s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=u,d=0},4798:e=>{"use strict";var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.apply(this,arguments)};e.exports=function(e,n){void 0===e&&(e={}),void 0===n&&(n=null);var r=e||{},a=[];function o(){a.forEach((function(e){return e(r)}))}return{middleware:n,setState:function(e){r=t({},r,"function"==typeof e?e(r):e),o()},subscribe:function(e){return a.push(e),function(){a.splice(a.indexOf(e),1)}},getState:function(){return r},reset:function(){r=e,o()}}}},1042:(e,t)=>{"use strict";function n(e,t){if(null!=t){if(t.then)return t.then(e.setState);e.setState(t)}}t.m=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reverse(),function(t,r,a){if(e.length<1)return n(t,r.apply(void 0,[t.getState()].concat(a)));var o=e.map((function(e){return e(t)})).reduce((function(e,t){return t(e,a)}),function(e,t){return function(r){return n(e,r.apply(void 0,[e.getState()].concat(t)))}}(t,a));return o(r)}}},5576:(e,t,n)=>{"use strict";var r=n(6400),a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},a(e,t)};function o(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},i.apply(this,arguments)};function s(e,t){for(var n in e)if(e[n]!==t[n])return!1;for(var n in t)if(!(n in e))return!1;return!0}function l(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return"function"==typeof t.middleware?t.middleware(t,e,n):function(e,t){if(null!=t){if(t.then)return t.then(e.setState);e.setState(t)}}(t,e.apply(void 0,[t.getState()].concat(n)))}}var c=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.update=function(){var e=r.getProps(r.props,r.context);s(e,r.state)||r.setState(e)},r.state=r.getProps(t,n),r.actions=r.getActions(),r}return o(t,e),t.prototype.componentWillMount=function(){this.unsubscribe=this.context.store.subscribe(this.update)},t.prototype.componentWillUnmount=function(){this.unsubscribe(this.update)},t.prototype.componentWillReceiveProps=function(e,t){var n=this.getProps(e,t);s(n,this.state)||this.setState(n)},t.prototype.getProps=function(e,t){var n=e.mapToProps,r=t.store&&t.store.getState()||{};return n?n(r,e):r},t.prototype.getActions=function(){return function(e,t,n){e="function"==typeof e?e(t,n):e;var r={};for(var a in e){var o=e[a];r[a]=l(o,t)}return r}(this.props.actions,this.context.store,this.props)},t.prototype.render=function(e,t,n){var r=e.children,a=n.store;return(r&&r[0]||r)(i({store:a},t,this.actions))},t}(r.Component),d=c;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getChildContext=function(){return{store:this.props.store}},t.prototype.render=function(){return this.props.children&&this.props.children[0]||this.props.children},t}(r.Component);t.zt=u,t.lj=c},7867:(e,t)=>{"use strict";function n(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return"function"==typeof t.middleware?t.middleware(t,e,n):function(e,t){if(null!=t){if(t.then)return t.then(e.setState);e.setState(t)}}(t,e.apply(void 0,[t.getState()].concat(n)))}}var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},r.apply(this,arguments)};t.kv=function(e,t,r){e="function"==typeof e?e(t,r):e;var a={};for(var o in e){var i=e[o];a[o]=n(i,t)}return a},t.Y2=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.reduce((function(e,n){return r({},e,"function"==typeof n?n.apply(void 0,t):n)}),{})}}},5877:(e,t,n)=>{var r=n(3570),a=n(1171),o=a;o.v1=r,o.v4=a,e.exports=o},5327:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,a=t;return[a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]]].join("")}},5217:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},3570:(e,t,n)=>{var r,a,o=n(5217),i=n(5327),s=0,l=0;e.exports=function(e,t,n){var c=t&&n||0,d=t||[],u=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:a;if(null==u||null==p){var h=o();null==u&&(u=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=a=16383&(h[6]<<8|h[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:l+1,v=m-s+(g-l)/1e4;if(v<0&&void 0===e.clockseq&&(p=p+1&16383),(v<0||m>s)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=m,l=g,a=p;var f=(1e4*(268435455&(m+=122192928e5))+g)%4294967296;d[c++]=f>>>24&255,d[c++]=f>>>16&255,d[c++]=f>>>8&255,d[c++]=255&f;var b=m/4294967296*1e4&268435455;d[c++]=b>>>8&255,d[c++]=255&b,d[c++]=b>>>24&15|16,d[c++]=b>>>16&255,d[c++]=p>>>8|128,d[c++]=255&p;for(var y=0;y<6;++y)d[c+y]=u[y];return t||i(d)}},1171:(e,t,n)=>{var r=n(5217),a=n(5327);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||r)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var s=0;s<16;++s)t[o+s]=i[s];return t||a(i)}},1295:e=>{"use strict";let t=0;e.exports={incr:()=>++t,decr:()=>--t,curr:()=>t}},6756:e=>{"use strict";e.exports=(e,t,n="")=>{const r=/url\(['"]?#([\w:.-]+)['"]?\)/g,a=/#([\w:.-]+)/g;return t.match(r)&&(t=t.replace(r,(function(t,n){return e[n]?`url(#${e[n]})`:t}))),["href","xlink:href"].includes(n)&&t.match(a)&&(t=t.replace(a,(function(t,n){return e[n]?`#${e[n]}`:t}))),t}},3054:e=>{"use strict";e.exports=(e,t,n)=>{const r=new RegExp("([^\r\n,{}]+)(,(?=[^}]*{)|s*{)","g");return e=e.replace(r,(function(e,r,a){if(r.match(/^\s*(@media|@.*keyframes|to|from|@font-face|1?[0-9]?[0-9])/))return r+a;const o=r.match(/#(\w+)/);return o&&n[o[1]]&&(r=r.replace(o[0],`#${n[o[1]]}`)),(r=r.replace(/^(\s*)/,"$1"+t+" "))+a}))}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{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.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.d(r,{default:()=>Td});n(1181);var e,t,a,o=n(6400),i=(n(5202),0),s=[],l=o.options.__r,c=o.options.diffed,d=o.options.__c,u=o.options.unmount;function p(e,n){o.options.__h&&o.options.__h(t,e,i||n),i=0;var r=t.__H||(t.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function h(e){return i=1,m(I,e)}function m(n,r,a){var o=p(e++,2);return o.__c||(o.__c=t,o.__=[a?a(r):I(void 0,r),function(e){var t=n(o.__[0],e);o.__[0]!==t&&(o.__[0]=t,o.__c.setState({}))}]),o.__}function g(n,r){var a=p(e++,3);!o.options.__s&&x(a.__H,r)&&(a.__=n,a.__H=r,t.__H.__h.push(a))}function v(n,r){var a=p(e++,4);!o.options.__s&&x(a.__H,r)&&(a.__=n,a.__H=r,t.__h.push(a))}function f(e){return i=5,y((function(){return{current:e}}),[])}function b(e,t,n){i=6,v((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function y(t,n){var r=p(e++,7);return x(r.__H,n)?(r.__H=n,r.__h=t,r.__=t()):r.__}function w(n){var r=t.context[n.__c],a=p(e++,9);return a.__c=n,r?(null==a.__&&(a.__=!0,r.sub(t)),r.props.value):n.__}function S(){s.some((function(e){if(e.__P)try{e.__H.__h.forEach(C),e.__H.__h.forEach(k),e.__H.__h=[]}catch(t){return e.__H.__h=[],o.options.__e(t,e.__v),!0}})),s=[]}function C(e){e.t&&e.t()}function k(e){var t=e.__();"function"==typeof t&&(e.t=t)}function x(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function I(e,t){return"function"==typeof t?t(e):t}function O(e,t){for(var n in t)e[n]=t[n];return e}function M(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}o.options.__r=function(n){l&&l(n),e=0,(t=n.__c).__H&&(t.__H.__h.forEach(C),t.__H.__h.forEach(k),t.__H.__h=[])},o.options.diffed=function(e){c&&c(e);var t=e.__c;if(t){var n=t.__H;n&&n.__h.length&&(1!==s.push(t)&&a===o.options.requestAnimationFrame||((a=o.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(S))}},o.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(C),e.__h=e.__h.filter((function(e){return!e.__||k(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],o.options.__e(n,e.__v)}})),d&&d(e,t)},o.options.unmount=function(e){u&&u(e);var t=e.__c;if(t){var n=t.__H;if(n)try{n.__.forEach((function(e){return e.t&&e.t()}))}catch(e){o.options.__e(e,t.__v)}}};var T=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return M(this.props,e)||M(this.state,t)},r}(o.Component);function F(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:M(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,o.createElement)(e,O({},t))}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(e.displayName||e.name)+")",r.t=!0,r}var j=o.options.__b;o.options.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),j&&j(e)};var _=function(e,t){return e?(0,o.toChildArray)(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},L={map:_,forEach:_,count:function(e){return e?(0,o.toChildArray)(e).length:0},only:function(e){if(1!==(e=(0,o.toChildArray)(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:o.toChildArray},D=o.options.__e;function A(e){return e&&((e=O({},e)).__c=null,e.__k=e.__k&&e.__k.map(A)),e}function E(){this.__u=0,this.o=null,this.__b=null}function H(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function P(){this.i=null,this.l=null}o.options.__e=function(e,t,n){if(e.then)for(var r,a=t;a=a.__;)if((r=a.__c)&&r.__c)return r.__c(e,t.__c);D(e,t,n)},(E.prototype=new o.Component).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=H(n.__v),a=!1,o=function(){a||(a=!0,r?r(i):i())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){o(),t.__c&&t.__c()};var i=function(){var e;if(! --n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(o,o)},E.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=A(this.__b),this.__b=null),[(0,o.createElement)(o.Component,null,t.u?null:e.children),t.u&&e.fallback]};var R=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(P.prototype=new o.Component).u=function(e){var t=this,n=H(t.__v),r=t.l.get(e);return r[0]++,function(a){var o=function(){t.props.revealOrder?(r.push(a),R(t,e,r)):a()};n?n(o):o()}},P.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,o.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},P.prototype.componentDidUpdate=P.prototype.componentDidMount=function(){var e=this;e.l.forEach((function(t,n){R(e,n,t)}))};var V=function(){function e(){}var t=e.prototype;return t.getChildContext=function(){return this.props.context},t.render=function(e){return e.children},e}();function $(e){var t=this,n=e.container,r=(0,o.createElement)(V,{context:t.context},e.vnode);return t.s&&t.s!==n&&(t.v.parentNode&&t.s.removeChild(t.v),(0,o._unmount)(t.h),t.p=!1),e.vnode?t.p?(n.__k=t.__k,(0,o.render)(r,n),t.__k=n.__k):(t.v=document.createTextNode(""),(0,o.hydrate)("",n),n.appendChild(t.v),t.p=!0,t.s=n,(0,o.render)(r,n,t.v),t.__k=t.v.__k):t.p&&(t.v.parentNode&&t.s.removeChild(t.v),(0,o._unmount)(t.h)),t.h=r,t.componentWillUnmount=function(){t.v.parentNode&&t.s.removeChild(t.v),(0,o._unmount)(t.h)},null}var z=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;o.Component.prototype.isReactComponent={};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function B(e,t,n){if(null==t.__k)for(;t.firstChild;)t.removeChild(t.firstChild);return(0,o.render)(e,t),"function"==typeof n&&n(),e?e.__c:null}var U=o.options.event;function W(e,t){e["UNSAFE_"+t]&&!e[t]&&Object.defineProperty(e,t,{configurable:!1,get:function(){return this["UNSAFE_"+t]},set:function(e){this["UNSAFE_"+t]=e}})}o.options.event=function(e){U&&(e=U(e)),e.persist=function(){};var t=!1,n=!1,r=e.stopPropagation;e.stopPropagation=function(){r.call(e),t=!0};var a=e.preventDefault;return e.preventDefault=function(){a.call(e),n=!0},e.isPropagationStopped=function(){return t},e.isDefaultPrevented=function(){return n},e.nativeEvent=e};var q={configurable:!0,get:function(){return this.class}},Y=o.options.vnode;o.options.vnode=function(e){e.$$typeof=N;var t=e.type,n=e.props;if(t){if(n.class!=n.className&&(q.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",q)),"function"!=typeof t){var r,a,i;for(i in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===t&&((0,o.toChildArray)(n.children).forEach((function(e){-1!=n.value.indexOf(e.props.value)&&(e.props.selected=!0)})),delete n.value),n)if(r=z.test(i))break;if(r)for(i in a=e.props={},n)a[z.test(i)?i.replace(/[A-Z0-9]/,"-$&").toLowerCase():i]=n[i]}!function(t){var n=e.type,r=e.props;if(r&&"string"==typeof n){var a={};for(var o in r)/^on(Ani|Tra|Tou)/.test(o)&&(r[o.toLowerCase()]=r[o],delete r[o]),a[o.toLowerCase()]=o;if(a.ondoubleclick&&(r.ondblclick=r[a.ondoubleclick],delete r[a.ondoubleclick]),a.onbeforeinput&&(r.onbeforeinput=r[a.onbeforeinput],delete r[a.onbeforeinput]),a.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(r.type))){var i=a.oninput||"oninput";r[i]||(r[i]=r[a.onchange],delete r[a.onchange])}}}(),"function"==typeof t&&!t.m&&t.prototype&&(W(t.prototype,"componentWillMount"),W(t.prototype,"componentWillReceiveProps"),W(t.prototype,"componentWillUpdate"),t.m=!0)}Y&&Y(e)};function Z(e){return!!e&&e.$$typeof===N}const K={useState:h,useReducer:m,useEffect:g,useLayoutEffect:v,useRef:f,useImperativeHandle:b,useMemo:y,useCallback:function(e,t){return i=8,y((function(){return e}),t)},useContext:w,useDebugValue:function(e,t){o.options.useDebugValue&&o.options.useDebugValue(t?t(e):e)},version:"16.8.0",Children:L,render:B,hydrate:B,unmountComponentAtNode:function(e){return!!e.__k&&((0,o.render)(null,e),!0)},createPortal:function(e,t){return(0,o.createElement)($,{vnode:e,container:t})},createElement:o.createElement,createContext:o.createContext,createFactory:function(e){return o.createElement.bind(null,e)},cloneElement:function(e){return Z(e)?o.cloneElement.apply(null,arguments):e},createRef:o.createRef,Fragment:o.Fragment,isValidElement:Z,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:o.Component,PureComponent:T,memo:F,forwardRef:function(e){function t(t){var n=O({},t);return delete n.ref,e(n,t.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},unstable_batchedUpdates:function(e,t){return e(t)},Suspense:E,SuspenseList:P,lazy:function(e){var t,n,r;function a(a){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,o.createElement)(n,a)}return a.displayName="Lazy",a.t=!0,a}};var G=n(7867),X=n(5877);const Q=()=>({updateTotalCardCount:(e,t,n)=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{lastModified:null!=n?n:e.cardFeed.lastModified,metadata:Object.assign(Object.assign({},e.cardFeed.metadata),{totalCards:t})})}),setStreamFilter:(e,t)=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{streamFilter:t})}),finishExternalAction(e,t){var n;return Object.assign(Object.assign({},e),{externalAction:(null===(n=e.externalAction)||void 0===n?void 0:n.actionId)===t?void 0:e.externalAction})}});var J=n(7292),ee=n(4798),te=n.n(ee),ne=n(1042);const re={application:{open:!1,windowOrigin:null,streamContainerId:"",containerInstanceId:"",isPreview:!1,cardListRefreshInterval:15e3,runtimeVariableResolutionTimeout:5e3,embedMode:"launcher",customStrings:{},firstLoadStyles:{backgroundColor:"#FFFFFF",textColor:"rgba(0,0,0,0.5)",loadingSpinnerColor:"#000000",buttonTextColor:"#000000"},enabledUiElements:{cardListToast:!0,customToastContainer:!1,cardListHeader:!0},interfaceStyle:"automatic"},cardFeed:{lastModified:"",cardInstances:[],runtimeVariables:{},runtimeVariableAnalyticsEnabled:!1,tutorialSeen:!0,status:{loaded:!1}},navigationStack:{items:[]},cardResponses:{},validationStates:{},theme:{},cardStates:{},messages:{lastMessageId:"0"}};let ae;const oe=(e,t)=>{var n,r,a;let{streamContainerId:o,instanceId:i,windowOrigin:s,subviewCardInstance:l,startingLayoutId:c,cardInstances:d,cardListRefreshInterval:u,runtimeVariableResolutionTimeout:p,embedMode:h,customStrings:m,cardListTutorialSeen:g,features:v,firstLoadStyles:f,enabledUiElements:b,interfaceStyle:y}=e;const w=t&&t.length?(0,ne.m)(...t):null,S="preview"===h,C=null==v?void 0:v.runtimeVariableAnalytics;return ae=te()(Object.assign(Object.assign({},re),{application:Object.assign(Object.assign({},re.application),{isPreview:S,streamContainerId:void 0!==o?o:re.application.streamContainerId,containerInstanceId:void 0!==i?i:re.application.containerInstanceId,windowOrigin:s||re.application.windowOrigin,cardListRefreshInterval:void 0!==u?u:re.application.cardListRefreshInterval,runtimeVariableResolutionTimeout:void 0!==p?p:re.application.runtimeVariableResolutionTimeout,embedMode:h,customStrings:m||re.application.customStrings,cardLimit:"single-card"===h?1:void 0,firstLoadStyles:{backgroundColor:(null==f?void 0:f.backgroundColor)||re.application.firstLoadStyles.backgroundColor,textColor:(null==f?void 0:f.textColor)||re.application.firstLoadStyles.textColor,loadingSpinnerColor:(null==f?void 0:f.loadingSpinnerColor)||re.application.firstLoadStyles.loadingSpinnerColor,buttonTextColor:(null==f?void 0:f.buttonTextColor)||re.application.firstLoadStyles.buttonTextColor},enabledUiElements:{cardListToast:null===(n=null==b?void 0:b.cardListToast)||void 0===n||n,customToastContainer:null!==(r=null==b?void 0:b.customToastContainer)&&void 0!==r&&r,toastConfig:null==b?void 0:b.toastConfig,cardListHeader:null===(a=null==b?void 0:b.cardListHeader)||void 0===a||a,customContainerHeader:null==b?void 0:b.customContainerHeader},interfaceStyle:void 0!==y?y:"automatic"}),navigationStack:{items:l&&c?[{cardInstance:l,cardInstanceId:l.instance.id,subviewId:c,kind:"subview"}]:re.navigationStack.items},cardFeed:Object.assign(Object.assign({},re.cardFeed),{cardInstances:d||re.cardFeed.cardInstances,tutorialSeen:void 0===g||g,runtimeVariableAnalyticsEnabled:void 0!==C&&C,cardVoting:null==v?void 0:v.cardVoting,cardMinimumHeight:null==v?void 0:v.cardMinimumHeight,horizontalContainerConfig:null==v?void 0:v.horizontalContainerConfig})}),w),ae},ie=()=>{if(!ae)throw new Error("You must initialise the store before accessing it.");return ae},se="YYYY-MM-DD[T]HH:mm:ssZZ",le=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,ce="displayedCards",de="cardDescription",ue="headline",pe="text",he="list",me="image",ge="video",ve="textInput",fe="numberInput",be="datePicker",ye="dropdown",we="checkbox",Se="stepper",Ce="switch",ke="upload",xe="form",Ie="actionButtonGroup",Oe="submitButton",Me="linkButton",Te="dismissButton",Fe="snoozeButton",je="voteUpButton",_e="voteDownButton";var Le=n(5576);const De=()=>({handleSubviewLinkPress:(e,t,n)=>Ae(e,t,n),finishSubview:e=>Ee(e),viewMedia(e,t,n){if(e.application.isPreview)return e;if(!n||!n.url||0===n.url.trim().length)return e;return Re(e,{kind:"media",cardInstanceId:t,item:n})},navigateBack(e){if(e.navigationStack.items.length){const r=e.navigationStack.items[e.navigationStack.items.length-1];let a=e.cardResponses[r.cardInstanceId]?Object.assign({},e.cardResponses[r.cardInstanceId]):void 0,o=e.validationStates[r.cardInstanceId]?Object.assign({},e.validationStates[r.cardInstanceId]):void 0;var t,n;if(r&&"subview"===r.kind)a&&(null===(t=a.subviews)||void 0===t||delete t[r.subviewId]),o&&(null===(n=o.subviews)||void 0===n||delete n[r.subviewId]),e.application.isPreview||window.AtomicUploadService.removeFilesForCardSubview(e.application.containerInstanceId,r.cardInstanceId,r.subviewId);return Object.assign(Object.assign({},Ve(e)),{cardResponses:Object.assign(Object.assign({},e.cardResponses),a?{[r.cardInstanceId]:a}:{}),validationStates:Object.assign(Object.assign({},e.validationStates),o?{[r.cardInstanceId]:o}:{}),messages:Object.assign(Object.assign({},e.messages),{subview:void 0})})}return e},clearSubviewsForCardInstance(e,t){const n=e.navigationStack.items.slice().filter((e=>e.cardInstanceId!==t));return Object.assign(Object.assign({},e),{navigationStack:{items:n}})},requestSnooze(e,t,n,r){if(e.application.isPreview)return e;const a=Object.assign({kind:"snooze",cardInstanceId:t,source:n},r?{cardExpiry:r}:{});return Re(e,a)},requestFeedback(e,t,n){if(e.application.isPreview)return e;const r={kind:"feedback",cardInstanceId:t,sentiment:n.sentiment,textFeedback:n.textFeedback,textFeedbackLabel:n.textFeedbackLabel,source:n.source};return Re(e,r)}}),Ae=(e,t,n)=>{const r=e.cardFeed.cardInstances;if(r){const a=r.find((e=>e.instance.id===t)),o=a&&a.subviews[n];if(a&&o){const t={kind:"subview",cardInstance:a,cardInstanceId:a.instance.id,subviewId:n};return Re(e,t)}}return e},Ee=e=>{const t=e.cardFeed.cardInstances;return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:t,status:{loaded:!0}}),navigationStack:{items:[]}})};let He;const Pe=()=>(He||(He=(0,G.kv)((0,G.Y2)(De),ie())),He),Re=(e,t)=>{let n=e.navigationStack.items.slice();for(const[e,r]of n.entries())switch(r.cardInstanceId!==t.cardInstanceId&&(n=[]),r.kind){case"subview":case"snooze":case"feedback":r.kind===t.kind&&n.splice(e,1);break;case"media":r.kind===t.kind&&r.item.url===t.item.url&&n.splice(e,1)}return Object.assign(Object.assign({},e),{navigationStack:{items:[...n,t]}})},Ve=e=>{const t=e.navigationStack.items.slice();return t.pop(),Object.assign(Object.assign({},e),{navigationStack:{items:t}})},$e=e=>e.navigationStack.items.length?e.navigationStack.items[e.navigationStack.items.length-1]:null;function ze(e){return void 0!==e&&"subview"===e.kind}function Ne(e){return void 0!==e&&"snooze"===e.kind}function Be(e){return void 0!==e&&"feedback"===e.kind}function Ue(e){return void 0!==e&&"media"===e.kind}var We=n(2807),qe=n.n(We);const Ye=e=>Object.keys(e).filter((t=>e[t])).join(" "),Ze=(e,t)=>{const n=((e,t)=>qe()(new Date(t,e-1)))(e,t),r=new Date(t,e-1,1).getDay()||7,a={week1:[],week2:[],week3:[],week4:[],week5:[],week6:[]};for(let o=0;o<n;o++){const n=new Date(t,e-1,o+1),i=Math.ceil((r+o)/7)-1,s=(r-1+o)%7+1;a[`week${Math.ceil((r+o)/7)}`].push({date:n,row:i,col:s,style:{gridRowStart:i,gridColumnStart:s}})}return a},Ke=(e,t)=>{let{isMax:n,isMin:r}=t;const a=new Date(e);return n?(0,J.endOfDay)((0,J.addMinutes)(a,a.getTimezoneOffset())):r?(0,J.addMinutes)(a,a.getTimezoneOffset()):a};var Ge=n(5616),Xe=n.n(Ge),Qe=n(623),Je=n.n(Qe);const et={required:"This field is required",minimumDate:e=>`Value must be after ${e}`,maximumDate:e=>`Value must be before ${e}`,regexp:"Value does not meet requirements",minimum:e=>`Value must be at least ${e}`,maximum:e=>`Value must be no more than ${e}`,minimumLength:e=>1===e?"Value must be at least 1 character":`Value must be at least ${e} characters`,maximumLength:e=>1===e?"Value must be no more than 1 character":`Value must be no more than ${e} characters`,minChecked:(e,t)=>1===t?"This option must be checked":1===e?"You must select at least one option":`At least ${e} options must be selected`,maxChecked:e=>1===e?"You cannot select more than one option":`You cannot select more than ${e} options`},tt={required:(e,t)=>{const n=e.errorMessage||et.required;return e.required&&(null==t||null==t||"string"==typeof t&&0==t.length)?{type:"invalid",errorMessage:n}:{type:"valid"}},minimumDate:(e,t)=>{const n=Ke(e.minimumDate,{isMin:!0}),r=e.errorMessage||et.minimumDate(Xe()(n,"DD MMM YYYY"));if(null==t||null==t)return{type:"invalid",errorMessage:r};const a=new Date(t);return!Je()(a)||a<n?{type:"invalid",errorMessage:r}:{type:"valid"}},maximumDate:(e,t)=>{const n=Ke(e.maximumDate,{isMax:!0}),r=e.errorMessage||et.maximumDate(Xe()(n,"DD MMM YYYY"));if(null==t||null==t)return{type:"invalid",errorMessage:r};const a=new Date(t);return!Je()(a)||a>n?{type:"invalid",errorMessage:r}:{type:"valid"}},regexp:(e,t)=>{const n=e.errorMessage||et.regexp;if(null==t||null==t)return{type:"invalid",errorMessage:n};try{if(!new RegExp(e.regexp).test(t))return{type:"invalid",errorMessage:n}}catch(e){}return{type:"valid"}},minimum:(e,t)=>{const n=e.errorMessage||et.minimum(e.minimum);return null==t||null==t||t<e.minimum?{type:"invalid",errorMessage:n}:{type:"valid"}},maximum:(e,t)=>{const n=e.errorMessage||et.maximum(e.maximum);return null==t||null==t||t>e.maximum?{type:"invalid",errorMessage:n}:{type:"valid"}},minimumLength:(e,t)=>{const n=e.errorMessage||et.minimumLength(e.minimumLength);return null==t||null==t||t.length<e.minimumLength?{type:"invalid",errorMessage:n}:{type:"valid"}},maximumLength:(e,t)=>{const n=e.errorMessage||et.maximumLength(e.maximumLength);return null==t||null==t?{type:"valid"}:t.length>e.maximumLength?{type:"invalid",errorMessage:n}:{type:"valid"}},minChecked:(e,t)=>{const n=e.errorMessage||et.minChecked(e.minChecked,Object.keys(t).length);return null==t||null==t||Object.values(t).filter((e=>e)).length<e.minChecked?{type:"invalid",errorMessage:n}:{type:"valid"}},maxChecked:(e,t)=>{const n=e.errorMessage||et.maxChecked(e.maxChecked);return null==t||null==t||Object.values(t).filter((e=>e)).length>e.maxChecked?{type:"invalid",errorMessage:n}:{type:"valid"}},maxSizeBytes:(e,t)=>{const n=Math.round(e.maxSizeBytes/1048576),r=e.errorMessage||`File size must be no more than ${n}MB`;return null==t||null==t?{type:"valid"}:t.size&&t.size>e.maxSizeBytes?{type:"invalid",errorMessage:r}:{type:"valid"}}},nt=["required","minimumLength","maximumLength","minimum","maximum","minimumDate","maximumDate","minChecked","maxChecked","maxSizeBytes","regexp"],rt=(e,t)=>{if(!t)return{type:"valid"};for(const n in nt){const r=nt[n],a=t[r];if(void 0===a)continue;const o=tt[r];if(o){const t=o(a.attributes,e);if("invalid"===t.type)return t}}return{type:"valid"}},at=()=>({handleImageLinkPress(e,t,n){const r=e.navigationStack.items.length?"subview":"topview",a=Object.assign(Object.assign({},n.currentSubviewId&&{subviewId:n.currentSubviewId}),n.currentSubviewTitle&&{subviewTitle:n.currentSubviewTitle});return n.layoutId?Ae(e,t,n.layoutId):n.payload&&!e.application.isPreview?it(e,"payload","image",t,r,n.payload,a):e},handleLinkButtonPress(e,t,n,r,a){const o=e.navigationStack.items.length?"subview":"topview";return r?Ae(e,t,r):a&&!e.application.isPreview?it(e,"payload","linkButton",t,o,a,n):e},handleSubmitButtonPayload(e,t,n,r){const a=e.navigationStack.items.length?"subview":"topview";return it(e,"payload","submitButton",t,a,r,n)},openExternalUrl:(e,t,n,r,a,o,i)=>(null==i?void 0:i.url)&&!e.application.isPreview?st(e,a,o,t,n,i,r):e,handleFormChange:(e,t,n,r,a)=>ot(e,t,{[n]:r},a),createResponseWithDefaults:(e,t,n,r)=>ot(e,t,n,r),clearCardForm(e,t){var n,r;return Object.assign(Object.assign({},e),{cardResponses:Object.assign(Object.assign({},e.cardResponses),{[t]:Object.assign(Object.assign({},(null===(n=e.cardResponses[t])||void 0===n?void 0:n.responses)?{responses:{}}:{}),(null===(r=e.cardResponses[t])||void 0===r?void 0:r.subviews)?{subviews:{}}:{})})})},validateField(e,t,n,r,a,o){var i,s,l,c;let d=rt(r,a);const u=d&&!o?{[n]:d}:{},p=d&&o?{[n]:d}:{},h=e.validationStates,m=null!==(i=null===(l=h[t])||void 0===l?void 0:l.validations)&&void 0!==i?i:{},g=null!==(s=null===(c=h[t])||void 0===c?void 0:c.subviews)&&void 0!==s?s:{};return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},h),{[t]:{validations:Object.assign(Object.assign({},m),u),subviews:Object.assign(Object.assign({},g),p&&o?{[o]:Object.assign(Object.assign({},g[o]),p)}:{})}})})},validateFieldCustomResult(e,t,n,r,a){var o,i,s,l;const c=r&&!a?{[n]:r}:{},d=r&&a?{[n]:r}:{},u=e.validationStates,p=null!==(o=null===(s=u[t])||void 0===s?void 0:s.validations)&&void 0!==o?o:{},h=null!==(i=null===(l=u[t])||void 0===l?void 0:l.subviews)&&void 0!==i?i:{};return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},u),{[t]:{validations:Object.assign(Object.assign({},p),c),subviews:Object.assign(Object.assign({},h),d&&a?{[a]:Object.assign(Object.assign({},h[a]),d)}:{})}})})},validateCurrentSubview(e,t){const n=$e(e);if(n&&ze(n)){const r=n.subviewId,a=n.cardInstance.subviews[r],o=lt(e,a.nodes,t,r);let i=e.validationStates;return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},i),{[t]:Object.assign(Object.assign({},e.validationStates[t]),{subviews:{[r]:o}})})})}return e},validateCardTopLevel(e,t){const[n]=e.cardFeed.cardInstances.filter((e=>e.instance.id===t));let r={};return n&&(r=lt(e,n.defaultView.nodes,t)),Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},e.validationStates),{[t]:Object.assign(Object.assign({},e.validationStates[t]),{validations:r})})})}}),ot=(e,t,n,r)=>{var a;const o=e.cardResponses[t]||{},i=r?null===(a=o.subviews)||void 0===a?void 0:a[r]:{};return Object.assign(Object.assign({},e),{cardResponses:Object.assign(Object.assign({},e.cardResponses),{[t]:{responses:Object.assign(Object.assign({},o.responses),r?{}:n),subviews:Object.assign(Object.assign({},o.subviews),r?{[r]:Object.assign(Object.assign({},i),n)}:{})}})})},it=(e,t,n,r,a,o,i)=>Object.assign(Object.assign({},e),{externalAction:Object.assign({actionId:(new Date).getTime(),linkMethod:t,trigger:n,cardInstanceId:r,cardViewState:a,subviewData:i},o?{payload:{actionPayload:o,cardInstanceId:r,streamContainerId:e.application.streamContainerId}}:{})}),st=(e,t,n,r,a,o,i)=>Object.assign(Object.assign({},e),{externalAction:{actionId:(new Date).getTime(),linkMethod:t,trigger:n,urlLink:o,cardInstanceId:r,cardViewState:a,subviewData:i}}),lt=(e,t,n,r)=>{var a;const o=Dc(t),i=r?null===(a=e.cardResponses[n].subviews)||void 0===a?void 0:a[r]:e.cardResponses[n].responses;let s={};for(const e in o){const t=o[e];t.attributes.name&&i&&(s[t.attributes.name]=rt(i[t.attributes.name],t.validations))}return s};let ct;const dt=()=>(ct||(ct=(0,G.kv)((0,G.Y2)(at),ie())),ct),ut=(e,t,n)=>{var r,a;const o=ie().getState().cardResponses,i=null===(r=o[e])||void 0===r||null===(a=r.responses)||void 0===a?void 0:a[t];return null!=i?i:n?null===(s=o[e])||void 0===s||null===(l=s.subviews)||void 0===l||null===(c=l[n])||void 0===c?void 0:c[t]:void 0;var s,l,c};function pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let ht;!function(e){e[e.DISABLED=0]="DISABLED",e[e.TRANSACTIONS=1]="TRANSACTIONS",e[e.PAYLOAD=2]="PAYLOAD",e[e.FULL_DETAIL=3]="FULL_DETAIL"}(ht||(ht={}));class mt{static debug(e){mt.logLevel!==ht.DISABLED&&(e.level1||e.level2||e.level3)&&console.log(...this.constructLogPayload(e))}static warn(e){mt.logLevel!==ht.DISABLED&&(e.level1||e.level2||e.level3)&&console.warn(...this.constructLogPayload(e))}static error(e){mt.logLevel!==ht.DISABLED&&(e.level1||e.level2||e.level3)&&console.error(...this.constructLogPayload(e))}}pt(mt,"logLevel",ht.DISABLED),pt(mt,"constructLogPayload",(e=>{const t=["AtomicSDK Web -"];return mt.logLevel>=ht.TRANSACTIONS&&e.level1&&t.push(...e.level1),mt.logLevel>=ht.PAYLOAD&&e.level2&&t.push(...e.level2),mt.logLevel>=ht.FULL_DETAIL&&e.level3&&t.push(...e.level3),t}));const gt="card-displayed",vt="user-redirected",ft="card-voted-up",bt="card-voted-down",yt="runtime-vars-updated",wt="stream-displayed",St="snooze-options-displayed",Ct="snooze-options-canceled",kt="card-subview-displayed",xt="card-subview-exited",It="video-played",Ot="video-completed",Mt="user-file-uploads-started",Tt="user-file-uploads-completed",Ft="user-file-uploads-failed";var jt=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))},_t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dt="AACUploadFailedError",At="AACUploadSignedUrlFailedError",Et="AACNoFileToUploadError",Ht="AACUploadCancelledError",Pt="Couldn't upload file(s)",Rt="Couldn't upload file(s)",Vt="No files to upload",$t="File upload cancelled";class zt{constructor(){Lt(this,"_fileStorage",void 0),Lt(this,"_uploadQueue",void 0),this._fileStorage=new Map,this._uploadQueue=new Map,zt._instance=this}static getInstance(){return zt._instance||(zt._instance=new zt),zt._instance}storeFile(e,t,n,r,a,o,i,s,l){var c,d,u,p;(this._fileStorage.get(a)||this._fileStorage.set(a,new Map),null===(c=this._fileStorage.get(a))||void 0===c?void 0:c.get(r))||(null===(p=this._fileStorage.get(a))||void 0===p||p.set(r,{topLevel:new Map,subviews:{}}));l&&!(null===(d=this._fileStorage.get(a))||void 0===d||null===(u=d.get(r))||void 0===u?void 0:u.subviews[l])&&(this._fileStorage.get(a).get(r).subviews[l]=new Map);const h={file:e,type:t,targetBucketId:n,destinationFilename:o,convertImage:i,size:e.size,uploaded:!1};l?this._fileStorage.get(a).get(r).subviews[l].set(s,h):this._fileStorage.get(a).get(r).topLevel.set(s,h)}getFile(e,t,n,r){var a,o,i,s,l,c;return r?(null===(s=this._fileStorage.get(e))||void 0===s||null===(l=s.get(t))||void 0===l||null===(c=l.subviews[r])||void 0===c?void 0:c.get(n))||null:(null===(a=this._fileStorage.get(e))||void 0===a||null===(o=a.get(t))||void 0===o||null===(i=o.topLevel)||void 0===i?void 0:i.get(n))||null}getAllFilesForCard(e,t){var n;return(null===(n=this._fileStorage.get(e))||void 0===n?void 0:n.get(t))||null}removeFile(e,t,n,r){var a,o,i,s,l,c,d,u;return r?null!==(a=null===(c=this._fileStorage.get(e))||void 0===c||null===(d=c.get(t))||void 0===d||null===(u=d.subviews[r])||void 0===u?void 0:u.delete(n))&&void 0!==a&&a:null!==(o=null===(i=this._fileStorage.get(e))||void 0===i||null===(s=i.get(t))||void 0===s||null===(l=s.topLevel)||void 0===l?void 0:l.delete(n))&&void 0!==o&&o}removeAllFilesForCard(e,t){var n;null===(n=this._fileStorage.get(e))||void 0===n||n.delete(t)}removeFilesForCardSubview(e,t,n){var r,a;null===(r=this._fileStorage.get(e))||void 0===r||(null===(a=r.get(t))||void 0===a||delete a.subviews[n])}removeFilesForContainer(e){this._fileStorage.delete(e)}getIsUploadingStatus(e){var t;const n=null===(t=this._uploadQueue.get(e))||void 0===t?void 0:t.size;return!!n&&n>0}uploadFile(e,t,n,r,a){return jt(this,void 0,void 0,(function*(){return new Promise(((o,i)=>jt(this,void 0,void 0,(function*(){var s;const{file:l,targetBucketId:c,destinationFilename:d}=n,u=null===(s=this._uploadQueue.get(t))||void 0===s?void 0:s.get(e);let p=!1;const h=new Error($t);h.name=Ht,u&&(u.uploadRequests[r]={abort:()=>{p=!0,mt.debug({level1:[`File upload for card: ${e} in container instance: ${t} was cancelled`,d]}),i({error:h,fieldname:r,filename:d})}});let m=`get-file-upload-url?filename=${encodeURIComponent(d)}&targetBucketId=${c}&card_instance_id=${e}`;n.convertImage&&(m+="&jpeg_convert=1");const{data:{uploadUrl:g},response:v}=yield sd.get(m,a);if(p)return;if(v.error){mt.error({level1:["Failed to get upload URL",v.error]});const e=new Error(Rt);return e.name=At,i({error:e,fieldname:r,filename:d})}const f=new XMLHttpRequest,b=new Error(Pt);b.name=Dt,f.onload=()=>{f.status>=200&&f.status<300?(mt.debug({level1:[`File upload for card: ${e} in container instance: ${t} was successful`,d]}),o(r)):(mt.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,d]}),i({error:b,fieldname:r,filename:d}))},f.onerror=()=>{mt.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,d]}),i({error:b,fieldname:r,filename:d})},f.onabort=()=>{mt.debug({level1:[`File upload for card: ${e} in container instance: ${t} was cancelled`,d]});const n=new Error($t);n.name=Ht,i({error:n,fieldname:r,filename:d})},u&&(u.uploadRequests[r]=f);try{f.open("PUT",g,!0);const e=new FormData;e.append("file",l,d),f.send(e.get("file"))}catch(n){mt.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,n]}),i({error:b,fieldname:r,filename:d})}}))))}))}uploadFilesForCard(e,t,n,r,a){return jt(this,void 0,void 0,(function*(){var o,i,s,l,c,d;const u=null==a?void 0:a.subviewData,p=(null==u?void 0:u.subviewId)?null===(o=this._fileStorage.get(t))||void 0===o||null===(i=o.get(e))||void 0===i?void 0:i.subviews[u.subviewId]:null===(s=this._fileStorage.get(t))||void 0===s||null===(l=s.get(e))||void 0===l?void 0:l.topLevel;if(!p){const e=new Error(Vt);return e.name=Et,{success:!1,error:e}}this._uploadQueue.set(t,(new Map).set(e,{cancelSubmitCallback:null==a?void 0:a.cancelSubmitCallback,uploadRequests:[]}));const h=[];for(const[e,t]of p)t.uploaded||h.push(Object.assign(Object.assign({},t),{fieldname:e}));const m=Object.assign({},(null==u?void 0:u.subviewId)?{subviewId:u.subviewId,subviewTitle:u.subviewTitle,subviewLevel:1}:{}),g=Object.assign({},m),v=h.map((r=>{const{fieldname:a}=r,o=_t(r,["fieldname"]);if(g[a]={filename:o.destinationFilename,targetBucketId:o.targetBucketId},"image"===o.type)return this.uploadFile(e,t,o,a,n)})),f={success:!1};return r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:Mt,properties:g}),yield Promise.allSettled(v).then((n=>{const a=[],o=[],i=Object.assign({},m),s=Object.assign({},m),l=n=>{var r,a,o,i,s;return(null==u?void 0:u.subviewId)?null===(r=this._fileStorage.get(t))||void 0===r||null===(a=r.get(e))||void 0===a||null===(o=a.subviews[u.subviewId])||void 0===o?void 0:o.get(n):null===(i=this._fileStorage.get(t))||void 0===i||null===(s=i.get(e))||void 0===s?void 0:s.topLevel.get(n)};n.forEach((n=>{var r;if("fulfilled"===n.status&&(null===(r=this._fileStorage.get(t))||void 0===r?void 0:r.get(e))){const e=l(n.value);e&&(e.uploaded=!0),i[n.value]={filename:null==e?void 0:e.destinationFilename,targetBucketId:null==e?void 0:e.targetBucketId}}else if("rejected"===n.status){const e=n.reason;if(e.error.name===Ht)o.push(n.reason);else{a.push(e);const t=l(e.fieldname);s[e.fieldname]={filename:null==t?void 0:t.destinationFilename,targetBucketId:null==t?void 0:t.targetBucketId},f.error=e.error}}})),a.length||o.length||(mt.debug({level1:[`All files successfully uploaded for card: ${e} in container instance: ${t}`]}),r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:Tt,properties:i}),f.success=!0),a.length&&(mt.error({level1:[`Failed to upload files for card: ${e} in container instance: ${t}`,...a]}),r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:Ft,properties:s}),f.failedUploads=a),o.length&&(f.cancelledUploads=o)})),null===(c=this._uploadQueue.get(t))||void 0===c||c.delete(e),(null===(d=this._uploadQueue.get(t))||void 0===d?void 0:d.size)||this._uploadQueue.delete(t),f}))}cancelUploadForCard(e,t){return jt(this,void 0,void 0,(function*(){var n,r,a;const o=null===(n=this._uploadQueue.get(e))||void 0===n?void 0:n.get(t);var i;o&&(Object.values(o.uploadRequests).forEach((e=>{e.abort()})),null===(i=o.cancelSubmitCallback)||void 0===i||i.call(o));null===(r=this._uploadQueue.get(e))||void 0===r||r.delete(t),(null===(a=this._uploadQueue.get(e))||void 0===a?void 0:a.size)||this._uploadQueue.delete(e)}))}cancelUploadsForContainer(e){return jt(this,void 0,void 0,(function*(){const t=this._uploadQueue.get(e);t&&(t.forEach((e=>{var t;Object.values(e.uploadRequests).forEach((e=>{e.abort()})),null===(t=e.cancelSubmitCallback)||void 0===t||t.call(e)})),this._uploadQueue.delete(e))}))}}Lt(zt,"_instance",void 0);zt.getInstance();var Nt=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Bt=(e,t)=>e?Object.keys(e).reduce(((n,r)=>{const a=e[r];return t.includes(a||"")||(n[r]=e[r]),n}),{}):e,Ut=e=>Bt(e,["submitted","dismissed","snoozed","submitted-subview","centering"]),Wt=(e,t,n)=>{var r,a;const o=null===(r=e.cardFeed.cardInstances.filter((e=>e.instance.id!==t))[0])||void 0===r||null===(a=r.instance)||void 0===a?void 0:a.id;return Object.assign(Object.assign({},e.cardStates),o&&{[o]:n})},qt=(e,t,n)=>(e||[]).reduce(((e,r,a)=>(n[r.instance.id]&&void 0===(t||[]).find((e=>e.instance.id===r.instance.id))&&e.splice(a,0,r),e)),[...t]),Yt=function(){let e=Number(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0);return""+ ++e},Zt=(e,t,n)=>{var r;if(!n)return e;switch(n.name){case Qc.noInternet:return"No internet connection";case Dt:case Et:case At:return(null==t||null===(r=t.toastMessages)||void 0===r?void 0:r.fileUploadFailed)||n.message;default:return e}},Kt=(e,t)=>{var n;return((null===(n=t.application.enabledUiElements.toastConfig)||void 0===n?void 0:n.toastMessages)||{})[e]},Gt=(e,t)=>{switch(t){case"cardList":return Object.assign(Object.assign({},e.messages),{cardList:void 0});case"subview":return Object.assign(Object.assign({},e.messages),{subview:void 0});default:return{lastMessageId:Yt(e.messages.lastMessageId),cardList:void 0,subview:void 0}}},Xt=()=>({updateAppOpen(e,t){const n="launcher"===e.application.embedMode&&!0===e.application.open&&!1===t;return Object.assign(Object.assign({},e),{application:Object.assign(Object.assign({},e.application),{open:t}),messages:n?Gt(e):e.messages})},startCardFileUpload:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"uploading-files"})}),finishCardFileUpload:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:null})}),submittingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"submitting"})}),submittedCard(e,t,n){const r=Kt("submittedCard",e),a=Yt(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:n?"submitted-subview":"submitted"}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=r?r:"Card submitted",messageId:a,cardInstanceId:t,action:"submitted"},lastMessageId:a})})},failedToSubmitCard(e,t,n,r,a,o){const i=Bt(e.cardStates,["centering","fixed-position"]),s=Yt(e.messages.lastMessageId),l=e.application.enabledUiElements.toastConfig,c=Object.assign({text:Zt("Couldn't submit",l,a),messageId:s,cardInstanceId:t,action:"submit-failed",responseValues:r},o||{});return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},i),{[t]:null}),messages:Object.assign(Object.assign({},n?{subview:c}:{cardList:c}),{lastMessageId:s})})},dismissingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"dismissing"})}),dismissedCard(e,t){const n=Kt("dismissedCard",e),r=Yt(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"dismissed"}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=n?n:"Card dismissed",messageId:r,cardInstanceId:t,action:"dismissed"},lastMessageId:r})})},failedToDismissCard(e,t,n,r){const a=Bt(e.cardStates,["centering","fixed-position"]),o=Yt(e.messages.lastMessageId),i=e.application.enabledUiElements.toastConfig;return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},a),{[t]:null}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:Zt("Couldn't dismiss",i,r),messageId:o,cardInstanceId:t,action:"dismiss-failed",source:n},lastMessageId:o})})},snoozingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"snoozing"})}),snoozedCard(e,t,n){const r=Kt("snoozedCard",e),a=Yt(e.messages.lastMessageId);let o;return o=(0,J.isToday)(n)?(0,J.format)(n,"h:mm A"):(0,J.format)(n,"D MMM YYYY, h:mm A"),Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"snoozed"}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=r?r:`Snoozed until ${o}`,messageId:a,cardInstanceId:t,action:"snoozed"},lastMessageId:a})})},failedToSnoozeCard(e,t,n,r,a){const o=Bt(e.cardStates,["centering","fixed-position"]),i=Yt(e.messages.lastMessageId),s=e.application.enabledUiElements.toastConfig;return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},o),{[t]:null}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:Zt("Couldn't snooze",s,a),messageId:i,cardInstanceId:t,action:"snooze-failed",snoozeDate:n,source:r},lastMessageId:i})})},fixPositionRemainingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:e.cardFeed.cardInstances.length<=2?Wt(e,t,"fixed-position"):Bt(e.cardStates,["centering","fixed-position"])}),centerRemainingCard(e,t){const n=e.cardFeed.cardInstances,r=n.filter((e=>e.instance.id!==t));return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:e.cardFeed.cardInstances.length<=2?r:n,status:{loaded:!0},updateId:(new Date).getTime()}),cardStates:e.cardFeed.cardInstances.length<=2?Wt(e,t,"centering"):Bt(e.cardStates,["centering","fixed-position"])})},removeCardState:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:null})}),removeCard(e,t){if(e.application.isPreview)return e;const n=e.cardFeed.cardInstances.filter((e=>e.instance.id!==t)),r=Object.assign({},e.cardStates);return delete r[t],Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:n,status:{loaded:!0},updateId:(new Date).getTime()}),cardStates:r})},queueCardFeedDeltaUpdate:(e,t)=>Object.assign(Object.assign({},e),{pendingCardFeedUpdates:[...e.pendingCardFeedUpdates||[],...t]}),clearCardFeedDeltaUpdateQueue:e=>Object.assign(Object.assign({},e),{pendingCardFeedUpdates:[]}),applyCardFeedDeltaUpdate(e,t,n,r){return Nt(this,void 0,void 0,(function*(){let a={cardFeed:{cardInstances:e.cardFeed.cardInstances,runtimeVariables:e.cardFeed.runtimeVariables},cardStates:e.cardStates,navigationStack:e.navigationStack},o=!1,i=[];if(t.forEach((t=>{switch(t.type){case"remove-card":{const{cardInstanceId:n,actionType:r}=t.data;if("limit"!==r&&(o=!0),e.application.isPreview)break;const i=a.cardFeed.cardInstances,s=e.application.isPreview?i:i.filter((e=>e.instance.id!==n));a.cardFeed.cardInstances=s;break}case"update-card":{const{cardInstance:e,actionType:n}=t.data;let r=!1;e.runtimeVariables&&i.push(e);const s=a.cardFeed.cardInstances.map((t=>(t.instance.id===e.instance.id&&(r=!0,t=Object.assign({},e)),t)));r||(o=!0,s.push(e)),"unsnooze"===n&&(a.cardStates[e.instance.id]=null),a.cardFeed.cardInstances=s;break}}})),i.length>0){const t=yield r(i),n=e.cardFeed.runtimeVariables.values;a.cardFeed.runtimeVariables={values:new Map([...n||new Map,...(null==t?void 0:t.values)||new Map]),updateId:(new Date).getTime()}}a.cardFeed.cardInstances=(e=>null==e?void 0:e.sort(((e,t)=>{const{priority:n,lastCardActiveTime:r,receivedAt:a}=e.metadata,{priority:o,lastCardActiveTime:i,receivedAt:s}=t.metadata;let l=0;return l=n-o,0===l&&(l=new Date(i).getTime()-new Date(r).getTime()),0===l&&(l=new Date(s).getTime()-new Date(a).getTime()),l})))(a.cardFeed.cardInstances),n(e.cardFeed.cardInstances.length!==a.cardFeed.cardInstances.length||o),"single-card"===e.application.embedMode&&(a.navigationStack={items:[]});const s=Bt(a.cardStates,["centering","fixed-position"]),l=Ut(s),c=qt(e.cardFeed.cardInstances,a.cardFeed.cardInstances,l);return a.cardFeed.cardInstances=c,{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:a.cardFeed.cardInstances,runtimeVariables:a.cardFeed.runtimeVariables,tutorialSeen:e.cardFeed.tutorialSeen||c.length>0,updateId:(new Date).getTime(),status:{loaded:!0}}),cardStates:s,navigationStack:a.navigationStack}}))},clearMessage:(e,t)=>Object.assign(Object.assign({},e),{messages:Gt(e,t)}),cardFeedLoading:e=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{status:{loaded:!1}})}),cardFeedLoaded(e,t){if(t.error){let n;if(t.error.name===Qc.noInternet)n="noInternet";else n="apiError";return mt.error({level1:["Error loading card feed"],level2:[n],level3:[t.error]}),Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{status:{loaded:!1,errorState:n}})})}if(!t.cardInstances)return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{status:Object.assign(Object.assign({},e.cardFeed.status),{loaded:!0})})});const n=Bt(e.cardStates,["centering","fixed-position"]),r=Ut(n),a=qt(e.cardFeed.cardInstances,t.cardInstances,r);return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{lastModified:t.lastModified,cardInstances:a,unfilteredCardInstanceCount:t.unfilteredCardInstanceCount||t.cardInstances.length,runtimeVariables:Object.assign(Object.assign({},t.runtimeVariables),{updateId:(new Date).getTime()}),tutorialSeen:e.cardFeed.tutorialSeen||t.cardInstances.length>0,status:{loaded:!0},updateId:(new Date).getTime(),metadata:t.metadata}),navigationStack:{items:"single-card"===e.application.embedMode?[]:e.navigationStack.items},cardStates:r})},setCardFeedOverlay:(e,t)=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{displayingOverlay:t})}),runtimeVariablesResolved:(e,t)=>t.values?Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{runtimeVariables:Object.assign(Object.assign({},e.cardFeed.runtimeVariables),{values:t.values,updateId:(new Date).getTime()})})}):e,runtimeVariableReplacement(e,t){var n,r;const a=null!==(n=null==t?void 0:t.values)&&void 0!==n?n:null===(r=e.cardFeed.runtimeVariables)||void 0===r?void 0:r.values;return e.cardFeed.cardInstances.map((e=>Ec(e,(null==a?void 0:a.get(e.instance.id))||new Map([])))),Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{runtimeVariables:null!=t?t:e.cardFeed.runtimeVariables})})},themeLoading:e=>Object.assign(Object.assign({},e),{theme:Object.assign(Object.assign({},e.theme),{status:{loaded:!1}})}),themeLoaded(e,t){if(t.error){let n;if(t.error.name===Qc.noInternet)n="noInternet";else n="apiError";return Object.assign(Object.assign({},e),{theme:Object.assign(Object.assign({},e.theme),{status:{loaded:!1,errorState:n}})})}return t.theme?Object.assign(Object.assign({},e),{theme:{themePayload:t.theme,status:{loaded:!0}}}):e},feedbackReceived(e,t){if(e.application.isPreview)return e;const n=Kt("feedbackReceived",e),r=Yt(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=n?n:"Feedback received",messageId:r,cardInstanceId:t,action:"other"},lastMessageId:r})})},userLoggedOut:e=>Object.assign(Object.assign({},e),{application:Object.assign(Object.assign({},e.application),{open:!1}),cardFeed:Object.assign(Object.assign({},e.cardFeed),{lastModified:"",cardInstances:[],runtimeVariables:{},status:{loaded:!0}}),navigationStack:{items:[]},cardResponses:{},validationStates:{},cardStates:{},messages:{lastMessageId:"0"}})});let Qt;const Jt=()=>(Qt||(Qt=(0,G.kv)((0,G.Y2)(Xt),ie())),Qt);var en=0,tn=document.head.appendChild(document.createElement("style")).sheet;function nn(e,t){var n="p"+en++,r=t+n;return e.forEach((function(e){if(/^@/.test(e)){var t=e.indexOf("{")+1;e=e.slice(0,t)+r+e.slice(t)}else e=r+e;try{tn.insertRule(e,tn.cssRules.length)}catch(e){}})),n}function rn(e,t){return t+"{"+e+"}"}function an(e,t){var n=[""];for(var r in t=t||0,e){var a=e[r];a&&(r=r.replace(/[A-Z]/g,"-$&").toLowerCase(),a.sub||Array.isArray(a)?(a=Array.isArray(a)?a:[a]).forEach((function(e){return n[0]+=r+":"+e+";"})):(r=r.replace(/&/g,""),n.push(rn(an(a,!/^@/.test(r)).join(""),r))))}return t||(n[0]=rn(n[0],"")),n}const on=function(e,t){var n={};return(t=t||{}).returnObject?{style:r,css:a}:r;function r(t){return function(n){return function(r,o){var i="function"==typeof n?n(r):n;return delete r.theme,r.class=[a(i),r.class].filter(Boolean).join(" "),e(t,r,r.children||[])}}}function a(e){var t=an(e),r=t.join("");return n[r]||(n[r]=nn(t,"."))}}(o.h),sn=function(e){return nn([rn(an(e,1).join(""),"")],"@keyframes ")};function ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const cn="rgba(0, 0, 0, 1)",dn="rgba(255, 255, 255, 1)",un='-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',pn={colors:{},typography:{},shape:{}},hn={icon:{switchOff:dn,switchOn:dn},background:{switchOff:"rgba(128, 128, 128, 1)",switchOn:cn}};class mn{constructor(e,t,n,r){ln(this,"theme",void 0),ln(this,"themeName",void 0),ln(this,"fontFamilies",void 0),ln(this,"hasSecondaryButtonStyle",!1),ln(this,"testSecondaryStyles",((e,t,n)=>{const r=e=>{null===e||"object"!=typeof e||Array.isArray(e)?"string"==typeof e&&e.match(/\w+/g)&&(this.hasSecondaryButtonStyle=!0):Object.values(e).length>0&&(this.hasSecondaryButtonStyle=!0)};for(const[l,c]of Object.entries(e)){switch(l){case"actionSecondary":case"buttonSecondary":case"buttonHoverSecondary":case"buttonActiveSecondary":case"actionIconSecondary":case"buttonIconSecondary":case"actionSecondaryTop":case"actionSecondaryRight":case"actionSecondaryBottom":case"actionSecondaryLeft":case"buttonSecondaryTop":case"buttonSecondaryRight":case"buttonSecondaryBottom":case"buttonSecondaryLeft":case"buttonHoverSecondaryTop":case"buttonHoverSecondaryRight":case"buttonHoverSecondaryBottom":case"buttonHoverSecondaryLeft":case"buttonActiveSecondaryTop":case"buttonActiveSecondaryRight":case"buttonActiveSecondaryBottom":case"buttonActiveSecondaryLeft":case"actionSecondaryShadow":case"buttonSecondaryShadow":case"buttonHoverSecondaryShadow":case"buttonActiveSecondaryShadow":case"actionSecondaryXAxis":case"actionSecondaryYAxis":case"buttonSecondaryXAxis":case"buttonHoverSecondaryXAxis":case"buttonActiveSecondaryXAxis":case"buttonSecondaryYAxis":case"buttonHoverSecondaryYAxis":case"buttonActiveSecondaryYAxis":if(t.includes("shadowOffsets")&&!l.includes("XAxis")&&!l.includes("YAxis")){var a,o;const e="true"===(null==n||null===(a=n.shape)||void 0===a||null===(o=a.equalShadowOffsets)||void 0===o?void 0:o[l]);"string"==typeof c&&c.match(/\w+/g)&&e&&(this.hasSecondaryButtonStyle=!0);break}if(t.includes("equalShadowOffsets")||t.includes("equalPaddings"))break;r(c);break;case"actionSecondaryWidth":case"buttonSecondaryWidth":case"buttonHoverSecondaryWidth":case"buttonActiveSecondaryWidth":{var i,s;const e=l.replace("Width",""),t="true"===(null==n||null===(i=n.shape)||void 0===i||null===(s=i.equalPaddings)||void 0===s?void 0:s[e]);"string"==typeof c&&c.match(/\w+/g)&&t&&(this.hasSecondaryButtonStyle=!0);break}}if(!this.hasSecondaryButtonStyle&&null!==c&&"object"==typeof c&&!Array.isArray(c)){const e=t?t+"."+l:l;this.testSecondaryStyles(c,e,n)}}}));let a,o=!1;switch(r){case"automatic":o="dark"===n&&window.matchMedia("not all and (prefers-color-scheme), (prefers-color-scheme)").matches;break;case"light":o=!1;break;case"dark":o=!0}var i;o?a=(null===(i=e.alternate)||void 0===i?void 0:i.dark)||e.theme||{}:a=e.theme||{};this.testSecondaryStyles(a.feed||{},"",a.feed),this.testSecondaryStyles(a.workflow||{},"",a.workflow),this.themeName=t,this.theme=a[t]||pn,this.fontFamilies=a.fontFamilies||[]}getShape(e,t){return vn(this.theme.shape,e,(null==t?void 0:t.skipFallback)?null:"")}getCSSShadowProperties(e,t){var n,r;const a=this.getShape(`blur.${e}Shadow`,t),o=this.getShape(`equalShadowOffsets.${e}`,t),i=this.getShape(`shadowOffsets.${e}`,t),s=this.getShape(`shadowOffsets.${e}XAxis`,t),l=this.getShape(`shadowOffsets.${e}YAxis`,t),c=this.getShape(`shadowOffsetType.${e}`,t),d=this.getCSSColor(`shadow.${e}`,{skipFallback:!0}),u="inset"===c?"inset":"",p=null!==(n="true"===o?i:s)&&void 0!==n?n:"0px",h=null!==(r="true"===o?i:l)&&void 0!==r?r:"0px";if(!d||d.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/))return"";return`${u} ${p} ${h} ${a||""} ${d}`.trim()}getPadding(e){var t,n,r,a;const o=null!==(t=null===(r=this.theme.shape)||void 0===r?void 0:r.padding)&&void 0!==t?t:{},i=null!==(n=null===(a=this.theme.shape)||void 0===a?void 0:a.equalPaddings)&&void 0!==n?n:{},s=vn(i,`${e}`,null),l=vn(o,`${e}Width`,null),c=vn(o,`${e}Top`,null),d=vn(o,`${e}Right`,null),u=vn(o,`${e}Bottom`,null),p=vn(o,`${e}Left`,null);return"true"===s&&l?`${l}`:c||d||u||p?`${c||0} ${d||0} ${u||0} ${p||0}`:""}getCSSColor(e,t){const n=vn(this.theme.colors,e,null);if(n&&(null==n?void 0:n.color)&&!(null==t?void 0:t.skipPrimaryStyle))return gn(n.color,n.opacity);if(null==t?void 0:t.skipFallback)return null;const r=vn(hn,e,null);return r||("workflow"===this.themeName?e.startsWith("background")?cn:dn:e.startsWith("background")?"rgba(0, 0, 0, 0)":cn)}getFontFamilies(){return this.fontFamilies}getTypographyStyle(e){var t;let n=vn(this.theme.typography,e,null),r={size:"17px",isDefaultTypography:!0};return null===(t=n)||void 0===t||t.align,n||r}getNumericFontSize(e,t){var n;const r=this.getTypographyStyle(e);return(null==t?void 0:t.skipFallback)&&r.isDefaultTypography?null:r&&r.size?(null===(n=r.scaling)||void 0===n?void 0:n.enabled)?this.getNumericScaledFontSize(r):Number(r.size.replace(/px/g,"")):null}getNumericScaledFontSize(e){const t=Number(window.getComputedStyle(document.documentElement).getPropertyValue("font-size").replace("px","")),n=t?t/16:1,r=e.size?Number(e.size.replace(/px/g,"")):17,a=r*n;if(e.scaling){const t=e.scaling.minimumSize?Number(e.scaling.minimumSize.replace(/px/g,"")):void 0,n=e.scaling.maximumSize?Number(e.scaling.maximumSize.replace(/px/g,"")):void 0;if(void 0===t&&void 0===n)return r;if(t&&a<t)return t;if(n&&a>n)return n}return a}getCSSFontProperties(e,t){var n,r;const a=this.getTypographyStyle(e);if(!a)return{};if((null==t?void 0:t.skipFallback)&&a.isDefaultTypography)return null;const o=a.transform?a.transform:(null==t?void 0:t.skipFontFallbacks)?null:"none",i=a.lineHeight||1,s=(null!==(n=this.getNumericFontSize(e,t))&&void 0!==n?n:17)*i+"px",l=(null===(r=a.scaling)||void 0===r?void 0:r.enabled)?`${this.getNumericScaledFontSize(a)}px`:a.size,c=a.fontFamily?`"${a.fontFamily}", ${un}`:un,d=a.weight||((null==t?void 0:t.skipFontFallbacks)?null:"normal"),u=a.style||((null==t?void 0:t.skipFontFallbacks)?null:"normal"),p=a.align;return Object.assign({textTransform:o,lineHeight:s,fontSize:l,fontFamily:c,fontWeight:d,fontStyle:u,fontSynthesis:"weight style"},p?{textAlign:p}:{})}getElementFocusCSSProperties(){return{outline:"none","&.focus-visible":{boxShadow:`0 0 0 2px ${this.getCSSColor("border.focus")} inset`}}}}const gn=(e,t)=>{const n=e.replace("#",""),r=parseInt(n,16);return`rgba(${[r>>16&255,r>>8&255,255&r].join(",")},${t})`},vn=(e,t,n)=>(e=e[(t=Array.isArray(t)?t:t.split("."))[0]])&&t.length>1?vn(e,t.slice(1),n):void 0!==e?e:n,fn=(e,t)=>n=>{let{themeMethod:r,primaryAccessor:a,secondaryAccessor:o,fallbackStyle:i,skipThemeHelperFallbacks:s,skipDefaultStyle:l}=n;const c=a?e[r](a,{skipFallback:s}):void 0,d=o?e[r](o,{skipFallback:!0}):void 0;let u="getCSSColor"===r?e.getCSSColor(a||o||"",{skipPrimaryStyle:!0}):e[r]("");return l&&(u=""),"secondary"===t&&d?d:c&&("primary"===t||"secondary"===t&&!e.hasSecondaryButtonStyle)?c:i||u||""},bn=e=>"string"!=typeof e?(mt.warn({level3:["Expected a string value for RGBA color, but received:",e]}),!1):null!==e.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/),yn=sn({from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}),wn=on("svg")((()=>({animation:`${yn} 1s infinite linear`}))),Sn=e=>{let{stopColor:t,size:n}=e;return(0,o.h)(wn,{width:n,height:n,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M31 16C31 7.71573 24.2843 1 16 1C7.71573 1 1 7.71573 1 16C1 24.2843 7.71573 31 16 31",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))},Cn=()=>(0,o.h)("style",null,"/*!\n * @license\n * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n */\n \n @font-face {\n font-family: 'Font Awesome 5 Free';\n font-style: normal;\n font-weight: 900;\n font-display: block;\n src: url('https://downloads.atomic.io/web-sdk/release/25.2.3/assets/fonts/font-awesome-5-15-4/fa-solid-900.woff');\n }\n "),kn={"500px":"","accessible-icon":"",accusoft:"","acquisitions-incorporated":"",ad:"","address-book":"","address-card":"",adjust:"",adn:"",adversal:"",affiliatetheme:"","air-freshener":"",airbnb:"",algolia:"","align-center":"","align-justify":"","align-left":"","align-right":"",alipay:"",allergies:"",amazon:"","amazon-pay":"",ambulance:"","american-sign-language-interpreting":"",amilia:"",anchor:"",android:"",angellist:"","angle-double-down":"","angle-double-left":"","angle-double-right":"","angle-double-up":"","angle-down":"","angle-left":"","angle-right":"","angle-up":"",angry:"",angrycreative:"",angular:"",ankh:"","app-store":"","app-store-ios":"",apper:"",apple:"","apple-alt":"","apple-pay":"",archive:"",archway:"","arrow-alt-circle-down":"","arrow-alt-circle-left":"","arrow-alt-circle-right":"","arrow-alt-circle-up":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-down":"","arrow-left":"","arrow-right":"","arrow-up":"","arrows-alt":"","arrows-alt-h":"","arrows-alt-v":"",artstation:"","assistive-listening-systems":"",asterisk:"",asymmetrik:"",at:"",atlas:"",atlassian:"",atom:"",audible:"","audio-description":"",autoprefixer:"",avianex:"",aviato:"",award:"",aws:"",baby:"","baby-carriage":"",backspace:"",backward:"",bacon:"",bacteria:"",bacterium:"",bahai:"","balance-scale":"","balance-scale-left":"","balance-scale-right":"",ban:"","band-aid":"",bandcamp:"",barcode:"",bars:"","baseball-ball":"","basketball-ball":"",bath:"","battery-empty":"","battery-full":"","battery-half":"","battery-quarter":"","battery-three-quarters":"","battle-net":"",bed:"",beer:"",behance:"","behance-square":"",bell:"","bell-slash":"","bezier-curve":"",bible:"",bicycle:"",biking:"",bimobject:"",binoculars:"",biohazard:"","birthday-cake":"",bitbucket:"",bitcoin:"",bity:"","black-tie":"",blackberry:"",blender:"","blender-phone":"",blind:"",blog:"",blogger:"","blogger-b":"",bluetooth:"","bluetooth-b":"",bold:"",bolt:"",bomb:"",bone:"",bong:"",book:"","book-dead":"","book-medical":"","book-open":"","book-reader":"",bookmark:"",bootstrap:"","border-all":"","border-none":"","border-style":"","bowling-ball":"",box:"","box-open":"","box-tissue":"",boxes:"",braille:"",brain:"","bread-slice":"",briefcase:"","briefcase-medical":"","broadcast-tower":"",broom:"",brush:"",btc:"",buffer:"",bug:"",building:"",bullhorn:"",bullseye:"",burn:"",buromobelexperte:"",bus:"","bus-alt":"","business-time":"","buy-n-large":"",buysellads:"",calculator:"",calendar:"","calendar-alt":"","calendar-check":"","calendar-day":"","calendar-minus":"","calendar-plus":"","calendar-times":"","calendar-week":"",camera:"","camera-retro":"",campground:"","canadian-maple-leaf":"","candy-cane":"",cannabis:"",capsules:"",car:"","car-alt":"","car-battery":"","car-crash":"","car-side":"",caravan:"","caret-down":"","caret-left":"","caret-right":"","caret-square-down":"","caret-square-left":"","caret-square-right":"","caret-square-up":"","caret-up":"",carrot:"","cart-arrow-down":"","cart-plus":"","cash-register":"",cat:"","cc-amazon-pay":"","cc-amex":"","cc-apple-pay":"","cc-diners-club":"","cc-discover":"","cc-jcb":"","cc-mastercard":"","cc-paypal":"","cc-stripe":"","cc-visa":"",centercode:"",centos:"",certificate:"",chair:"",chalkboard:"","chalkboard-teacher":"","charging-station":"","chart-area":"","chart-bar":"","chart-line":"","chart-pie":"",check:"","check-circle":"","check-double":"","check-square":"",cheese:"",chess:"","chess-bishop":"","chess-board":"","chess-king":"","chess-knight":"","chess-pawn":"","chess-queen":"","chess-rook":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-left":"","chevron-right":"","chevron-up":"",child:"",chrome:"",chromecast:"",church:"",circle:"","circle-notch":"",city:"","clinic-medical":"",clipboard:"","clipboard-check":"","clipboard-list":"",clock:"",clone:"","closed-captioning":"",cloud:"","cloud-download-alt":"","cloud-meatball":"","cloud-moon":"","cloud-moon-rain":"","cloud-rain":"","cloud-showers-heavy":"","cloud-sun":"","cloud-sun-rain":"","cloud-upload-alt":"",cloudflare:"",cloudscale:"",cloudsmith:"",cloudversify:"",cocktail:"",code:"","code-branch":"",codepen:"",codiepie:"",coffee:"",cog:"",cogs:"",coins:"",columns:"",comment:"","comment-alt":"","comment-dollar":"","comment-dots":"","comment-medical":"","comment-slash":"",comments:"","comments-dollar":"","compact-disc":"",compass:"",compress:"","compress-alt":"","compress-arrows-alt":"","concierge-bell":"",confluence:"",connectdevelop:"",contao:"",cookie:"","cookie-bite":"",copy:"",copyright:"","cotton-bureau":"",couch:"",cpanel:"","creative-commons":"","creative-commons-by":"","creative-commons-nc":"","creative-commons-nc-eu":"","creative-commons-nc-jp":"","creative-commons-nd":"","creative-commons-pd":"","creative-commons-pd-alt":"","creative-commons-remix":"","creative-commons-sa":"","creative-commons-sampling":"","creative-commons-sampling-plus":"","creative-commons-share":"","creative-commons-zero":"","credit-card":"","critical-role":"",crop:"","crop-alt":"",cross:"",crosshairs:"",crow:"",crown:"",crutch:"",css3:"","css3-alt":"",cube:"",cubes:"",cut:"",cuttlefish:"","d-and-d":"","d-and-d-beyond":"",dailymotion:"",dashcube:"",database:"",deaf:"",deezer:"",delicious:"",democrat:"",deploydog:"",deskpro:"",desktop:"",dev:"",deviantart:"",dharmachakra:"",dhl:"",diagnoses:"",diaspora:"",dice:"","dice-d20":"","dice-d6":"","dice-five":"","dice-four":"","dice-one":"","dice-six":"","dice-three":"","dice-two":"",digg:"","digital-ocean":"","digital-tachograph":"",directions:"",discord:"",discourse:"",disease:"",divide:"",dizzy:"",dna:"",dochub:"",docker:"",dog:"","dollar-sign":"",dolly:"","dolly-flatbed":"",donate:"","door-closed":"","door-open":"","dot-circle":"",dove:"",download:"",draft2digital:"","drafting-compass":"",dragon:"","draw-polygon":"",dribbble:"","dribbble-square":"",dropbox:"",drum:"","drum-steelpan":"","drumstick-bite":"",drupal:"",dumbbell:"",dumpster:"","dumpster-fire":"",dungeon:"",dyalog:"",earlybirds:"",ebay:"",edge:"","edge-legacy":"",edit:"",egg:"",eject:"",elementor:"","ellipsis-h":"","ellipsis-v":"",ello:"",ember:"",empire:"",envelope:"","envelope-open":"","envelope-open-text":"","envelope-square":"",envira:"",equals:"",eraser:"",erlang:"",ethereum:"",ethernet:"",etsy:"","euro-sign":"",evernote:"","exchange-alt":"",exclamation:"","exclamation-circle":"","exclamation-triangle":"",expand:"","expand-alt":"","expand-arrows-alt":"",expeditedssl:"","external-link-alt":"","external-link-square-alt":"",eye:"","eye-dropper":"","eye-slash":"",facebook:"","facebook-f":"","facebook-messenger":"","facebook-square":"",fan:"","fantasy-flight-games":"","fast-backward":"","fast-forward":"",faucet:"",fax:"",feather:"","feather-alt":"",fedex:"",fedora:"",female:"","fighter-jet":"",figma:"",file:"","file-alt":"","file-archive":"","file-audio":"","file-code":"","file-contract":"","file-csv":"","file-download":"","file-excel":"","file-export":"","file-image":"","file-import":"","file-invoice":"","file-invoice-dollar":"","file-medical":"","file-medical-alt":"","file-pdf":"","file-powerpoint":"","file-prescription":"","file-signature":"","file-upload":"","file-video":"","file-word":"",fill:"","fill-drip":"",film:"",filter:"",fingerprint:"",fire:"","fire-alt":"","fire-extinguisher":"",firefox:"","firefox-browser":"","first-aid":"","first-order":"","first-order-alt":"",firstdraft:"",fish:"","fist-raised":"",flag:"","flag-checkered":"","flag-usa":"",flask:"",flickr:"",flipboard:"",flushed:"",fly:"",folder:"","folder-minus":"","folder-open":"","folder-plus":"",font:"","font-awesome":"","font-awesome-alt":"","font-awesome-flag":"","font-awesome-logo-full":"",fonticons:"","fonticons-fi":"","football-ball":"","fort-awesome":"","fort-awesome-alt":"",forumbee:"",forward:"",foursquare:"","free-code-camp":"",freebsd:"",frog:"",frown:"","frown-open":"",fulcrum:"","funnel-dollar":"",futbol:"","galactic-republic":"","galactic-senate":"",gamepad:"","gas-pump":"",gavel:"",gem:"",genderless:"","get-pocket":"",gg:"","gg-circle":"",ghost:"",gift:"",gifts:"",git:"","git-alt":"","git-square":"",github:"","github-alt":"","github-square":"",gitkraken:"",gitlab:"",gitter:"","glass-cheers":"","glass-martini":"","glass-martini-alt":"","glass-whiskey":"",glasses:"",glide:"","glide-g":"",globe:"","globe-africa":"","globe-americas":"","globe-asia":"","globe-europe":"",gofore:"","golf-ball":"",goodreads:"","goodreads-g":"",google:"","google-drive":"","google-pay":"","google-play":"","google-plus":"","google-plus-g":"","google-plus-square":"","google-wallet":"",gopuram:"","graduation-cap":"",gratipay:"",grav:"","greater-than":"","greater-than-equal":"",grimace:"",grin:"","grin-alt":"","grin-beam":"","grin-beam-sweat":"","grin-hearts":"","grin-squint":"","grin-squint-tears":"","grin-stars":"","grin-tears":"","grin-tongue":"","grin-tongue-squint":"","grin-tongue-wink":"","grin-wink":"","grip-horizontal":"","grip-lines":"","grip-lines-vertical":"","grip-vertical":"",gripfire:"",grunt:"",guilded:"",guitar:"",gulp:"","h-square":"","hacker-news":"","hacker-news-square":"",hackerrank:"",hamburger:"",hammer:"",hamsa:"","hand-holding":"","hand-holding-heart":"","hand-holding-medical":"","hand-holding-usd":"","hand-holding-water":"","hand-lizard":"","hand-middle-finger":"","hand-paper":"","hand-peace":"","hand-point-down":"","hand-point-left":"","hand-point-right":"","hand-point-up":"","hand-pointer":"","hand-rock":"","hand-scissors":"","hand-sparkles":"","hand-spock":"",hands:"","hands-helping":"","hands-wash":"",handshake:"","handshake-alt-slash":"","handshake-slash":"",hanukiah:"","hard-hat":"",hashtag:"","hat-cowboy":"","hat-cowboy-side":"","hat-wizard":"",hdd:"","head-side-cough":"","head-side-cough-slash":"","head-side-mask":"","head-side-virus":"",heading:"",headphones:"","headphones-alt":"",headset:"",heart:"","heart-broken":"",heartbeat:"",helicopter:"",highlighter:"",hiking:"",hippo:"",hips:"","hire-a-helper":"",history:"",hive:"","hockey-puck":"","holly-berry":"",home:"",hooli:"",hornbill:"",horse:"","horse-head":"",hospital:"","hospital-alt":"","hospital-symbol":"","hospital-user":"","hot-tub":"",hotdog:"",hotel:"",hotjar:"",hourglass:"","hourglass-end":"","hourglass-half":"","hourglass-start":"","house-damage":"","house-user":"",houzz:"",hryvnia:"",html5:"",hubspot:"","i-cursor":"","ice-cream":"",icicles:"",icons:"","id-badge":"","id-card":"","id-card-alt":"",ideal:"",igloo:"",image:"",images:"",imdb:"",inbox:"",indent:"",industry:"",infinity:"",info:"","info-circle":"",innosoft:"",instagram:"","instagram-square":"",instalod:"",intercom:"","internet-explorer":"",invision:"",ioxhost:"",italic:"","itch-io":"",itunes:"","itunes-note":"",java:"",jedi:"","jedi-order":"",jenkins:"",jira:"",joget:"",joint:"",joomla:"","journal-whills":"",js:"","js-square":"",jsfiddle:"",kaaba:"",kaggle:"",key:"",keybase:"",keyboard:"",keycdn:"",khanda:"",kickstarter:"","kickstarter-k":"",kiss:"","kiss-beam":"","kiss-wink-heart":"","kiwi-bird":"",korvue:"",landmark:"",language:"",laptop:"","laptop-code":"","laptop-house":"","laptop-medical":"",laravel:"",lastfm:"","lastfm-square":"",laugh:"","laugh-beam":"","laugh-squint":"","laugh-wink":"","layer-group":"",leaf:"",leanpub:"",lemon:"",less:"","less-than":"","less-than-equal":"","level-down-alt":"","level-up-alt":"","life-ring":"",lightbulb:"",line:"",link:"",linkedin:"","linkedin-in":"",linode:"",linux:"","lira-sign":"",list:"","list-alt":"","list-ol":"","list-ul":"","location-arrow":"",lock:"","lock-open":"","long-arrow-alt-down":"","long-arrow-alt-left":"","long-arrow-alt-right":"","long-arrow-alt-up":"","low-vision":"","luggage-cart":"",lungs:"","lungs-virus":"",lyft:"",magento:"",magic:"",magnet:"","mail-bulk":"",mailchimp:"",male:"",mandalorian:"",map:"","map-marked":"","map-marked-alt":"","map-marker":"","map-marker-alt":"","map-pin":"","map-signs":"",markdown:"",marker:"",mars:"","mars-double":"","mars-stroke":"","mars-stroke-h":"","mars-stroke-v":"",mask:"",mastodon:"",maxcdn:"",mdb:"",medal:"",medapps:"",medium:"","medium-m":"",medkit:"",medrt:"",meetup:"",megaport:"",meh:"","meh-blank":"","meh-rolling-eyes":"",memory:"",mendeley:"",menorah:"",mercury:"",meteor:"",microblog:"",microchip:"",microphone:"","microphone-alt":"","microphone-alt-slash":"","microphone-slash":"",microscope:"",microsoft:"",minus:"","minus-circle":"","minus-square":"",mitten:"",mix:"",mixcloud:"",mixer:"",mizuni:"",mobile:"","mobile-alt":"",modx:"",monero:"","money-bill":"","money-bill-alt":"","money-bill-wave":"","money-bill-wave-alt":"","money-check":"","money-check-alt":"",monument:"",moon:"","mortar-pestle":"",mosque:"",motorcycle:"",mountain:"",mouse:"","mouse-pointer":"","mug-hot":"",music:"",napster:"",neos:"","network-wired":"",neuter:"",newspaper:"",nimblr:"",node:"","node-js":"","not-equal":"","notes-medical":"",npm:"",ns8:"",nutritionix:"","object-group":"","object-ungroup":"","octopus-deploy":"",odnoklassniki:"","odnoklassniki-square":"","oil-can":"","old-republic":"",om:"",opencart:"",openid:"",opera:"","optin-monster":"",orcid:"",osi:"",otter:"",outdent:"",page4:"",pagelines:"",pager:"","paint-brush":"","paint-roller":"",palette:"",palfed:"",pallet:"","paper-plane":"",paperclip:"","parachute-box":"",paragraph:"",parking:"",passport:"",pastafarianism:"",paste:"",patreon:"",pause:"","pause-circle":"",paw:"",paypal:"",peace:"",pen:"","pen-alt":"","pen-fancy":"","pen-nib":"","pen-square":"","pencil-alt":"","pencil-ruler":"","penny-arcade":"","people-arrows":"","people-carry":"","pepper-hot":"",perbyte:"",percent:"",percentage:"",periscope:"","person-booth":"",phabricator:"","phoenix-framework":"","phoenix-squadron":"",phone:"","phone-alt":"","phone-slash":"","phone-square":"","phone-square-alt":"","phone-volume":"","photo-video":"",php:"","pied-piper":"","pied-piper-alt":"","pied-piper-hat":"","pied-piper-pp":"","pied-piper-square":"","piggy-bank":"",pills:"",pinterest:"","pinterest-p":"","pinterest-square":"","pizza-slice":"","place-of-worship":"",plane:"","plane-arrival":"","plane-departure":"","plane-slash":"",play:"","play-circle":"",playstation:"",plug:"",plus:"","plus-circle":"","plus-square":"",podcast:"",poll:"","poll-h":"",poo:"","poo-storm":"",poop:"",portrait:"","pound-sign":"","power-off":"",pray:"","praying-hands":"",prescription:"","prescription-bottle":"","prescription-bottle-alt":"",print:"",procedures:"","product-hunt":"","project-diagram":"","pump-medical":"","pump-soap":"",pushed:"","puzzle-piece":"",python:"",qq:"",qrcode:"",question:"","question-circle":"",quidditch:"",quinscape:"",quora:"","quote-left":"","quote-right":"",quran:"","r-project":"",radiation:"","radiation-alt":"",rainbow:"",random:"","raspberry-pi":"",ravelry:"",react:"",reacteurope:"",readme:"",rebel:"",receipt:"","record-vinyl":"",recycle:"","red-river":"",reddit:"","reddit-alien":"","reddit-square":"",redhat:"",redo:"","redo-alt":"",registered:"","remove-format":"",renren:"",reply:"","reply-all":"",replyd:"",republican:"",researchgate:"",resolving:"",restroom:"",retweet:"",rev:"",ribbon:"",ring:"",road:"",robot:"",rocket:"",rocketchat:"",rockrms:"",route:"",rss:"","rss-square":"","ruble-sign":"",ruler:"","ruler-combined":"","ruler-horizontal":"","ruler-vertical":"",running:"","rupee-sign":"",rust:"","sad-cry":"","sad-tear":"",safari:"",salesforce:"",sass:"",satellite:"","satellite-dish":"",save:"",schlix:"",school:"",screwdriver:"",scribd:"",scroll:"","sd-card":"",search:"","search-dollar":"","search-location":"","search-minus":"","search-plus":"",searchengin:"",seedling:"",sellcast:"",sellsy:"",server:"",servicestack:"",shapes:"",share:"","share-alt":"","share-alt-square":"","share-square":"","shekel-sign":"","shield-alt":"","shield-virus":"",ship:"","shipping-fast":"",shirtsinbulk:"","shoe-prints":"",shopify:"","shopping-bag":"","shopping-basket":"","shopping-cart":"",shopware:"",shower:"","shuttle-van":"",sign:"","sign-in-alt":"","sign-language":"","sign-out-alt":"",signal:"",signature:"","sim-card":"",simplybuilt:"",sink:"",sistrix:"",sitemap:"",sith:"",skating:"",sketch:"",skiing:"","skiing-nordic":"",skull:"","skull-crossbones":"",skyatlas:"",skype:"",slack:"","slack-hash":"",slash:"",sleigh:"","sliders-h":"",slideshare:"",smile:"","smile-beam":"","smile-wink":"",smog:"",smoking:"","smoking-ban":"",sms:"",snapchat:"","snapchat-ghost":"","snapchat-square":"",snowboarding:"",snowflake:"",snowman:"",snowplow:"",soap:"",socks:"","solar-panel":"",sort:"","sort-alpha-down":"","sort-alpha-down-alt":"","sort-alpha-up":"","sort-alpha-up-alt":"","sort-amount-down":"","sort-amount-down-alt":"","sort-amount-up":"","sort-amount-up-alt":"","sort-down":"","sort-numeric-down":"","sort-numeric-down-alt":"","sort-numeric-up":"","sort-numeric-up-alt":"","sort-up":"",soundcloud:"",sourcetree:"",spa:"","space-shuttle":"",speakap:"","speaker-deck":"","spell-check":"",spider:"",spinner:"",splotch:"",spotify:"","spray-can":"",square:"","square-full":"","square-root-alt":"",squarespace:"","stack-exchange":"","stack-overflow":"",stackpath:"",stamp:"",star:"","star-and-crescent":"","star-half":"","star-half-alt":"","star-of-david":"","star-of-life":"",staylinked:"",steam:"","steam-square":"","steam-symbol":"","step-backward":"","step-forward":"",stethoscope:"","sticker-mule":"","sticky-note":"",stop:"","stop-circle":"",stopwatch:"","stopwatch-20":"",store:"","store-alt":"","store-alt-slash":"","store-slash":"",strava:"",stream:"","street-view":"",strikethrough:"",stripe:"","stripe-s":"",stroopwafel:"",studiovinari:"",stumbleupon:"","stumbleupon-circle":"",subscript:"",subway:"",suitcase:"","suitcase-rolling":"",sun:"",superpowers:"",superscript:"",supple:"",surprise:"",suse:"",swatchbook:"",swift:"",swimmer:"","swimming-pool":"",symfony:"",synagogue:"",sync:"","sync-alt":"",syringe:"",table:"","table-tennis":"",tablet:"","tablet-alt":"",tablets:"","tachometer-alt":"",tag:"",tags:"",tape:"",tasks:"",taxi:"",teamspeak:"",teeth:"","teeth-open":"",telegram:"","telegram-plane":"","temperature-high":"","temperature-low":"","tencent-weibo":"",tenge:"",terminal:"","text-height":"","text-width":"",th:"","th-large":"","th-list":"","the-red-yeti":"","theater-masks":"",themeco:"",themeisle:"",thermometer:"","thermometer-empty":"","thermometer-full":"","thermometer-half":"","thermometer-quarter":"","thermometer-three-quarters":"","think-peaks":"","thumbs-down":"","thumbs-up":"",thumbtack:"","ticket-alt":"",tiktok:"",times:"","times-circle":"",tint:"","tint-slash":"",tired:"","toggle-off":"","toggle-on":"",toilet:"","toilet-paper":"","toilet-paper-slash":"",toolbox:"",tools:"",tooth:"",torah:"","torii-gate":"",tractor:"","trade-federation":"",trademark:"","traffic-light":"",trailer:"",train:"",tram:"",transgender:"","transgender-alt":"",trash:"","trash-alt":"","trash-restore":"","trash-restore-alt":"",tree:"",trello:"",trophy:"",truck:"","truck-loading":"","truck-monster":"","truck-moving":"","truck-pickup":"",tshirt:"",tty:"",tumblr:"","tumblr-square":"",tv:"",twitch:"",twitter:"","twitter-square":"",typo3:"",uber:"",ubuntu:"",uikit:"",umbraco:"",umbrella:"","umbrella-beach":"",uncharted:"",underline:"",undo:"","undo-alt":"",uniregistry:"",unity:"","universal-access":"",university:"",unlink:"",unlock:"","unlock-alt":"",unsplash:"",untappd:"",upload:"",ups:"",usb:"",user:"","user-alt":"","user-alt-slash":"","user-astronaut":"","user-check":"","user-circle":"","user-clock":"","user-cog":"","user-edit":"","user-friends":"","user-graduate":"","user-injured":"","user-lock":"","user-md":"","user-minus":"","user-ninja":"","user-nurse":"","user-plus":"","user-secret":"","user-shield":"","user-slash":"","user-tag":"","user-tie":"","user-times":"",users:"","users-cog":"","users-slash":"",usps:"",ussunnah:"","utensil-spoon":"",utensils:"",vaadin:"","vector-square":"",venus:"","venus-double":"","venus-mars":"",vest:"","vest-patches":"",viacoin:"",viadeo:"","viadeo-square":"",vial:"",vials:"",viber:"",video:"","video-slash":"",vihara:"",vimeo:"","vimeo-square":"","vimeo-v":"",vine:"",virus:"","virus-slash":"",viruses:"",vk:"",vnv:"",voicemail:"","volleyball-ball":"","volume-down":"","volume-mute":"","volume-off":"","volume-up":"","vote-yea":"","vr-cardboard":"",vuejs:"",walking:"",wallet:"",warehouse:"","watchman-monitoring":"",water:"","wave-square":"",waze:"",weebly:"",weibo:"",weight:"","weight-hanging":"",weixin:"",whatsapp:"","whatsapp-square":"",wheelchair:"",whmcs:"",wifi:"","wikipedia-w":"",wind:"","window-close":"","window-maximize":"","window-minimize":"","window-restore":"",windows:"","wine-bottle":"","wine-glass":"","wine-glass-alt":"",wix:"","wizards-of-the-coast":"",wodu:"","wolf-pack-battalion":"","won-sign":"",wordpress:"","wordpress-simple":"",wpbeginner:"",wpexplorer:"",wpforms:"",wpressr:"",wrench:"","x-ray":"",xbox:"",xing:"","xing-square":"","y-combinator":"",yahoo:"",yammer:"",yandex:"","yandex-international":"",yarn:"",yelp:"","yen-sign":"","yin-yang":"",yoast:"",youtube:"","youtube-square":"",zhihu:""},xn=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,o.h)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":n},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 2H2V13.398L9.66274 8.25944C10.1695 7.91961 10.8316 7.92061 11.3374 8.26198L14 10.0593V2ZM14 14H2.89774L10.2197 9.08999C10.3886 8.97671 10.6093 8.97704 10.7779 9.09083L14 11.2657V14ZM2 1C1.44772 1 1 1.44772 1 2V14C1 14.5523 1.44772 15 2 15H14C14.5523 15 15 14.5523 15 14V2C15 1.44772 14.5523 1 14 1H2ZM6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4ZM5 6C5 5.44771 5.44771 5 6 5C6.55229 5 7 5.44771 7 6C7 6.55229 6.55229 7 6 7C5.44771 7 5 6.55229 5 6Z",fill:t}))},In=on("i")((e=>{let{size:t,styles:n}=e;return Object.assign({fontFamily:"'Font Awesome 5 Free'",fontWeight:"900",fontSize:`${t}px`,width:`${t}px`,textAlign:"center",fontStyle:"normal",fontVariant:"normal",textRendering:"auto","-moz-osx-font-smoothing":"grayscale","-webkit-font-smoothing":"antialiased"},n)})),On=on("div")((e=>{var t;let{color:n,size:r,styles:a}=e;return Object.assign(Object.assign(Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},n?{fill:n}:{}),a),{width:`${r}px`,height:null!==(t=a.lineHeight)&&void 0!==t?t:`${r}px`})})),Mn=e=>{let{iconName:t,iconUrl:n,size:r,color:a,fallbackColor:i,styles:s={}}=e;const[l,c]=h(!1),d=f(n);return g((()=>{n&&n!==d.current&&l&&(d.current=n,c(!1))}),[n,l]),n&&!l?(0,o.h)(On,{size:r,styles:s},(0,o.h)("svg",{"aria-hidden":"true","data-src":n,"data-replacement-color":a,"data-container-size":r,oniconloaderror:()=>{mt.error({level1:[`Error loading custom icon: ${n}`]}),c(!0)},style:Object.assign({maxWidth:`${r}px`,maxHeight:`${r}px`},a?{color:a}:{})})):t?(a&&(s.color=a),(0,o.h)(In,{styles:s,size:r,"aria-hidden":"true"},kn[t]||"")):(0,o.h)(On,{size:r,styles:s},(0,o.h)(xn,{ariaHidden:!0,fillColor:null!=a?a:i}))},Tn=e=>{let{theme:t,appearance:n}=e;const r=fn(t,n),a=(e,t)=>t?{[e]:t}:{},o=t.getShape("buttonWidth.global"),i=r({themeMethod:"getCSSFontProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:{}});return Object.assign(Object.assign(Object.assign({position:"relative",cursor:"pointer",width:"hugsLabel"===o?"auto":"100%",maxWidth:"100%",padding:r({themeMethod:"getPadding",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:"10px 20px"}),backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.button",secondaryAccessor:"background.buttonSecondary"}),color:r({themeMethod:"getCSSColor",primaryAccessor:"text.button",secondaryAccessor:"text.buttonSecondary"}),textAlign:"center"},i),{borderStyle:"solid",borderColor:r({themeMethod:"getCSSColor",primaryAccessor:"border.button",secondaryAccessor:"border.buttonSecondary",fallbackStyle:"transparent",skipThemeHelperFallbacks:!0}),borderWidth:r({themeMethod:"getShape",primaryAccessor:"border.button",secondaryAccessor:"border.buttonSecondary",fallbackStyle:"0px"}),borderRadius:r({themeMethod:"getShape",primaryAccessor:"borderRadius.button",secondaryAccessor:"borderRadius.buttonSecondary",fallbackStyle:"0px"}),boxShadow:r({themeMethod:"getCSSShadowProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",skipThemeHelperFallbacks:!0,fallbackStyle:"none"}),display:"flex",alignItems:"center",whiteSpace:"pre-wrap",":hover":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonHover",secondaryAccessor:"text.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("backgroundColor",r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonHover",secondaryAccessor:"background.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonHover",secondaryAccessor:"borderRadius.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),":active":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonActive",secondaryAccessor:"text.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),{backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonActive",secondaryAccessor:"background.buttonActiveSecondary",fallbackStyle:"rgba(0,0,0,0.1)",skipThemeHelperFallbacks:!0})}),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonActive",secondaryAccessor:"borderRadius.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})))}),t.getElementFocusCSSProperties())},Fn=on("button")((e=>Object.assign({},Tn(e)))),jn=on("a")((e=>Object.assign(Object.assign({},Tn(e)),{textDecoration:"none"}))),_n=on("div")((e=>{var t,n;let r,a,{labelAlignment:o,iconAlignment:i,visible:s}=e;return"right"===i?(r="row-reverse",a=null!==(t=null==o?void 0:o.replace("left","flex-end").replace("right","flex-start"))&&void 0!==t?t:"center"):(r="row",a=null!==(n=null==o?void 0:o.replace("left","flex-start").replace("right","flex-end"))&&void 0!==n?n:"center"),{width:"100%",display:"flex",justifyContent:a,alignItems:"center",flexDirection:r,visibility:s?"visible":"hidden"}})),Ln=on("div")({display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}),Dn=on("span")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),An=e=>{let{nodeKey:t,clickHandler:n,text:r,icon:a,iconUrl:i,theme:s,appearance:l,loading:c,type:d,urlLink:u}=e;const p=u?jn:Fn,h=fn(s,l),m=h({themeMethod:"getCSSFontProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:{}}),g=h({themeMethod:"getShape",primaryAccessor:"align.buttonIcon",secondaryAccessor:"align.buttonIconSecondary",fallbackStyle:"left",skipThemeHelperFallbacks:!0}),v=h({themeMethod:"getShape",primaryAccessor:"lineHeight.buttonIcon",secondaryAccessor:"lineHeight.buttonIconSecondary",fallbackStyle:"1",skipThemeHelperFallbacks:!0}),f=h({themeMethod:"getNumericFontSize",primaryAccessor:"button",secondaryAccessor:"buttonSecondary"}),b=Object.assign(Object.assign({},"left"===g?{marginRight:"10px"}:{marginLeft:"10px"}),{lineHeight:f*v+"px",color:h({themeMethod:"getCSSColor",primaryAccessor:"icon.button",secondaryAccessor:"icon.buttonSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),y=h({themeMethod:"getCSSColor",primaryAccessor:"icon.button",secondaryAccessor:"icon.buttonSecondary"});return(0,o.h)(p,{key:t,"data-element-key":t,class:"submit-button",onClick:n,theme:s,appearance:l,tabIndex:"0",type:d,href:null==u?void 0:u.url,target:null==u?void 0:u.target},(0,o.h)(o.Fragment,null,c&&(0,o.h)(Ln,null,(0,o.h)(Sn,{stopColor:s.getCSSColor("text.button"),size:22})),(0,o.h)(_n,{"data-testid":"button-content-wrapper",labelAlignment:null==m?void 0:m.textAlign,iconAlignment:g,visible:!c},(a||i)&&(0,o.h)(Mn,{iconName:a,iconUrl:i,size:f,color:b.color,fallbackColor:y,styles:Object.assign(Object.assign(Object.assign({},b),!r&&{marginLeft:0,marginRight:0}),{alignSelf:"center",justifySelf:"start"})}),(0,o.h)(Dn,null,r))))},En=e=>{let{theme:t,appearance:n}=e;const r=fn(t,n),a=(e,t)=>t?{[e]:t}:{},o=r({themeMethod:"getCSSFontProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:{}}),i=t.getShape("buttonWidth.global"),s=t.getShape("buttonLayout.global"),l=r({themeMethod:"getCSSColor",primaryAccessor:"background.action",secondaryAccessor:"background.actionSecondary"}),c="transparent"===l||l.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/);let d="100%";return c&&(d="calc(100% + 40px)"),Object.assign(Object.assign(Object.assign({cursor:"pointer",padding:r({themeMethod:"getPadding",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:"10px 20px"}),margin:c&&"horizontal"!==s?"0 -20px":"0px",color:r({themeMethod:"getCSSColor",primaryAccessor:"text.action",secondaryAccessor:"text.actionSecondary"}),display:"flex",alignItems:"center",textAlign:"left"},o),{maxWidth:d,width:"hugsLabel"===i?"auto":d,backgroundColor:l,borderStyle:"solid",borderColor:r({themeMethod:"getCSSColor",primaryAccessor:"border.action",secondaryAccessor:"border.actionSecondary",fallbackStyle:"transparent",skipThemeHelperFallbacks:!0}),borderWidth:r({themeMethod:"getShape",primaryAccessor:"border.action",secondaryAccessor:"border.actionSecondary",fallbackStyle:"0px"}),borderRadius:r({themeMethod:"getShape",primaryAccessor:"borderRadius.action",secondaryAccessor:"borderRadius.actionSecondary",fallbackStyle:"0px"}),boxShadow:r({themeMethod:"getCSSShadowProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",skipThemeHelperFallbacks:!0,fallbackStyle:"none"}),":hover":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonHover",secondaryAccessor:"text.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),{backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonHover",secondaryAccessor:"background.buttonHoverSecondary",fallbackStyle:"rgba(0,0,0,0.05)",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonHover",secondaryAccessor:"borderRadius.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),":active":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonActive",secondaryAccessor:"text.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),{backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonActive",secondaryAccessor:"background.buttonActiveSecondary",fallbackStyle:"rgba(0,0,0,0.1)",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonActive",secondaryAccessor:"borderRadius.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})))}),t.getElementFocusCSSProperties())},Hn=on("button")((e=>Object.assign({},En(e)))),Pn=on("a")((e=>Object.assign(Object.assign({},En(e)),{textDecoration:"none"}))),Rn=on("div")((e=>{var t,n;let r,a,{labelAlignment:o,iconAlignment:i}=e;return"right"===i?(r="row-reverse",a=null!==(t=null==o?void 0:o.replace("left","flex-end").replace("right","flex-start"))&&void 0!==t?t:"flex-start"):(r="row",a=null!==(n=null==o?void 0:o.replace("left","flex-start").replace("right","flex-end"))&&void 0!==n?n:"flex-start"),{width:"100%",display:"flex",justifyContent:a,alignItems:"center",flexDirection:r}})),Vn=on("span")((()=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),$n=e=>{let{nodeKey:t,clickHandler:n,text:r,icon:a,iconUrl:i,theme:s,appearance:l,type:c,urlLink:d}=e;const u=d?Pn:Hn,p=fn(s,l),h=p({themeMethod:"getCSSFontProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:{}}),m=p({themeMethod:"getShape",primaryAccessor:"align.actionIcon",secondaryAccessor:"align.actionIconSecondary",fallbackStyle:"left",skipThemeHelperFallbacks:!0}),g=p({themeMethod:"getShape",primaryAccessor:"lineHeight.actionIcon",secondaryAccessor:"lineHeight.actionIconSecondary",fallbackStyle:"1",skipThemeHelperFallbacks:!0}),v=p({themeMethod:"getNumericFontSize",primaryAccessor:"action",secondaryAccessor:"actionSecondary"}),f=Object.assign(Object.assign({},"left"===m?{marginRight:"10px"}:{marginLeft:"10px"}),{lineHeight:v*g+"px",color:p({themeMethod:"getCSSColor",primaryAccessor:"icon.action",secondaryAccessor:"icon.actionSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),b=p({themeMethod:"getCSSColor",primaryAccessor:"icon.action",secondaryAccessor:"icon.actionSecondary"});return(0,o.h)(u,{key:t,"data-element-key":t,class:"action-button",onClick:n,theme:s,appearance:l,tabIndex:"0",type:c,href:null==d?void 0:d.url,target:null==d?void 0:d.target},(0,o.h)(Rn,{labelAlignment:null==h?void 0:h.textAlign,iconAlignment:m},(a||i)&&(0,o.h)(Mn,{iconName:a,iconUrl:i,size:v,color:f.color,fallbackColor:b,styles:Object.assign(Object.assign(Object.assign({},f),!r&&{marginLeft:0,marginRight:0}),{alignSelf:"center",justifySelf:"start"})}),(0,o.h)(Vn,null,r)))},zn=e=>e.isWorkflow?(0,o.h)(An,e):(0,o.h)($n,e),Nn=e=>{let{fillColor:t,className:n,style:r,ariaHidden:a=!0}=e;return(0,o.h)("svg",{width:"14",height:"10",viewBox:"0 0 14 10",class:n,style:r,focusable:"false","aria-hidden":a},(0,o.h)("path",{d:"M13.7071 0.292893C14.0976 0.683417 14.0976 1.31658 13.7071 1.70711L5.70711 9.70711C5.31658 10.0976 4.68342 10.0976 4.29289 9.70711L0.292893 5.70711C-0.0976311 5.31658 -0.0976311 4.68342 0.292893 4.29289C0.683417 3.90237 1.31658 3.90237 1.70711 4.29289L5 7.58579L12.2929 0.292893C12.6834 -0.0976311 13.3166 -0.0976311 13.7071 0.292893Z",fill:t}))},Bn=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,focusable:"false"},(0,o.h)("path",{d:"M11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13H11ZM13 7C13 6.44772 12.5523 6 12 6C11.4477 6 11 6.44772 11 7H13ZM9 2V1C8.73478 1 8.48043 1.10536 8.29289 1.29289L9 2ZM11 2L11.7071 1.29289C11.5196 1.10536 11.2652 1 11 1V2ZM3 2C2.44772 2 2 2.44772 2 3C2 3.55228 2.44772 4 3 4V2ZM17 4C17.5523 4 18 3.55228 18 3C18 2.44772 17.5523 2 17 2V4ZM5 7C5 6.44772 4.55228 6 4 6C3.44772 6 3 6.44772 3 7H5ZM17 7C17 6.44772 16.5523 6 16 6C15.4477 6 15 6.44772 15 7H17ZM9 7C9 6.44772 8.55228 6 8 6C7.44772 6 7 6.44772 7 7H9ZM7 13C7 13.5523 7.44772 14 8 14C8.55228 14 9 13.5523 9 13H7ZM13 13V7H11V13H13ZM9 3H11V1H9V3ZM15 7V16H17V7H15ZM15 16H5V18H15V16ZM5 16V7H3V16H5ZM3 4H8V2H3V4ZM8.29289 1.29289L7.29289 2.29289L8.70711 3.70711L9.70711 2.70711L8.29289 1.29289ZM8 4H12V2H8V4ZM12 4H17V2H12V4ZM10.2929 2.70711L11.2929 3.70711L12.7071 2.29289L11.7071 1.29289L10.2929 2.70711ZM7 7V13H9V7H7ZM5 16L5 16H3C3 17.1046 3.89543 18 5 18V16ZM15 16L15 16V18C16.1046 18 17 17.1046 17 16H15Z"}))},Un=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,focusable:"false"},(0,o.h)("path",{d:"M10 7C10 6.44772 9.55228 6 9 6C8.44772 6 8 6.44772 8 7H10ZM9 11H8C8 11.5523 8.44772 12 9 12V11ZM13 12C13.5523 12 14 11.5523 14 11C14 10.4477 13.5523 10 13 10V12ZM10 17C6.13401 17 3 13.866 3 10H1C1 14.9706 5.02944 19 10 19V17ZM17 10C17 13.866 13.866 17 10 17V19C14.9706 19 19 14.9706 19 10H17ZM10 3C13.866 3 17 6.13401 17 10H19C19 5.02944 14.9706 1 10 1V3ZM10 1C5.02944 1 1 5.02944 1 10H3C3 6.13401 6.13401 3 10 3V1ZM8 7V11H10V7H8ZM9 12H13V10H9V12Z"}))},Wn=n(3054),qn=n(6756),Yn=n(1295),Zn=[];const Kn={},Gn=(e,t,n)=>{const{enableJs:r,disableUniqueIds:a,disableCssScoping:o,spriteIconId:i,replacementColor:s,containerSize:l}=t,c=!!i,d=(new DOMParser).parseFromString(n,"text/html"),u=c?d.getElementById(i):d.querySelector("svg"),p=(()=>{if(Zn.length)return Zn;for(const e in document.body)e.startsWith("on")&&Zn.push(e);return Zn.push("onbegin","onend","onrepeat"),Zn.push("onfocusin","onfocusout","onbounce","onfinish","onshow"),Zn})(),h=Kn[e.getAttribute("data-id")]||new Set,m=e.getAttribute("data-id")||`svg-loader_${Yn.incr()}`,g={};if(a||Array.from(u.querySelectorAll("[id]")).forEach((e=>{const t=e.getAttribute("id"),n=`${t}_${Yn.incr()}`;e.setAttribute("id",n),g[t]=n})),Array.from(u.querySelectorAll("*")).concat(u).forEach((t=>{if("script"===t.tagName){if(t.remove(),!r)return;{const n=document.createElement("script");n.appendChild(t.childNodes[0]),e.appendChild(n)}}const n=[];for(let e=0;e<t.attributes.length;e++){const{name:a,value:o}=t.attributes[e],i=qn(g,o,a);o!==i&&t.setAttribute(a,i),!p.includes(a.toLowerCase())||r?["href","xlink:href","values"].includes(a)&&o.startsWith("javascript")&&!r&&n.push(a):n.push(a)}if(n.forEach((e=>t.removeAttribute(e))),"style"===t.tagName&&!o){let e=Wn(t.innerHTML,`[data-id="${m}"]`,g);e=qn(g,e),e!==t.innerHTML&&(t.innerHTML=e)}})),e.innerHTML=i?u.outerHTML:u.innerHTML,!c)for(let t=0;t<u.attributes.length;t++){const{name:n,value:r}=u.attributes[t];e.getAttribute(n)&&!h.has(n)||(h.add(n),e.setAttribute(n,r))}Kn[m]=h,e.setAttribute("data-id",m),function(e,t){const n=e.querySelectorAll("*"),r=new Map,a=(e,t,n)=>{r.has(e)?r.get(e)?.set(t,n):r.set(e,(new Map).set(t,n))};n.forEach((e=>{const t=e.getAttribute("style");let n,r,o=e.getAttribute("fill"),i=e.getAttribute("stroke");t&&(n=t.match(/fill\s*:\s*([^;]+)/),r=t.match(/stroke\s*:\s*([^;]+)/));const s={...o?{fill:o}:{},...i?{stroke:i}:{},...n?{fillMatch:n}:{},...r?{strokeMatch:r}:{}};o&&a(o,e,s),i&&a(i,e,s),n&&a(n[1],e,s),r&&a(r[1],e,s)})),1===r.size&&t&&r.forEach(((e,n)=>{"currentcolor"===n.toLowerCase()&&e.forEach(((e,n)=>{if(e.fill&&n.setAttribute("fill",t),e.stroke&&n.setAttribute("stroke",t),e.fillMatch){const r=n.getAttribute("style")?.replace(e.fillMatch[0],`fill: ${t}`)??"";n.setAttribute("style",r)}if(e.strokeMatch){const r=n.getAttribute("style")?.replace(e.strokeMatch[0],`stroke: ${t}`)??"";n.setAttribute("style",r)}}))}))}(e,s),function(e,t){const n=e.getBBox({stroke:!0,fill:!0});(t&&n.width>t||t&&n.height>t)&&e.setAttribute("viewBox",`${n.x} ${n.y} ${n.width} ${n.height}`)}(e,l),function(e){const t=e.getBBox({stroke:!0,fill:!0});e.setAttribute("width",t.width),e.setAttribute("height",t.height)}(e);const v=new CustomEvent("iconload",{bubbles:!0});if(e.dispatchEvent(v),e.getAttribute("oniconload")){e.setAttribute("onauxclick",e.getAttribute("oniconload"));const t=new CustomEvent("auxclick",{bubbles:!1,view:window});e.dispatchEvent(t),e.removeAttribute("onauxclick")}},Xn={},Qn={},Jn=async e=>{const t=new URL(e.getAttribute("data-src"),globalThis.location),n=t.toString().replace(t.hash,""),r=t.hash.replace("#",""),a="enabled"===e.getAttribute("data-js"),o="disabled"===e.getAttribute("data-unique-ids"),i="disabled"===e.getAttribute("data-css-scoping"),s=e.getAttribute("data-replacement-color"),l=e.getAttribute("data-container-size"),c=Gn.bind(self,e,{enableJs:a,disableUniqueIds:o,disableCssScoping:i,spriteIconId:r,replacementColor:s,containerSize:l});if(Qn[n]){const e=Qn[n];c(e)}else{if(Xn[n])return void setTimeout((()=>Jn(e)),20);Xn[n]=!0,fetch(n).then((e=>{if(!e.ok)throw Error(`Request for '${n}' returned ${e.status} (${e.statusText})`);return e.text()})).then((e=>{const t=e.toLowerCase().trim();if(!(t.startsWith("<svg")||t.startsWith("<?xml")||t.startsWith("<!doctype")))throw Error(`Resource '${n}' returned an invalid SVG file`);Qn[n]=e,c(e)})).catch((t=>{console.error(t);const n=new CustomEvent("iconloaderror",{bubbles:!0,detail:t.toString()});if(e.dispatchEvent(n),e.getAttribute("oniconloaderror")){Function("error",e.getAttribute("oniconloaderror"))(t)}})).finally((()=>{delete Xn[n]}))}};let er;globalThis.IntersectionObserver&&(er=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(Jn(e.target),er.unobserve(e.target))}))}),{rootMargin:"1200px"}));const tr=[];function nr(){Array.from(document.querySelectorAll("svg[data-src]:not([data-id])")).forEach((e=>{-1===tr.indexOf(e)&&(tr.push(e),"lazy"===e.getAttribute("data-loading")?er.observe(e):Jn(e))}))}let rr=!1;if(globalThis.addEventListener){const Fd=setInterval((()=>{nr()}),100);function jd(){clearInterval(Fd),nr(),(()=>{if(rr)return;rr=!0,new MutationObserver((e=>{e.some((e=>Array.from(e.addedNodes).some((e=>e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("data-src")&&!e.getAttribute("data-id")||e.querySelector("svg[data-src]:not([data-id])"))))))&&nr(),e.forEach((e=>{"attributes"===e.type&&Jn(e.target)}))})).observe(document.documentElement,{attributeFilter:["data-src"],attributes:!0,childList:!0,subtree:!0})})()}"interactive"===document.readyState||"complete"===document.readyState?jd():globalThis.addEventListener("DOMContentLoaded",(()=>{jd()}))}globalThis.SVGLoader={},globalThis.SVGLoader.updateMemoryCache=async(e,t)=>{Qn[e]=t};const ar=()=>(0,o.h)("svg",{width:"3",height:"15",viewBox:"0 0 3 15",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M3 1.5C3 2.32843 2.32843 3 1.5 3C0.671573 3 0 2.32843 0 1.5C0 0.671573 0.671573 0 1.5 0C2.32843 0 3 0.671573 3 1.5Z"}),(0,o.h)("path",{d:"M3 7.5C3 8.32843 2.32843 9 1.5 9C0.671573 9 0 8.32843 0 7.5C0 6.67157 0.671573 6 1.5 6C2.32843 6 3 6.67157 3 7.5Z"}),(0,o.h)("path",{d:"M3 13.5C3 14.3284 2.32843 15 1.5 15C0.671573 15 0 14.3284 0 13.5C0 12.6716 0.671573 12 1.5 12C2.32843 12 3 12.6716 3 13.5Z"})),or=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",style:t},(0,o.h)("path",{d:"M11 8V9C10.5955 9 10.2309 8.75636 10.0761 8.38268C9.92134 8.00901 10.0069 7.57889 10.2929 7.29289L11 8ZM10.5 2.5L11.2071 3.20711L10.5 2.5ZM6 8V18H4V8H6ZM5 17H14.3604V19H5V17ZM15.341 16.1961L16.541 10.1961L18.5021 10.5884L17.3021 16.5883L15.341 16.1961ZM11.2071 3.20711L5.70711 8.70711L4.29289 7.29289L9.79289 1.79289L11.2071 3.20711ZM15.5604 9H11V7H15.5604V9ZM10.2929 7.29289L12.7929 4.79289L14.2071 6.20711L11.7071 8.70711L10.2929 7.29289ZM5 9H3V7H5V9ZM2 10V16H0V10H2ZM3 17H5V19H3V17ZM2 16C2 16.5523 2.44771 17 3 17V19C1.34315 19 0 17.6569 0 16H2ZM3 9C2.44772 9 2 9.44772 2 10H0C0 8.34315 1.34315 7 3 7V9ZM12.7929 4.79289C13.2308 4.35499 13.2308 3.64501 12.7929 3.20711L14.2071 1.79289C15.4261 3.01184 15.4261 4.98815 14.2071 6.20711L12.7929 4.79289ZM9.79289 1.79289C11.0118 0.573941 12.9882 0.573942 14.2071 1.79289L12.7929 3.20711C12.355 2.7692 11.645 2.7692 11.2071 3.20711L9.79289 1.79289ZM14.3604 17C14.8371 17 15.2475 16.6635 15.341 16.1961L17.3021 16.5883C17.0217 17.9906 15.7904 19 14.3604 19V17ZM16.541 10.1961C16.6647 9.57732 16.1914 9 15.5604 9V7C17.4535 7 18.8734 8.73198 18.5021 10.5884L16.541 10.1961Z"}))},ir=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t},(0,o.h)("path",{d:"M8 11V10C8.40446 10 8.7691 10.2436 8.92388 10.6173C9.07866 10.991 8.9931 11.4211 8.70711 11.7071L8 11ZM8.5 16.5L7.79289 15.7929L8.5 16.5ZM13 11L13 1H15L15 11H13ZM14 2H4.63961V0H14V2ZM3.65903 2.80388L2.45903 8.80388L0.497866 8.41165L1.69787 2.41165L3.65903 2.80388ZM7.79289 15.7929L13.2929 10.2929L14.7071 11.7071L9.20711 17.2071L7.79289 15.7929ZM3.43961 10H8V12H3.43961V10ZM8.70711 11.7071L6.20711 14.2071L4.79289 12.7929L7.29289 10.2929L8.70711 11.7071ZM14 10H16L16 12H14L14 10ZM17 9V3H19L19 9H17ZM16 2L14 2V0L16 0V2ZM17 3C17 2.44771 16.5523 2 16 2V0C17.6569 0 19 1.34315 19 3H17ZM16 10C16.5523 10 17 9.55228 17 9H19C19 10.6569 17.6569 12 16 12L16 10ZM6.20711 14.2071C5.7692 14.645 5.7692 15.355 6.20711 15.7929L4.79289 17.2071C3.57394 15.9882 3.57394 14.0118 4.79289 12.7929L6.20711 14.2071ZM9.20711 17.2071C7.98815 18.4261 6.01184 18.4261 4.79289 17.2071L6.20711 15.7929C6.64501 16.2308 7.35499 16.2308 7.79289 15.7929L9.20711 17.2071ZM4.63961 2C4.16293 2 3.75251 2.33646 3.65903 2.80388L1.69787 2.41165C1.97832 1.00938 3.20956 0 4.63961 0V2ZM2.45903 8.80388C2.33527 9.42268 2.80856 10 3.43961 10V12C1.54647 12 0.126591 10.268 0.497866 8.41165L2.45903 8.80388Z"}))},sr=e=>e&&e.current&&e.current.base,lr={top:35,right:25},cr=on("button")((e=>{let{open:t,theme:n}=e;return Object.assign({cursor:"pointer",position:"absolute",top:"10px",right:"10px",width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"0px",borderRadius:"30px",zIndex:rs.OVERFLOW_MENU_BUTTON,background:n.getCSSColor(t?"background.optionsActive":"background.options"),"&:hover":{background:n.getCSSColor("background.optionsHover")}," > svg":{fill:n.getCSSColor(t?"icon.optionsActive":"icon.options")},"&:hover > svg":{fill:n.getCSSColor("icon.optionsHover")}},n.getElementFocusCSSProperties())})),dr=on("button")((e=>{let{theme:t}=e;return Object.assign({cursor:"pointer",position:"absolute",top:"10px",right:"10px",width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"0px",borderRadius:"30px",zIndex:rs.OVERFLOW_MENU_BUTTON,background:t.getCSSColor("background.options")," > svg":{stroke:t.getCSSColor("icon.options")},"&:hover":{background:t.getCSSColor("background.optionsHover")},"&:active":{background:t.getCSSColor("background.optionsActive")},"&:hover > svg":{stroke:t.getCSSColor("icon.optionsHover")},"&:active > svg":{stroke:t.getCSSColor("icon.optionsActive")}},t.getElementFocusCSSProperties())})),ur=e=>{let{theme:t,open:n,feedOrientation:r,children:a,cardRef:i,ariaLabelledBy:s}=e;const l=f(null);let c={direction:"down",maxHeight:0,maxWidth:0};return n&&(c=((e,t,n)=>{if(sr(t)&&sr(n)){const r=t.current.base.offsetParent,a=r.offsetParent,o=n.current.base,i=10,s=10;if("horizontal"===e){const e=r.offsetLeft+o.offsetLeft-a.scrollLeft,t=a.clientWidth-e,n=200,i=e>=n||t<n;return{direction:i?"left":"right",maxWidth:i?e:t}}const l=o.offsetTop,c=a.scrollHeight-r.offsetTop-i-l,d=r.offsetTop,u=o.scrollHeight,p=c>=u||d<u;return{direction:p?"down":"up",maxHeight:p?c:d,maxWidth:r.clientWidth-2*s}}return{direction:"down",maxHeight:0,maxWidth:0}})(r,i,l),setTimeout((()=>{if(sr(l)){const e=l.current.base.querySelector('[tabindex="0"]');if(e){e.focus()}}}),0)),(0,o.h)(pr,{maxHeight:`${c.maxHeight}px`,maxWidth:`${c.maxWidth}px`,open:n,theme:t,ref:l,children:a,direction:c.direction,"aria-labelledBy":s})},pr=on("ul")((e=>{var t;let n,{theme:r,open:a,maxHeight:o,maxWidth:i,direction:s}=e;switch(s){case"up":n="translateY(-100%) translateY(-50px)";break;case"down":case"left":n="translateY(0)";break;case"right":n="translateX(90%)"}return{position:"absolute",top:"50px",right:"10px",width:"300px",flexShrink:"0",background:r.getCSSColor("background.sheet"),display:"flex",flexFlow:"column",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",borderRadius:null!==(t=r.getShape("borderRadius.sheet",{skipFallback:!0}))&&void 0!==t?t:"5px",padding:"10px 0",overflow:"auto",listStyle:"none",margin:"0",zIndex:rs.OVERFLOW_MENU,maxHeight:a?`${o}`:"0px",maxWidth:a?`${i}`:"0px",visibility:a?"visible":"hidden",transform:n}})),hr=on("button")((e=>{let{theme:t}=e;return Object.assign(Object.assign(Object.assign({padding:"15px 20px",cursor:"pointer",display:"flex",flexShrink:"0",alignItems:"center",background:"transparent"},t.getCSSFontProperties("sheetItem")),{color:t.getCSSColor("text.sheetItem"),width:"100%",margin:"0 0 0 0"," svg":{fill:t.getCSSColor("icon.sheetItem")},"&:hover":{background:t.getCSSColor("background.sheetItemActive"),color:t.getCSSColor("text.sheetItemActive")},"&:hover svg":{fill:t.getCSSColor("icon.sheetItemActive")},border:"0px"}),t.getElementFocusCSSProperties())})),mr=on("span")((()=>({maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),gr=on("li")((e=>{let{theme:t}=e;return{borderTop:`1px solid ${t.getCSSColor("border.sheetItemDivider")}`,height:"1px",margin:"10px 0"}})),vr=on("li")((()=>({flexShrink:"0"}))),fr=e=>{let{title:t,icon:n,onClick:r,theme:a,className:i}=e;const s={marginRight:"20px",minWidth:"20px"};return(0,o.h)(vr,{role:"none"},(0,o.h)(hr,{theme:a,tabIndex:"-1",onClick:r,className:i},"bin"===n&&(0,o.h)(Bn,{style:s}),"clock"===n&&(0,o.h)(Un,{style:s}),"thumbs-up"===n&&(0,o.h)(or,{style:s}),"thumbs-down"===n&&(0,o.h)(ir,{style:s}),(0,o.h)(mr,null,t)))},br=32,yr=38,wr=40,Sr=13,Cr=27,kr=-1,xr=e=>{switch(e){case"ArrowUp":case"Up":return yr;case"ArrowDown":case"Down":return wr;case"Enter":return Sr;case"Spacebar":case" ":return br;case"Escape":return Cr;default:return kr}},Ir="ArrowUp",Or="ArrowDown",Mr="ArrowLeft",Tr="ArrowRight",Fr="Enter",jr=" ",_r="Escape",Lr="PageUp",Dr="PageDown",Ar="Tab",Er=on("div")((e=>{let{theme:t}=e;return Object.assign({width:"100%",border:"0"},t.getElementFocusCSSProperties())})),Hr=(e,t)=>{try{const n=Pr(e)[t];return n&&"none"===n.getAttribute("role")&&n.childNodes.length>0?n.childNodes[0]:n}catch(e){return null}},Pr=e=>e&&e.current&&e.current.base&&e.current.base.childNodes?[...e.current.base.childNodes].filter((e=>"true"!==e.getAttribute("aria-hidden"))):[],Rr=e=>{let{defaultIndex:t,theme:n,children:r}=e;const[a,i]=h(t||0),s=(0,o.createRef)(),l=f(-1);g((()=>{l.current=a}));const c=l.current;return g((()=>{i(t||0)}),[t]),g((()=>{var e,t,n;-1!==c&&(null===(n=Hr(s,c))||void 0===n||n.setAttribute("tabIndex","-1"));null===(e=Hr(s,a))||void 0===e||e.setAttribute("tabIndex","0"),null===(t=Hr(s,a))||void 0===t||t.focus()}),[a]),(0,o.h)(Er,{theme:n,className:"supports-keyboard-navigation",ref:s,onKeyDown:e=>{var t;let n=null;switch(xr(e.key)){case wr:n=a+1;break;case yr:n=a-1;break;case Sr:case br:null===(t=Hr(s,a))||void 0===t||t.click(),e.stopPropagation(),e.preventDefault()}var r,o;null!==n&&(r=n,o=Pr(s).length,n=(r+o)%o,i(n),e.view.event.preventDefault())}},r)},Vr=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"12",height:"12",viewBox:"0 0 12 12"},(0,o.h)("path",{d:"M1 1L6 6L11 11M1 11L11 1","stroke-width":"2","stroke-linecap":"round",stroke:t}))},$r=on("div")((e=>{let{feedOrientation:t,rendersButton:n,cardElements:r}=e;const a=((e,t)=>{var n,r;if(!t||!e||0===e.length)return{top:0,right:0};const a=(e,t)=>{var n;if(!e)return{top:0,right:0};const r=Array.isArray(e)?e[0]:e;switch(null==r?void 0:r.type){case me:case ge:const e=null==r||null===(n=r.attributes)||void 0===n?void 0:n.format;return"banner"===e?null:"text"===e?{top:0,right:lr.right}:{top:lr.top,right:0};case ve:case fe:case be:case ye:case we:case Se:case Ce:case ke:case Oe:case Me:case Te:case Fe:case je:case _e:return{top:lr.top,right:0};case de:case ue:case pe:case he:return{top:0,right:lr.right};case xe:case Ie:return a(null==r?void 0:r.children,t);default:return null}},o=null===(n=e[0])||void 0===n||null===(r=n.props)||void 0===r?void 0:r.node;return a(o,t)})(r,n);return Object.assign(Object.assign({},"horizontal"===t?{height:"100%",display:"flex",flexDirection:"column"}:{}),a?{"& > *:nth-child(2)":{marginRight:`${a.right}px`,marginTop:`${a.top}px`}}:{})})),zr=on("div")((e=>{let{theme:t,margin:n,minHeight:r,feedOrientation:a,cardWidth:o}=e;const i={width:`${o}px`,marginLeft:`${n}px`};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({backgroundColor:t.getCSSColor("background.card"),marginBottom:`${n}px`,borderRadius:t.getShape("borderRadius.card"),boxShadow:n>0?`0 ${t.getShape("offset.cardShadow")} ${t.getShape("blur.cardShadow")} ${t.getCSSColor("shadow.card")}`:"none",padding:"10px 20px",border:`${t.getShape("border.card")} solid ${t.getCSSColor("border.card")}`,position:"relative",minHeight:r?`${r}px`:"0px"},"horizontal"===a?i:{}),Ts(a).cardCompletion),Ts(a).dismissal),Ts(a).snooze),{".submitting, .submitted, .submitted-subview":{border:"0"}})})),Nr=on("div")((e=>{let{dimensions:t,centerAlign:n,leftPosition:r,feedOrientation:a}=e;const o=Object.assign({width:t.width,display:"flex",flexShrink:"0",scrollSnapAlign:"center",".fixed-position":{position:"unset",left:`${r?r/2+r:0}px`}},n&&{left:"50%",transform:"translateX(-50%)"});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({height:t.height},"horizontal"===a?o:{}),Fs(a).cardCompletion),Fs(a).dismissal),Fs(a).snooze),Fs(a).center)})),Br=on("div")((()=>({})));var Ur;!function(e){e.menu="menu",e.dismiss="dismiss",e.hidden="hidden"}(Ur||(Ur={}));const Wr=F((e=>{let{containerInstanceId:t,cardInstanceId:n,children:r,theme:a,animationState:i,cardFeedOverlayDisplayed:s,onDismiss:l,onSnooze:c,onFeedbackSelected:d,removeCard:u,customStrings:p,margin:m,centerAlign:b,accessibilityRole:y,actions:w,votingOptions:S,cardMinimumHeight:C,horizontalContainerConfig:k}=e;const[x,I]=h(!1),O=f(x),M=e=>{O.current=e,I(e)},[T,F]=h({height:"auto",width:"auto"}),[j,_]=h(0),L=f(null),D=f(null),A=f(null),E=`card-overflow-menu-${n}`,H=Bc(k);v((()=>{D.current&&D.current.base&&("submitted"===i||"submitted-subview"===i||"dismissed"===i||"snoozed"===i?(F({height:D.current.base.offsetHeight+m-1+"px",width:`${D.current.base.offsetWidth+m}px`}),"horizontal"===Bc(k)&&"center"===(null==k?void 0:k.lastCardAlignment)?(Jt().fixPositionRemainingCard(n),_(A.current.base.offsetLeft),setTimeout((()=>{Jt().centerRemainingCard(n)}),200),setTimeout((()=>{u()}),Ds(i))):setTimeout((()=>{u()}),Ds(i))):F({height:"auto",width:"auto"})),A.current&&A.current.base&&(_("fixed-position"===i?A.current.base.offsetLeft:0),"centering"===i&&setTimeout((()=>{Jt().removeCardState(n)}),Ds(i)))}),[i,D.current,A.current]),g((()=>{const e=e=>{var t;(null===(t=L.current)||void 0===t?void 0:t.base)&&!L.current.base.contains(e.target)&&M(!1)};document.addEventListener("mousedown",e);const t=e=>{if(O.current&&("Tab"===e.key&&M(!1),"Escape"===e.key&&O.current)){const e=document.getElementById(E);M(!1),null==e||e.focus()}};return document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}}),[n]);const{dismiss:{overflow:P},snooze:{overflow:R},voteUp:{overflow:V,feedback:$,feedbackLabel:z},voteDown:{overflow:N,feedback:B,feedbackLabel:U}}=w,W={voteUp:!0===(null==S?void 0:S.canVoteUseful)||V,voteDown:!0===(null==S?void 0:S.canVoteNotUseful)||N};let q=Ur.hidden;W.voteUp||W.voteDown||R?q=Ur.menu:P&&(q=Ur.dismiss);const Y=(W.voteUp||W.voteDown)&&(P||R);return(0,o.h)(Nr,{ref:A,id:n,dimensions:T,feedOrientation:H,centerAlign:b,leftPosition:j,class:i,role:y},(0,o.h)(zr,{theme:a,class:`card-content ${i||""}`,ref:D,margin:m,minHeight:C,feedOrientation:H,cardWidth:null==k?void 0:k.cardWidth,inert:s},(0,o.h)($r,{class:"card-nodes",feedOrientation:H,rendersButton:q!==Ur.hidden,cardElements:r},q===Ur.menu&&(0,o.h)(Br,{ref:L},(0,o.h)(cr,{class:"overflow-action",theme:a,open:x,tabIndex:"0",ariaLabel:"Card overflow menu",id:E,ariaHasPopup:"true",ariaExpanded:x,onClick:e=>{e.target&&e.target.focus(),M(!x)}},(0,o.h)(ar,null)),(0,o.h)(ur,{theme:a,ariaLabelledBy:E,open:x,feedOrientation:H,cardRef:D},(0,o.h)(Rr,{theme:a},W.voteUp&&(0,o.h)(fr,{onClick:()=>{d({sentiment:"positive",textFeedback:$,textFeedbackLabel:z,source:"overflow-menu"}),M(!1)},theme:a,title:(null==p?void 0:p.votingUsefulTitle)||"This is useful",icon:"thumbs-up",className:"vote-up-action"}),W.voteDown&&(0,o.h)(fr,{onClick:()=>{d({sentiment:"negative",textFeedback:B,textFeedbackLabel:U,source:"overflow-menu"}),M(!1)},theme:a,title:(null==p?void 0:p.votingNotUsefulTitle)||"This isn't useful",icon:"thumbs-down",className:"vote-down-action"}),Y&&(0,o.h)(gr,{theme:a,className:"card-overflow-divider","aria-hidden":"true"}),R&&(0,o.h)(fr,{onClick:()=>{c(),M(!1)},theme:a,title:(null==p?void 0:p.cardSnoozeTitle)||"Remind me",icon:"clock",className:"snooze-action"}),P&&(0,o.h)(fr,{onClick:()=>{l(),M(!1)},theme:a,title:"Dismiss",icon:"bin",className:"dismiss-action"})))),q===Ur.dismiss&&(0,o.h)(dr,{ariaLabel:"Dismiss card",theme:a,tabIndex:"0",onClick:l,className:"dismiss-button"},(0,o.h)(Vr,null)),r),(0,o.h)(ys,{theme:a,animationState:i})),(0,o.h)(Os,{viewState:"topview",onCancelUpload:()=>{window.AtomicUploadService.cancelUploadForCard(t,n),Jt().finishCardFileUpload(n),!window.AtomicUploadService.getIsUploadingStatus(t)&&Jt().setCardFeedOverlay(!1)},theme:a,renderOverlay:"uploading-files"===i}),(0,o.h)(ws,{theme:a,animationState:i}))}),((e,t)=>0==t.isPreview&&e.animationState===t.animationState&&e.cardInstanceId===t.cardInstanceId&&e.runtimeVariables===t.runtimeVariables&&e.theme===t.theme)),qr=on("div")((e=>{let{feedOrientation:t,snapScroll:n}=e;const r={position:"relative",display:"flex",flexDirection:"row nowrap",alignItems:"stretch",flexShrink:"0",padding:"10px 10px 10px 0",overflowX:"auto",scrollSnapType:n?"x mandatory":"none"};return Object.assign({},"horizontal"===t?r:{})})),Yr=K.forwardRef(((e,t)=>{let{cardInstances:n,theme:r,isPreview:a,onDismiss:i,onSnooze:s,onFeedbackSelected:l,removeCard:c,cardStates:d,margin:u,runtimeVariables:p,customStrings:h,votingOptions:m,cardMinimumHeight:g,horizontalContainerConfig:v}=e;const f=ie().getState();let b=n;f.application.cardLimit&&(b=b.slice(0,f.application.cardLimit));const y=Bc(v);return(0,o.h)(qr,{feedOrientation:y,snapScroll:"free"!==(null==v?void 0:v.scrollMode),class:"card-list",ref:t},b.map((e=>{if(e.defaultView){var t;let n=null==p||null===(t=p.values)||void 0===t?void 0:t.get(e.instance.id);n=n||new Map;const w=1===b.length&&"horizontal"===y&&"center"===(null==v?void 0:v.lastCardAlignment);return e.defaultView.nodes=Ac(e.defaultView.nodes),(0,o.h)(Wr,{key:e.instance.id,cardInstanceId:e.instance.id,containerInstanceId:f.application.containerInstanceId,theme:r,isPreview:a,animationState:d[e.instance.id],cardFeedOverlayDisplayed:f.cardFeed.displayingOverlay,onDismiss:()=>{i(e.instance.id)},onSnooze:()=>{s(e.instance.id,e.metadata.expires)},onFeedbackSelected:t=>{l(t,e.instance.id)},removeCard:()=>{c(e.instance.id)},runtimeVariables:n,customStrings:h,margin:u,centerAlign:w,accessibilityRole:"listitem",actions:e.actions,votingOptions:m,cardMinimumHeight:g,horizontalContainerConfig:v},e.defaultView.nodes.map((t=>(0,o.h)(Tc,{cardInstanceId:e.instance.id,cardMetadata:e.metadata,node:t,isWorkflow:!1,theme:r,runtimeVariables:n,feedOrientation:y,embedMode:f.application.embedMode}))))}return null})))})),Zr=on("button")((e=>{let{theme:t}=e;return Object.assign({justifySelf:"end",alignSelf:"center",border:"0px",borderRadius:"999px",width:"40px",height:"40px",display:"flex",flexBasis:"40px",flex:"none",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",":hover":{backgroundColor:"rgba(0, 0, 0, 0.05)",transition:"background-color 0.1s ease"},":active":{backgroundColor:"rgba(0, 0, 0, 0.1)"}},t.getElementFocusCSSProperties())})),Kr={settings:e=>{let{fillColor:t}=e;return(0,o.h)("svg",{fill:t,width:"18",height:"14",viewBox:"0 0 18 14"},(0,o.h)("path",{d:"M17 4C17.5523 4 18 3.55228 18 3C18 2.44772 17.5523 2 17 2V4ZM1 2C0.447715 2 0 2.44772 0 3C0 3.55228 0.447715 4 1 4V2ZM17 12C17.5523 12 18 11.5523 18 11C18 10.4477 17.5523 10 17 10V12ZM1 10C0.447715 10 0 10.4477 0 11C0 11.5523 0.447715 12 1 12V10ZM13 3C13 3.55228 12.5523 4 12 4V6C13.6569 6 15 4.65685 15 3H13ZM12 4C11.4477 4 11 3.55228 11 3H9C9 4.65685 10.3431 6 12 6V4ZM11 3C11 2.44772 11.4477 2 12 2V0C10.3431 0 9 1.34315 9 3H11ZM12 2C12.5523 2 13 2.44772 13 3H15C15 1.34315 13.6569 0 12 0V2ZM14 4H17V2H14V4ZM10 2H1V4H10V2ZM7 11C7 11.5523 6.55228 12 6 12V14C7.65685 14 9 12.6569 9 11H7ZM6 12C5.44772 12 5 11.5523 5 11H3C3 12.6569 4.34315 14 6 14V12ZM5 11C5 10.4477 5.44772 10 6 10V8C4.34315 8 3 9.34315 3 11H5ZM6 10C6.55228 10 7 10.4477 7 11H9C9 9.34315 7.65685 8 6 8V10ZM8 12H17V10H8V12ZM4 10H1V12H4V10Z"}))},arrowLeft:e=>{let{fillColor:t}=e;return(0,o.h)("svg",{stroke:t,width:"14",height:"12",viewBox:"0 0 14 12"},(0,o.h)("path",{d:"M6 11L1 6M1 6L6 1M1 6L13 6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},cross:Vr},Gr=e=>{let{title:t,iconName:n,onClick:r,theme:a}=e;const i=Kr[n];return(0,o.h)(Zr,{onClick:r,tabIndex:"0",ariaLabel:t,theme:a,className:`button-${n}`},(0,o.h)(i,{fillColor:a.getCSSColor("text.navigationAction")}))},Xr=on("div")((e=>{let{theme:t,feedOrientation:n}=e;return Object.assign({padding:"10px 20px 10px 15px",display:"flex",alignItems:"center",backgroundColor:t.getCSSColor("background.navigation"),zIndex:rs.HEADER,boxShadow:`0 ${t.getShape("offset.navigationShadow")} ${t.getShape("blur.navigationShadow")} ${t.getCSSColor("shadow.navigation")}`},"horizontal"===n?{padding:"10px"}:{})})),Qr=on("h1")((e=>{let{theme:t,feedOrientation:n,alignment:r="left"}=e;const a={paddingLeft:"0",textAlign:r};return Object.assign(Object.assign(Object.assign({},t.getCSSFontProperties("navigationTitle")),{alignSelf:"center",paddingLeft:"10px",flexGrow:"1",color:t.getCSSColor("text.navigationTitle")}),"horizontal"===n?a:{})})),Jr=K.forwardRef(((e,t)=>{let{theme:n,title:r,actionHandler:a,feedOrientation:i,alignment:s,inert:l}=e;return(0,o.h)(Xr,{theme:n,feedOrientation:i,ref:t,inert:l},a&&(0,o.h)(Gr,{title:"Back",onClick:a,iconName:"arrowLeft",theme:n}),(0,o.h)(Qr,{theme:n,feedOrientation:i,alignment:s},r))})),ea=e=>{let{theme:t,title:n,actionHandler:r,inert:a}=e;return(0,o.h)(Xr,{theme:t,inert:a},(0,o.h)(Qr,{theme:t},n),r&&(0,o.h)(Gr,{title:"Close",onClick:r,iconName:"cross",theme:t}))},ta="action-cards-sdk-toast-wrapper",na=on("div")((e=>{let{theme:t,hasRetry:n,feedOrientation:r}=e;const a={maxWidth:"380px",flexGrow:"1"};return Object.assign(Object.assign(Object.assign({},t.getElementFocusCSSProperties()),{margin:"10px",background:t.getCSSColor("background.toast"),padding:"20px",border:"0px",borderRadius:"10px",display:"flex",flexDirection:"row",pointerEvents:"auto",cursor:!n&&"pointer",transform:"translateY(100%) translateY(50px)",transition:"300ms transform ease-in-out 300ms",".visible":{transform:"translateY(0)"}}),"horizontal"===r?a:{})})),ra=on("div")((e=>{let{feedOrientation:t}=e;return Object.assign({position:"absolute",bottom:"0",left:"0",right:"0",overflow:"hidden",pointerEvents:"none",zIndex:rs.TOAST},"horizontal"===t?{display:"flex",justifyContent:"center"}:{})})),aa=on("p")((e=>{let{theme:t}=e;return Object.assign({flexGrow:"1",margin:"0",userSelect:"none",webkitUserSelect:"none",color:t.getCSSColor("text.toast")},t.getCSSFontProperties("toast"))})),oa=on("span")((e=>{let{theme:t,hasRetry:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign({border:"0px"},t.getElementFocusCSSProperties()),{color:t.getCSSColor("text.toastAction")}),t.getCSSFontProperties("toastAction")),{cursor:n&&"pointer",background:"transparent",padding:"0",userSelect:"none",webkitUserSelect:"none",display:"flex",alignItems:"center"})})),ia=(e,t)=>new Promise((n=>{t(setTimeout((()=>{n()}),e))})),sa=e=>{var t;let{theme:n,feedOrientation:r,message:a,actionTitle:i,actionHandler:s,onDismiss:l,delay:c=0}=e;const[d,u]=h(!1),[p,m]=h(""),[v,f]=h(null),[b,y]=h(""),w=null==a?void 0:a.messageId,S="Try again"===i,C=(null===(t=ie().getState().application.enabledUiElements.toastConfig)||void 0===t?void 0:t.timeout)||2e3;g((()=>{null!=(null==a?void 0:a.messageId)&&p!=a.messageId&&(m(a.messageId),a.text&&y(a.text),null!=v&&(clearTimeout(v),f(null)),ia(c,f).then((()=>(u(!0),ia(C+600,f)))).then((()=>(u(!1),ia(600,f)))).then((()=>{l&&(l(),y(""))})))}),[w]);const k=()=>{u(!1),s?s():y("")},x=e=>{const t=e.keyCode;13!==t&&32!==t||k()};return(0,o.h)(ra,{id:ta,class:"floating",feedOrientation:r},void 0!==a&&(0,o.h)(na,{id:"toast-body",theme:n,feedOrientation:r,hasRetry:S,onClick:S?void 0:k,onKeyUp:S?void 0:x,tabIndex:d&&!S?0:-1,class:d?"visible":"",role:d?"alert":void 0},(0,o.h)(aa,{theme:n,class:"toast-message"},b||""),S&&(0,o.h)(oa,{theme:n,class:"toast-action",hasRetry:S,onClick:S?k:void 0,onKeyUp:S?x:void 0,tabIndex:d&&S?0:-1},i)))},la=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"79",height:"53",viewBox:"0 0 79 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M20.0172 47.9056C20.0172 49.5625 21.3604 50.9056 23.0172 50.9056H73.0172C74.6741 50.9056 76.0172 49.5625 76.0172 47.9056V17.9056C76.0172 16.2488 74.6741 14.9056 73.0172 14.9056V12.9056C75.7786 12.9056 78.0172 15.1442 78.0172 17.9056V47.9056C78.0172 50.667 75.7786 52.9056 73.0172 52.9056H23.0172C20.2558 52.9056 18.0172 50.667 18.0172 47.9056H20.0172Z",fill:t}),(0,o.h)("path",{d:"M68.0172 9.90561H59.5V7.90561H68.0172C70.7786 7.90561 73.0172 10.1442 73.0172 12.9056V42.9056C73.0172 45.667 70.7786 47.9056 68.0172 47.9056H18.0172V45.9056H68.0172C69.6741 45.9056 71.0172 44.5625 71.0172 42.9056V12.9056C71.0172 11.2488 69.6741 9.90561 68.0172 9.90561Z",fill:t}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M54.5117 2.83786L5.27133 11.5203C3.63965 11.808 2.55015 13.3639 2.83786 14.9956L8.0473 44.5399C8.33501 46.1715 9.89098 47.2611 11.5227 46.9733L60.7631 38.2909C62.3947 38.0032 63.4842 36.4472 63.1965 34.8156L57.9871 5.27133C57.6994 3.63965 56.1434 2.55015 54.5117 2.83786ZM4.92404 9.55065C2.20457 10.0302 0.388724 12.6235 0.86824 15.3429L6.07769 44.8872C6.5572 47.6066 9.15049 49.4225 11.87 48.943L61.1104 40.2605C63.8298 39.781 65.6457 37.1877 65.1662 34.4683L59.9567 4.92404C59.4772 2.20457 56.8839 0.388724 54.1644 0.86824L4.92404 9.55065Z",fill:t}),(0,o.h)("path",{d:"M28.2341 24.1607C27.7817 23.8439 27.1582 23.9539 26.8414 24.4063C26.5246 24.8587 26.6346 25.4822 27.087 25.799L28.2341 24.1607ZM32.2944 28.2245L31.7208 29.0436C32.1732 29.3604 32.7967 29.2505 33.1135 28.7981L32.2944 28.2245ZM39.6028 19.5304C39.9196 19.078 39.8096 18.4545 39.3572 18.1377C38.9048 17.8209 38.2813 17.9309 37.9645 18.3833L39.6028 19.5304ZM27.087 25.799L31.7208 29.0436L32.8679 27.4053L28.2341 24.1607L27.087 25.799ZM33.1135 28.7981L39.6028 19.5304L37.9645 18.3833L31.4752 27.6509L33.1135 28.7981Z",fill:t}))},ca=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M40 21C40 31.4934 31.4934 40 21 40V42C32.598 42 42 32.598 42 21H40ZM21 40C10.5066 40 2 31.4934 2 21H0C0 32.598 9.40202 42 21 42V40ZM2 21C2 10.5066 10.5066 2 21 2V0C9.40202 0 0 9.40202 0 21H2ZM21 2C31.4934 2 40 10.5066 40 21H42C42 9.40202 32.598 0 21 0V2Z",fill:t}),(0,o.h)("path",{d:"M16.7071 20.2929C16.3166 19.9024 15.6834 19.9024 15.2929 20.2929C14.9024 20.6834 14.9024 21.3166 15.2929 21.7071L16.7071 20.2929ZM20 25L19.2929 25.7071C19.6834 26.0976 20.3166 26.0976 20.7071 25.7071L20 25ZM28.7071 17.7071C29.0976 17.3166 29.0976 16.6834 28.7071 16.2929C28.3166 15.9024 27.6834 15.9024 27.2929 16.2929L28.7071 17.7071ZM15.2929 21.7071L19.2929 25.7071L20.7071 24.2929L16.7071 20.2929L15.2929 21.7071ZM20.7071 25.7071L28.7071 17.7071L27.2929 16.2929L19.2929 24.2929L20.7071 25.7071Z",fill:t}))},da=on("div")((()=>({width:"100%",display:"flex",flexFlow:"column wrap",alignItems:"center",justifyContent:"center",minHeight:"250px"}))),ua=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({padding:"20px 20px 0 20px",color:t.getCSSColor("text.listEmptyState")},t.getCSSFontProperties("listEmptyState")),{textAlign:"center",width:"100%"})})),pa=e=>{let{hasSeenTutorial:t,tutorialMessage:n,emptyMessage:r,theme:a}=e;return(0,o.h)(da,null,t?(0,o.h)(o.Fragment,null,(0,o.h)(ca,{fillColor:a.getCSSColor("icon.listEmptyState")}),(0,o.h)(ua,{theme:a},r||"All caught up")):(0,o.h)(o.Fragment,null,(0,o.h)(la,{fillColor:a.getCSSColor("icon.listEmptyState")}),(0,o.h)(ua,{theme:a},n||"Cards will appear here when there’s something to action.")))},ha=e=>{let{title:t,textColor:n,buttonColor:r,theme:a,onRetry:i,tryAgainTitle:s}=e;return(0,o.h)(o.Fragment,null,(0,o.h)(ga,{textColor:n,theme:a},t),(0,o.h)(va,{textColor:r,theme:a,onClick:i},null!=s?s:"Try again"))},ma=on("div")((e=>{let{background:t,embedMode:n}=e;return{display:"flex",width:"100%",height:"launcher"===n?"350px":"100%",minHeight:"250px",alignItems:"center",justifyContent:"center",flexFlow:"column nowrap",background:t,font:`16px ${un}`}})),ga=on("p")((e=>{let{textColor:t,theme:n}=e;return Object.assign(Object.assign({color:(null==n?void 0:n.getCSSColor("text.errorOverlayTitle"))||t},(null==n?void 0:n.getCSSFontProperties("errorOverlayTitle"))||{}),{textAlign:"center"})})),va=on("button")((e=>{let{textColor:t,theme:n}=e;return Object.assign({color:(null==n?void 0:n.getCSSColor("text.errorOverlayAction"))||t,font:`16px ${un}`,background:"transparent",border:"0",outline:"none",fontWeight:"bold",cursor:"pointer"},(null==n?void 0:n.getCSSFontProperties("errorOverlayAction"))||{})})),fa=e=>{let{embedMode:t,state:n,onRetry:r,loadingIconColor:a,textColor:i,buttonColor:s,backgroundColor:l,theme:c,noInternetConnectionMessage:d,dataLoadFailedMessage:u,tryAgainTitle:p}=e;return"single-card"===t||"preview"===t||"modal-subview"===t?null:(0,o.h)(ma,{background:l,className:"loading-wrapper",embedMode:t},!n&&(0,o.h)(Sn,{stopColor:(null==c?void 0:c.getCSSColor("icon.loadingSpinner"))||a||"#000000",size:32}),"apiError"===n&&(0,o.h)(ha,{title:null!=u?u:"Couldn't load data",textColor:i,buttonColor:s,theme:c,onRetry:r,tryAgainTitle:p}),"noInternet"===n&&(0,o.h)(ha,{title:null!=d?d:"No internet connection",textColor:i,buttonColor:s,theme:c,onRetry:r,tryAgainTitle:p}))};let ba;!function(e){e.DISMISSED="dismissed",e.DISMISS_FAILED="dismiss-failed",e.SUBMITTED="submitted",e.SUBMIT_FAILED="submit-failed",e.SNOOZED="snoozed",e.SNOOZE_FAILED="snooze-failed",e.VOTED_USEFUL="voted-useful",e.VOTED_NOT_USEFUL="voted-not-useful"}(ba||(ba={}));const ya=(0,o.createContext)({cardEventDispatcher:{dispatchCardEvent:e=>{}},analyticsDispatcher:{sendEvent:e=>{}},authTokenProvider:{requestToken:()=>Promise.resolve(void 0)},runtimeVariableResolver:void 0});var wa=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Sa="action-cards-sdk-overflow-container",Ca=on("div")((e=>{let{theme:t,rendersBackground:n}=e;return{display:"flex",flexDirection:"column",height:"100%",backgroundColor:n?t.getCSSColor("background.default"):"transparent"}})),ka=on("div")((e=>{let{embedMode:t}=e;return{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",zIndex:rs.FEED_OVERLAY,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"launcher"===t?"20px":"0"}})),xa=on("div")((e=>{let{embedMode:t}=e;return{width:"100%",position:"absolute",top:"0px",left:"0px",zIndex:rs.CUSTOM_HEADER,overflow:"hidden",borderRadius:"launcher"===t?"20px 20px 0 0":"0"}})),Ia=on("div")((e=>{let{scrollPosition:t,scrollbarWidth:n,headerOffset:r}=e;return{width:"100%",marginTop:`${r}px`,paddingRight:`${n}px`,transform:`translateY(-${t}px)`}})),Oa=on("div")((e=>{let{embedMode:t,feedOrientation:n,headerPadding:r}=e;return Object.assign(Object.assign(Object.assign({padding:"single-card"===t?"0px":"10px 10px 0 10px"},r?{paddingTop:`${r+10}px`}:{}),{overflowX:"hidden",overflowY:"auto",maxHeight:"100%",height:"standalone"===t?"100%":"auto",position:"relative",overflowAnchor:"none"}),"horizontal"===n?{padding:"0",overflowY:"auto"}:{})})),Ma=on("div")((e=>{let{embedMode:t,feedOrientation:n,horizontalOffset:r}=e;const a={position:"relative",bottom:r&&`${r}px`};return Object.assign({height:"standalone"===t?"100%":"350px",display:"flex",flexFlow:"row wrap",justifyItems:"center",alignItems:"center"},"horizontal"===n?a:{})})),Ta={scrollTop:0,lastScrollTimeout:null,lastCardIds:[]},Fa=e=>{const t=e.messages.cardList,n=e.cardFeed.cardInstances,r=e.cardStates,{enabled:a,emptyStyle:o}=e.cardFeed.horizontalContainerConfig||{};return t&&1===n.length&&a&&"shrink"===o?0:t&&["submitted-subview"].includes(r[t.cardInstanceId]||"")?1100:800},ja=e=>{let{theme:t,onRetry:n}=e;const r=f(null),a=f(null),i=f(null),s=f(null),l=f(null),[c,d]=h(0),[u,p]=h(0),m=w(ya),v=m.analyticsDispatcher,b=m.cardEventDispatcher,y=m.authTokenProvider;return g((()=>(l.current=new IntersectionObserver(((e,t)=>{const n=Uc();let r=[];e.forEach((e=>{if(e.isIntersecting){const t=e.target.id;n.add(t),Ta.lastCardIds.includes(t)||r.push(t)}})),r.forEach((e=>{const t=ie().getState().cardFeed.cardInstances.find((t=>t.instance.id===e)),n=null==t?void 0:t.metadata.payloadMetadata;v.sendEvent(Object.assign({cardInstanceId:e,cardViewState:"topview",eventName:gt},n?{properties:n}:{}))}));const a=JSON.stringify(Array.from(n));sessionStorage.setItem(ce,a),Ta.lastCardIds=r}),{root:null,rootMargin:"0px",threshold:0}),()=>{var e;null===(e=l.current)||void 0===e||e.disconnect()})),[]),(0,o.h)(Le.lj,{actions:(0,G.Y2)(at,De,Xt)},(e=>{var h,m,f,w,S,C,k,x,I,O;const M="preview"===e.application.embedMode,T="single-card"===e.application.embedMode,F="single-card"!==e.application.embedMode,j=("standalone"===e.application.embedMode||"launcher"===e.application.embedMode)&&e.cardFeed.displayingOverlay,_=e.application.enabledUiElements,L=e.cardFeed.horizontalContainerConfig,D=!("standalone"===e.application.embedMode&&(null==L?void 0:L.enabled)&&"shrink"===(null==L?void 0:L.emptyStyle)),A=Bc(L),E=e.cardFeed.cardInstances.length,H="horizontal"===A&&_.cardListHeader&&"left"===(null==L?void 0:L.headerAlignment)&&(null!==(h=null===(m=a.current)||void 0===m||null===(f=m.base)||void 0===f?void 0:f.scrollHeight)&&void 0!==h?h:0)/2,P=()=>{if(s.current&&s.current.base&&l.current){var e;(null===(e=s.current)||void 0===e?void 0:e.base.childNodes).forEach((e=>{var t;null===(t=l.current)||void 0===t||t.observe(e)}))}};return g((()=>{e.application.open&&P()}),[e.cardFeed.updateId]),g((()=>{e.application.open&&(Ta.lastCardIds=[],P(),v.sendEvent({cardViewState:"topview",eventName:wt,properties:{displayMode:T?"single":"stream"}}))}),[e.application.open]),g((()=>{var e,t;p(null==a||null===(e=a.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.scrollHeight)}),[a]),g((()=>{const n=window.frameElement,r=t.getCSSColor("background.default");D||(n.style.backgroundColor=r);const a=()=>{"visible"===document.visibilityState&&e.application.open&&P()};return window.addEventListener("visibilitychange",a),()=>{window.removeEventListener("visibilitychange",a)}}),[]),g((()=>{Ta.lastCardIds=[];let e=e=>{let t=!1;t||(window.requestAnimationFrame((()=>{var n;const r=e.target;!1!==(null===(n=_.customContainerHeader)||void 0===n?void 0:n.scrollHeader)&&d(r.scrollTop),t=!1})),t=!0),Ta.scrollTop=e.target.scrollTop};return r.current&&r.current.base&&(r.current.base.scrollTop=Ta.scrollTop,r.current.base.addEventListener("scroll",e)),()=>{r.current&&r.current.base&&(Ta.scrollTop=r.current.base.scrollTop,r.current.base.removeEventListener("scroll",e))}}),[]),(0,o.h)(Ca,{theme:t,id:Sa,rendersBackground:F},j&&(0,o.h)(ka,{class:"use-offset",embedMode:e.application.embedMode}),F&&_.cardListHeader&&(0,o.h)(Jr,{title:e.application.customStrings.cardListTitle||"Cards",theme:t,feedOrientation:A,ref:a,alignment:null==L?void 0:L.headerAlignment}),_.customContainerHeader&&("standalone"===e.application.embedMode||"launcher"===e.application.embedMode)&&(0,o.h)(xa,{embedMode:e.application.embedMode},(0,o.h)(Ia,{ref:i,headerOffset:u,scrollbarWidth:(null==r||null===(w=r.current)||void 0===w||null===(S=w.base)||void 0===S?void 0:S.offsetWidth)-(null==r||null===(C=r.current)||void 0===C||null===(k=C.base)||void 0===k?void 0:k.clientWidth),scrollPosition:c,dangerouslySetInnerHTML:{__html:null===(x=document.getElementById("custom-container-header"))||void 0===x?void 0:x.innerHTML}})),(0,o.h)(Oa,{embedMode:e.application.embedMode,feedOrientation:A,headerPadding:null==i||null===(I=i.current)||void 0===I||null===(O=I.base)||void 0===O?void 0:O.scrollHeight,ref:r,cardCount:E,id:"action-cards-sdk-card-container",class:"card-container",role:"list"},!e.cardFeed.status.loaded&&(0,o.h)(fa,{embedMode:e.application.embedMode,state:e.cardFeed.status.errorState,backgroundColor:"transparent",theme:t,onRetry:n,noInternetConnectionMessage:e.application.customStrings.noInternetConnectionMessage,dataLoadFailedMessage:e.application.customStrings.dataLoadFailedMessage,tryAgainTitle:e.application.customStrings.tryAgainTitle}),e.cardFeed.status.loaded&&E>0&&(0,o.h)(Yr,{cardInstances:e.cardFeed.cardInstances,theme:t,isPreview:M,onDismiss:t=>wa(void 0,void 0,void 0,(function*(){Es(e,e,t,b,y,"overflow-menu")})),onSnooze:(t,n)=>{e.requestSnooze(t,"overflow-menu",n)},onFeedbackSelected:(t,n)=>{t.textFeedback||"negative"===t.sentiment?e.requestFeedback(n,t):"positive"===t.sentiment&&Rs(n,e,v,b,t.source)},removeCard:t=>{e.removeCard(t)},cardStates:e.cardStates,margin:T?0:10,runtimeVariables:e.cardFeed.runtimeVariables,customStrings:e.application.customStrings,votingOptions:e.cardFeed.cardVoting,cardMinimumHeight:e.cardFeed.cardMinimumHeight,horizontalContainerConfig:L,ref:s}),e.cardFeed.status.loaded&&0===E&&!T&&D&&(0,o.h)(Ma,{embedMode:e.application.embedMode,feedOrientation:A,horizontalOffset:H,class:"empty-state-wrapper"},(0,o.h)(pa,{theme:t,hasSeenTutorial:e.cardFeed.tutorialSeen,tutorialMessage:e.application.customStrings.awaitingFirstCard,emptyMessage:e.application.customStrings.allCardsCompleted}))),!e.application.isPreview&&!T&&!0===_.cardListToast&&!_.customToastContainer&&(0,o.h)(sa,{theme:t,feedOrientation:A,message:e.messages.cardList,delay:Fa(e),actionTitle:e.messages.cardList&&["submit-failed","dismiss-failed","snooze-failed"].includes(e.messages.cardList.action)?"Try again":"Dismiss",actionHandler:()=>wa(void 0,void 0,void 0,(function*(){var t,n,r,a,o,i,s,l,c,d;const u=null===(t=e.messages.cardList)||void 0===t?void 0:t.cardInstanceId,p=null===(n=e.messages.cardList)||void 0===n?void 0:n.action;if(u&&p)switch(p){case"submit-failed":Hs(e,e,u,!1,b,v,y,(null===(r=e.messages.cardList)||void 0===r?void 0:r.responseValues)||{},{payload:null===(a=e.messages.cardList)||void 0===a?void 0:a.payload,postSubmissionUrl:null===(o=e.messages.cardList)||void 0===o?void 0:o.postSubmissionUrl,subviewData:null===(i=e.messages.cardList)||void 0===i?void 0:i.subviewData,submitButtonName:null===(s=e.messages.cardList)||void 0===s?void 0:s.submitButtonName});break;case"dismiss-failed":const t=null===(l=e.messages.cardList)||void 0===l?void 0:l.source;t&&Es(e,e,u,b,y,t);break;case"snooze-failed":const n=null===(c=e.messages.cardList)||void 0===c?void 0:c.snoozeDate,p=null===(d=e.messages.cardList)||void 0===d?void 0:d.source;n&&p&&Ps(e,e,u,n,b,y,p)}})),onDismiss:()=>{e.clearMessage("cardList")}}))}))},_a=on("div")((e=>{let{yOffset:t}=e;return{position:"absolute",top:`${t}px`,left:"0",right:"0",zIndex:rs.BANNER,overflow:"hidden"}})),La=on("div")((e=>{let{theme:t}=e;return{position:"absolute",top:"0",left:"0",right:"0",background:t.getCSSColor("background.banner"),padding:"12px",transform:"translateY(-100%)",transition:"transform 300ms ease-in-out",".visible":{transform:"translateY(0)",position:"initial"},".animating":{position:"initial"}}})),Da=on("p")((e=>{let{theme:t}=e;return Object.assign(Object.assign({flexGrow:"1",margin:"0",color:t.getCSSColor("text.banner")},t.getCSSFontProperties("banner")),{textAlign:"center",overflow:"hidden"})})),Aa=e=>{let{theme:t,message:n,yOffset:r,onDismiss:a}=e;const[i,s]=h(null),[l,c]=h(null),[d,u]=h(!1);return g((()=>{null!=n&&null!=n.text?(null!=l&&(clearTimeout(l),c(null)),null!=i&&(clearTimeout(i),s(null)),u(!0),c(setTimeout((()=>{u(!1),c(null),s(setTimeout((()=>{a&&a(),s(null)}),300))}),3300))):u(!1)}),[n]),(0,o.h)(_a,{theme:t,yOffset:r},(0,o.h)(La,{theme:t,class:`${d?"visible":""} ${i?"animating":""}`},(0,o.h)(Da,{theme:t},n?n.text:"")))},Ea=on("div")((e=>{let{theme:t,isPreview:n}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:n?"relative":"static"}})),Ha=on("div")((e=>{let{theme:t,isPreview:n}=e;return{background:t.getCSSColor("background.default"),position:"relative",bottom:n?"auto":"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"visible",padding:"0 20px",boxSizing:"border-box",display:"flex",flex:"1"}})),Pa=on("div")({paddingTop:"10px"}),Ra={scrollTop:0,subviewId:""},Va=e=>{let{theme:t}=e;const n=f(null),r=w(ya).analyticsDispatcher;return(0,o.h)(Le.lj,{actions:(0,G.Y2)(De,Xt),mapToProps:e=>{const t=$e(e);return{containerInstanceId:e.application.containerInstanceId,cardStates:e.cardStates,customStrings:e.application.customStrings,subview:t&&ze(t)?t:null,isPreview:e.application.isPreview||!1,embedMode:e.application.embedMode,runtimeVariables:e.cardFeed.runtimeVariables,bannerMessage:e.messages.subview}}},(e=>{if(null===e.subview)return null;const{cardInstance:a,subviewId:i}=e.subview;if(a&&i){const l=a.subviews[i],{id:c}=a.instance,d=e.cardStates[c],u="modal-subview"===e.embedMode?ea:Jr;if(l){var s;let p=null===(s=e.runtimeVariables.values)||void 0===s?void 0:s.get(c);return p=p||new Map,g((()=>{var e;const t=()=>{let e=!1;e||(window.requestAnimationFrame((()=>{var t;const r=null==n||null===(t=n.current)||void 0===t?void 0:t.base;r&&(Ra.scrollTop=r.scrollTop,Ra.subviewId=i),e=!1})),e=!0)};return(null==n||null===(e=n.current)||void 0===e?void 0:e.base)&&(n.current.base.scrollTop=Ra.subviewId===i?Ra.scrollTop:0,n.current.base.addEventListener("scroll",t)),()=>{var e;(null==n||null===(e=n.current)||void 0===e?void 0:e.base)&&(n.current.base.scrollTop=Ra.subviewId===i?Ra.scrollTop:0,n.current.base.removeEventListener("scroll",t))}}),[]),g((()=>{r.sendEvent({cardInstanceId:c,cardViewState:"subview",eventName:kt,properties:{subviewId:i,subviewTitle:Rc(l.title,p),subviewLevel:1}})}),[i]),l.nodes=Ac(l.nodes),(0,o.h)(o.Fragment,null,(0,o.h)(Ea,{theme:t,id:Sa,isPreview:e.isPreview},(0,o.h)(Os,{viewState:"subview",onCancelUpload:()=>{window.AtomicUploadService.cancelUploadForCard(e.containerInstanceId,c),Jt().finishCardFileUpload(c),!window.AtomicUploadService.getIsUploadingStatus(e.containerInstanceId)&&Jt().setCardFeedOverlay(!1)},theme:t,renderOverlay:"uploading-files"===d}),(0,o.h)(u,{title:Rc(l.title,p),theme:t,actionHandler:()=>{e.navigateBack(),r.sendEvent({cardInstanceId:c,cardViewState:"subview",eventName:xt,properties:{subviewId:i,subviewTitle:Rc(l.title,p),subviewLevel:1}})},inert:"uploading-files"===d}),(0,o.h)(Ha,{theme:t,ref:n,isPreview:e.isPreview,class:"use-offset",id:"action-cards-subview-container",inert:"uploading-files"===d},(0,o.h)(Pa,{class:"offset-child"},l.nodes.map((n=>(0,o.h)(Tc,{cardInstanceId:c,cardMetadata:a.metadata,node:n,isWorkflow:!0,theme:t,runtimeVariables:p,subviewId:i,subviewTitle:Rc(l.title,p),embedMode:e.embedMode})))))),!e.isPreview&&(0,o.h)(Aa,{theme:t,message:e.bannerMessage,yOffset:60,onDismiss:()=>{e.clearMessage("subview")}}))}}return null}))},$a=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,o.h)("svg",{width:"19",height:"12",viewBox:"0 0 19 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"A blank video icon","aria-hidden":n},(0,o.h)("path",{d:"M12 1H2C1.44772 1 1 1.44772 1 2V10C1 10.5523 1.44772 11 2 11H12C12.5523 11 13 10.5523 13 10V2C13 1.44772 12.5523 1 12 1Z",stroke:t,strokeWidth:"2"}),(0,o.h)("path",{d:"M17.1464 1.85355L13.3536 5.64645C13.1583 5.84171 13.1583 6.15829 13.3536 6.35355L17.1464 10.1464C17.4614 10.4614 18 10.2383 18 9.79289V2.20711C18 1.76165 17.4614 1.53857 17.1464 1.85355Z",stroke:t,strokeWidth:"2"}))};class za extends o.Component{constructor(e){super(e),this.state={imageLoaded:!1,imageLoadFailed:!1}}preloadsImage(){return!0}onImageLoad(e){this.setState((t=>Object.assign(Object.assign({},t),{loadedDimensions:{width:e.naturalWidth,height:e.naturalHeight}})))}preloadImage(){if(this.preloadsImage()){const e=new Image;e.src=this.props.src,e.onload=()=>{this.setState({imageLoaded:!0}),this.onImageLoad(e)},e.onerror=()=>{this.setState({imageLoadFailed:!0})}}}getPreviewIcon(e){switch(e){case"image":case"imageWithoutSrc":return xn;case"video":case"videoWithoutSrc":return $a;default:return null}}getElementRole(e){switch(e){case"image":case"video":return"button";case"imageWithoutSrc":case"videoWithoutSrc":return"img"}}componentDidMount(){this.props.src&&this.preloadImage()}componentDidUpdate(e){this.props.src&&this.props.src!==e.src&&this.preloadImage()}handleKeyPress(e){e.charCode===br&&this.props.onClickImage&&(this.props.onClickImage(),e.preventDefault())}}const Na=on("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column"}})),Ba=on("div")({width:"100%",height:"100%",maxWidth:"100%",minHeight:"420px",overflow:"auto",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),Ua=on("div")((e=>{let{autoSizes:t}=e;return{overflow:"auto",flexGrow:t?"0":"1",height:t?"auto":"100%",display:"flex",flexDirection:"column",width:"100%"}})),Wa=on("div")((e=>{let{imageLoaded:t,theme:n}=e;return{width:"100%",height:"100%",backgroundColor:t?"":n.getCSSColor("background.media"),display:"flex",alignItems:"center",justifyContent:"center",flexGrow:"1"}})),qa=on("video")({maxWidth:"100%"}),Ya=on("img")({maxWidth:"100%",flexShrink:"0"});class Za extends za{render(){const{theme:e,src:t,label:n,alt:r}=this.props,{imageLoaded:a}=this.state;return(0,o.h)(o.Fragment,null,!a&&(0,o.h)(Wa,{imageLoaded:a,theme:e},(0,o.h)(xn,{fillColor:e.getCSSColor("icon.mediaBanner"),ariaHidden:!0})),a&&(0,o.h)(Ya,{src:t,alt:r||n}))}}const Ka=e=>{var t,n;let{src:r,alt:a,cardInstanceId:i}=e;const s=f(null),l=w(ya).analyticsDispatcher,c="string"==typeof r&&null!==(t=null===(n=r.match(/[^\/]*$/))||void 0===n?void 0:n[0])&&void 0!==t?t:"";return g((()=>{var e,t,n,a;const o=()=>{l.sendEvent({eventName:It,cardInstanceId:i,cardViewState:"subview",properties:{media:c,mediaURL:r}})},d=()=>{l.sendEvent({eventName:Ot,cardInstanceId:i,cardViewState:"subview",properties:{media:c,mediaURL:r}})};return null===(e=s.current)||void 0===e||null===(t=e.base)||void 0===t||t.addEventListener("play",o),null===(n=s.current)||void 0===n||null===(a=n.base)||void 0===a||a.addEventListener("ended",d),()=>{var e,t,n,r;null===(e=s.current)||void 0===e||null===(t=e.removeEventListener)||void 0===t||t.call(e,"play",o),null===(n=s.current)||void 0===n||null===(r=n.removeEventListener)||void 0===r||r.call(n,"ended",d)}}),[]),(0,o.h)(qa,{ref:s,src:r,alt:a||"video",autoplay:!0,controls:!0})},Ga=e=>{let{theme:t}=e;return(0,o.h)(Le.lj,{actions:De,mapToProps:e=>{const t=$e(e);return{embedMode:e.application.embedMode,cardInstanceId:null==t?void 0:t.cardInstanceId,currentMediaItem:t&&Ue(t)?t.item:void 0}}},(e=>{const n=e.currentMediaItem;if(!n)return null;const r="modal-subview"===e.embedMode?ea:Jr,a="launcher"===e.embedMode;return(0,o.h)(Na,{theme:t,id:Sa},(0,o.h)(r,{title:`View ${n.type}`,theme:t,actionHandler:e.navigateBack}),(0,o.h)(Ua,{autoSizes:a},(0,o.h)(Ba,{theme:t},"image"==n.type&&(0,o.h)(Za,{mediaType:n.type,src:n.url,label:n.title,alt:n.alt,theme:t}),"video"==n.type&&(0,o.h)(Ka,{src:n.url,alt:n.alt,cardInstanceId:e.cardInstanceId}))))}))};var Xa=n(6083),Qa=n.n(Xa),Ja=n(9331),eo=n.n(Ja),to=n(5932),no=n.n(to),ro=n(4844),ao=n.n(ro),oo=n(4801),io=n.n(oo),so=n(7754),lo=n.n(so),co=n(6254),uo=n.n(co),po=n(5886),ho=n.n(po);const mo=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M1 1L5.96464 5.96464C5.98417 5.98417 5.98417 6.01583 5.96464 6.03536L1 11",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},go=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M6.16235 11L1.16235 6L6.16235 1",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},vo=on("button")((e=>{let{theme:t}=e;return Object.assign({height:"100%",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",justifySelf:"center",border:"none",backgroundColor:"transparent"},t.getElementFocusCSSProperties())})),fo=on("div")((e=>{var t;let{theme:n}=e;return{"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none",display:"grid",gridTemplate:"auto / 42px 1fr 42px",alignItems:"center",margin:"0 auto",width:"100%",color:null!==(t=n.getCSSColor("text.datePickerCalendarMonthYear",{skipFallback:!0}))&&void 0!==t?t:"black","> h1":{textAlign:"center",textTransform:"none",lineHeight:"30px",margin:"0 0 10px",gridColumn:"2"},"> input":{display:"block",fontSize:"small",fontWeight:"bold",textAlign:"center",lineHeight:"15px",height:"18px",width:"60px",margin:"0 auto",backgroundColor:"transparent",fontFamily:"inherit",border:"1px solid lightgray",paddingLeft:"11px"},"> div:first-of-type":{gridColumn:"1"},"> div:last-of-type":{gridColumn:"3"}}})),bo=on("span")({fontSize:"15px"}),yo=on("span")({fontSize:"15px",fontWeight:"normal"}),wo=e=>{var t,n;let{theme:r,month:a,year:i="",onBack:s,onForward:l,locale:c}=e;return(0,o.h)(fo,{theme:r},(0,o.h)(vo,{theme:r,onClick:s,"aria-label":"previous month"},(0,o.h)(go,{fillColor:null!==(t=r.getCSSColor("background.datePickerCalendarMonthNavArrows",{skipFallback:!0}))&&void 0!==t?t:"rgba(0,0,0,0.5)"})),(0,o.h)("h1",{className:"MonthDisplay","aria-live":"assertive"},(0,o.h)(bo,null,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return window.months=window.months||[...Array(12)].map(((t,n)=>new Date(2017,n,1).toLocaleDateString(e,{month:"long"}))),window.months}(c)[a-1]+" "),(0,o.h)(yo,null,i)),(0,o.h)(vo,{theme:r,onClick:l,"aria-label":"next month"},(0,o.h)(mo,{fillColor:null!==(n=r.getCSSColor("background.datePickerCalendarMonthNavArrows",{skipFallback:!0}))&&void 0!==n?n:"rgba(0,0,0,0.5)"})))};var So=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};const Co=on("button")((e=>{var t,n,r,a,o,i,s;let{isDisabled:l,isSelected:c,isToday:d,isFocused:u,theme:p}=e,h=null!==(t=p.getCSSColor("text.datePickerCalendarDateItem",{skipFallback:!0}))&&void 0!==t?t:"rgba(0, 0, 0, 1)",m=p.getCSSColor("text.datePickerCalendarHoverDateItem",{skipFallback:!0}),g="transparent",v=null!==(n=p.getCSSColor("background.datePickerCalendarHoverDateItem",{skipFallback:!0}))&&void 0!==n?n:"rgba(0, 0, 0, 0.05)";const f="#1E6EFA";d&&!c?h=null!==(r=p.getCSSColor("text.datePickerCalendarCurrentDate",{skipFallback:!0}))&&void 0!==r?r:f:c?(h=null!==(a=p.getCSSColor("text.datePickerCalendarSelectedDateItem",{skipFallback:!0}))&&void 0!==a?a:"white",g=null!==(o=p.getCSSColor("background.datePickerCalendarSelectedDateItem",{skipFallback:!0}))&&void 0!==o?o:f,v=g):u?g="rgba(0, 0, 0, 0.05)":l&&(h="rgba(0, 0, 0, 0.2)",v="transparent");const b=null!==(i=p.getShape("borderRadius.datePickerCalendarDateItem",{skipFallback:!0}))&&void 0!==i?i:"99px";return{userSelect:"none",display:"flex",justifySelf:"center",alignItems:"center",justifyContent:"center",fontFamily:"inherit",fontSize:"small",lineHeight:"15px",margin:"0",position:"relative",width:"string"==typeof b&&(null===(s=b.match(new RegExp(/([1-9])+/g)))||void 0===s?void 0:s.length)?"40px":"100%",height:"40px",outline:"none",border:"2px solid transparent",cursor:l?"initial":"pointer",backgroundColor:g,borderRadius:b,":hover":Object.assign(Object.assign({},m?{color:m}:{}),{backgroundColor:v}),color:h}})),ko=e=>{let{theme:t,date:n,dateLabel:r,style:a,col:i,onSelect:s,onHover:l,onFocus:c}=e,d=So(e,["theme","date","dateLabel","style","col","onSelect","onHover","onFocus"]);const u=f(null);return(0,o.h)(Co,{"data-testid":"calendar-day-button",ref:u,title:r,"aria-label":r,"aria-selected":d.isSelected?"true":"false","aria-disabled":d.isDisabled?"true":"false","aria-colindex":i,role:"gridcell",key:n,style:a,class:`CalendarDay ${Ye(d)}`,isToday:ho()(n),isDisabled:d.isDisabled,isSelected:d.isSelected,isFocused:d.isFocused,theme:t,tabIndex:"-1",onMouseDown:e=>{e.stopPropagation(),d.isDisabled||(u.current&&document.activeElement!==u.current&&u.current.base.focus(),s(n))},onMouseEnter:()=>{d.isDisabled||l(n)},onMouseLeave:()=>{d.isDisabled||l(null)},onFocus:()=>{d.isDisabled||c(n)}},n.getDate())},xo=on("div")((e=>{var t;let{theme:n}=e;return{cursor:"default",borderWidth:"1px",backgroundColor:null!==(t=n.getCSSColor("background.datePickerCalendar",{skipFallback:!0}))&&void 0!==t?t:"white",width:"100%",margin:"0",padding:"10px",borderRadius:"5px",boxSizing:"border-box","> div:focus":{outline:"none"},"> .focus-visible":{outline:"none",boxShadow:`0 0 0 2px ${n.getCSSColor("border.focus")} inset`}}})),Io=on("div")({padding:"5px"}),Oo=on("div")({}),Mo=on("div")({display:"grid",gridTemplate:"auto / repeat(7, 1fr)"}),To=on("div")((e=>{var t;let{theme:n}=e;return{userSelect:"none",textAlign:"center",textTransform:"none",color:null!==(t=n.getCSSColor("text.datePickerCalendarDaysSubHeading",{skipFallback:!0}))&&void 0!==t?t:"rgba(0,0,0,0.5)",fontSize:"13px"}})),Fo=on("div")({display:"grid",gridTemplate:"auto / repeat(7, 1fr)","-ms-grid-rows":"auto","-ms-grid-columns":"(1fr)[7]",marginBottom:"5px"}),jo=e=>{const{month:t,year:n,isDateHovered:r,isDateFocused:a,isDateSelected:i,isDateInRange:s,isDateEnabled:l,onDateFocused:c,onDateHovered:d,onDateSelected:u,onChangeMonth:p,onChangeYear:h,calendarRef:m,disabled:g,locale:v,theme:f}=e,b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return window.days=window.days||[...Array(7)].map(((t,n)=>{const r=n+1;return{dayName:new Date(Date.UTC(2017,0,n+2)).toLocaleDateString(e,{weekday:"long"}),col:r,style:{gridColumnStart:r}}})),window.days}(v),y=Ze(t,n||0),w=e=>{let{date:t,style:n,col:p}=e;return(0,o.h)(ko,{key:t,theme:f,date:t,col:p,dateLabel:Xe()(t,"dddd, MMMM D, YYYY"),style:n,isToday:ho()(t),isHovered:r(t),isFocused:a(t),isSelected:i(t),isInRange:s(t),isDisabled:g||!l(t),onSelect:u,onHover:d,onFocus:c})};return(0,o.h)(xo,{theme:f},(0,o.h)(wo,{theme:f,month:t,year:n,onBack:p(-1),onForward:p(1),onChangeYear:h,locale:v,disabled:g}),(0,o.h)(Io,{className:"Calendar",role:"grid",ref:m,tabIndex:0,"aria-colcount":7,"aria-rowcount":6,"aria-label":"Calendar picker"},(0,o.h)(Fo,{role:"row"},b.map((e=>{let{dayName:t,style:n,col:r}=e;return(0,o.h)(To,{key:t,theme:f,style:n,role:"columnheader","aria-colindex":r,"aria-label":t},(0,o.h)("abbr",null,t.slice(0,1)))}))),(0,o.h)(Oo,{role:"rowgroup"},(0,o.h)(Mo,{role:"row","aria-rowIndex":1},y.week1.map(w)),(0,o.h)(Mo,{role:"row","aria-rowIndex":2},y.week2.map(w)),(0,o.h)(Mo,{role:"row","aria-rowIndex":3},y.week3.map(w)),(0,o.h)(Mo,{role:"row","aria-rowIndex":4},y.week4.map(w)),(0,o.h)(Mo,{role:"row","aria-rowIndex":5},y.week5.map(w)),(0,o.h)(Mo,{role:"row","aria-rowIndex":6},y.week6.map(w)))))};function _o(){return _o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_o.apply(this,arguments)}const Lo="DatePicker",Do="DateRangePicker";class Ao extends o.Component{constructor(e){var t,n,r;super(e),r=void 0,(n="calendar")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;const a=e.date||new Date,i=a.getMonth()+1,s=a.getFullYear();this.state={month:i,year:s,focused:a,hovered:new Date},this.calendar=(0,o.createRef)(),this.handleKeyPress=this.handleKeyPress.bind(this),this.onDateHovered=this.onDateHovered.bind(this),this.onDateSelected=this.onDateSelected.bind(this),this.onDateFocused=this.onDateFocused.bind(this),this.isDateHovered=this.isDateHovered.bind(this),this.isDateFocused=this.isDateFocused.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.isDateInRange=this.isDateInRange.bind(this),this.isDateEnabled=this.isDateEnabled.bind(this),this.onChangeMonth=this.onChangeMonth.bind(this),this.onChangeYear=this.onChangeYear.bind(this)}componentDidMount(){window.addEventListener("keydown",this.handleKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.handleKeyPress)}handleKeyPress(e){var t,n;if(!(null===(n=this.calendar)||void 0===n?void 0:n.current.base.contains(document.activeElement)))return;if(e.key===Ar)return void(this.props.onCancel&&this.props.onCancel());e.preventDefault();const{shiftKey:r,key:a}=e,o=a===Fr,i=a===_r,s=a===Lr,l=a===Dr,c=a===Mr,d=a===Ir,u=a===Tr,p=a===Or,h=a===jr,m=null!==(t=this.props.isDateEnabled)&&void 0!==t?t:function(){return!0};let{focused:g}=this.state;if(o)m(g)&&this.onDateSelected(g);else if(r&&s){const e=Qa()(g,-1);m(e)&&this.onDateFocused(e)}else if(r&&l){const e=Qa()(g,1);m(e)&&this.onDateFocused(e)}else if(s){const e=eo()(g,-1);m(e)&&this.onDateFocused(e)}else if(l){const e=eo()(g,1);m(e)&&this.onDateFocused(e)}else if(d){const e=no()(g,-1);m(e)&&this.onDateFocused(e)}else if(p){const e=no()(g,1);m(e)&&this.onDateFocused(e)}else if(c){const e=ao()(g,-1);m(e)&&this.onDateFocused(e)}else if(u){const e=ao()(g,1);m(e)&&this.onDateFocused(e)}else h?this.onDateSelected(g):i&&this.props.onCancel&&this.props.onCancel()}onChangeYear(e){e.preventDefault(),this.setState({year:parseInt(e.target.value)||void 0})}onChangeMonth(e){let{month:t,year:n=0}=this.state,r=t+e,a=n;return r<1&&(r=12+r,a-=1),r>12&&(r-=12,a+=1),()=>{this.setState({month:r,year:a})}}onDateSelected(e){const{type:t,onDateSelected:n,onStartDateSelected:r,onEndDateSelected:a}=this.props;if(t===Lo)n&&n(e);else if(t===Do){const t=!this.props.startDate,n=this.props.startDate&&this.props.endDate,o=this.props.startDate&&this.props.startDate>e;t||n||o?(r&&r(e),a&&a(null)):a&&a(e)}}onDateHovered(e){const{onDateHovered:t}=this.props;e&&this.state.hovered&&this.state.hovered.getDate()!==e.getDate()&&this.setState({hovered:e},(()=>{t&&t(e)}))}onDateFocused(e){const{onDateFocused:t}=this.props,n=e.getMonth()+1,r=e.getFullYear();this.state.focused&&this.state.focused!==e&&this.setState({focused:e,month:n,year:r},(()=>{t&&t(e)}))}isDateEnabled(e){var t;return(null!==(t=this.props.isDateEnabled)&&void 0!==t?t:function(){return!0})(e)}isDateFocused(e){return io()(e,this.state.focused)}isDateHovered(e){return io()(e,this.state.hovered)}isDateSelected(e){return(this.props.type===Lo?[this.props.date]:[this.props.startDate,this.props.endDate]).some((t=>!!t&&io()(t,e)))}isDateInRange(e){if(this.props.type===Lo)return!1;const{startDate:t,endDate:n}=this.props,{focused:r,hovered:a}=this.state,o=n||(t&&r&&!io()(t,r)?r:a);return!(!t||!o||lo()(o,t))&&uo()(e,t,o)}componentWillReceiveProps(e){var t;e&&e.open!==this.props.open&&!0===e.open&&((null===(t=this.calendar)||void 0===t?void 0:t.current)&&this.calendar.current.base.focus())}render(){return(0,o.h)(jo,{calendarRef:this.calendar,month:this.state.month,year:this.state.year,isDateHovered:this.isDateHovered,isDateFocused:this.isDateFocused,isDateSelected:this.isDateSelected,isDateInRange:this.isDateInRange,isDateEnabled:this.isDateEnabled,onDateSelected:this.onDateSelected,onDateHovered:this.onDateHovered,onDateFocused:this.onDateFocused,onChangeMonth:this.onChangeMonth,onChangeYear:this.onChangeYear,locale:this.props.locale||"en-US",disabled:this.props.disabled||!1,theme:this.props.theme})}}const Eo=e=>(0,o.h)(Ao,_o({type:Lo},e));function Ho(){return Ho=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ho.apply(this,arguments)}const Po=on("div")((e=>{let{theme:t,mode:n,cursor:r,hPadding:a}=e;return Object.assign(Object.assign({minHeight:"stacked"===n?"70px":"50px",borderRadius:"4px",border:`1px solid ${t.getCSSColor("border.component")}`},t.getElementFocusCSSProperties()),{backgroundColor:t.getCSSColor("background.component"),display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px",overflow:"hidden",minWidth:"0",padding:`10px ${void 0!==a?a:20}px`,flexGrow:"1",cursor:r||"pointer"})})),Ro=e=>{let{nodeKey:t,children:n,mode:r,cursor:a,ref:i,theme:s,onClick:l,tabFocusable:c,innerRef:d,hPadding:u,accessibleAttributes:p}=e;const h=c?e=>{e.charCode===br&&l&&(e.preventDefault(),l())}:void 0;return(0,o.h)("div",{ref:i},(0,o.h)(Po,Ho({key:t,"data-element-key":t,mode:r,theme:s,cursor:a,class:"component-field-wrapper",onClick:l,onKeyPress:h,tabIndex:c?0:void 0,ref:d,hPadding:u},p),n))},Vo=on("div")((e=>{let{thumbnailUrl:t,theme:n}=e;return{backgroundColor:n.getCSSColor("background.media"),borderRadius:n.getShape("borderRadius.media"),width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",marginRight:"10px",backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",alignSelf:"start"}})),$o=e=>{let{thumbnailUrl:t,theme:n}=e;return(0,o.h)(Vo,{thumbnailUrl:t,theme:n})},zo=on("div")((e=>{let{theme:t,mode:n,truncateLabel:r,inputHasValue:a}=e;return Object.assign(Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===n?"pinned":"primary")),{flexGrow:"1",whiteSpace:"pre-wrap",color:"stacked"===n?t.getCSSColor("text.pinned"):t.getCSSColor("text.primary"),paddingBottom:"stacked"===n?"2px":"0px"}),"inline"===n&&r?{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",minWidth:"0",flex:"0 1 auto",flexShrink:a?"2":"1",paddingBottom:"0.1em",marginBottom:"-0.1em"}:{})})),No=e=>{let{theme:t,children:n,mode:r,name:a,truncateLabel:i,inputHasValue:s}=e;return(0,o.h)(zo,{theme:t,mode:r,id:a,"aria-hidden":!n,truncateLabel:i,inputHasValue:s},n)},Bo=e=>{let{fillColor:t,ariaHidden:n,styles:r}=e;return(0,o.h)("svg",{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":n,style:r},(0,o.h)("path",{d:"M1 1L6 6L11 1",stroke:t,"stroke-opacity":"1","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},Uo=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.error")},t.getCSSFontProperties("error")),{margin:"-10px 0 30px 0"})})),Wo=e=>{let{theme:t,cardInstanceId:n,subviewId:r,name:a,variableResolver:i}=e;return(0,o.h)(Le.lj,{mapToProps:e=>{let{validationStates:t}=e;return{validationStates:t}}},(e=>{let{validationStates:s}=e;const l=s[n]||{};let c;var d,u,p;r?c=null===(d=l.subviews)||void 0===d||null===(u=d[r])||void 0===u?void 0:u[a]:c=null===(p=l.validations)||void 0===p?void 0:p[a];return c&&c.errorMessage?(0,o.h)(Uo,{theme:t,role:"alert","data-testid":"validation"},i(c.errorMessage)):null}))},qo=on("div")((e=>{let{theme:t,mode:n}=e;return Object.assign(Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===n?"pinned":"primary")),{display:"block",cursor:"pointer"}),"inline"===n?{display:"flex",gap:"5px",flex:"1 1 auto",minWidth:"0"}:{})})),Yo=on("div")((()=>({flex:"0 0 auto",alignItems:"center"}))),Zo=on("div")((()=>({"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}))),Ko=on("div")((e=>{let{open:t,openPosition:n,height:r,theme:a}=e;return Object.assign(Object.assign({position:"absolute",top:`${n}px`,left:t?"20px":"-999px",width:"calc(100% - 40px)",marginBottom:"20px",backgroundColor:"white",boxShadow:"0px 2px 10px 0px rgba(0, 0, 0, 0.2)",cursor:"pointer",height:`${r}px`,maxHeight:"335px",overflow:"auto",zIndex:rs.DROPDOWN,borderRadius:"5px",color:"black"},a.getCSSFontProperties("primary")),{visibility:t?"visible":"hidden"})})),Go=on("div")((e=>{let{theme:t,disabled:n}=e;return Object.assign({padding:"20px",":hover":{backgroundColor:"rgba(0,0,0,0.05)"},":active":{backgroundColor:"rgba(0,0,0,0.1)"},border:"0px",color:n?"rgba(0,0,0,0.3)":"initial"},t.getElementFocusCSSProperties())})),Xo=on("div")((e=>{let{theme:t,placeholder:n,mode:r}=e;return Object.assign(Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===r?"primary":"secondary")),{marginRight:"10px",color:"stacked"===r?t.getCSSColor("text.primary"):t.getCSSColor("text.secondary"),paddingTop:"stacked"===r?"2px":"0px"}),"inline"===r?{maxWidth:"100%",minWidth:"0",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",flex:n?"1 1 0":"1 0 auto",textAlign:"right",paddingBottom:"0.1em",marginBottom:"-0.1em"}:{})})),Qo=e=>{let{onClick:t,children:n,ref:r,theme:a,disabled:i,isSelected:s}=e;return(0,o.h)(Go,{onClick:t,ref:r,tabIndex:"-1",theme:a,disabled:i,"aria-disabled":i,"aria-selected":s,role:"option"},n)},Jo=e=>{let{children:t,mode:n,theme:r,ariaLabel:a,placeholder:i}=e;return(0,o.h)(Xo,{theme:r,mode:n,class:"dropdown-selected-value",placeholder:i,"aria-label":a},t)},ei=(e,t,n,r)=>{var a,o,i,s,l,c;let d=0,u=0,p=0,h=0,m=null;const g=null===(s=window.frameElement)||void 0===s?void 0:s.parentElement,v=document.querySelector("#action-cards-sdk-card-container"),f=(null==g?void 0:g.scrollHeight)!==(null==g?void 0:g.clientHeight),b=(null==v?void 0:v.scrollHeight)!==(null==v?void 0:v.clientHeight);if("launcher"!==r&&g&&f&&!b)m=g;else if(n){m=document.querySelector("#action-cards-subview-container")}else null!==v&&(m=v);if(null!==window.frameElement){var y,w;const e=t.getBoundingClientRect(),n=null===(y=m)||void 0===y?void 0:y.getBoundingClientRect();d=e.top-(n?null==n?void 0:n.top:0),u=e.bottom-(n?null==n?void 0:n.top:0),p=null!==(a=null===(w=m)||void 0===w?void 0:w.scrollHeight)&&void 0!==a?a:window.innerHeight}else{const e=document.querySelector("#workbench-card-preview");if(e){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();h=e.scrollTop,d=r.top-n.top-h,u=d+t.offsetHeight,p=e.offsetHeight}}e.style.height="auto";const S=d-20+(m?m.scrollTop:0),C=p-u-20,k=S-(null!==(o=null===(l=m)||void 0===l?void 0:l.scrollTop)&&void 0!==o?o:0),x=(null!==(i=null===(c=m)||void 0===c?void 0:c.offsetHeight)&&void 0!==i?i:p)-k-20-t.offsetHeight,I=e.offsetHeight;e.style.height="";const O=t.offsetTop,M={openPosition:O+t.offsetHeight+10,height:I},T={openPosition:O-I-10,height:I};return I<=x?M:I<=k?T:I<=C?M:I<=S?T:{openPosition:O,height:Math.min(I,C+t.offsetHeight)}},ti=K.forwardRef(((e,t)=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,embedMode:i,attributes:{format:s,defaultValue:l,thumbnailSrc:c,label:d,name:u,values:p,placeholder:m},validations:v,theme:y,variableResolver:w,onValueChanged:S}=e;const[C,k]=h(!1),[x,I]=h(0),[O,M]=h(0),[T,F]=h(l?w(l.toString()):null),[j,_]=h(-1),L=f(null),D=f(null),A=f(null),E=f(null),H=f(l?w(l.toString()):null),P=p.find((e=>{let{value:t}=e;return T===t}));b(t,(()=>({getCurrentValue:()=>T,setCurrentValue:e=>F(e)}))),g((()=>{const e=e=>{L.current&&!L.current.base.contains(e.target)&&(C&&dt().validateField(r,u,T,v),k(!1))},t=e=>{var t,n;(null==A||null===(t=A.current)||void 0===t||null===(n=t.base)||void 0===n?void 0:n.contains(document.activeElement))&&e.key===_r&&(k(!1),D.current.base.focus())};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}})),g((()=>{if(S)S(T);else{const e=ut(r,u,a);e?(H.current=e.toString(),F(e)):dt().handleFormChange(r,u,T,a)}A.current&&E.current&&(A.current.base.scrollTop=E.current.base.offsetTop)}),[]),g((()=>{const e=l?w(l.toString()):null;e!==H.current&&(T===H.current&&(S?S(e):dt().handleFormChange(r,u,e,a),F(e)),H.current=l?w(l.toString()):null)}),[l]),g((()=>{if(C){const e=p.findIndex((e=>T===e.value));_(Math.max(0,e))}else _(-1)}),[C]);const R=`dropdown-label-${u}`;return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(0,o.h)(Zo,null,(0,o.h)(Ro,{nodeKey:n,ref:L,innerRef:D,mode:s,theme:y,tabFocusable:!0,accessibleAttributes:{role:"combobox","aria-haspopup":"listbox","aria-expanded":C,"aria-controls":`${u}-dropdown-body`,"aria-labelledby":R},onClick:()=>{if(L.current){const{openPosition:t,height:n}=ei(A.current.base,L.current.base,!!a,i);I(t),M(n),k((t=>(t&&e.validateField(r,u,T,v,a),!t)))}}},c&&(0,o.h)(Yo,null,(0,o.h)($o,{thumbnailUrl:w(c),theme:y})),(0,o.h)(qo,{mode:s,theme:y},(0,o.h)(No,{theme:y,mode:s,name:R,truncateLabel:"inline"===s,inputHasValue:!!T},w(d)),(0,o.h)(Jo,{theme:y,mode:s,placeholder:!P},P?P.title:w(m))),(0,o.h)(Bo,{fillColor:y.getCSSColor("icon.dropdown"),styles:{flex:"0 0 auto"},ariaHidden:!0}),(0,o.h)(Ko,{ref:A,open:C,openPosition:x,theme:y,height:O,className:"dropdown-body",id:`${u}-dropdown-body`,role:"listbox"},(0,o.h)(Rr,{defaultIndex:j,theme:y},p.map(((t,n)=>(0,o.h)(Qo,{onClick:()=>{t.disabled||(F(t.value),S?S(t.value):e.handleFormChange(r,u,t.value,a),e.validateField(r,u,t.value,v,a),D&&D.current&&D.current.base&&D.current.base.focus(),_(n))},ref:t.value===T?E:null,theme:y,disabled:t.disabled,isSelected:t.value===T},t.title)))))),(0,o.h)(Wo,{name:u,cardInstanceId:r,subviewId:a,theme:y,variableResolver:w}))))})),ni=on("div")((e=>{let{mode:t,theme:n}=e;return Object.assign(Object.assign({},n.getCSSFontProperties("stacked"===t?"pinned":"primary")),{display:"stacked"===t?"block":"flex",cursor:"pointer",flex:"1 1 auto",gap:"5px",maxWidth:"100%",minWidth:"0"})})),ri=on("div")((()=>({flex:"0 0 auto",alignItems:"center"}))),ai=on("div")((()=>({"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}))),oi=e=>{var t,n,r,a,i,s,l,c,d,u,p,m;let{nodeKey:v,cardInstanceId:b,subviewId:y,attributes:{format:w,defaultValue:S,thumbnailSrc:C,label:k,name:x,placeholder:I},controlledDateValidator:O,validations:M,theme:T,variableResolver:F,onValueChanged:j,embedMode:_}=e;const L=S?new Date(S):void 0,D=f(L?(0,J.addMinutes)(L,L.getTimezoneOffset()):null),[A,E]=h(!1),[H,P]=h(0),[R,V]=h(0),[$,z]=h(D.current),N=f(null),B=f(null),U=f(null),W=(null==M||null===(t=M.maximumDate)||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.maximumDate)?new Date(null==M||null===(r=M.maximumDate)||void 0===r||null===(a=r.attributes)||void 0===a?void 0:a.maximumDate):void 0,q=(null==M||null===(i=M.minimumDate)||void 0===i||null===(s=i.attributes)||void 0===s?void 0:s.minimumDate)?new Date(null==M||null===(l=M.minimumDate)||void 0===l||null===(c=l.attributes)||void 0===c?void 0:c.minimumDate):void 0,Y=new Date;let Z=new Date;if(W&&q){if(!(Y<=W&&Y>=q)){Z=Math.abs((0,J.differenceInSeconds)(Y,W))<Math.abs((0,J.differenceInSeconds)(Y,q))?W:q}}else if(q){Y>=q||(Z=q)}else if(W){Y<=W||(Z=W)}const K=$?new Date($):new Date(Z);K.setHours(0,0,0,0);const G=()=>{A&&dt().validateField(b,x,$,M,y),E(!1)};let X;g((()=>{const e=e=>{U.current&&!U.current.base.contains(e.target)&&N.current&&!N.current.base.contains(e.target)&&G()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}})),g((()=>{const e=$?$.toISOString():void 0,t=$?Xe()($,se):null;if(j)j(e);else{const e=ut(b,x,y);e?(D.current=new Date(e),z(e)):dt().handleFormChange(b,x,t,y)}}),[]),g((()=>{var e;const t=S?new Date(S):void 0,n=t?(0,J.addMinutes)(t,t.getTimezoneOffset()):null;if((null==n?void 0:n.toDateString())!==(null===(e=D.current)||void 0===e?void 0:e.toDateString())){if($===D.current){const e=n?n.toISOString():void 0,t=n?Xe()(n,se):null;j?j(e):dt().handleFormChange(b,x,t,y),z(n)}D.current=n}}),[S]),O?X=O:((null==M||null===(d=M.maximumDate)||void 0===d||null===(u=d.attributes)||void 0===u?void 0:u.maximumDate)||(null==M||null===(p=M.minimumDate)||void 0===p||null===(m=p.attributes)||void 0===m?void 0:m.minimumDate))&&(X=e=>{var t,n,r,a;const o=null===(t=M.maximumDate)||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.maximumDate,i=null===(r=M.minimumDate)||void 0===r||null===(a=r.attributes)||void 0===a?void 0:a.minimumDate,s=o?Ke(o,{isMax:!0}):void 0,l=i?Ke(i,{isMin:!0}):void 0;return(!s||e<=s)&&(!l||e>=l)});const Q=`datepicker-label-${x}`,ee=$?Xe()($,"DD MMM YYYY"):F(I),te=()=>{B&&B.current&&B.current.base&&B.current.base.focus()};return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(0,o.h)(ai,null,(0,o.h)(Ro,{nodeKey:v,ref:N,innerRef:B,mode:w,theme:T,tabFocusable:!0,accessibleAttributes:{role:"button","aria-haspopup":"dialog","aria-expanded":A,"aria-labelledby":Q},onClick:()=>{if(N.current){const{openPosition:t,height:n}=ei(U.current.base,N.current.base,!!y,_);P(t),V(n),E((t=>(t&&e.validateField(b,x,$,M,y),!t)))}}},C&&(0,o.h)(ri,{mode:w},(0,o.h)($o,{thumbnailUrl:F(C),theme:T})),(0,o.h)(ni,{mode:w,theme:T},(0,o.h)(No,{theme:T,mode:w,name:Q,truncateLabel:"inline"===w,inputHasValue:!!$},F(k)),(0,o.h)(Jo,{theme:T,mode:w,placeholder:!$,ariaLabel:ee},ee)),(0,o.h)(Bo,{fillColor:T.getCSSColor("icon.dropdown"),styles:{flex:"0 0 auto"},ariaHidden:!0})),(0,o.h)(Ko,{ref:U,open:A,openPosition:H,theme:T,height:R},(0,o.h)(Eo,{date:K,open:A,theme:T,onDateSelected:t=>{z(t);const n=t?Xe()(t,se):void 0,r=t?t.toISOString():void 0;j?j(r):e.handleFormChange(b,x,n,y),e.validateField(b,x,r,M,y),E(!1),te()},onCancel:()=>{G(),te()},isDateEnabled:X})),(0,o.h)(Wo,{theme:T,name:x,cardInstanceId:b,subviewId:y,variableResolver:F}))))},ii=15,si=(0,J.startOfDay)(new Date),li=e=>{let{cardInstanceId:t,attributes:{format:n,name:r,label:a,defaultValue:i},validations:s,theme:l,maxDateTime:c,selectedDate:d,selectedTime:u,isWorkflow:p,variableResolver:m,onValueChanged:v}=e;const b=new Date(i),[y,w]=h(""),S=f(null),C=f([...Array(96).keys()].map((e=>({title:(0,J.format)((0,J.addMinutes)(si,e*ii),"h:mm A"),value:""+e*ii,disabled:!1})))),k=e=>{let t="";return e.forEach((e=>{e.disabled||(t=e.value)})),t};g((()=>{if(d){const t=C.current.map(((e,t)=>{const n=(0,J.addMinutes)(d,t*ii);return e.disabled=!!(c&&n>=c),e}));if(C.current=t,u&&c){if((0,J.addMinutes)(d,u||0)>c){const t=k(C.current);var e;if(t)null==v||v(t),null===(e=S.current)||void 0===e||e.setCurrentValue(t)}}}}),[c,d]);return(0,o.h)(ti,{ref:S,attributes:{name:r,label:a,format:n,values:C.current,defaultValue:(()=>{const e=ci(b);if(c){var t;const n=(0,J.differenceInMinutes)(c,(0,J.startOfDay)(b)),r=k(C.current);if(b>c)return Number(r);if(e<n)return e;const a=(0,J.differenceInMinutes)(c,(0,J.startOfDay)(c));return w((0,J.format)((0,J.addMinutes)(si,a),"h:mm A")),null===(t=S.current)||void 0===t||t.setCurrentValue(""),null==v||v(a.toString()),a}return e})(),placeholder:y},cardInstanceId:t,variableResolver:m,theme:l,validations:s,isWorkflow:p,onValueChanged:v})},ci=e=>Math.ceil(((0,J.differenceInMinutes)(e,(0,J.startOfDay)(e))+5)/ii)*ii,di=on("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"static"}})),ui=on("div")((()=>({position:"static",top:"60px",bottom:"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"hidden",padding:"0 20px"}))),pi=on("div")({overflow:"auto",paddingTop:"10px","> button":{marginBottom:"20px"}}),hi=e=>{let{theme:t}=e;const n=w(ya),r=n.analyticsDispatcher,a=n.cardEventDispatcher,i=n.authTokenProvider,[s,l]=h(void 0),[c,d]=h(0),u=new Date;return(0,o.h)(Le.lj,{actions:(0,G.Y2)(De,Xt),mapToProps:e=>{const t=$e(e);let n,r,a;return t&&Ne(t)&&(n=t.cardInstanceId,r=t.source,a=t.cardExpiry),{screenTitle:e.application.customStrings.cardSnoozeTitle||"Remind me",embedMode:e.application.embedMode,snoozeCardInstanceId:n,source:r,snoozeCardExpiry:a}}},(e=>{const[n,p]=h(u),[m,v]=h(0),f=e.snoozeCardInstanceId,b=e.snoozeCardExpiry,y=e.source;if(!f||!y)return null;const w=e.screenTitle,S="modal-subview"===e.embedMode?ea:Jr;g((()=>{r.sendEvent({eventName:St,cardInstanceId:f,cardViewState:"subview"})}),[]);return(0,o.h)(di,{theme:t,id:Sa},(0,o.h)(S,{title:w,theme:t,actionHandler:()=>{r.sendEvent({eventName:Ct,cardInstanceId:f,cardViewState:"subview"}),e.navigateBack()}}),(0,o.h)(ui,{class:"use-offset"},(0,o.h)(pi,{class:"offset-child"},(0,o.h)(oi,{cardInstanceId:f,attributes:{name:"snoozeDate",label:"Date",defaultValue:Xe()(u,"YYYY-MM-DD[T]00:00:00.000[Z]"),format:"inline"},isWorkflow:!0,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{p(new Date(e))},controlledDateValidator:b?e=>{if(b){return e<=new Date(b)}return!0}:void 0}),(0,o.h)(li,{attributes:{name:"snoozeTime",label:"Time",defaultValue:u.toISOString(),format:"inline"},isWorkflow:!0,cardInstanceId:f,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{v(Number.parseInt(e))},selectedDate:n,selectedTime:m,maxDateTime:b?new Date(b):void 0}),(0,o.h)(Ns,{isWorkflow:!0,clickHandler:()=>()=>{const t=mi(n,m);if((0,J.isPast)(t)){const e=c+1;d(e),l({text:"Date must be in the future",messageId:`${e}`,cardInstanceId:f,action:"other"})}else e.navigateBack(),Ps(ie().getState(),e,f,t,a,i,y)},text:"Done",theme:t,appearance:"primary"}))),(0,o.h)(sa,{theme:t,message:s,actionTitle:"Dismiss",onDismiss:()=>{}}))}))},mi=(e,t)=>(0,J.addMinutes)((0,J.startOfDay)(e),t),gi=(e,t,n)=>({getTheme:r=>new mn(e,r,t,n)});var vi=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const fi="theme_cache",bi=()=>new Promise(((e,t)=>{const n=window.parent.indexedDB.open("AtomicSDK",1);n.onerror=e=>{t(e)},n.onsuccess=()=>{e(n.result)},n.onupgradeneeded=()=>{const r=n.result;n.transaction&&(n.transaction.oncomplete=()=>{e(n.result)},n.transaction.onerror=e=>{t(e)},n.transaction.onabort=e=>{t(e)});r.createObjectStore(fi).createIndex("stream_container_id","stream_container_id",{unique:!0})}}));var yi=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const wi=(e,t)=>yi(void 0,void 0,void 0,(function*(){const n=`theme/${e}`,{data:r,response:a}=yield sd.get(n,void 0,t,{streamContainerId:e});if(200===a.status){if(r&&r.theme){try{yield((e,t,n)=>vi(void 0,void 0,void 0,(function*(){const r=yield bi();return new Promise(((a,o)=>{const i=r.transaction(fi,"readwrite").objectStore(fi).put({themePayload:t,eTag:n},e);i.onsuccess=()=>{r.close();const t=i.result;a({streamContainerId:e,themePayload:t.themePayload,eTag:t.eTag})},i.onerror=e=>{r.close(),o(e)}}))})))(e,r,a.etag||"")}catch(e){console.warn("Failed to update cached theme.",e)}return{theme:r||{}}}return{error:new Error("Invalid theme returned. Missing `theme` key in payload.")}}return{error:a.error}})),Si=e=>yi(void 0,void 0,void 0,(function*(){try{const t=yield(e=>vi(void 0,void 0,void 0,(function*(){const t=yield bi();return new Promise(((n,r)=>{const a=t.transaction(fi,"readonly").objectStore(fi).get(e);a.onsuccess=()=>{t.close(),n(a.result)},a.onerror=e=>{t.close(),r(e)}}))})))(e);return t&&t.themePayload&&t.themePayload.theme?{theme:t.themePayload,eTag:t.eTag}:null}catch(e){return console.warn("Failed to fetch cached theme.",e),null}}));class Ci extends o.Component{componentDidCatch(e){this.props.onError?this.props.onError(e):console.error(e)}render(){return this.props.children}}const ki=e=>{let{fontFamilies:t}=e;return(0,o.h)("style",{dangerouslySetInnerHTML:{__html:t.map((e=>Ii(e))).join("\n")}})},xi={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"},Ii=e=>{let{fontFamily:t,weight:n,style:r,src:a}=e;if(a&&0===a.split(".").length)throw new Error("Invalid file url provided for font.");const o=a?new URL(a).pathname:null;if(!o)return"";const i=o.split("."),s=i[i.length-1],l=xi[s];if(!l)return"";if(!t)return"";return`\n @font-face {\n font-family: "${t}";\n ${(a?`src: url('${a}') format('${l}');`:"")||""}\n font-weight: ${n||"normal"};\n font-style: ${r||"normal"};\n font-display: swap;\n }\n `},Oi=e=>Object.assign(Object.assign({backgroundColor:e.getCSSColor("background.component"),color:e.getCSSColor("text.primary")},e.getCSSFontProperties("primary")),{border:"none",boxSizing:"border-box",height:"100%",width:"100%",display:"flex",flexGrow:"1",overflow:"hidden",":focus":{outline:"none"},"::placeholder":{color:e.getCSSColor("text.hint")},whiteSpace:"pre-wrap"}),Mi=on("textarea")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},Oi(t)),{resize:"none",boxSizing:"content-box",paddingLeft:"0px",paddingRight:"0px"})})),Ti=on("input")((e=>{let t,{theme:n}=e,r=n.getNumericFontSize("primary"),a=n.getCSSFontProperties("primary");if(a&&a.lineHeight&&r){const e=Math.ceil(.05*r);t=Number(a.lineHeight.replace("px",""))+e}return Object.assign(Object.assign({},Oi(n)),t?{lineHeight:`${t}px`}:{})})),Fi=(e,t,n)=>{let r=0;"getComputedStyle"in window&&document.defaultView&&(r=parseInt(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height"))),e.style.height="auto",n&&(e.style.minHeight=n*r+"px"),1===t?e.style.height="auto":t>0?e.style.height=t*r+"px":(e.style.height=`${e.scrollHeight}px`,e.style.paddingTop="4px")};let ji=null;const _i=K.forwardRef(((e,t)=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,attributes:{defaultValue:i,numberOfLines:s,name:l,thumbnailSrc:c,placeholder:d,maxLength:u},minimumLines:p,validations:m,theme:v,variableResolver:y,onValueChanged:w}=e;const S=f(null),C=f(i),[k,x]=h(y(i)),I=1===s?Ti:Mi;g((()=>{const{current:{base:e}}=S;Fi(e,s,p)})),g((()=>{const e=ut(r,l,a);e?(C.current=e,x(e)):dt().handleFormChange(r,l,k,a)}),[]),g((()=>{if(i!==C.current){if(k===y(C.current)){const e=y(i);x(e),dt().handleFormChange(r,l,e,a)}C.current=i}}),[i]);const O=y(d);return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(b(t,(()=>({clearInput:()=>{x(""),S.current.base&&Fi(S.current.base,s),e.handleFormChange(r,l,"",a)}}))),(0,o.h)(o.Fragment,null,(0,o.h)(Ro,{nodeKey:n,mode:"inline",theme:v},c&&(0,o.h)($o,{thumbnailUrl:y(c),theme:v}),(0,o.h)(I,{theme:v,ref:S,placeholder:O,value:k,maxlength:u,className:"input-text",onInput:t=>{const{current:{base:n}}=S,{value:o}=t.target;x(o),Fi(n,s),((e,t)=>{null!==ji&&(clearTimeout(ji),ji=null),ji=setTimeout((()=>{t(r,l,null!=e?e:void 0,m,a)}),200)})(o,e.validateField),e.handleFormChange(r,l,o,a),w&&w(o)},rows:"1"})),(0,o.h)(Wo,{name:l,cardInstanceId:r,subviewId:a,theme:v,variableResolver:y})))))})),Li=on("div")((e=>{let{theme:t}=e;return Object.assign({padding:"10px 20px",display:"flex",width:"100%",alignItems:"center",border:"0px"},t.getElementFocusCSSProperties())})),Di=on("p")((e=>{let{theme:t}=e;return Object.assign({padding:"0 10px 0 0",margin:"0",flexGrow:"1",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t.getCSSColor("text.primary")},t.getCSSFontProperties("primary"))})),Ai=on("div")((e=>{let{checked:t,theme:n}=e;return{width:"22px",height:"22px",border:t?`7px solid ${n.getCSSColor("icon.selectionIndicatorActive")}`:`1px solid ${n.getCSSColor("icon.selectionIndicator")}`,flexShrink:"0",borderRadius:"100%"}})),Ei=e=>{let{title:t,value:n,checked:r,onValueSelected:a,theme:i}=e;return(0,o.h)(Li,{onClick:()=>{a(n)},role:"radio","aria-checked":r,theme:i,tabIndex:"-1"},(0,o.h)(Di,{theme:i},t),(0,o.h)(Ai,{checked:r,theme:i}))},Hi=on("div")((e=>{let{}=e;return{display:"flex",flexFlow:"column wrap",width:"100%"}})),Pi=on("div")((e=>{let{}=e;return{display:"none"}})),Ri=e=>{let{attributes:{items:t,title:n,name:r},theme:a,onValueChanged:i}=e;const[s,l]=h(null),c=`radio-group-${r}`;return(0,o.h)(Ro,{mode:"inline",theme:a,hPadding:0},(0,o.h)(Pi,{id:c},n),(0,o.h)(Hi,{role:"radiogroup","aria-labelledby":c},(0,o.h)(Rr,{theme:a},t.map((e=>(0,o.h)(Ei,{title:e.title,value:e.value,theme:a,checked:s===e.value,onValueSelected:e=>{l(e),i&&i(e)}}))))))},Vi=on("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"static"}})),$i=on("div")((()=>({position:"static",top:"60px",bottom:"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"hidden",padding:"0 20px"}))),zi=on("div")({overflow:"auto",paddingTop:"10px","> button":{marginBottom:"20px"}}),Ni=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.error")},t.getCSSFontProperties("error")),{margin:"-10px 0 30px 0"})})),Bi=e=>{let{theme:t}=e;const n=w(ya),r=n.analyticsDispatcher,a=n.cardEventDispatcher,i=f(),[s,l]=h(null),[c,d]=h(null),[u,p]=h(!1);return(0,o.h)(Le.lj,{actions:(0,G.Y2)(De,Xt),mapToProps:e=>{const t=$e(e),n=t&&Be(t)?t:void 0;return{embedMode:e.application.embedMode,screenTitle:e.application.customStrings.votingFeedbackTitle||"Send feedback",validationMessage:e.application.customStrings.votingFeedbackValidationMessage||"Feedback is limited to 280 characters.",feedbackSentiment:null==n?void 0:n.sentiment,feedbackCardInstanceId:null==n?void 0:n.cardInstanceId,feedbackSource:null==n?void 0:n.source,textFeedback:null==n?void 0:n.textFeedback,textFeedbackLabel:null==n?void 0:n.textFeedbackLabel}}},(e=>{const n="modal-subview"===e.embedMode?ea:Jr,h=e.screenTitle,m=e.feedbackCardInstanceId,g=e.feedbackSource,v="positive"===e.feedbackSentiment&&e.textFeedback,f=[{title:"It's not relevant",value:"not-relevant"},{title:"I see this too often",value:"too-often"}];if(e.textFeedback&&f.push({title:"Something else",value:"other"}),!m||!g)return null;const b="positive"===e.feedbackSentiment?"Add optional feedback...":"Add your feedback...";return(0,o.h)(Vi,{theme:t,id:Sa},(0,o.h)(n,{title:h,theme:t,actionHandler:()=>{var t;d(null),null===(t=i.current)||void 0===t||t.clearInput(),e.navigateBack()}}),(0,o.h)($i,{class:"use-offset"},(0,o.h)(zi,{class:"offset-child"},"negative"===e.feedbackSentiment&&(0,o.h)(Ri,{attributes:{title:h,name:"feedback-reason",items:f},isWorkflow:!0,cardInstanceId:m,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{l(e)}}),("other"===s||v)&&(0,o.h)(o.Fragment,null,(0,o.h)(_i,{ref:i,attributes:{name:"feedback-message",defaultValue:"",placeholder:e.textFeedbackLabel&&e.textFeedbackLabel.length>0?e.textFeedbackLabel:b,numberOfLines:0,maxLength:280},minimumLines:3,isWorkflow:!0,cardInstanceId:m,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{if(e.length>=280)return p(!0);p(!1),d(e)}}),u&&(0,o.h)(Ni,{theme:t,"data-testid":"feedback-validation-error"},e.validationMessage)),(0,o.h)(Ns,{isWorkflow:!0,clickHandler:()=>()=>{var t;if(!v&&null===s)return;if("other"===s&&(null===c||null==c||0===c.trim().length))return;const n="other"===s||v&&c?{message:c}:{};r.sendEvent({cardViewState:"topview",eventName:v?ft:bt,cardInstanceId:m,properties:Object.assign(Object.assign({source:g},"negative"===e.feedbackSentiment||null!==c?{reason:v?"other":s}:{}),n)}),e.feedbackReceived(m),a.dispatchCardEvent({type:v?ba.VOTED_USEFUL:ba.VOTED_NOT_USEFUL}),d(null),null===(t=i.current)||void 0===t||t.clearInput(),e.navigateBack()},text:"Submit",theme:t,appearance:"primary"}))))}))};var Ui=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Wi=()=>window.matchMedia("(prefers-color-scheme: dark)"),qi=on("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.toast")}})),Yi=e=>{let{store:t,onAnalyticsEvent:n,onCardEvent:r,onAuthTokenRequested:a,onError:i}=e;const s=y((()=>({analyticsDispatcher:{sendEvent:(e,t)=>Ui(void 0,void 0,void 0,(function*(){n&&(void 0===t?yield n(e):yield n(e,t))}))},cardEventDispatcher:{dispatchCardEvent:e=>{r&&r(e)}},authTokenProvider:{requestToken:()=>Ui(void 0,void 0,void 0,(function*(){return yield a()}))},runtimeVariableResolver:void 0})),[n,r,a]);return(0,o.h)(Ci,{onError:i},(0,o.h)(ya.Provider,{value:s},(0,o.h)(Le.zt,{store:t},(0,o.h)(Le.lj,{actions:(0,G.Y2)(De,Xt,at,De)},Zi))))},Zi=e=>{const{cardFeed:t,messages:n,themeLoading:r,themeLoaded:a,clearMessage:i,application:{interfaceStyle:s,streamContainerId:l},theme:c}=e,[d,u]=h(Wi().matches?"dark":"light");if(g((()=>{!function(){Ui(this,void 0,void 0,(function*(){const e=yield Si(l);if(e)a({theme:e.theme}),wi(l,e.eTag);else{r();const e=yield wi(l);a(e)}}))}()}),[]),g((()=>{const e=e=>{u(e.matches?"dark":"light")};return Wi().addEventListener("change",e),()=>{Wi().removeEventListener("change",e)}}),[]),!c.status||!1===c.status.loaded)return null;const p=c.themePayload?gi(c.themePayload,d,s):void 0;if(!p)return null;const m=p.getTheme("feed"),v=w(ya),f=v.cardEventDispatcher,b=v.analyticsDispatcher,y=v.authTokenProvider;return(0,o.h)(qi,{theme:m},(0,o.h)(sa,{theme:m,feedOrientation:Bc(t.horizontalContainerConfig),message:n.cardList,actionTitle:n.cardList&&["submit-failed","dismiss-failed","snooze-failed"].includes(n.cardList.action)?"Try again":"Dismiss",actionHandler:()=>{var t,r,a,o,i,s,l,c,d,u;const p=null===(t=n.cardList)||void 0===t?void 0:t.cardInstanceId,h=null===(r=n.cardList)||void 0===r?void 0:r.action;if(p&&h)switch(h){case"submit-failed":Hs(e,e,p,!1,f,b,y,(null===(a=e.messages.cardList)||void 0===a?void 0:a.responseValues)||{},{payload:null===(o=e.messages.cardList)||void 0===o?void 0:o.payload,postSubmissionUrl:null===(i=e.messages.cardList)||void 0===i?void 0:i.postSubmissionUrl,subviewData:null===(s=e.messages.cardList)||void 0===s?void 0:s.subviewData,submitButtonName:null===(l=e.messages.cardList)||void 0===l?void 0:l.submitButtonName});break;case"dismiss-failed":const t=null===(c=e.messages.cardList)||void 0===c?void 0:c.source;t&&Es(e,e,p,f,y,t);break;case"snooze-failed":const n=null===(d=e.messages.cardList)||void 0===d?void 0:d.snoozeDate,r=null===(u=e.messages.cardList)||void 0===u?void 0:u.source;n&&r&&Ps(e,e,p,n,f,y,r)}},onDismiss:()=>{i("cardList")},delay:500}))};function Ki(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let Gi;!function(e){e.STATE="state-update",e.ANALYTICS_EVENT="analytics-event-dispatched"}(Gi||(Gi={}));class Xi{constructor(){Ki(this,"channel",void 0),Ki(this,"isOpen",!1),Ki(this,"eventListeners",new Map),this.channel=new BroadcastChannel("stream-container-broadcast-channel"),this.isOpen=!0,window.addEventListener("pagehide",(()=>{this.close()}))}addEventListener(e,t,n){if(!("BroadcastChannel"in window))return mt.error({level1:["BroadcastChannel API not supported in this browser"]});const r=n=>{n.type===e&&t(n)},a=n||`${e}-${Date.now().toString()}-${this.eventListeners.size}`;return this.channel.addEventListener(e,r),this.eventListeners.set(a,r),a}removeEventListener(e){if(!("BroadcastChannel"in window))return mt.error({level1:["BroadcastChannel API not supported in this browser"]});const t=this.eventListeners.get(e);return!!t&&(this.channel.removeEventListener("message",t),this.eventListeners.delete(e),!0)}postMessage(e){if(!("BroadcastChannel"in window))return mt.error({level1:["BroadcastChannel API not supported in this browser"]});this.channel.postMessage(e)}close(){this.channel.close(),this.isOpen=!1}}var Qi=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))},Ji=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function es(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ts=()=>window.matchMedia("(prefers-color-scheme: dark)"),ns=()=>window.getComputedStyle(document.documentElement).getPropertyValue("font-size"),rs={FEED_OVERLAY:"100",CARD_OVERLAY:"110",DROPDOWN:"40",HEADER:"30",BANNER:"20",TOAST:"11",OVERFLOW_MENU:"11",OVERFLOW_MENU_BUTTON:"10",CUSTOM_HEADER:"2"},as=on("div")((e=>{let{embedMode:t,feedOrientation:n}=e;const r={};return"launcher"===t?Object.assign({width:"calc(100% - 40px)",height:"0px",position:"absolute",bottom:"100px",right:"20px",left:"20px",transition:"height 0.2s"},"horizontal"===n?r:{}):{width:"100%",height:"100%"}})),os={fontFamily:'-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',height:"100%",overflow:"hidden"},is=on("div")((e=>{let{embedMode:t}=e;return"launcher"===t?Object.assign(Object.assign({},os),{borderRadius:"20px",boxShadow:"0 2px 20px 0 rgba(0, 0, 0, 0.1)"}):Object.assign({},os)})),ss=K.forwardRef(((e,t)=>{let{store:n,embedMode:r,applyCardFeedDeltaUpdates:a,cardCountChanged:i,onReady:s,runtimeVariableResolver:l,linkButtonPressed:c,submitButtonPressed:d,onCardListTutorialSeen:u,onAnalyticsEvent:p,onCardEvent:m,onError:v,onAuthTokenRequested:w,onCardFeedSubscribe:S,requestWebSocketReconnect:C,webSocketDisabled:k}=e;const[x,I]=h(ts().matches?"dark":"light"),[,O]=h(ns);g((()=>{const e=e=>{I(e.matches?"dark":"light")};ts().addEventListener("change",e);const t=()=>{O(ns)};return window.addEventListener("browser-font-changed",t),window.addEventListener("pageshow",(e=>{var t;e.persisted&&!(null===(t=M.containersBroadcastChannel)||void 0===t?void 0:t.isOpen)&&(M.containersBroadcastChannel=new Xi)})),()=>{ts().removeEventListener("change",e),window.removeEventListener("browser-font-changed",t)}}),[]);const M=y((()=>({analyticsDispatcher:{sendEvent:(e,t)=>Qi(void 0,void 0,void 0,(function*(){p&&(void 0===t?yield p(e):yield p(e,t))}))},cardEventDispatcher:{dispatchCardEvent:e=>{m&&m(e)}},authTokenProvider:{requestToken:()=>Qi(void 0,void 0,void 0,(function*(){return yield w()}))},runtimeVariableResolver:l,containersBroadcastChannel:"BroadcastChannel"in window?new Xi:void 0})),[p,m,w]),T=f();return b(t,(()=>({pollCardList:()=>{var e;mt.debug({level3:["Card feed polling initiated"]}),null===(e=T.current)||void 0===e||e.loadCards(!1)},cancelCardListPolling:()=>{var e;null===(e=T.current)||void 0===e||e.cancelCardListPolling()}}))),"toast"===r?(0,o.h)(Yi,{store:n,onAuthTokenRequested:w}):(0,o.h)(Ci,{onError:v},(0,o.h)(ya.Provider,{value:M},(0,o.h)(Le.zt,{store:n},(0,o.h)(Le.lj,{actions:(0,G.Y2)(Xt,Q),mapToProps:e=>{const{cardResponses:t}=e;return Ji(e,["cardResponses"])}},(e=>{let{cardFeed:t,pendingCardFeedUpdates:n,cardStates:r,navigationStack:p,cardFeedLoading:h,cardFeedLoaded:m,themeLoading:g,themeLoaded:v,finishExternalAction:f,application:{open:b,cardListRefreshInterval:y,streamContainerId:w,runtimeVariableResolutionTimeout:I,isPreview:O,embedMode:M,customStrings:F,cardLimit:j,firstLoadStyles:_,interfaceStyle:L},externalAction:D,theme:{themePayload:A}}=e;const E=p.items.length?p.items[p.items.length-1]:void 0;let H;switch(null==E?void 0:E.kind){case"media":H="Media";break;case"subview":H="Card Subview";break;case"snooze":H="Snooze Date & Time Selector";break;case"feedback":H="Send Feedback"}return(0,o.h)(as,{embedMode:M,feedOrientation:Bc(t.horizontalContainerConfig),id:"action-cards-sdk-app-root",class:"atomic-sdk-root","data-contentLabel":H},(0,o.h)(cs,{ref:T,streamContainerId:w,runtimeVariableResolutionTimeout:I,runtimeVariablesResolver:l,themePayload:A,cardFeed:t,pendingCardFeedUpdates:n,cardStates:r,cardLimit:j,onThemeLoading:g,onThemeLoaded:v,onCardFeedLoading:h,onCardFeedLoaded:m,onCardFeedSubscribe:S,streamFilter:t.streamFilter,requestWebSocketReconnect:C,webSocketDisabled:k,currentNavigationItem:E,applicationOpen:b,onReady:s,onCardCountChanged:i,applyCardFeedDeltaUpdates:a,cardListRefreshInterval:y,isPreview:O,cardListTitle:F.cardListTitle,embedMode:M,externalAction:D,finishExternalAction:f,onLinkButtonPressed:c,onSubmitButtonPressed:d,cardListTutorialSeen:t.tutorialSeen,onCardListTutorialSeen:u,firstLoadStyles:_,colourScheme:x,interfaceStyle:L,noInternetConnectionMessage:F.noInternetConnectionMessage,dataLoadFailedMessage:F.dataLoadFailedMessage,tryAgainTitle:F.tryAgainTitle}))})))))})),ls=e=>"modal-subview"!==e;class cs extends o.Component{constructor(e){super(e),es(this,"pollCounter",0),es(this,"poll",void 0),this.poll=null}componentDidMount(){return Qi(this,void 0,void 0,(function*(){this.props.onReady(),ls(this.props.embedMode)&&this.loadTheme()}))}componentWillUnmount(){this.cancelCardListPolling()}componentDidUpdate(e){var t,n;const{cardFeed:r,externalAction:a}=e,{cardFeed:o,pendingCardFeedUpdates:i,cardStates:s,onCardCountChanged:l,externalAction:c,embedMode:d}=this.props;if("modal-subview"===d||"toast"===d)return;const u=o.cardInstances.map((e=>e.instance.id)),p=r.cardInstances.map((e=>e.instance.id));var h;Yc(u,p)&&(null===(t=r.metadata)||void 0===t?void 0:t.totalCards)===(null===(n=o.metadata)||void 0===n?void 0:n.totalCards)||this.poll&&l&&l(o.cardInstances.length,null===(h=o.metadata)||void 0===h?void 0:h.totalCards);if(!r.tutorialSeen&&o.tutorialSeen&&this.props.onCardListTutorialSeen&&this.props.onCardListTutorialSeen(),c&&c.actionId!==(null==a?void 0:a.actionId)&&this.handleExternalAction(c),r.runtimeVariables.updateId!==o.runtimeVariables.updateId&&this.trackRuntimeVariablesChanged(o),Object.values(s).every((e=>null===e))&&i&&i.length>0){const e=(0,G.kv)((0,G.Y2)(Xt,Q),ie());this.props.applyCardFeedDeltaUpdates(e,i)}}trackRuntimeVariablesChanged(e){const t=this.context.analyticsDispatcher,n=!1===e.runtimeVariableAnalyticsEnabled;e.cardInstances.forEach((r=>{if(r.runtimeVariables&&r.runtimeVariables.values){var a;const o=null===(a=e.runtimeVariables.values)||void 0===a?void 0:a.get(r.instance.id);t.sendEvent({cardInstanceId:r.instance.id,cardViewState:"topview",eventName:yt,properties:{resolvedVariables:r.runtimeVariables.reduce(((e,t)=>(e[t.name]=(null==o?void 0:o.get(t.name))||"",e)),{})}},n)}}))}loadTheme(){return Qi(this,void 0,void 0,(function*(){const{streamContainerId:e,onThemeLoading:t,onThemeLoaded:n}=this.props,r=yield Si(e);if(r)n({theme:r.theme}),wi(e,r.eTag);else{t();n(yield wi(e))}const a=ie().getState().theme.status;a&&a.loaded&&this.subscribeToCardFeedUpdates()}))}loadCards(e){return Qi(this,void 0,void 0,(function*(){const t=this.context,{onCardFeedLoading:n,onCardFeedLoaded:r,streamContainerId:a,runtimeVariableResolutionTimeout:o,cardFeed:i,runtimeVariablesResolver:s,cardLimit:l,streamFilter:c}=this.props;e||n();const d=yield hd(a,t.authTokenProvider,o,i.lastModified,s,l,c);e&&d.error||r(d),ie().getState().cardFeed.status.loaded&&this.pollForNewCards()}))}handleExternalAction(e){return Qi(this,void 0,void 0,(function*(){const t=this.context,n=t.analyticsDispatcher,r=t.containersBroadcastChannel,a=()=>Qi(this,void 0,void 0,(function*(){var t;return n.sendEvent({cardInstanceId:e.cardInstanceId,cardViewState:e.cardViewState,eventName:vt,properties:Object.assign(Object.assign(Object.assign(Object.assign({linkMethod:e.linkMethod},(null===(t=e.urlLink)||void 0===t?void 0:t.url)?{url:e.urlLink.url}:{}),e.payload?{payload:e.payload.actionPayload}:{}),e.trigger?{detail:e.trigger}:{}),e.subviewData.subviewId?Object.assign(Object.assign({},e.subviewData),{subviewLevel:1}):{})})})),o=()=>{var t;e.payload?(this.props.finishExternalAction(e.actionId),"linkButton"!==e.trigger&&"image"!==e.trigger||!this.props.onLinkButtonPressed?"submitButton"===e.trigger&&this.props.onSubmitButtonPressed&&this.props.onSubmitButtonPressed(e.payload):this.props.onLinkButtonPressed(e.payload)):e.urlLink&&(this.props.finishExternalAction(e.actionId),window.open(e.urlLink.url,null!==(t=e.urlLink.target)&&void 0!==t?t:"_blank"))};if(r){const t=`${e.actionId}-app-external-action`;r.addEventListener("message",(n=>{var a;if(n.data.type!==Gi.ANALYTICS_EVENT)return;const i=null===(a=n.data)||void 0===a?void 0:a.eventQueued;i.eventName===vt&&i.cardInstanceId===e.cardInstanceId&&r&&(r.removeEventListener(t),o())}),t),yield a()}else yield a(),o()}))}subscribeToCardFeedUpdates(){return this.props.webSocketDisabled?this.loadCards(!1):this.props.onCardFeedSubscribe()}pollForNewCards(){const{isPreview:e,cardListRefreshInterval:t,embedMode:n}=this.props;!e&&0!==t&&ls(n)&&(this.poll=setTimeout((()=>Qi(this,void 0,void 0,(function*(){this.props.webSocketDisabled?yield this.loadCards(!0):this.pollCounter<9?(this.pollCounter++,yield this.loadCards(!0)):(this.pollCounter=0,mt.debug({level3:["Attempt to reconnect websocket initiated"]}),this.props.requestWebSocketReconnect())}))),t))}cancelCardListPolling(){this.poll&&mt.debug({level3:["Card feed polling cancelled"]}),clearTimeout(this.poll),this.poll=null,this.pollCounter=0}render(e){var t;let{currentNavigationItem:n,embedMode:r,cardFeed:a,firstLoadStyles:i,colourScheme:s,interfaceStyle:l,noInternetConnectionMessage:c,dataLoadFailedMessage:d,tryAgainTitle:u}=e;const p=ie().getState(),h="modal-subview"===r;if(!p.theme.status)return h?null:(0,o.h)(is,{embedMode:r,id:Sa});if(!1===p.theme.status.loaded)return h?null:(0,o.h)(is,{embedMode:r,id:Sa},(0,o.h)(fa,{embedMode:r,textColor:i.textColor,loadingIconColor:i.loadingSpinnerColor,buttonColor:i.buttonTextColor,backgroundColor:i.backgroundColor,onRetry:()=>{this.loadTheme()},state:p.theme.status.errorState,noInternetConnectionMessage:c,dataLoadFailedMessage:d,tryAgainTitle:u}));const{applicationOpen:m,themePayload:g}=this.props;let v;v="standalone"===r&&(null===(t=a.horizontalContainerConfig)||void 0===t?void 0:t.enabled)||"single-card"===r?"feed":Ue(n)?"media":ze(n)?"subview":Ne(n)?"snooze":Be(n)?"feedback":h?void 0:"feed";const f=g?gi(g,s,l):void 0;if(!v||!f)return null;const b=f.getTheme("feed"),y=f.getTheme("workflow");return(0,o.h)(o.Fragment,null,(0,o.h)(is,{theme:b,visible:m,embedMode:r,className:"feed-container",role:"main"},"subview"===v&&(0,o.h)(Va,{theme:y}),"media"===v&&(0,o.h)(Ga,{theme:y}),"feed"===v&&(0,o.h)(ja,{theme:b,onRetry:()=>(this.props.onCardFeedLoading(),this.subscribeToCardFeedUpdates())}),"snooze"===v&&(0,o.h)(hi,{theme:y}),"feedback"===v&&(0,o.h)(Bi,{theme:y})),(0,o.h)(ki,{fontFamilies:b.getFontFamilies()}),(0,o.h)(Cn,null))}}es(cs,"contextType",ya);const ds=sn({to:{opacity:"0"}}),us=sn({to:{opacity:"1"}}),ps=sn({to:{opacity:"1",width:"400%",paddingTop:"400%"}}),hs=sn({to:{opacity:"0",transform:"scale(0.9)"}}),ms=sn({from:{opacity:"1",transform:"scale(1)"},to:{opacity:"0",transform:"scale(0)"}}),gs=sn({to:{transform:"translateX(-120%)"}}),vs=sn({from:{left:"100%"},to:{left:"50%"}}),fs=sn({from:{},to:{height:"0px"}}),bs=sn({from:{},to:{width:"0px"}}),ys=e=>{let{theme:t,animationState:n}=e;return(0,o.h)(o.Fragment,null,(0,o.h)(Ms,{theme:t,class:n,"aria-hidden":"true"}),(0,o.h)(Nn,{fillColor:t.getCSSColor("icon.cardCompletion"),className:"tick-icon",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},"aria-hidden":!0}))},ws=e=>{let{animationState:t,theme:n}=e;return(0,o.h)(o.Fragment,null,(0,o.h)("div",{class:`${t||""} dismiss-icon`,style:{background:n.getCSSColor("background.quickActionPrimary")},"aria-hidden":"true"},(0,o.h)(Bn,{style:{fill:n.getCSSColor("icon.quickActionPrimary")}})),(0,o.h)("div",{class:`${t||""} clock-icon`,style:{background:n.getCSSColor("background.quickActionSecondary")},"aria-hidden":"true"},(0,o.h)(Un,{style:{fill:n.getCSSColor("icon.quickActionSecondary")}})))},Ss=on("div")((e=>{let{theme:t,topAlign:n,viewState:r,useHorizontalStyles:a}=e,o="rgba(255,255,255,1)";"subview"===r?o=(bn(t.getCSSColor("background.default")),t.getCSSColor("background.default")):bn(t.getCSSColor("background.card"))&&!bn(t.getCSSColor("background.default"))?o=t.getCSSColor("background.default"):bn(t.getCSSColor("background.card"))||(o=t.getCSSColor("background.card")),o=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(\d*(?:\.\d+)?)?\s*\)$/);if(t){const[,e,n,r]=t;return`rgba(${e},${n},${r},1)`}return mt.warn({level3:["Expected a valid RGBA color string, but received:",e,"Returning the original value."]}),e})(o);return Object.assign(Object.assign({position:"absolute",top:"0",left:"0",right:"0",bottom:"0",zIndex:rs.CARD_OVERLAY,padding:"15px 10px",backgroundColor:o,border:`${t.getShape("border.card")} solid ${t.getCSSColor("border.card")}`,borderRadius:t.getShape("borderRadius.card")},n?{}:{display:"flex"}),a?{marginLeft:"10px",marginBottom:"10px"}:{})})),Cs=on("div")((e=>{let{topAlign:t}=e;return Object.assign({width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},t?{marginTop:"15vh"}:{})})),ks=on("div")({}),xs=on("div")((e=>{let{theme:t,maxLines:n}=e;return Object.assign({width:"100%",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:`${n}`,textAlign:"center",marginTop:"20px",color:t.getCSSColor("text.processingStateMessage")},t.getCSSFontProperties("processingStateMessage",{skipFallback:!0})||{})})),Is=on("button")((e=>{let{theme:t}=e;return Object.assign({width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"15px",padding:"8px",background:"transparent",border:"0",outline:"none",fontWeight:"bold",cursor:"pointer",color:t.getCSSColor("text.processingStateButtonLabel")},t.getCSSFontProperties("processingStateButtonLabel",{skipFallback:!0})||{})})),Os=e=>{let{viewState:t,onCancelUpload:n,theme:r,renderOverlay:a}=e;return a?(0,o.h)(Le.lj,{mapToProps:e=>{var t;const n=$e(e),r=n&&ze(n);return{customStrings:e.application.customStrings,embedMode:e.application.embedMode,presentingSubview:r,horizontalStreamContainer:!!(null===(t=e.cardFeed.horizontalContainerConfig)||void 0===t?void 0:t.enabled)}}},(e=>{var a,i,s,l;const c=f(null),d=f(null),u=f(null),p=f(null),[m,v]=h(0),b=null!==(a=null===(s=e.customStrings)||void 0===s?void 0:s.processingStateMessage)&&void 0!==a?a:"Sending, please wait...",y=null!==(i=null===(l=e.customStrings)||void 0===l?void 0:l.processingStateCancelButtonTitle)&&void 0!==i?i:"Cancel process";if(g((()=>{var e,t,n,r,a,o,i,s;const l=null===(e=c.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.clientHeight,h=null===(n=d.current)||void 0===n||null===(r=n.base)||void 0===r?void 0:r.clientHeight,m=null===(a=u.current)||void 0===a||null===(o=a.base)||void 0===o?void 0:o.clientHeight,g=null===(i=p.current)||void 0===i||null===(s=i.base)||void 0===s?void 0:s.clientHeight;if(l&&h&&m&&g){const e=l-h-g-30-20-15,t=parseFloat(getComputedStyle(u.current.base).lineHeight),n=Math.floor(e/t);v(n)}}),[b,y]),"single-card"===e.embedMode&&e.presentingSubview)return null;if("standalone"===e.embedMode&&e.horizontalStreamContainer&&e.presentingSubview)return null;const w="subview"===t&&"standalone"===e.embedMode;return(0,o.h)(Ss,{theme:r,class:"subview"===t?"use-offset":"",topAlign:w,viewState:t,useHorizontalStyles:e.horizontalStreamContainer&&!e.presentingSubview},(0,o.h)(Cs,{ref:c,theme:r,topAlign:w},(0,o.h)(ks,{ref:d},(0,o.h)(Sn,{stopColor:r.getCSSColor("icon.processingStateSpinner"),size:30})),(0,o.h)(xs,{ref:u,theme:r,maxLines:Math.max(1,m)},b),(0,o.h)(Is,{ref:p,theme:r,onClick:n},y)))})):null},Ms=on("div")((e=>{let{theme:t}=e;return{background:t.getCSSColor("background.cardCompletion"),position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",transformOrigin:"center",borderRadius:"999px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",opacity:"0",width:"0px",paddingTop:"0px",".submitting":{animation:`${ps} 0.6s ease 0.2s forwards`},".submitted":{animation:`${ps} 0s ease forwards`},".submitted-subview":{animation:`${ps} 0.6s ease 0.2s forwards`}}})),Ts=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vertical";return{cardCompletion:{" .tick-icon":{opacity:"0"},".submitting":{overflow:"hidden",padding:"11px 21px"},".submitting .tick-icon":{animation:`${us} 0.2s ease 0.2s forwards`},".submitting .card-nodes":{animation:`${ds} 0.2s ease forwards`},".submitted":Object.assign(Object.assign(Object.assign({},"vertical"===e?{animation:`${hs} 0.4s ease forwards`}:{}),{overflow:"hidden"}),"horizontal"===e?{transform:"translateX(-120%)",opacity:"0"}:{}),".submitted .tick-icon":{animation:`${us} 0.2s ease forwards`},".submitted .card-nodes":{opacity:"0"},".submitted-subview":Object.assign({animation:`${hs} 0.4s ease 0.8s forwards`,overflow:"hidden"},"horizontal"===e?{transform:"translateX(-120%)",opacity:"0"}:{}),".submitted-subview .tick-icon":{animation:`${us} 0.2s ease 0.2s forwards`},".submitted-subview .card-nodes":{animation:`${ds} 0.2s ease forwards`}},dismissal:{".dismissing":{animation:"vertical"===e?`${gs} 0.4s ease forwards`:`${ds} 0.3s ease forwards`},".dismissed":Object.assign({transform:"translateX(-120%)"},"horizontal"===e?{animation:`${fs}`,opacity:"0"}:{})},snooze:{".snoozing":{animation:"vertical"===e?`${gs} 0.4s ease forwards`:`${ds} 0.3s ease forwards`},".snoozed":Object.assign({transform:"translateX(-120%)"},"horizontal"===e?{animation:`${fs}`,opacity:"0"}:{})}}},Fs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vertical";return{cardCompletion:{".submitted":{overflow:"hidden",animation:`${"vertical"===e?fs:bs} 0.4s ease 0.2s forwards`},".submitted .clock-icon":Object.assign({},"horizontal"===e?{width:"0"}:{}),".submitted .dismiss-icon":Object.assign({},"horizontal"===e?{width:"0"}:{}),".submitted-subview":{overflow:"hidden",animation:"vertical"===e?`${fs} 0.4s ease 1.0s forwards`:`${bs} 0.4s ease 0.2s forwards`}},dismissal:{position:"relative"," .dismiss-icon":Object.assign({position:"absolute",left:"vertical"===e?"120%":"50%",top:"50%",width:"50px",height:"50px",margin:"vertical"===e?"-25px 0 0 -25px":"-29px 0 0 -20px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},"vertical"===e?{}:{opacity:"0"}),".dismissing .dismiss-icon":{animation:"vertical"===e?`${vs} 0.4s ease forwards`:`${us} 0.3s ease 0.3s forwards`},".dismissed":{overflow:"hidden",animation:"vertical"===e?`${fs} 0.4s ease 0.4s forwards`:`${bs} 0.3s ease 0.3s forwards`},".dismissed .dismiss-icon":{left:"50%",animation:"vertical"===e?`${ms} 0.4s ease forwards`:`${ms} 0.3s ease forwards`},".dismissed .clock-icon":Object.assign({},"horizontal"===e?{width:"0"}:{})},snooze:{position:"relative"," .clock-icon":Object.assign({position:"absolute",left:"vertical"===e?"120%":"50%",top:"50%",width:"50px",height:"50px",margin:"vertical"===e?"-25px 0 0 -25px":"-29px 0 0 -20px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},"vertical"===e?{}:{opacity:"0"}),".snoozing .clock-icon":{animation:"vertical"===e?`${vs} 0.4s ease forwards`:`${us} 0.3s ease 0.3s forwards`},".snoozed":{overflow:"hidden",animation:"vertical"===e?`${fs} 0.4s ease 0.4s forwards`:`${bs} 0.3s ease 0.3s forwards`},".snoozed .clock-icon":{left:"50%",animation:"vertical"===e?`${ms} 0.4s ease forwards`:`${ms} 0.3s ease forwards`},".snoozed .dismiss-icon":Object.assign({},"horizontal"===e?{width:"0"}:{})},center:{position:"relative",".centering":{position:"relative",left:"50%",transform:"translateX(-50%)",transition:"left 0.4s ease-out"}}}},js=600,_s=600,Ls=600,Ds=e=>{switch(e){case"submitted":return 400;case"submitted-subview":return 1200;case"dismissed":case"snoozed":return 800;case"centering":return 500;default:return 0}};var As=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Es=(e,t,n,r,a,o)=>As(void 0,void 0,void 0,(function*(){const{dismissingCard:i,dismissedCard:s,failedToDismissCard:l}=t;if(e.application.isPreview)return;i(n);const c=new Promise((e=>setTimeout(e,_s)));mt.debug({level1:["Dismiss card sent by HTTP"]});const d=yield gd(e.application.streamContainerId,n,a);yield Promise.allSettled([c,d]),d.ok?(mt.debug({level1:["Dismiss card sent by HTTP: success"]}),s(n),Pe().clearSubviewsForCardInstance(n),window.AtomicUploadService.cancelUploadForCard(e.application.containerInstanceId,n),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),r.dispatchCardEvent({type:ba.DISMISSED,eventPayload:d.event})):(mt.error({level1:["Dismiss card sent by HTTP: failed"]}),l(n,o,d.error),r.dispatchCardEvent({type:ba.DISMISS_FAILED}))})),Hs=function(e,t,n){return As(this,arguments,void 0,(function*(){var r,a,o;let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4?arguments[4]:void 0,l=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0,d=arguments.length>7?arguments[7]:void 0,u=arguments.length>8?arguments[8]:void 0;const{submittingCard:p,submittedCard:h,failedToSubmitCard:m,finishSubview:g,openExternalUrl:v,handleSubmitButtonPayload:f}=t,{postSubmissionUrl:b,payload:y,subviewData:w,submitButtonName:S,cancelSubmitCallback:C}=u||{};if(e.application.isPreview)return;const k=e=>{m(n,i,d,e,{postSubmissionUrl:b,subviewData:w,payload:y,submitButtonName:S}),s.dispatchCardEvent({type:ba.SUBMIT_FAILED})};let x=!1;const I=(null==w?void 0:w.subviewId)?null===(r=e.cardResponses[n])||void 0===r||null===(a=r.subviews)||void 0===a?void 0:a[null==w?void 0:w.subviewId]:null===(o=e.cardResponses[n])||void 0===o?void 0:o.responses,O=Object.assign(Object.assign({},d),I||{});for(const[e,t]of Object.entries(I||{}))t&&"object"==typeof t&&"image"===t.type&&"string"==typeof t.destinationFilename&&"string"==typeof t.targetBucketId&&(x=!0,O&&(O[e]={filename:t.destinationFilename,targetBucketId:t.targetBucketId}));if(x){const r=window.frameElement,a=r.classList.contains("modal-subview");a&&r.classList.add("uploading-files"),t.startCardFileUpload(n),t.setCardFeedOverlay(!0);const o=yield window.AtomicUploadService.uploadFilesForCard(n,e.application.containerInstanceId,c,l,{subviewData:w,cancelSubmitCallback:C});if(t.finishCardFileUpload(n),!window.AtomicUploadService.getIsUploadingStatus(e.application.containerInstanceId)&&t.setCardFeedOverlay(!1),a&&r.classList.remove("uploading-files"),!o.success)return o.cancelledUploads?null:(mt.error({level1:[`Submit of card ${n} failed due to file upload failure`]}),k(o.error))}p(n);const M=new Promise((e=>setTimeout(e,js)));mt.debug({level1:["Submit card sent by HTTP"]});const T=yield md(e.application.streamContainerId,n,Object.assign(Object.assign({},O),S?{[S]:null}:{}),c);yield Promise.allSettled([M,T]),T.ok?(mt.debug({level1:["Submit card sent by HTTP: success"]}),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),g(),(null==b?void 0:b.url)&&v(n,i?"subview":"topview",w||{},"url","submitButton",b),y&&f(n,w||{},y),h(n,i),Pe().clearSubviewsForCardInstance(n),s.dispatchCardEvent({type:ba.SUBMITTED,eventPayload:T.event})):(mt.error({level1:["Submit card sent by HTTP: failed"]}),k(T.error))}))},Ps=(e,t,n,r,a,o,i)=>As(void 0,void 0,void 0,(function*(){const s=(0,J.differenceInSeconds)(r,new Date),{snoozingCard:l,snoozedCard:c,failedToSnoozeCard:d}=t;if(e.application.isPreview)return;l(n);const u=new Promise((e=>setTimeout(e,Ls)));mt.debug({level1:["Snooze card sent by HTTP"]});const p=yield vd(e.application.streamContainerId,n,s,o);yield Promise.allSettled([u,p]),p.ok?(mt.debug({level1:["Snooze card sent by HTTP: success"]}),c(n,r),Pe().clearSubviewsForCardInstance(n),dt().clearCardForm(n),window.AtomicUploadService.cancelUploadForCard(e.application.containerInstanceId,n),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),a.dispatchCardEvent({type:ba.SNOOZED,eventPayload:p.event})):(mt.error({level1:["Snooze card sent by HTTP: failed"]}),d(n,r,i,p.error),a.dispatchCardEvent({type:ba.SNOOZE_FAILED}))})),Rs=(e,t,n,r,a)=>{n.sendEvent({cardInstanceId:e,cardViewState:"topview",eventName:ft,properties:{source:a}}),t.feedbackReceived(e),r.dispatchCardEvent({type:ba.VOTED_USEFUL})};var Vs=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};function $s(){return $s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$s.apply(this,arguments)}const zs=(e,t,n,r)=>Vs(void 0,void 0,void 0,(function*(){var a;const o=null===(a=(yield fd([n],t,e)).values)||void 0===a?void 0:a.get(n.instance.id);o&&Object.entries(r).forEach((a=>{let[i,s]=a;"string"==typeof s?r[i]=Rc(s,o):Wc(s)&&zs(e,t,n,s)}))})),Ns=e=>{let{nodeKey:t,isWorkflow:n,clickHandler:r,text:a,icon:i,iconUrl:s,theme:l,appearance:c,loading:d,type:u,urlLink:p}=e;return(0,o.h)(Le.lj,{actions:(0,G.Y2)(at,De,Xt),mapToProps:()=>{}},(e=>(0,o.h)(zn,$s({},t&&{nodeKey:t},{isWorkflow:n,clickHandler:r(e),text:a,icon:i,iconUrl:s,theme:l,appearance:c,loading:d,type:u,urlLink:p}))))},Bs=on("div")((e=>{let{isWorkflow:t,feedOrientation:n}=e;return Object.assign({},t||"horizontal"!==n?{}:{display:"flex",flexDirection:"column",flexGrow:"1",justifyContent:"flex-end"})})),Us=e=>{let{children:t,isWorkflow:n,feedOrientation:r,initializeFormStore:a}=e;return g((()=>{a()}),[]),(0,o.h)(Bs,{isWorkflow:n,feedOrientation:r},t)},Ws=(e,t,n,r)=>()=>{e.createResponseWithDefaults(t,n,r)},qs=on("div")((e=>{let{theme:t,headlineFontProperties:n}=e;return{color:t.getCSSColor("text.headline"),display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${n.lineHeight} 1fr`,padding:"10px 0"}})),Ys=on("h2")((e=>{let{theme:t}=e;return Object.assign(Object.assign({gridColumnStart:"2",gridRowStart:"span 2"},t.getCSSFontProperties("headline")),{margin:"0",whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"})})),Zs="22px",Ks=e=>Object.assign(Object.assign({margin:"0",paddingLeft:"0",listStyleType:"none"},e.getCSSFontProperties("body")),{color:e.getCSSColor("text.body")}),Gs=e=>{let t;return qc(t)||(t=e.getCSSFontProperties("bullet")),{"> li":{display:"flex",margin:"0 0 5px"},"> li.without-icon:before":Object.assign({content:'"•"',textAlign:"center",flexBasis:Zs,minWidth:Zs,marginRight:"10px",color:e.getCSSColor("icon.bullet")},t?{fontSize:t.fontSize,lineHeight:t.lineHeight}:{}),"> li.with-icon i":{flexBasis:Zs,minWidth:Zs,textAlign:"center"},"> li:last-child":{marginBottom:"10px"}}},Xs=on("ul")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},Ks(t)),Gs(t))})),Qs=on("ol")((e=>{let{theme:t}=e;return Object.assign(Object.assign(Object.assign({},Ks(t)),Gs(t)),{counterReset:"item","> li.without-icon:before":Object.assign(Object.assign(Object.assign({},Ks(t)["> li.without-icon:before"]),Gs(t)["> li.without-icon:before"]),{content:'counter(item) "."',counterIncrement:"item"})})})),Js=on("ul")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},Ks(t)),{margin:"5px 20px 5px 0"," li":{display:"inline"}," li:before":{content:'", "'}," li:first-child:before":{content:'""'}})}));class el{constructor(){this.tagState=new Map,this.tagState.set("__",{open:!1}),this.tagState.set("**",{open:!1}),this.tagState.set("_",{open:!1}),this.tagState.set("*",{open:!1})}toggle(e){const t=this.tagState.get(e);t&&(t.open=!t.open,this.tagState.set(e,t))}}const tl={"":["<em>","</em>"],_:["<strong>","</strong>"],"\n":["</p><p>"]," ":["<br />"]};function nl(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function rl(e){return("<p>"+al(e)+"</p>").replace(/<p><\/p>/g,"")}function al(e,t){const n=new el;let r,a,o,i,s,l=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([*+-]|\d+\.)\s+.*)+)|(?:\!\[([^\]]*?)\]\(([^\)]+?)\))|(\[)|(\](?:\(([^\)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(\-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|(__|\*\*|[_*])|( \n\n*|\n{2,})/gm,c=[],d="",u=t||{},p=0;function h(e){var t=tl[e.replace(/\*/g,"_")[1]||""],n=c[c.length-1]==e;return t?t[1]?(c[n?"pop":"push"](e),t[0|n]):t[0]:e}function m(){let e="";for(;c.length;)e+=h(c[c.length-1]);return e}function g(e){return e.replace(/&%[0-9]+%;/g,(e=>String.fromCharCode(+e.substring(2,e.length-2))))}for(e=e.replace(/\\([*_[\]{}`<>()#+\-!|.])/g,(e=>`&%${e.charCodeAt(1)}%;`)),e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,(function(e,t,n){return u[t.toLowerCase()]=n,""})).replace(/^\n+|\n+$/g,"");o=l.exec(e);){a=e.substring(p,o.index),p=l.lastIndex,r=o[0];let t=!1;if(a.match(/[^\\](\\\\)*\\$/));else if(o[6])s=o[6],s.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=al((f=o[5].replace(/^\s*[>*+.-]/gm,"")).replace(RegExp("^"+(f.match(/^(\t| )+/)||"")[0],"gm"),"")),">"!==s&&(t=!0,s=s.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"<li><span>$1</span></li>")),r="<"+s+">"+i+"</"+s+">";else if(o[10]){const e=(o[11]||"").match(/subview:(?<viewId>.*)/);if(e){const t=((e||{}).groups||{}).viewId?e.groups.viewId:"";d=d.replace("<a>",`<a tabindex="0" class="md-subview-link" data-subview-id="${t}">`)}else d=d.replace("<a>",'<a tabindex="0" target="_blank" class="md-web-link" href="'+nl(o[11]||u[a.toLowerCase()])+'">');r=m()+"</a>"}else if(o[9])r="<a>";else if(o[12])r="<p>"+o[12]+"\n"+o[13]+"</p>",t=!0;else if(o[14])r="<p>"+o[14]+" "+o[15]+"</p>",t=!0;else if(o[17]){const e=o[17];var v=tl[e.replace(/\*/g,"_")[1]||""];r=n.tagState.has(e)&&n.tagState.get(e).open?v[1]:v[0],n.toggle(e)}else if(o[18]){const e=o[18];r=e?h(e):r}else o[4]&&(r="<p>"+o[4]+"</p>",t=!0);d+=a,d+=t?"</p>"+r+"<p>":r}var f;return n.tagState.forEach(((e,t)=>{if(n.tagState.get(t).open){const e=tl[t.replace(/\*/g,"_")[1]||""][0],n=d.lastIndexOf(e);-1!==n&&(d=d.slice(0,n)+t+d.slice(n+e.length))}})),(g(d)+g(e.substring(p))+m()).trim()}const ol=on("li")((e=>{let{theme:t}=e;return{color:t.getCSSColor("text.body"),whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"}})),il=on("span")((e=>{let{theme:t}=e;return{" p":{margin:"0",display:"inline"}," a":{color:t.getCSSColor("text.link")}," em":{fontStyle:"italic"}," strong":{fontWeight:"bold"}," .md-subview-link":{textDecoration:"underline",cursor:"pointer"}}})),sl=on("a")((e=>{let{isLinkEnabled:t,theme:n,url:r}=e;return{border:`1px solid ${n.getCSSColor("border.mediaThumb")}`,borderRadius:n.getShape("borderRadius.mediaThumb"),overflow:"hidden",display:"flex",margin:"10px 0",backgroundColor:n.getCSSColor("background.mediaThumbnail"),cursor:t||r?"pointer":"default"}})),ll=on("div")((e=>{let{thumbnail:t,theme:n}=e;return{display:"flex",width:"100px",minWidth:"100px",height:"100px",backgroundColor:n.getCSSColor("background.media"),backgroundSize:"cover",backgroundPosition:"center",backgroundImage:`url('${t}')`,alignItems:"center",justifyContent:"center"}})),cl=on("div")((()=>({padding:"12px 15px 10px 15px",display:"flex",flexFlow:"row wrap",minWidth:"0px"}))),dl=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("mediaTitle")),{color:t.getCSSColor("text.mediaTitle"),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginBottom:"0px",width:"100%"})})),ul=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("mediaSubtitle")),{color:t.getCSSColor("text.mediaSubtitle"),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%"})})),pl=on("a")((e=>{let{isLinkEnabled:t,theme:n}=e;return Object.assign(Object.assign(Object.assign({border:"0px"},n.getElementFocusCSSProperties()),n.getCSSFontProperties("mediaAction")),{color:n.getCSSColor("text.mediaAction"),textDecoration:"none",display:"block",marginTop:"auto",width:"100%",cursor:t?"pointer":"default",visibility:t?"visible":"hidden",userSelect:"none"})}));class hl extends za{render(){const{nodeKey:e,children:t,mediaType:n,src:r,theme:a,label:i,description:s,customStrings:l,onClickImage:c,url:d,alt:u}=this.props,{imageLoaded:p,imageLoadFailed:h}=this.state,m=p?r:"",g=this.getPreviewIcon(n),v=n.includes("video"),f=v&&h,b="image"===n||"video"===n,y=this.getElementRole(n),w=v?(null==l?void 0:l.thumbnailVideoActionLinkTitle)||"Watch":(null==l?void 0:l.thumbnailImageActionLinkTitle)||"View",S=v?"A video":"An image";let C="";return b&&(C=(v?"Plays a video":"Displays an image")+": "),C=`${C}${u?u+".":""}`,(0,o.h)(sl,{key:e,"data-element-key":e,theme:a,onClick:c,isLinkEnabled:b,url:d},(0,o.h)(ll,{thumbnail:m,theme:a,role:y,"aria-label":C||S},!p&&!f&&g&&(0,o.h)(g,{fillColor:a.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(p||h)&&t),(0,o.h)(cl,null,(0,o.h)(dl,{theme:a,class:"thumbnail-header","aria-label":`${i}.`},i),(0,o.h)(ul,{theme:a,class:"thumbnail-format","aria-label":`${s}.`},s),(0,o.h)(pl,{theme:a,isLinkEnabled:"image"===n||"video"===n,tabIndex:"0",class:"thumbnail-link",onKeyPress:this.handleKeyPress.bind(this)},w)))}}const ml=on("div")((e=>{let{backgroundImage:t,theme:n,dimensions:r,loadedDimensions:a,url:o,isLinkEnabled:i}=e;const s=`calc(${n.getShape("borderRadius.card")} - ${n.getShape("border.card")})`;return Object.assign(Object.assign({width:"calc(100% + 40px)",border:"0px",borderRadius:`${s} ${s} 0 0`,backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:n.getCSSColor("background.media"),display:"flex",alignItems:"center",justifyContent:"center",margin:"-10px -20px 10px -20px",overflow:"hidden",cursor:i||o?"pointer":"default"},Sl({dimensions:r,naturalDimensions:a})),n.getElementFocusCSSProperties())}));class gl extends za{onImageLoad(e){super.onImageLoad(e),this.props.onLoad&&this.props.onLoad({width:e.naturalWidth,height:e.naturalHeight})}render(){const{nodeKey:e,children:t,mediaType:n,src:r,theme:a,onClickImage:i,dimensions:s,url:l,alt:c}=this.props,{imageLoaded:d,imageLoadFailed:u}=this.state,p=d?r:"",h=this.getPreviewIcon(n),m=n.includes("video")&&u,g="image"===n||"video"===n,v=this.getElementRole(n),f=n.includes("video")?"A banner video":"A banner image";let b="";return g&&(b=(n.includes("video")?"Plays a video":"Displays an image")+": "),b+=c,(0,o.h)(ml,{key:e,"data-element-key":e,backgroundImage:p,theme:a,mediaType:n,url:l,dimensions:s,loadedDimensions:this.state.loadedDimensions,onClick:i,onKeyPress:this.handleKeyPress.bind(this),tabIndex:"0",className:"image-banner",role:v,isLinkEnabled:g,"aria-label":b||f},!d&&!m&&h&&(0,o.h)(h,{fillColor:a.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(d||u)&&t)}}const vl=on("div")((e=>{let{backgroundImage:t,theme:n,dimensions:r,loadedDimensions:a,url:o,isLinkEnabled:i}=e;const s=n.getCSSColor("border.media");return Object.assign(Object.assign(Object.assign(Object.assign({},bn(s)?{}:{border:`1px solid ${n.getCSSColor("border.media")}`}),{borderRadius:`${n.getShape("borderRadius.media")}`,backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundColor:n.getCSSColor("background.media"),margin:"10px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:i||o?"pointer":"default",overflow:"hidden"}),Sl({dimensions:r,naturalDimensions:a})),n.getElementFocusCSSProperties())}));class fl extends za{onImageLoad(e){super.onImageLoad(e),this.props.onLoad&&this.props.onLoad({width:e.naturalWidth,height:e.naturalHeight})}render(){const{nodeKey:e,children:t,mediaType:n,src:r,dimensions:a,url:i,onClickImage:s,theme:l,alt:c}=this.props,{imageLoaded:d,imageLoadFailed:u}=this.state,p=d?r:"",h=this.getPreviewIcon(n),m=n.includes("video")&&u,g="image"===n||"video"===n,v=this.getElementRole(n),f=n.includes("video")?"A video":"An image";let b="";return g&&(b=(n.includes("video")?"Plays a video":"Displays an image")+": "),b+=c,(0,o.h)(vl,{key:e,"data-element-key":e,backgroundImage:p,dimensions:a,loadedDimensions:this.state.loadedDimensions,mediaType:n,url:i,onClick:s,onKeyPress:this.handleKeyPress.bind(this),theme:l,tabIndex:"0",className:"image-inline",role:v,isLinkEnabled:g,ariaLabel:b||f},!d&&!m&&h&&(0,o.h)(h,{fillColor:l.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(d||u)&&t)}}const bl=on("p")({padding:"10px 0",margin:"0",overflow:"hidden",textOverflow:"ellipsis"}),yl=on("a")((e=>{let{theme:t,mediaType:n,url:r}=e;return Object.assign(Object.assign(Object.assign(Object.assign({border:"0px"},t.getElementFocusCSSProperties()),{color:t.getCSSColor("text.link")}),t.getCSSFontProperties("body")),{textDecoration:"none",cursor:"image"===n||"video"===n||r?"pointer":"default","&:hover":{textDecoration:"underline"},whiteSpace:"pre-wrap"})}));class wl extends za{preloadsImage(){return!1}render(){const{nodeKey:e,theme:t,label:n,onClickImage:r,mediaType:a,url:i}=this.props;return(0,o.h)(bl,{key:e,"data-element-key":e},(0,o.h)(yl,{theme:t,onClick:r,onKeyPress:this.handleKeyPress.bind(this),tabIndex:"0",className:"image-text",mediaType:a,url:i},n))}}const Sl=e=>{var t,n;let{dimensions:r,naturalDimensions:a}=e;if(null==r?void 0:r.height)switch(null==r?void 0:r.height){case"short":return{height:"50px"};case"medium":return{height:"120px"};case"tall":default:return{height:"200px"};case"original":const e=(null==r||null===(t=r.originalDimensions)||void 0===t?void 0:t.width)||(null==a?void 0:a.width),o=(null==r||null===(n=r.originalDimensions)||void 0===n?void 0:n.height)||(null==a?void 0:a.height);return e&&o?{aspectRatio:`${e} / ${o}`}:{height:"200px"}}return{height:"200px"}},Cl=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,o.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"A play button icon","aria-hidden":n},(0,o.h)("path",{d:"M6 15.1958V3.80425C6 3.01881 6.86395 2.53997 7.53 2.95625L16.6432 8.652C17.2699 9.04367 17.2699 9.95633 16.6432 10.348L7.53 16.0438C6.86395 16.46 6 15.9812 6 15.1958Z",stroke:t,strokeWidth:"2"}))},kl=on("div")((e=>{let{theme:t}=e;return{borderRadius:"40px",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",background:t.getCSSColor("background.mediaControl")}})),xl=e=>{let{onClick:t,theme:n}=e;return(0,o.h)(kl,{onClick:t,theme:n},(0,o.h)(Cl,{fillColor:n.getCSSColor("icon.mediaControl"),ariaHidden:!0}))},Il={objectFit:"contain",width:"100%",height:"100%",background:"black"},Ol=on("video")(Object.assign({},Il)),Ml=on("video")((()=>Object.assign({},Il))),Tl=on("div")((e=>{let{maskRadius:t,dimensions:n,loadedDimensions:r,format:a}=e;return Object.assign({borderRadius:"banner"===a?`${t} ${t} 0 0`:t,overflow:"hidden",margin:"banner"===a?"-10px -20px 10px -20px":"10px 0"},n?Sl({dimensions:n,naturalDimensions:r}):{height:"200px"})})),Fl=on("div")((e=>{let{theme:t}=e;return{background:t.getCSSColor("overlay.mediaBanner"),display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"}})),jl=e=>{let t,{nodeKey:n,cardInstanceId:r,label:a,description:i,format:s,src:l,altText:c,theme:d,thumbnailSrc:u,dimensions:p,setPlaying:h,onLoad:m}=e,g=!1,v=!1;switch(s){case"banner":t=gl,g=!0,v=!0;break;case"inline":t=fl,g=!0,v=!0;break;case"thumbnail":t=hl,g=!0;break;case"text":t=wl}return(0,o.h)(Le.lj,{actions:De,mapToProps:e=>({customStrings:e.application.customStrings})},(e=>(0,o.h)(t,{nodeKey:n,theme:d,customStrings:e.customStrings,src:u,dimensions:p,onLoad:m,alt:null==c?void 0:c.src,label:a,description:i,mediaType:null!==l&&l.length>0?"video":"videoWithoutSrc",onClickImage:()=>{v?h(!0):e.viewMedia(r,{type:"video",url:l,title:a,alt:null==c?void 0:c.src})}},g&&(0,o.h)(Fl,{theme:d},(0,o.h)(xl,{onClick:()=>v&&h(!0),theme:d})))))},_l=e=>{var t,n;let{format:r,theme:a,src:i,cardInstanceId:s,dimensions:l,loadedDimensions:c,isWorkflow:d}=e;const u=f(null),p=w(ya).analyticsDispatcher,h="string"==typeof i&&null!==(t=null===(n=i.match(/[^\/]*$/))||void 0===n?void 0:n[0])&&void 0!==t?t:"";switch(g((()=>{var e,t,n,r;const a=()=>{p.sendEvent({eventName:It,cardInstanceId:s,cardViewState:d?"subview":"topview",properties:{media:h,mediaURL:i}})},o=()=>{p.sendEvent({eventName:Ot,cardInstanceId:s,cardViewState:d?"subview":"topview",properties:{media:h,mediaURL:i}})};return null===(e=u.current)||void 0===e||null===(t=e.base)||void 0===t||t.addEventListener("play",a),null===(n=u.current)||void 0===n||null===(r=n.base)||void 0===r||r.addEventListener("ended",o),()=>{var e,t,n,r;null===(e=u.current)||void 0===e||null===(t=e.removeEventListener)||void 0===t||t.call(e,"play",a),null===(n=u.current)||void 0===n||null===(r=n.removeEventListener)||void 0===r||r.call(n,"ended",o)}}),[]),r){case"banner":return(0,o.h)(Le.lj,{mapToProps:e=>({applicationOpen:e.application.open})},(e=>{var t;let{applicationOpen:n}=e;return!n&&(null==u||null===(t=u.current)||void 0===t?void 0:t.base)&&u.current.base.pause(),(0,o.h)(Tl,{format:r,dimensions:l,loadedDimensions:c,maskRadius:a.getShape("borderRadius.card")},(0,o.h)(Ol,{ref:u,src:i,playsInline:!0,autoplay:!0,controls:!0}))}));case"inline":return(0,o.h)(Le.lj,{mapToProps:e=>({applicationOpen:e.application.open})},(e=>{var t;let{applicationOpen:n}=e;return!n&&(null==u||null===(t=u.current)||void 0===t?void 0:t.base)&&u.current.base.pause(),(0,o.h)(Tl,{format:r,dimensions:l,loadedDimensions:c,maskRadius:a.getShape("borderRadius.media")},(0,o.h)(Ml,{ref:u,src:i,playsInline:!0,autoplay:!0,controls:!0}))}));default:return null}},Ll=(e,t)=>{let n;return qc(n)||(n=e.getCSSFontProperties("bullet")),{[`>${t} > li`]:Object.assign({display:"flex",margin:"0 0 5px"},"ol"===t?{counterIncrement:"count"}:{}),[`>${t} > li:before`]:Object.assign({content:"ol"===t?'counter(count)"."':'"•"',textAlign:"center",marginRight:"10px",flexBasis:"22px",minWidth:"22px",color:e.getCSSColor("icon.bullet")},n?{fontSize:n.fontSize,lineHeight:n.lineHeight}:{}),[`>${t} > li:last-child`]:{marginBottom:"10px"}}},Dl=(e,t)=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.getCSSColor("text.body"),gridColumnStart:"2",gridRowStart:"span 2"},e.getCSSFontProperties("body")),{marginRight:"10px"," em":{fontStyle:"italic"}," strong":{fontWeight:"bold"}," code":{borderRadius:"3px",padding:"5px",backgroundColor:"rgba(0,0,0,0.05)"},"> ul":Object.assign({},{paddingLeft:"0",margin:"0",whiteSpace:"pre-wrap",listStyleType:"none"})}),Ll(e,"ul")),{"> ol":Object.assign(Object.assign({},{paddingLeft:"0",margin:"0",whiteSpace:"pre-wrap",listStyleType:"none"}),{counterReset:"count"})}),Ll(e,"ol")),{" a":{color:e.getCSSColor("text.link")}," p":Object.assign(Object.assign({margin:"10px 0 0 0",whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"},e.getCSSFontProperties("body")),{overflow:"hidden"})," p:first-child":{marginTop:"0"}," .md-subview-link":{textDecoration:"underline",cursor:"pointer"}}),t),Al=on("div")((e=>{let{theme:t}=e;return Dl(t)})),El=on("div")({position:"absolute",top:"-1000px",left:"-1000px",width:"1px",height:"1px",overflow:"hidden"}),Hl=on("div")((e=>{let{bodyFontProperties:t}=e;return{position:"fixed",visibility:"hidden",pointerEvents:"none",display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${t.lineHeight} 1fr`}})),Pl=on("div")((e=>{let{theme:t}=e;return Dl(t,{"& *":{marginTop:"0!important",marginBottom:"0!important"}})})),Rl=on("div")((e=>{let{theme:t,bodyFontProperties:n,isWorkflow:r}=e;return{display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${n.lineHeight} 1fr`,color:t.getCSSColor("text.body"),padding:r?"0 0 20px 0":"10px 0px"}})),Vl=()=>window.matchMedia("(prefers-color-scheme: dark)");function $l(){var e;const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t);const n=document.createElement("div");t.appendChild(n);const r=t.offsetWidth-n.offsetWidth;return null===(e=t.parentNode)||void 0===e||e.removeChild(t),r}function zl(e,t,n,r,a){var o,i,s,l,c,d,u,p,h,m,g,v;const f=document.createElement("button"),b=document.createElement("span"),y=document.createElement("span");y.innerHTML="&#8230; ";const w=t.getCSSFontProperties("expandCollapse",{skipFallback:!0,skipFontFallbacks:!0}),S=t.getCSSFontProperties("body"),C=t.getShape("padding.expandCollapseLeft")||"0px",k="expand"===n?"Show more":"Show less",x="expand"===n;return f.style.fontFamily="inherit",f.style.fontSize="inherit",f.style.lineHeight="inherit",b.style.paddingLeft=x?C:"0px",b.style.color=null!==(o=t.getCSSColor("text.expandCollapse",{skipFallback:!0}))&&void 0!==o?o:t.getCSSColor("text.body"),f.style.color=null!==(i=t.getCSSColor("text.expandCollapse",{skipFallback:!0}))&&void 0!==i?i:t.getCSSColor("text.body"),b.style.fontWeight=null!==(s=null==w?void 0:w.fontWeight)&&void 0!==s?s:null==S?void 0:S.fontWeight,f.style.fontWeight=null!==(l=null==w?void 0:w.fontWeight)&&void 0!==l?l:null==S?void 0:S.fontWeight,b.style.fontStyle=null!==(c=null==w?void 0:w.fontStyle)&&void 0!==c?c:null==S?void 0:S.fontStyle,f.style.fontStyle=null!==(d=null==w?void 0:w.fontStyle)&&void 0!==d?d:null==S?void 0:S.fontStyle,b.style.textTransform=null!==(u=null==w?void 0:w.textTransform)&&void 0!==u?u:null==S?void 0:S.textTransform,f.style.textTransform=null!==(p=null==w?void 0:w.textTransform)&&void 0!==p?p:null==S?void 0:S.textTransform,b.style.fontSynthesis=null!==(h=null==w?void 0:w.fontSynthesis)&&void 0!==h?h:null==S?void 0:S.fontSynthesis,f.style.fontSynthesis=null!==(m=null==w?void 0:w.fontSynthesis)&&void 0!==m?m:null==S?void 0:S.fontSynthesis,b.textContent=e&&e.length?e:k,y.style.color=t.getCSSColor("text.body"),y.style.fontWeight=null!==(g=null==S?void 0:S.fontWeight)&&void 0!==g?g:"normal",y.style.fontStyle=null!==(v=null==S?void 0:S.fontStyle)&&void 0!==v?v:"normal",f.innerHTML=`${x?y.outerHTML:""}${b.outerHTML}`,f.style.display="inline",f.style.border="none",f.style.background="none",f.style.margin="0",f.style.padding="0",f.style.cursor="pointer",f.style.maxWidth=a,f.style.textAlign="left",x&&(f.style.whiteSpace="nowrap",f.style.overflow="hidden",f.style.textOverflow="ellipsis"),f.id=r,f.setAttribute("data-testid","text-expand-collapse-button"),f}function Nl(e,t,n,r,a,o){var i,s;n.innerHTML="";const l=e.cloneNode(!0);n.appendChild(l);const c=document.createTreeWalker(l,NodeFilter.SHOW_TEXT),d=[];let u=null;for(;u=c.nextNode();){var p;u&&(null===(p=u.textContent)||void 0===p?void 0:p.trim())&&d.push(u)}let h=null,m=0,g=!1;for(let s=d.length;s>0;s--){const l=d[s-1],c=null!==(i=l.textContent)&&void 0!==i?i:"";let u=0,p=c.length,S=0;if(l.parentElement){for(;u<=p;){var v,f;let e=Math.floor((u+p)/2);l.textContent=c.slice(0,e);const i=zl(null!=o?o:"Show more",a,"expand",`expand-text-${r}`,n.getBoundingClientRect().width+"px");i.style.marginRight=$l()+"px",null===(v=l.parentElement)||void 0===v||v.appendChild(i);Math.ceil(n.getBoundingClientRect().height)<=t?(S=e,u=e+1):p=e-1,null===(f=l.parentElement)||void 0===f||f.removeChild(i)}var b,y;if("ol"===e.tagName.toLowerCase()||"ul"===e.tagName.toLowerCase())if(0===S&&"li"===(null===(b=l.parentElement)||void 0===b||null===(y=b.parentElement)||void 0===y?void 0:y.tagName.toLowerCase())){var w;null===(w=l.parentElement)||void 0===w||w.parentElement.remove();continue}if(1===s||S>0){h=l,h.textContent=c,m=S,g=S<4;break}}}if(h){const e=null!==(s=h.textContent)&&void 0!==s?s:"";let t=0;if(h.textContent=e.slice(0,g?4:m).trimEnd(),g){var S,C;const n=document.createElement("span");n.textContent=e.slice(0,4).trimEnd(),null===(S=h.parentElement)||void 0===S||S.appendChild(n),t=n.getBoundingClientRect().width,null===(C=h.parentElement)||void 0===C||C.removeChild(n)}const i=zl(null!=o?o:"Show more",a,"expand",`expand-text-${r}`,n.getBoundingClientRect().width-t-$l()+"px"),l=h.parentElement;"p"!==(null==l?void 0:l.tagName.toLowerCase())||(null==l?void 0:l.textContent)||(l.style.marginTop="0px"),"a"===(null==l?void 0:l.tagName.toLowerCase())&&l.parentElement?l.parentElement.insertBefore(i,l.nextSibling):null==l||l.appendChild(i)}return l.outerHTML}const Bl=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M15 10V20M20 15H15H10",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))},Ul=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M20 15H10",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))},Wl=on("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.component"),color:t.getCSSColor("text.primary"),display:"flex",":focus":{outline:"none"},"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}})),ql=on("button")((e=>{let{theme:t,disabled:n}=e;return Object.assign(Object.assign({backgroundColor:n?t.getCSSColor("background.stepperDisabled"):t.getCSSColor("background.stepper"),border:"0px",borderRadius:"99px",width:"24px",height:"24px",display:"flex",padding:"0",alignItems:"center",cursor:n?"initial":"pointer"},t.getElementFocusCSSProperties()),{" svg":{height:"100%"}})})),Yl=on("input")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.primary")},t.getCSSFontProperties("primary")),{backgroundColor:t.getCSSColor("background.component"),width:"40px",maxWidth:"40px",minWidth:"40px",paddingTop:"1px",textAlign:"center",border:"0","-moz-appearance":"textfield",":focus":{outline:"none"},"::-webkit-inner-spin-button, ::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:"0"}})})),Zl=on("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("primary")),{color:t.getCSSColor("text.primary"),flexGrow:"1",whiteSpace:"pre-wrap"})})),Kl=(e,t,n)=>e-n>=t,Gl=(e,t,n)=>e+n<=t;let Xl=null;const Ql=on("button")((e=>{let{on:t,theme:n}=e;return Object.assign({backgroundColor:n.getCSSColor(t?"background.switchOn":"background.switchOff"),transition:"0.25s ease-in-out",position:"relative",border:"0px",borderRadius:"99px",width:"40px",height:"22px",cursor:"pointer",flexShrink:"0"},n.getElementFocusCSSProperties())})),Jl=on("div")((e=>{let{on:t,theme:n}=e;return{transition:"0.25s ease-in-out",position:"absolute",top:"2px",left:t?"50%":"2px",backgroundColor:n.getCSSColor(t?"icon.switchOn":"icon.switchOff"),width:"18px",height:"18px",borderRadius:"99px"}})),ec=on("p")((e=>{let{theme:t}=e;return Object.assign(Object.assign({display:"grid",gridTemplateColumns:"auto minmax(0,1fr)",color:t.getCSSColor("text.category")},t.getCSSFontProperties("category")),{padding:"10px 0px 8px 0px",margin:"0"})})),tc=on("span")({whiteSpace:"pre-wrap",overflow:"hidden",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"});let nc=null;const rc=e=>{let{fillColor:t,ariaHidden:n}=e;return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":null!=n&&n},(0,o.h)("path",{d:"M12 13V7M3 3H8M17 3H12M4 7V16C4 16.5523 4.44772 17 5 17H15C15.5523 17 16 16.5523 16 16V7M8 3L9 2H11L12 3M8 3H12M8 7V13",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},ac=e=>{let{fillColor:t,ariaHidden:n}=e;return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":null!=n&&n},(0,o.h)("path",{d:"M15 7V13.5C15 15.9853 12.9853 18 10.5 18V18C8.01472 18 6 15.9853 6 13.5V5C6 3.34315 7.34315 2 9 2V2C10.6569 2 12 3.34315 12 5V13.5C12 14.3284 11.3284 15 10.5 15V15C9.67157 15 9 14.3284 9 13.5V7",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))};var oc=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const ic={jpeg:{signatures:[[255,216,255]],offset:0},png:{signatures:[[137,80,78,71,13,10,26,10]],offset:0},webp:{signatures:[[82,73,70,70,,,,,87,69,66,80]],offset:0},avif:{signatures:[[32,102,116,121,112,97,118,105,102]],offset:3}},sc={tif:{signatures:[[73,73,42,0],[77,77,0,42]],offset:0},tiff:{signatures:[[73,73,43,0],[73,73,0,43]],offset:0},heic:{signatures:[[102,116,121,112,104,101,105,99]],offset:4}};var lc=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const cc=on("label")((()=>({position:"relative",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",display:"flex",alignItems:"center",width:"100%",cursor:"pointer"}))),dc=on("div")((e=>{let{theme:t,enabledThumbnailIcon:n,preview:r}=e;const a=n||(null==r?void 0:r.url)?"30px":"0",o={background:`url(${null==r?void 0:r.url})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"};return Object.assign({width:a,height:a,minWidth:a,minHeight:a,padding:n||(null==r?void 0:r.url)?"7px":"0",marginRight:n||(null==r?void 0:r.url)?"10px":"0",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:t.getShape("borderRadius.uploadPlaceholder"),backgroundColor:t.getCSSColor("background.uploadPlaceholder")},(null==r?void 0:r.url)&&r.webCompatible?o:{})})),uc=on("span")((e=>{let{theme:t,placeholder:n,yPadding:r}=e;return Object.assign(Object.assign({width:"100%",overflow:"hidden",textOverflow:"ellipsis",padding:`${r}px 0`,color:n?t.getCSSColor("text.hint"):t.getCSSColor("text.secondary")},t.getCSSFontProperties("secondary")),{userSelect:"none","-webkit-user-select":"none","-moz-user-select":"none"})})),pc=on("input")({position:"absolute",visibility:"hidden",width:"100%",height:"100%"}),hc=on("button")((()=>({display:"flex",justifyContent:"center",alignItems:"center",border:"0",padding:"0",margin:"0",textDecoration:"none",cursor:"pointer",textAlign:"center",background:"none","-webkit-appearance":"none","-moz-appearance":"none"}))),mc=on("button")((()=>({display:"flex",justifyContent:"center",alignItems:"center",border:"0",padding:"0",margin:"0",textDecoration:"none",cursor:"pointer",textAlign:"center",background:"none","-webkit-appearance":"none","-moz-appearance":"none"}))),gc=e=>{let{theme:t,cardInstanceId:n,subviewId:r,name:a,label:i,validations:s,enabledThumbnailIcon:l,targetBucketId:c,variableResolver:d}=e;const u=f(null),p=f(null),m=ut(n,a,r),[v,b]=h(null),[y,w]=h(null),[S,C]=h(0),k=ie().getState();g((()=>{if(k.application.isPreview)return;const e=window.AtomicUploadService.getFile(k.application.containerInstanceId,n,a);m&&e?(I(e),w(m.filename)):dt().handleFormChange(n,a,void 0,r)}),[]),g((()=>{if(u.current&&p.current&&!S){var e,t,n,r;const a=(null===(e=u.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.offsetHeight)||0,o=(null===(n=p.current)||void 0===n||null===(r=n.base)||void 0===r?void 0:r.offsetHeight)||0;if(a>0&&o>0&&a>o){const e=Math.round((a-o)/2);C(e)}}}),[u]);const x=(e,t)=>{b({url:URL.createObjectURL(e),webCompatible:!t})},I=e=>{const t=u.current.base;if(t){x(e.file,e.convertImage);const n=new DataTransfer;n.items.add(e.file),t.files=n.files}},O=()=>{k.application.isPreview||(window.AtomicUploadService.removeFile(k.application.containerInstanceId,n,a,r),dt().handleFormChange(n,a,void 0,r),dt().validateField(n,a,void 0,s,r),u.current&&(b(null),w(null),u.current.base.value=null))},M=`upload-label=${n}-${a}`;return(0,o.h)(o.Fragment,null,(0,o.h)(dc,{theme:t,enabledThumbnailIcon:l,preview:v},!v&&l&&(0,o.h)(xn,{fillColor:t.getCSSColor("icon.uploadPlaceholder"),ariaHidden:!0}),v&&!v.webCompatible&&(0,o.h)(Nn,{fillColor:t.getCSSColor("icon.uploadPlaceholder"),ariaHidden:!0})),(0,o.h)(cc,{htmlFor:M},(0,o.h)(uc,{ref:p,theme:t,placeholder:!y,yPadding:S},y||d(i.length?i:"")),(0,o.h)(pc,{id:M,ref:u,type:"file",accept:"image/jpeg, image/png, image/webp, image/avif",onChange:e=>lc(void 0,void 0,void 0,(function*(){if(k.application.isPreview)return;const t=e.target;if(t.files&&t.files.length){b(null),w(null);const[e]=Array.from(t.files),o=yield(e=>oc(void 0,void 0,void 0,(function*(){const t=yield e.slice(0,(()=>{const e=Object.assign(Object.assign({},ic),sc);return Object.values(e).reduce(((e,t)=>{let n=0;return t.signatures.forEach((e=>n=Math.max(n,e.length))),n+=t.offset,Math.max(e,n)}),0)})()).arrayBuffer(),n=new Uint8Array(t),r=(e,t)=>e.every(((e,r)=>n[t+r]===e||void 0===e));for(const{signatures:e,offset:t}of Object.values(ic))for(const n of e)if(r(n,t))return{requiresConversion:!1,isValidImage:!0};for(const{signatures:e,offset:t}of Object.values(sc))for(const n of e)if(r(n,t))return{requiresConversion:!0,isValidImage:!0};return{requiresConversion:!1,isValidImage:!1}})))(e);if(!o.isValidImage)return O(),void dt().validateFieldCustomResult(n,a,{type:"invalid",errorMessage:"Invalid file or unsupported image format selected"},r);const i=`${(0,X.v4)()}_${e.name}`,l={filename:e.name,destinationFilename:i,size:e.size,type:"image",targetBucketId:c};window.AtomicUploadService.storeFile(e,"image",c,n,k.application.containerInstanceId,i,o.requiresConversion,a,r),dt().handleFormChange(n,a,l,r),x(e,o.requiresConversion),w(e.name),dt().validateField(n,a,l,s,r)}}))})),y?(0,o.h)(mc,{onClick:O,"aria-label":"remove image"},(0,o.h)(rc,{fillColor:t.getCSSColor("icon.inputButton"),ariaHidden:!0})):(0,o.h)(hc,{onClick:()=>{var e,t;return null==u||null===(e=u.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.click()},"aria-label":"attach image"},(0,o.h)(ac,{fillColor:t.getCSSColor("icon.inputButton"),ariaHidden:!0})))},vc=F((e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{label:a,name:i,type:s,enabledThumbnailIcon:l,targetBucketId:c},theme:d,validations:u,variableResolver:p}=e;const h="image"===s?(0,o.h)(gc,{theme:d,cardInstanceId:n,subviewId:r,name:i,validations:u,label:a,enabledThumbnailIcon:l,targetBucketId:c||"DEFAULT",variableResolver:p}):null;return(0,o.h)(o.Fragment,null,(0,o.h)(Ro,{nodeKey:t,theme:d,cursor:"default",mode:"inline"},h),(0,o.h)(Wo,{name:i,cardInstanceId:n,subviewId:r,theme:d,variableResolver:p}))}),((e,t)=>e.nodeKey===t.nodeKey&&e.cardInstanceId===t.cardInstanceId&&e.subviewId===t.subviewId&&e.attributes===t.attributes&&e.theme===t.theme&&e.validations===t.validations)),fc=on("div")((e=>{var t,n,r,a,o;let{theme:i,feedOrientation:s,isWorkflow:l,transparencies:c}=e;const d=i.getShape("buttonLayout.global"),u=i.getShape("buttonAlignment.global"),p=c.finalButtonTransparent?"0":l?"20px":"10px",h=c.primaryButtonTransparent||c.secondaryButtonTransparent?"0px":"10px",m=!1===c.primaryButtonTransparent,g=!1===c.secondaryButtonTransparent;let v,f;m||g?(v="10px",f="20px"):(v="0px",f="10px");const b=Object.assign({flexGrow:"1",flexDirection:"column"},"horizontal"===d?{alignItems:"flex-end"}:{justifyContent:"flex-end"}),y={paddingBottom:l?f:v,flexDirection:"row",overflowX:"scroll",margin:"0 -20px",paddingLeft:"20px",paddingRight:"20px",marginRight:"-20px","::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none",scrollbarWidth:"none","> button:not(:last-child)":{marginRight:null!==(t=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==t?t:h},"> a:not(:last-child)":{marginRight:null!==(n=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==n?n:h}},w={flexDirection:"column",alignItems:null!==(r={left:"flex-start",center:"center",right:"flex-end"}[u])&&void 0!==r?r:"flex-start","> button:not(:last-child)":{marginBottom:null!==(a=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==a?a:h},"> button:last-child":{marginBottom:p},"> a:not(:last-child)":{marginBottom:null!==(o=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==o?o:h},"> a:last-child":{marginBottom:p}};return Object.assign(Object.assign({paddingTop:c.firstButtonTransparent?"0px":"10px",display:"flex",alignItems:"center"},"horizontal"===s?b:{}),"horizontal"===d?y:w)})),bc=on("div")({marginBottom:"20px"}),yc=on("ul")({listStyle:"none",padding:"0",margin:"0","> li":{marginBottom:"10px"},"> :last-child":{marginBottom:"0"}}),wc=e=>{let{fillColor:t,style:n,ariaHidden:r}=e;return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",height:"8",viewBox:"0 0 11 8",width:"11",style:n,"aria-hidden":r},(0,o.h)("path",{"clip-rule":"evenodd",d:"m10.7071.292893c.3905.390524.3905 1.023687 0 1.414217l-5.99999 6c-.39053.39052-1.02369.39052-1.41422 0l-2.999997-3c-.3905241-.39053-.3905241-1.02369 0-1.41422.390524-.39052 1.023687-.39052 1.414217 0l2.29289 2.2929 5.29289-5.292897c.39053-.3905241 1.02371-.3905241 1.41421 0z",fill:null!=t?t:"#000","fill-rule":"evenodd"}))},Sc=on("label")((e=>{let{labelFontProperties:t}=e;return{cursor:"pointer",display:"grid",gridTemplateColumns:"auto minmax(0, 1fr)",gridTemplateRows:`${(null==t?void 0:t.lineHeight)||"auto"} 1fr`,alignItems:"center",width:"fit-content",userSelect:"none"}})),Cc=on("input")((e=>{let{theme:t}=e;return{position:"absolute",appearance:"none","&:focus-visible + span":{boxShadow:`0 0 0 2px ${t.getCSSColor("border.focus")} inset`}}})),kc=on("span")((e=>{let{theme:t,isChecked:n}=e;const r={backgroundColor:t.getCSSColor("background.checkedCheckbox",{skipFallback:!0})||"#000",borderColor:t.getCSSColor("border.checkedCheckbox",{skipFallback:!0})||"#000",borderWidth:t.getShape("border.checkedCheckbox")||"1px",borderStyle:"solid",borderRadius:t.getShape("borderRadius.checkedCheckbox",{skipFallback:!0})||"4px"},a={backgroundColor:t.getCSSColor("background.uncheckedCheckbox",{skipFallback:!0})||"#FFF",borderColor:t.getCSSColor("border.uncheckedCheckbox",{skipFallback:!0})||"#000",borderWidth:t.getShape("border.uncheckedCheckbox")||"1px",borderStyle:"solid",borderRadius:t.getShape("borderRadius.uncheckedCheckbox",{skipFallback:!0})||"4px"};return Object.assign({height:"20px",width:"20px",padding:"6px 4px 6px 5px",position:"relative",marginRight:"10px",display:"inline-block"},n?r:a)})),xc=on("span")((e=>{let{theme:t,labelFontProperties:n}=e;return Object.assign(Object.assign({},n||{}),{gridColumnStart:"2",gridRowStart:"span 2",whiteSpace:"pre-wrap",color:t.getCSSColor("text.primary"),cursor:"pointer",userSelect:"none",webkitUserSelect:"none",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"})}));function Ic(){return Ic=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ic.apply(this,arguments)}const Oc={linkButton:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,subviewTitle:a,isWorkflow:i,theme:s,attributes:l,variableResolver:c}=e;const{text:d,icon:u,iconUrl:p,appearance:h}=l,m=l.url,g=l.target,v=Object.assign(Object.assign({},r&&{subviewId:r}),a&&{subviewTitle:a}),f=w(ya),b=f.runtimeVariableResolver,y=f.containersBroadcastChannel;return(0,o.h)(Ns,{nodeKey:t,theme:s,appearance:h,isWorkflow:i,text:c(d),icon:u,iconUrl:p,clickHandler:e=>{const r=ie().getState();return a=>Vs(void 0,void 0,void 0,(function*(){let o,i,s;if(l.action){s=l.action;const e=r.cardFeed.cardInstances.find((e=>e.instance.id===n));s&&b&&e&&(yield zs(b,r.application.runtimeVariableResolutionTimeout,e,s))}else if(l.layoutId)o=l.layoutId;else if(l.url){if(a.preventDefault(),i={url:c(m),target:a.ctrlKey||a.metaKey?"_blank":null!=g?g:"_blank"},f.analyticsDispatcher.sendEvent({cardInstanceId:n,cardViewState:r.navigationStack.items.length?"subview":"topview",eventName:vt,properties:Object.assign({linkMethod:"url",url:i.url,trigger:"linkButton"},v.subviewId?Object.assign(Object.assign({},v),{subviewLevel:1}):{})}),"_top"===i.target&&y){const e=`${t}-link-button`;return y.addEventListener("message",(t=>{if(t.data.type===Gi.ANALYTICS_EVENT){var r;const a=null===(r=t.data)||void 0===r?void 0:r.eventQueued;a.eventName===vt&&a.cardInstanceId===n&&y&&i&&(y.removeEventListener(e),window.open(i.url,i.target))}}),e)}return window.open(i.url,i.target)}return e.handleLinkButtonPress(n,v,o,s)}))},urlLink:m?{url:c(m),target:g}:void 0})},submitButton:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,subviewTitle:a,isWorkflow:i,theme:s,attributes:{name:l,text:c,appearance:d,icon:u,iconUrl:p,values:m,url:g,action:v,target:f},variableResolver:b}=e;const[y,S]=h(!1),C=w(ya),k=C.cardEventDispatcher,x=C.authTokenProvider,I=C.analyticsDispatcher,O=C.runtimeVariableResolver;return(0,o.h)(Ns,{nodeKey:t,theme:s,appearance:d,isWorkflow:i,text:b(c),icon:u,iconUrl:p,clickHandler:e=>{const t=ie().getState();return()=>Vs(void 0,void 0,void 0,(function*(){var o,s;if(t.application.isPreview)return void e.finishSubview();if(y)return;S(!0);const c=t.cardFeed.cardInstances.find((e=>e.instance.id===n));v&&O&&c&&(yield zs(O,t.application.runtimeVariableResolutionTimeout,c,v));let d={};var u,p;i?(e.validateCurrentSubview(n),d=r&&null!==(o=null===(u=ie().getState().validationStates[n])||void 0===u||null===(p=u.subviews)||void 0===p?void 0:p[r])&&void 0!==o?o:{}):(e.validateCardTopLevel(n),d=null!==(s=ie().getState().validationStates[n].validations)&&void 0!==s?s:{});const h=ie().getState(),w=(e=>!!e.navigationStack.items.length)(t);(e=>{for(var t in e)if("invalid"===e[t].type)return!1;return!0})(d)&&(yield Hs(h,e,n,w,k,I,x,m,{postSubmissionUrl:g?{url:b(g),target:f}:void 0,payload:v,subviewData:{subviewId:r,subviewTitle:a},submitButtonName:l,cancelSubmitCallback:()=>S(!1)}),i&&I.sendEvent({cardInstanceId:n,cardViewState:"subview",eventName:xt,properties:{subviewId:r,subviewTitle:a,subviewLevel:1}})),S(!1)}))},loading:y,type:"submit"})},dismissButton:e=>{let{nodeKey:t,isWorkflow:n,attributes:r,theme:a,cardInstanceId:i,variableResolver:s}=e;const{text:l,icon:c,iconUrl:d,appearance:u}=r,p=w(ya);return(0,o.h)(Ns,{nodeKey:t,theme:a,appearance:u,isWorkflow:n,text:s(l),icon:c,iconUrl:d,clickHandler:e=>()=>{Es(ie().getState(),e,i,p.cardEventDispatcher,p.authTokenProvider,"card-button")}})},snoozeButton:e=>{let{nodeKey:t,isWorkflow:n,attributes:r,theme:a,cardInstanceId:i,cardMetadata:s,variableResolver:l}=e;const{text:c,icon:d,iconUrl:u,snoozePeriod:p,appearance:h}=r,m=w(ya);return(0,o.h)(Ns,{nodeKey:t,theme:a,appearance:h,isWorkflow:n,text:l(c),icon:d,iconUrl:u,clickHandler:e=>()=>{if(void 0===p||null===$c(p))e.requestSnooze(i,"card-button",null==s?void 0:s.expires);else{const t=zc(p,new Date);(0,J.isPast)(t)||Ps(ie().getState(),e,i,t,m.cardEventDispatcher,m.authTokenProvider,"card-button")}}})},voteUpButton:e=>{let{nodeKey:t,isWorkflow:n,attributes:r,theme:a,cardInstanceId:i,variableResolver:s}=e;const{text:l,icon:c,iconUrl:d,appearance:u}=r,p=w(ya);return(0,o.h)(Ns,{nodeKey:t,theme:a,appearance:u,isWorkflow:n,text:s(l),icon:c,iconUrl:d,clickHandler:e=>()=>{Rs(i,e,p.analyticsDispatcher,p.cardEventDispatcher,"card-button")}})},voteDownButton:e=>{let{nodeKey:t,isWorkflow:n,attributes:r,theme:a,cardInstanceId:i,variableResolver:s}=e;const{text:l,icon:c,iconUrl:d,appearance:u}=r;return(0,o.h)(Ns,{nodeKey:t,theme:a,appearance:u,isWorkflow:n,text:s(l),icon:c,iconUrl:d,clickHandler:e=>()=>{e.requestFeedback(i,{sentiment:"negative",source:"card-button",textFeedback:!0})}})},actionButtonGroup:e=>{let{children:t,theme:n,feedOrientation:r,isWorkflow:a}=e;const i=f(null),[s,l]=h({primaryButtonTransparent:void 0,secondaryButtonTransparent:void 0,firstButtonTransparent:!1,finalButtonTransparent:!1});return g((()=>{var e,t,n;const r=null===(t=i.current)||void 0===t||null===(n=t.base)||void 0===n?void 0:n.childNodes;if(r)for(let t=0;t<r.length;t++){var a;const n=r[t],o=n.getAttribute("appearance"),i=null!==(e=null===(a=window.getComputedStyle(n).backgroundColor.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/))||void 0===a?void 0:a.length)&&void 0!==e?e:0;"primary"!==o||s.primaryButtonTransparent?"secondary"!==o||s.secondaryButtonTransparent||l((e=>Object.assign(Object.assign({},e),{secondaryButtonTransparent:i>0}))):l((e=>Object.assign(Object.assign({},e),{primaryButtonTransparent:i>0}))),0===t&&l((e=>Object.assign(Object.assign({},e),{firstButtonTransparent:i>0}))),t===r.length-1&&l((e=>Object.assign(Object.assign({},e),{finalButtonTransparent:i>0})))}}),[i]),(0,o.h)(fc,{ref:i,theme:n,feedOrientation:r,isWorkflow:a,transparencies:s},t)},cardDescription:e=>{var t;let{attributes:{text:n,icon:r,iconUrl:a},theme:i,variableResolver:s}=e;const l=i.getCSSFontProperties("category"),c=i.getNumericFontSize("category"),d=i.getCSSColor("icon.category",{skipFallback:!0}),u=i.getCSSColor("icon.category");return(0,o.h)(ec,{theme:i,"data-testid":"card-category"},(r||a)&&(0,o.h)(Mn,{iconName:r,iconUrl:a,size:null!=c?c:20,color:null!==d?d:void 0,fallbackColor:u,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null==l?void 0:l.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${c}px`,minWidth:`${c}px`,textAlign:"center"}}),(0,o.h)(tc,null,s(n)))},headline:e=>{var t;let{nodeKey:n,attributes:{text:r,icon:a,iconUrl:i},theme:s,variableResolver:l}=e;const c=s.getCSSFontProperties("headline"),d=s.getNumericFontSize("headline"),u=s.getCSSColor("icon.headline",{skipFallback:!0}),p=s.getCSSColor("icon.headline");return(0,o.h)(qs,{theme:s,headlineFontProperties:c},(a||i)&&(0,o.h)(Mn,{iconName:a,iconUrl:i,size:null!=d?d:20,color:null!==u?u:void 0,fallbackColor:p,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null==c?void 0:c.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${d}px`,minWidth:`${d}px`,textAlign:"center"}}),(0,o.h)(Ys,{key:n,theme:s,"data-testid":"card-headline","data-element-key":n},l(r)))},text:e=>{var t,n,r,a,i,s;let{nodeKey:l,theme:c,attributes:{icon:d,iconUrl:u,text:p,clickToExpandEnabled:m,maxDisplayLines:v,showTextLabel:b,hideTextLabel:y},isWorkflow:S,variableResolver:C,cardInstanceId:k,subviewId:x,subviewTitle:I}=e;const O=f(null),M=f(null),[T,F]=h(!1),[j,_]=h(null),[L,D]=h(null),[A,E]=h(Vl().matches?"dark":"light"),H=f((0,X.v4)()),P=null===(r=O.current)||void 0===r?void 0:r.base.querySelector(`#expand-text-${H.current}`),R=null===(a=O.current)||void 0===a?void 0:a.base.querySelector(`#collapse-text-${H.current}`),V=rl(Hc(C(p))),$=w(ya).analyticsDispatcher;let z;qc(c.getCSSFontProperties("body"))||(z=c.getCSSFontProperties("body"));const N=c.getNumericFontSize("body"),B=Object.assign(Object.assign(Object.assign({},x&&{subviewId:x}),I&&{subviewTitle:I}),x&&{subviewLevel:1}),U=c.getCSSColor("icon.body",{skipFallback:!0}),W=c.getCSSColor("icon.body"),q=()=>{if(!(O.current&&M.current&&v&&m))return _(null),F(!1),D(!1);const e=M.current.base;e.style.width=getComputedStyle(O.current.base).width;const t=getComputedStyle(O.current.base).lineHeight,n=getComputedStyle(O.current.base).fontSize;let r;r=isNaN(parseFloat(t))?Math.ceil((parseFloat(n)+1)*v):Math.ceil((parseFloat(t)+1)*v);let a=0,o="",i=!1;const s=document.createElement("div");s.innerHTML=V;const l=Array.from(s.children);for(let t=0;t<l.length;t++){const n=l[t].cloneNode(!0);e.innerHTML="",e.appendChild(n);const s=e.getBoundingClientRect().height;if(!(Math.ceil(a+s)<r)){if(Math.ceil(a+s)===r){a+=s,o+=n.outerHTML;if(t<l.length-1){const t=Nl(n,Math.ceil(s),e,H.current,c,b);o=o.replace(n.outerHTML,t),i=!0}break}if(t<l.length-1||n.textContent.length>0){o+=Nl(n,Math.ceil(r-a),e,H.current,c,b),i=!0}else o+=n.outerHTML;break}a+=s,o+=n.outerHTML}i?(_(o),D(!0)):D(!1)};g((()=>{let e;if(m){const t=()=>{q()};document.fonts.onloadingdone=t,"ResizeObserver"in window&&(e=new ResizeObserver(q),e.observe(document.body))}const t=e=>{E(e.matches?"dark":"light")};return Vl().addEventListener("change",t),()=>{var n;null===(n=e)||void 0===n||n.disconnect(),document.fonts.onloadingdone=null,Vl().removeEventListener("change",t)}}),[V]),g(q,[V,v,m,A,b,y]),g((()=>{const e=()=>F(!0),t=()=>F(!1),n=O.current.base;if(!n)return;const r=n.querySelector(`#expand-text-${H.current}`),a=n.querySelector(`#collapse-text-${H.current}`);return r&&r.addEventListener("click",e),a&&a.addEventListener("click",t),()=>{r&&r.removeEventListener("click",e),a&&a.removeEventListener("click",t)}}),[P,R,j,T,L]),g((()=>{const e=document.querySelector(`#markdown-${H.current}`);if(e){Array.from(e.querySelectorAll(".md-subview-link")).forEach((e=>{e.addEventListener("click",(()=>{var t;F(!1),D(!1),_(null),Pe().handleSubviewLinkPress(k,null==e||null===(t=e.dataset)||void 0===t?void 0:t.subviewId)})),e.addEventListener("keydown",(t=>{var n;xr(t.key)===Sr&&(F(!1),D(!1),_(null),Pe().handleSubviewLinkPress(k,null==e||null===(n=e.dataset)||void 0===n?void 0:n.subviewId))}))}));Array.from(e.querySelectorAll(".md-web-link")).forEach((e=>{e.addEventListener("click",(e=>{var t;const n=null===(t=e.target.attributes.getNamedItem("href"))||void 0===t?void 0:t.value;$.sendEvent({cardInstanceId:k,cardViewState:S?"subview":"topview",eventName:vt,properties:Object.assign({linkMethod:"url",url:null!=n?n:"",detail:"textLink"},B)})}))}))}}),[V,L,T]);return(0,o.h)(o.Fragment,null,(0,o.h)(Rl,{key:l,theme:c,bodyFontProperties:z,isWorkflow:S,"data-element-key":l,"data-testid":"text-block"},(d||u)&&(0,o.h)(Mn,{iconName:d,iconUrl:u,size:null!=N?N:20,color:null!==U?U:void 0,fallbackColor:W,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null===(i=z)||void 0===i?void 0:i.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${N}px`,minWidth:`${N}px`,textAlign:"center"}}),(0,o.h)(Al,{id:`markdown-${H.current}`,"data-testid":"text-markdown",theme:c,ref:O,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:V&&0!==V.length&&null!==L?T||!j?function(e,t,n,r){if(!t||!n||!r)return e;const a=n.cloneNode(!0);a.innerHTML=e;const o=document.createTreeWalker(a,NodeFilter.SHOW_TEXT),i=[];let s=null;for(;s=o.nextNode();){var l;s&&(null===(l=s.textContent)||void 0===l?void 0:l.trim())&&i.push(s)}if(i.length>0){const e=i[i.length-1],t=e.parentElement;"a"===(null==t?void 0:t.tagName.toLowerCase())&&t.parentElement?(r.style.paddingLeft="5px",t.parentElement.insertBefore(r,t.nextSibling)):(e.textContent=e.textContent+" ",null==t||t.appendChild(r))}return a.innerHTML}(V,L,null===(Y=M.current)||void 0===Y?void 0:Y.base,zl(null!=y?y:"Show less",c,"collapse",`collapse-text-${H.current}`,(null===(Z=O.current)||void 0===Z?void 0:Z.base.getBoundingClientRect().width)+"px")):j:"<p></p>"}}),(0,o.h)(El,{dangerouslySetInnerHTML:{__html:V}})),(0,o.h)(Hl,{bodyFontProperties:z,isWorkflow:S,"aria-hidden":"true"},(d||u)&&(0,o.h)(Mn,{iconName:d,iconUrl:u,size:null!=N?N:20,color:null!==U?U:void 0,fallbackColor:W,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(n=null===(s=z)||void 0===s?void 0:s.lineHeight)&&void 0!==n?n:"initial",marginRight:"10px",width:`${N}px`,minWidth:`${N}px`,textAlign:"center"}}),(0,o.h)(Pl,{theme:c,ref:M})));var Y,Z},list:e=>{let t,{nodeKey:n,attributes:{type:r},children:a,theme:i}=e;switch(r){case"bullet":t=Xs;break;case"number":t=Qs;break;case"comma":t=Js}return t?(0,o.h)(t,{key:n,"data-element-key":n,theme:i},a):null},listItem:e=>{let{nodeKey:t,attributes:{text:n,icon:r},theme:a,isWorkflow:i,variableResolver:s,cardInstanceId:l,subviewId:c,subviewTitle:d}=e;const u=f((0,X.v4)()),p=w(ya).analyticsDispatcher,h=rl(Hc(s(n))),m=Object.assign(Object.assign(Object.assign({},c&&{subviewId:c}),d&&{subviewTitle:s(d)}),c&&{subviewLevel:1});let v;g((()=>{const e=document.querySelector(`#markdown-${u.current}`);if(e){Array.from(e.querySelectorAll(".md-subview-link")).forEach((e=>{const t=()=>{var t,n;Pe().handleSubviewLinkPress(l,null==e||null===(t=e.dataset)||void 0===t?void 0:t.subviewId),c&&(null==e||null===(n=e.dataset)||void 0===n?void 0:n.subviewId)!==c&&p.sendEvent({cardInstanceId:l,cardViewState:"subview",eventName:xt,properties:m})};e.addEventListener("click",t),e.addEventListener("keydown",(e=>{xr(e.key)===Sr&&t()}))}));Array.from(e.querySelectorAll(".md-web-link")).forEach((e=>{e.addEventListener("click",(e=>{var t;const n=null===(t=e.target.attributes.getNamedItem("href"))||void 0===t?void 0:t.value;p.sendEvent({cardInstanceId:l,cardViewState:i?"subview":"topview",eventName:vt,properties:Object.assign({linkMethod:"url",url:null!=n?n:"",detail:"textLink"},m)})}))}))}}),[h]),qc(v)||(v=a.getCSSFontProperties("bullet"));const b=a.getCSSColor("icon.bullet",{skipFallback:!0}),y=a.getCSSColor("icon.bullet");return(0,o.h)(ol,{key:t,"data-element-key":t,theme:a,class:r?"with-icon":"without-icon"},r&&(0,o.h)(Mn,{iconName:r,size:v?v.fontSize:20,color:null!==b?b:void 0,fallbackColor:y,styles:{lineHeight:v?v.lineHeight:"initial",marginRight:"10px",width:"22px",minWidth:"22px",textAlign:"center"}}),(0,o.h)(il,{id:`markdown-${u.current}`,theme:a,"data-testid":"list-item-text",dangerouslySetInnerHTML:{__html:h}}))},image:e=>{let t,{nodeKey:n,cardInstanceId:r,subviewId:a,subviewTitle:i,theme:s,attributes:{format:l,thumbnailSrc:c,description:d,label:u,src:p,dimensions:h,altText:m,behaviour:g,url:v,target:f,layoutId:b,payload:S},variableResolver:C}=e;const k=w(ya),x=k.containersBroadcastChannel;switch(l){case"inline":t=fl;break;case"banner":t=gl;break;case"thumbnail":t=hl;break;case"text":t=wl}const I=p&&p.length>0?"image":"imageWithoutSrc";return t?(0,o.h)(Le.lj,{actions:(0,G.Y2)(De,at),mapToProps:e=>({customStrings:e.application.customStrings})},(e=>{const l=y((()=>{switch(g){case"url":return v?e=>{e.preventDefault();const t={url:C(v),target:e.ctrlKey||e.metaKey?"_blank":null!=f?f:"_blank"};if(k.analyticsDispatcher.sendEvent({cardInstanceId:r,cardViewState:a?"subview":"topview",eventName:vt,properties:Object.assign({linkMethod:"url",url:t.url,trigger:"image"},a?{subviewId:a,subviewTitle:i,subviewLevel:1}:{})}),"_top"===t.target&&x){const e=`${n}-image-link`;return x.addEventListener("message",(n=>{if(n.data.type===Gi.ANALYTICS_EVENT){var a;const o=null===(a=n.data)||void 0===a?void 0:a.eventQueued;o.eventName===vt&&o.cardInstanceId===r&&x&&t&&(x.removeEventListener(e),window.open(t.url,t.target))}}),e)}return window.open(t.url,t.target)}:()=>{mt.error({level2:[`url type image link for card: ${r} has no url`]})};case"subview":return b?()=>{e.handleImageLinkPress(r,{layoutId:b,currentSubviewId:a,currentSubviewTitle:i})}:()=>{mt.error({level2:[`subview type image link for card: ${r} has no subview id`]})};case"payload":return S?()=>{e.handleImageLinkPress(r,{payload:S,currentSubviewId:a,currentSubviewTitle:i})}:()=>{mt.error({level2:[`payload type image link for card: ${r} has no payload`]})};case"none":return;default:return()=>{e.viewMedia(r,Object.assign({type:I,url:C(p),title:C(u)},(null==m?void 0:m.src)?{alt:C(m.src)}:{}))}}}),[g,r,x]);return(0,o.h)(t,{nodeKey:n,mediaType:I,theme:s,customStrings:e.customStrings,src:C(c),dimensions:h,url:v,label:C(u),description:C(d),alt:C(null==m?void 0:m.thumbnailSrc),onClickImage:l})})):null},video:e=>{let{nodeKey:t,cardInstanceId:n,attributes:r,theme:a,isWorkflow:i,variableResolver:s}=e;const[l,c]=h(!1),[d,u]=h(void 0);return l?(0,o.h)(_l,{nodeKey:t,cardInstanceId:n,isWorkflow:i,format:r.format,src:s(r.src),thumbnailSrc:s(r.thumbnailSrc),dimensions:r.dimensions,loadedDimensions:d,theme:a,label:s(r.label),description:s(r.description)}):(0,o.h)(jl,{nodeKey:t,cardInstanceId:n,isWorkflow:i,format:r.format,src:s(r.src),thumbnailSrc:s(r.thumbnailSrc),dimensions:r.dimensions,onLoad:u,theme:a,label:s(r.label),description:s(r.description),altText:{src:s(null===(p=r.altText)||void 0===p?void 0:p.src),thumbnailSrc:s(null===(m=r.altText)||void 0===m?void 0:m.thumbnailSrc)},setPlaying:c});var p,m},form:e=>{let{cardInstanceId:t,subviewId:n,attributes:{defaultValues:r},isWorkflow:a,feedOrientation:i,children:s}=e;return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(0,o.h)(Us,{isWorkflow:a,feedOrientation:i,initializeFormStore:Ws(e,t,r,n)},s)))},textInput:_i,numberInput:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{defaultValue:a,thumbnailSrc:i,placeholder:s,name:l},theme:c,validations:d,variableResolver:u}=e;const p=f(null),m=f(a&&_c(a.toString())?a.toString():""),[v,b]=h(m.current);g((()=>{const e=ut(n,l,r);if(e)m.current=e.toString(),b(e.toString());else{const e=_c(v);dt().handleFormChange(n,l,null!=e?e:void 0,r)}}),[]),g((()=>{const e=a&&_c(a.toString())?a.toString():"";if(e!==m.current){if(v===m.current){const t=_c(e);dt().handleFormChange(n,l,null!=t?t:void 0,r),b(e)}m.current=e}}),[a]);const y=u(s);return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(0,o.h)(o.Fragment,null,(0,o.h)(Ro,{nodeKey:t,mode:"inline",theme:c},i&&(0,o.h)($o,{thumbnailUrl:u(i),theme:c}),(0,o.h)(Ti,{theme:c,ref:p,placeholder:y,value:v,title:y,className:"input-number",inputmode:"decimal",onInput:t=>{const{value:a}=t.target,o=v;let i;b(a),i=Lc(a)?a.trim():o,b(i);const s=_c(i);((e,t)=>{null!==nc&&(clearTimeout(nc),nc=null),nc=setTimeout((()=>{t(n,l,null!=e?e:void 0,d,r)}),200)})(s,e.validateField),e.handleFormChange(n,l,null!=s?s:void 0,r)}})),(0,o.h)(Wo,{name:l,cardInstanceId:n,subviewId:r,theme:c,variableResolver:u}))))},stepper:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{defaultValue:a,minimumValue:i,maximumValue:s,stepValue:l,thumbnailSrc:c,label:d,name:u},validations:p,theme:m,variableResolver:v}=e;const b=i||0,y=s||100,w=l&&l>0?l:1,S=f(a&&a>=b&&a<=y?a:b),[C,k]=h(S.current),[x,I]=h(S.current),[O,M]=h(!0),T=m.getCSSColor("icon.stepper"),F=m.getCSSColor("icon.stepperDisabled"),j=null==C||!Gl(C,y,w)||!O,_=null==C||!Kl(C,b,w)||!O;g((()=>{const e=ut(n,u,r);e?(S.current=e,k(e),I(e)):dt().handleFormChange(n,u,C,r)}),[]),g((()=>{const e=a&&a>=b&&a<=y?a:b;e!==S.current&&(x===S.current&&(dt().handleFormChange(n,u,e,r),k(e),I(e)),S.current=e)}),[a]);const L=v(d),D=(e,t)=>{null!==Xl&&(clearTimeout(Xl),Xl=null),Xl=setTimeout((()=>{t(n,u,null!=e?e:void 0,p,r)}),400)};return(0,o.h)(Le.lj,{actions:at,mapToProps:e=>{let{}=e}},(e=>(0,o.h)(o.Fragment,null,(0,o.h)(Ro,{nodeKey:t,mode:"inline",theme:m,cursor:"default"},c&&(0,o.h)($o,{thumbnailUrl:v(c),theme:m}),(0,o.h)(Zl,{theme:m},L),(0,o.h)(Wl,{theme:m},(0,o.h)(ql,{theme:m,disabled:_,tabIndex:"0","aria-label":`Decrease value by ${w}`,class:"stepper-decrement",onClick:()=>{if(null==C||!Kl(C,b,w)||!O)return;const t=((e,t,n)=>e-t<n?n:e-t)(C,w,b);I(t),k(t),e.handleFormChange(n,u,t,r),D(t,e.validateField)}},(0,o.h)(Ul,{fillColor:_?F:T})),(0,o.h)(Yl,{type:"number",theme:m,tabIndex:"0",title:L,className:"stepper-value",onInput:t=>{const{value:a}=t.target,o=x;let i;I(a),i=Lc(a)?a.trim():o,M(((e,t,n)=>e>=t&&e<=n)(i,b,y)),I(i);const s=_c(i);k(s),e.handleFormChange(n,u,null!=s?s:void 0,r),D(s,e.validateField)},onBlur:()=>{e.validateField(n,u,C,p,r)},value:x}),(0,o.h)(ql,{theme:m,disabled:j,tabIndex:"0","aria-label":`Increase value by ${w}`,class:"stepper-increment",onClick:()=>{if(null==C||!Gl(C,y,w)||!O)return;const t=((e,t,n)=>e+t>n?n:e+t)(C,w,y);I(t),k(t),e.handleFormChange(n,u,t,r),D(t,e.validateField)}},(0,o.h)(Bl,{fillColor:j?F:T})))),(0,o.h)(Wo,{name:u,cardInstanceId:n,subviewId:r,theme:m,variableResolver:v}))))},checkbox:e=>{let{nodeKey:t,children:n,cardInstanceId:r,subviewId:a,attributes:{name:i},theme:s,variableResolver:l}=e;return(0,o.h)(o.Fragment,null,(0,o.h)(bc,{key:t,"data-element-key":t,role:"group"},(0,o.h)(yc,{"aria-label":"checkbox group"},n)),(0,o.h)(Wo,{name:i,cardInstanceId:r,subviewId:a,theme:s,variableResolver:l}))},checkboxItem:e=>{var t,n;let{nodeKey:r,cardInstanceId:a,subviewId:i,attributes:{label:s,key:l,checked:c},theme:d,variableResolver:u,parentFieldName:p,parentValidations:m}=e;const v=f(c),b=f(`${a}-${l}`),[y,w]=h(null!==(t=v.current)&&void 0!==t&&t),S=null!==(n=d.getCSSColor("icon.checkedCheckbox",{skipFallback:!0}))&&void 0!==n?n:"#FFF";let C;qc(C)||(C=d.getCSSFontProperties("primary"),parseInt(C.lineHeight)<20&&(C.lineHeight="20px"));const k=e=>{const t=ut(a,p,i)||{};return dt().handleFormChange(a,p,Object.assign(Object.assign({},t),{[l]:e}),i),Object.assign(Object.assign({},t),{[l]:e})};return g((()=>{const e=ut(a,p,i);void 0!==e&&void 0!==e[l]?(v.current=e[l],w(e[l])):k(y)}),[]),g((()=>{void 0!==c&&c!==v.current&&(y===v.current&&(w(c),k(c)),v.current=c)}),[c]),(0,o.h)("li",null,(0,o.h)(Sc,{key:r,"data-element-key":r,labelFontProperties:C,role:"checkbox","aria-labelledby":b.current,"aria-checked":y},(0,o.h)(Cc,{type:"checkbox",checked:y,theme:d,onChange:()=>{w(!y);const e=k(!y);dt().validateField(a,p,e,m,i)},"aria-hidden":"true"}),(0,o.h)(kc,{theme:d,isChecked:y},y&&(0,o.h)(wc,{fillColor:S,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},ariaHidden:!0})),(0,o.h)(xc,{theme:d,id:b.current,"data-testid":"checkbox-label",labelFontProperties:C,"aria-hidden":"true"},u(s))))},switch:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{defaultValue:a,thumbnailSrc:i,label:s,name:l},theme:c,variableResolver:d}=e;const u=f(a),[p,m]=h(u.current);g((()=>{const e=ut(n,l,r);void 0!==e?(u.current=e,m(e)):dt().handleFormChange(n,l,p,r)}),[]),g((()=>{a!==u.current&&(p===u.current&&(dt().handleFormChange(n,l,a,r),m(a)),u.current=a)}),[a]);const v=`switch-label-${l}`;return(0,o.h)(Le.lj,{actions:at,mapToProps:()=>{}},(e=>(0,o.h)(Ro,{nodeKey:t,mode:"inline",theme:c},i&&(0,o.h)($o,{thumbnailUrl:d(i),theme:c}),(0,o.h)(No,{theme:c,name:v,mode:"inline",truncateLabel:!0},d(s)),(0,o.h)(Ql,{on:p,theme:c,tabIndex:"0",role:"switch","aria-checked":p,"aria-labelledby":v,className:"switch-toggle",onClick:()=>{m(!p),e.handleFormChange(n,l,!p,r)}},(0,o.h)(Jl,{on:p,theme:c})))))},dropdown:ti,datePicker:oi,upload:vc},Mc=["linkButton","submitButton","dismissButton","snoozeButton","voteUpButton","voteDownButton"],Tc=e=>{let{node:t,cardInstanceId:n,cardMetadata:r,isWorkflow:a,theme:i,runtimeVariables:s,feedOrientation:l,subviewId:c,subviewTitle:d,embedMode:u,parentFieldName:p,parentValidations:h}=e;const m=Oc[t.type];return m?(0,o.h)(m,Ic({},t.key&&{nodeKey:t.key},{cardInstanceId:n,cardMetadata:r,subviewId:c,subviewTitle:d,attributes:t.attributes,validations:t.validations,isWorkflow:a,theme:i,variableResolver:e=>Rc(e,s),feedOrientation:l,embedMode:u,parentFieldName:p,parentValidations:h}),t.children&&t.children.map((e=>{var l;return(0,o.h)(Tc,{cardInstanceId:n,cardMetadata:r,subviewId:c,subviewTitle:d,node:e,isWorkflow:a,theme:i,runtimeVariables:s,embedMode:u,parentFieldName:null===(l=t.attributes)||void 0===l?void 0:l.name,parentValidations:t.validations})}))):null},Fc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"},jc=/[&<>"'\/]/g,_c=e=>{if(""===e)return null;const t=Number(e);return Number.isNaN(t)?null:t},Lc=e=>null!==_c(e)||""===e||"-"===e,Dc=e=>{let t=Array();for(var n in e){const r=e[n];t.push(r),r.children&&(t=t.concat(Dc(r.children)))}return t},Ac=e=>{const t=[],n=(e,r)=>{const a=[];for(let r=0;r<e.length;r++){var o;const i=e[r];"actionButtonGroup"!==i.type&&i.children&&(null===(o=i.children)||void 0===o?void 0:o.length)>0&&(i.children=n(i.children,i)),Mc.includes(i.type)?t.push(i):a.push(i)}if("form"===(null==r?void 0:r.type)){var i;let e=!1;null===(i=r.children)||void 0===i||i.forEach((t=>{"actionButtonGroup"===t.type&&(e=!0)})),!e&&a.push({type:"actionButtonGroup",attributes:{},children:t})}return a};return n(e)},Ec=(e,t)=>{const n=e=>{for(let r in e){const a=e[r];"string"==typeof a&&(e[r]=Rc(a,t)),"object"==typeof a&&n(a)}},r=e=>{const t=[];for(let o=0;o<e.length;o++){var a;const i=e[o];i.children&&(null===(a=i.children)||void 0===a?void 0:a.length)>0&&(i.children=r(i.children)),i.attributes&&n(i.attributes),t.push(i)}return t};e.defaultView.nodes=r(e.defaultView.nodes);for(let n in e.subviews){const a=e.subviews[n];e.subviews[n].nodes=r(a.nodes),a.title&&(e.subviews[n].title=Rc(a.title,t))}},Hc=e=>e?e.replace(jc,(e=>Fc[e]||e)):"",Pc=/!\{([\w\.]+?)\}/g,Rc=(e,t)=>e&&t&&"string"==typeof e?e.replace(Pc,((e,n)=>t.get(n)||"")):e||"",Vc={years:J.addYears,months:J.addMonths,weeks:J.addWeeks,days:J.addDays,hours:J.addHours,minutes:J.addMinutes,seconds:J.addSeconds},$c=e=>{if("string"!=typeof e)return null;const t=e.match(le);if(t){const[,,e,n,r,a,o,i,s]=t.map((e=>void 0!==e?Number(e):void 0));return{years:e,months:n,weeks:r,days:a,hours:o,minutes:i,seconds:s}}return null},zc=(e,t)=>{const n=$c(e);return n?Object.entries(Vc).reduce(((e,t)=>{let[r,a]=t;const o=n[r];return o?a(e,o):e}),t):t},Nc=e=>!!e.match(/^[\w-]+\.[\w-]+\.[\w-]*$/),Bc=e=>{const t=ie().getState().application.embedMode;return(null==e?void 0:e.enabled)&&"standalone"===t?"horizontal":"vertical"},Uc=()=>{const e=sessionStorage.getItem(ce),t=e?JSON.parse(e):void 0;return new Set(t)},Wc=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),qc=e=>e&&Wc(e)&&0===Object.keys(e).length,Yc=(e,t)=>e.length===t.length&&(e.sort(),t.sort(),e.every(((e,n)=>e===t[n])));const Zc=(e,t)=>{if(!e)return null;let n;try{n=(e=>{if(!Nc(e))throw new Error("JWT supplied has an incorrect format");try{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=atob(t);return JSON.parse(n)}catch(e){throw new Error("JWT payload could not be parsed")}})(e)}catch(e){return null}if(t)return n[t]&&["number","string"].includes(typeof n[t])?String(n[t]):null;const r=["atomic_sub","atomic_id","sub","id"];for(const e of r)if(n[e]&&["number","string"].includes(typeof n[e]))return String(n[e]);return null};const Kc=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;let r=new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t});n.dispatchEvent(r)};var Gc=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};function Xc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Qc={noInternet:"AACNoInternetError",missingApiHost:"AACMissingApiHostError",apiError:"AACApiError",invalidParameters:"AACInvalidParametersError",notPermitted:"AACOperationNotPermittedError",authTokenError:"AACAuthTokenError"},Jc="Device is not connected to the internet",ed="API host was not specified for the request.",td="An API error occurred.",nd="Failed to retrieve an authentication token for request.",rd={method:"GET",mode:"cors"},ad=e=>Gc(void 0,void 0,void 0,(function*(){const t=yield e.text();try{return{text:t,json:JSON.parse(t)}}catch(e){}return{text:t}})),od=e=>e<400,id=(e,t,n,r,a)=>{var o,i;const s=null!==(o=Zc(n,a))&&void 0!==o?o:void 0;Kc("request-failed",{request:{path:e,statusCode:t,streamContainerId:"string"==typeof(null==r?void 0:r.streamContainerId)?null==r?void 0:r.streamContainerId:void 0,streamContainerIds:null==r||null===(i=r.streamContainerIds)||void 0===i?void 0:i.filter((e=>"string"==typeof e)),cardInstanceId:"string"==typeof(null==r?void 0:r.cardInstanceId)?null==r?void 0:r.cardInstanceId:void 0,endUserId:s}})};class sd{static initialise(e,t,n){this.apiHost=e,this.apiKey=t,this.environmentId=n,this.instanceId=(0,X.v4)()}static reset(){this.apiHost="https://client-api.atomic.io",this.apiKey=void 0,this.environmentId=void 0}static setTestHostHeader(e){this.testHost=e}static setTokenUserIdAttribute(e){this.tokenUserIdAttribute=e}static setClientAppVersion(e){this.clientAppVersion=e}static verifyInitialised(){if(!this.isInitialised())throw new Error("The Atomic SDK has not been initialised with an API host, API key and environment ID. Call `AtomicSDK.initialise(apiHost, apiKey, environmentId)` before attempting to use the SDK.")}static isInitialised(){return void 0!==this.apiKey&&void 0!==this.environmentId}static get(e,t,n,r){return Gc(this,void 0,void 0,(function*(){let a,o;if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Jc);return e.name=Qc.noInternet,{response:{error:e}}}{const i=dd(this.apiHost,e,this.environmentId);if(!i){const e=new Error(ed);return e.name=Qc.missingApiHost,{response:{error:e}}}let s;if(t)try{s=yield t.requestToken()}catch(e){const t=new Error(`${nd} ${e}`);return t.name=Qc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},rd),{headers:ld({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,lastModified:n,testHost:this.testHost,clientAppVersion:this.clientAppVersion})});try{const t=yield fetch(i,l);o=t.status;const n=yield ad(t);if(n.json&&(a=n.json),!od(t.status))throw id(e,o,s,r,this.tokenUserIdAttribute),new Error(`GET request failed with status code ${t.status}.`);return{data:a,response:{status:t.status,etag:t.headers.get("etag")}}}catch(e){const t=new Error(`${td} ${e}`);return t.name=Qc.apiError,{data:a,response:{status:o,error:t}}}}}))}static post(e,t,n,r){return Gc(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Jc);return e.name=Qc.noInternet,{response:{error:e}}}{let a,o;const i=dd(this.apiHost,e,this.environmentId);if(!i){const e=new Error(ed);return e.name=Qc.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${nd} ${e}`);return t.name=Qc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},rd),{method:"POST",headers:ld({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(i,l);o=t.status;const n=yield ad(t);if(n.json&&(a=n.json),!od(t.status))throw id(e,o,s,r,this.tokenUserIdAttribute),new Error(`POST request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${td} ${e}`);return t.name=Qc.apiError,{data:a,response:{status:o,error:t}}}}}))}static put(e,t,n,r){return Gc(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Jc);return e.name=Qc.noInternet,{response:{error:e}}}{let a,o;const i=dd(this.apiHost,e,this.environmentId);if(!i){const e=new Error(ed);return e.name=Qc.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${nd} ${e}`);return t.name=Qc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},rd),{method:"PUT",headers:ld({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(i,l);o=t.status;const n=yield ad(t);if(n.json&&(a=n.json),!od(t.status))throw id(e,o,s,r,this.tokenUserIdAttribute),new Error(`PUT request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${td} ${e}`);return t.name=Qc.apiError,{data:a,response:{status:o,error:t}}}}}))}static delete(e,t,n,r){return Gc(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Jc);return e.name=Qc.noInternet,{response:{error:e}}}{let a,o;const i=dd(this.apiHost,e,this.environmentId);if(!i){const e=new Error(ed);return e.name=Qc.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${nd} ${e}`);return t.name=Qc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},rd),{method:"DELETE",headers:ld({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(i,l);o=t.status;const n=yield ad(t);if(n.json&&(a=n.json),!od(t.status))throw id(e,o,s,r,this.tokenUserIdAttribute),new Error(`DELETE request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${td} ${e}`);return t.name=Qc.apiError,{data:a,response:{status:o,error:t}}}}}))}}Xc(sd,"apiHost","https://client-api.atomic.io"),Xc(sd,"apiKey",void 0),Xc(sd,"environmentId",void 0),Xc(sd,"instanceId",void 0),Xc(sd,"testHost",void 0),Xc(sd,"clientAppVersion","unknown"),Xc(sd,"tokenUserIdAttribute",void 0);const ld=e=>cd("header",Object.assign({},e)),cd=(e,t)=>{const n="header"===e;let r={"x-atomic-sdk-platform":"Web","x-atomic-sdk-version":"25.2.3","x-atomic-sdk-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone,"x-atomic-sdk-device":navigator.userAgent};if(t.instanceId&&(r["x-atomic-sdk-instance-id"]=t.instanceId),n&&(r["Content-Type"]="application/json"),t.apiKey){r["ws"===t.scheme?"api-key":"x-atomic-sdk-api-key"]=t.apiKey}return t.authToken&&(n?r.Authorization=`Bearer ${t.authToken}`:r.Token=t.authToken),t.lastModified&&n&&(r["If-None-Match"]=t.lastModified),t.testHost&&(r["x-atomic-test-host"]=t.testHost),t.clientAppVersion&&(r["x-atomic-sdk-client-app-version"]=t.clientAppVersion),t.error&&(r.error=t.error),r},dd=(e,t,n)=>{if(!e||0==e.trim().length)return null;return`${e.endsWith("/")?e:`${e}/`}${n&&n.trim().length>0?`${n}/`:""}${t}`};var ud=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const pd=e=>{switch(e.type){case"string":return e.defaultValue;case"number":return e.defaultValue.toString();case"boolean":return e.defaultValue?"true":"false";case"list":return e.defaultValue.join(", ");case"date":const t=new Date(e.defaultValue);return isNaN(t.getTime())?e.defaultValue:(0,J.format)(t,e.defaultFormatterOption||"");default:return String(e.defaultValue)}},hd=(e,t,n,r,a,o,i)=>ud(void 0,void 0,void 0,(function*(){const s=`feed/${e}${i?"?filters="+JSON.stringify(i):""}`,l=yield sd.get(s,t,r||"",{streamContainerId:e});if(304===l.response.status)return mt.debug({level1:["Feed unchanged response received by HTTP"]}),{};if(200===l.response.status){mt.debug({level1:["Feed update received by HTTP"]});let e=l.data.cardInstances,t=l.data.metadata;const r=e.length;o&&e.length>o&&(e=e.slice(0,o));const i=yield fd(e,n,a);return{lastModified:l.response.etag,cardInstances:e,metadata:t,unfilteredCardInstanceCount:r,runtimeVariables:i}}return{error:l.response.error}})),md=(e,t,n,r)=>ud(void 0,void 0,void 0,(function*(){const a=yield sd.post("response",{streamContainerId:e,cardInstanceId:t,values:n},r,{streamContainerId:e,cardInstanceId:t});return{ok:a.data&&1==a.data.ok,event:a.data&&a.data.event,error:a.response&&a.response.error}})),gd=(e,t,n)=>ud(void 0,void 0,void 0,(function*(){const r=yield sd.post("dismiss",{streamContainerId:e,cardInstanceId:t},n,{streamContainerId:e,cardInstanceId:t});return{ok:r.data&&1==r.data.ok,event:r.data&&r.data.event,error:r.response.error}})),vd=(e,t,n,r)=>ud(void 0,void 0,void 0,(function*(){const a=yield sd.post("snooze",{streamContainerId:e,cardInstanceId:t,interval:`PT${Math.max(0,n)}S`},r,{streamContainerId:e,cardInstanceId:t});return{ok:a.data&&!0===a.data.ok,event:a.data&&a.data.event,error:a.response.error}})),fd=(e,t,n)=>ud(void 0,void 0,void 0,(function*(){let r=e.filter((e=>e.runtimeVariables&&e.runtimeVariables.length)).map((e=>{const t=e.runtimeVariables||[];return{eventName:e.instance.eventName,lifecycleId:e.instance.lifecycleId,id:e.instance.id,runtimeVariables:new Map(t.map((e=>[e.name,pd(e)])))}}));if(r.length){let e=r;if(n){let a=!1;const o=new Promise((e=>{setTimeout((()=>{a||(console.error(`Resolution of runtime variables exceeded the timeout (${t}ms). Falling back to default values.`),e(r))}),t)})),i=r.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:new Map(e.runtimeVariables)})));e=yield Promise.race([o,n(i).then((e=>(a=!0,e)))])}const a=e.reduce(((e,t)=>(r.filter((e=>e.id===t.id)).length>0&&e.set(t.id,t.runtimeVariables),e)),new Map);return{values:a}}return{}})),bd="AtomicStreamContainersTutorialSeen";class yd{static setCardListTutorialSeen(e){const t=this.containersCardListTutorialSeenIn();t.includes(e)||(t.push(e),localStorage.setItem(bd,t.join(",")))}static hasCardListTutorialBeenSeen(e){return this.containersCardListTutorialSeenIn().includes(e)}static containersCardListTutorialSeenIn(){const e=localStorage.getItem(bd);return e?e.split(","):[]}}var wd,Sd,Cd=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};function kd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xd=120,Id=null===(wd=Array.from(document.getElementsByTagName("script")).filter((e=>{var t;return null==e||null===(t=e.dataset)||void 0===t?void 0:t.config}))[0])||void 0===wd||null===(Sd=wd.dataset)||void 0===Sd?void 0:Sd.config,Od=Id?JSON.parse(Id):void 0,Md="onpageshow"in window;class Td{constructor(){kd(this,"domListener",void 0),kd(this,"resizeObserver",void 0),kd(this,"messageReceivedCallback",void 0),kd(this,"requestFailedCallback",void 0),kd(this,"resizedCallback",void 0),kd(this,"outsideClickCallback",void 0),kd(this,"keyDownCallback",void 0),kd(this,"containersBroadcastChannel",void 0),kd(this,"variableResolutionRequests",{}),kd(this,"authTokenRequests",{}),kd(this,"lastVariableResolutionRequestId",1),kd(this,"streamContainerId",void 0),kd(this,"feedSubscriptionId",void 0),kd(this,"containerInstanceId",void 0),kd(this,"applicationRef",K.createRef()),kd(this,"subscriptionRetryCount",0),kd(this,"subscriptionRetryLimit",3)}startCardFeed(e){var t;if(!e.apiHost||!e.apiKey||!e.environmentId)throw new Error("The Atomic SDK must be initialised before launching a stream container. Call `AtomicSDK.initialise` to configure the API host, API key and environment ID.");window.AtomicUploadService||(window.AtomicUploadService=window.parent.AtomicUploadService),mt.logLevel=e.logLevel||ht.DISABLED,this.containerInstanceId=e.instanceId,sd.initialise(e.apiHost,e.apiKey,e.environmentId);const{testHost:n,clientAppVersion:r,tokenUserIdAttribute:a}=e;n&&sd.setTestHostHeader(n),r&&sd.setClientAppVersion(r),a&&sd.setTokenUserIdAttribute(a),this.messageReceivedCallback=this.onMessageReceived.bind(this),this.requestFailedCallback=this.onRequestFailed.bind(this);const i=()=>{this.destroy.bind(this)(),window.removeEventListener("pagehide",i),this.containerInstanceId&&(window.AtomicUploadService.cancelUploadsForContainer(this.containerInstanceId),window.AtomicUploadService.removeFilesForContainer(this.containerInstanceId))},s=()=>{this.initialiseIframeBroadcastChannel(),window.addEventListener("message",this.messageReceivedCallback),window.addEventListener("request-failed",this.requestFailedCallback),window.addEventListener("pagehide",i)};if(Md?window.addEventListener("pageshow",s):s(),"launcher"===e.embedMode){this.domListener=new MutationObserver((()=>{this.resizeHandler()}));const e=()=>{this.resizedCallback=this.resizeHandler.bind(this),window.addEventListener("resize",this.resizedCallback),this.outsideClickCallback=this.outsideClickHandler.bind(this),document.addEventListener("mousedown",this.outsideClickCallback),this.keyDownCallback=this.keyDownHandler.bind(this),document.addEventListener("keydown",this.keyDownCallback)};Md?window.addEventListener("pageshow",e):e()}if(("single-card"===e.embedMode||"standalone"===e.embedMode&&!0===e.autosizeFrame)&&(this.domListener=new MutationObserver((()=>{var t;this.autoResizingFrameHandler(e.embedMode,null===(t=e.features)||void 0===t?void 0:t.horizontalContainerConfig)})),document.fonts.onloadingdone=()=>{var t;mt.debug({level3:["Font loading completed, resizing frame"]}),this.autoResizingFrameHandler(e.embedMode,null===(t=e.features)||void 0===t?void 0:t.horizontalContainerConfig)},"ResizeObserver"in window)){const t=window.parent.document;t&&(this.resizeObserver=new ResizeObserver((()=>{var t;this.autoResizingFrameHandler(e.embedMode,null===(t=e.features)||void 0===t?void 0:t.horizontalContainerConfig)})),this.resizeObserver.observe(t.body))}"modal-subview"===e.embedMode&&(this.domListener=new MutationObserver((()=>{this.modalViewResizeHandler()}))),"toast"===e.embedMode&&(this.domListener=new MutationObserver((()=>{this.toastViewResizeHandler()}))),(null===(t=e.enabledUiElements)||void 0===t?void 0:t.customContainerHeader)&&(e.enabledUiElements.customContainerHeader.headerElement=decodeURI(e.enabledUiElements.customContainerHeader.headerElement)),this.domListener&&this.domListener.observe(document.body,{attributes:!0,childList:!0,characterData:!0,subtree:!0});const l=oe(Object.assign(Object.assign({},e),{cardListTutorialSeen:!e.streamContainerId||yd.hasCardListTutorialBeenSeen(e.streamContainerId)}),[(()=>e=>e=>t=>{const n=e(t);return this.synchroniseStores(),n})()]);this.streamContainerId=e.streamContainerId,(0,o.render)((0,o.h)(ss,{ref:this.applicationRef,store:l,embedMode:e.embedMode,applyCardFeedDeltaUpdates:this.applyCardFeedDeltaUpdates.bind(this),cardCountChanged:this.cardCountChanged.bind(this),linkButtonPressed:this.linkButtonPressed.bind(this),submitButtonPressed:this.submitButtonPressed.bind(this),onReady:this.onReady.bind(this),runtimeVariableResolver:this.runtimeVariablesRequested.bind(this),onCardListTutorialSeen:this.cardListTutorialSeen.bind(this),onAnalyticsEvent:this.sendAnalyticsEvent.bind(this),onCardEvent:this.dispatchCardEvent.bind(this),onError:this.onError.bind(this),onAuthTokenRequested:this.onAuthTokenRequested.bind(this),onCardFeedSubscribe:this.cardFeedSubscribe.bind(this),requestWebSocketReconnect:this.requestWebSocketReconnect.bind(this),webSocketDisabled:e.webSocketDisabled}),document.body)}synchroniseStores(){if(this.containersBroadcastChannel){let e=Object.assign({},ie().getState());this.containersBroadcastChannel.postMessage({type:Gi.STATE,state:e,instanceId:this.containerInstanceId})}else mt.error({level1:["BroadcastChannel API unavailable"]})}sendMessageToParent(e,t){const n=window.parent;n&&n.postMessage(Object.assign({action:e},t),ie().getState().application.windowOrigin||"")}onReady(){this.sendMessageToParent("io.atomic.events.ready")}cardCountChanged(e,t){this.sendMessageToParent("io.atomic.events.cardCountChanged",{cardCount:e,totalCards:t})}cardFeedSubscribe(){var e;this.subscriptionRetryCount>=this.subscriptionRetryLimit?(null===(e=this.applicationRef.current)||void 0===e||e.pollCardList(),this.sendMessageToParent("io.atomic.events.subscriptionRetryExceeded"),this.subscriptionRetryCount=0):(this.subscriptionRetryCount++,this.sendMessageToParent("io.atomic.events.cardFeedSubscribeRequested",{streamContainerId:this.streamContainerId}))}cardFeedUnsubscribe(){this.sendMessageToParent("io.atomic.events.cardFeedUnsubscribeRequested",{subscriptionId:this.feedSubscriptionId})}checkWebSocketConnection(){this.sendMessageToParent("io.atomic.events.socketConnectionHealthcheck")}requestWebSocketReconnect(){this.sendMessageToParent("io.atomic.events.socketReconnectionRequested")}cardFeedUpdated(e,t){return Cd(this,void 0,void 0,(function*(){const n=ie().getState();let r;const a=t.filter((e=>("replace-feed"===e.type&&(r=e),"replace-feed"!==e.type)));if(r){const{instances:t,totalCards:a}=r.data.cardInstances,o=yield fd(t,n.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this)),i={cardInstances:t,unfilteredCardInstanceCount:t.length,runtimeVariables:o,metadata:{totalCards:a}};e.cardFeedLoaded(i),this.cardCountChanged(i.cardInstances.length,i.metadata.totalCards)}a.length&&(Object.values(n.cardStates).length?e.queueCardFeedDeltaUpdate(a):yield this.applyCardFeedDeltaUpdates(e,a))}))}applyCardFeedDeltaUpdates(e,t){return Cd(this,void 0,void 0,(function*(){const n=ie().getState();e.clearCardFeedDeltaUpdateQueue(),yield e.applyCardFeedDeltaUpdate(t,(t=>Cd(this,void 0,void 0,(function*(){if(t){const t=yield(r=n.application.streamContainerId,a={requestToken:()=>Cd(this,void 0,void 0,(function*(){return yield this.onAuthTokenRequested()}))},ud(void 0,void 0,void 0,(function*(){const e=yield sd.get(`feed/${r}`,a,void 0,{streamContainerId:r});var t,n;return 200===e.response.status&&e.data&&e.data.metadata?{cardCount:null===(t=e.data.cardInstances)||void 0===t?void 0:t.length,totalCards:null===(n=e.data.metadata)||void 0===n?void 0:n.totalCards,lastModified:e.response.etag}:{error:e.response.error}})));if(t.error)mt.error({level1:["error retrieving total card count after card feed updated"],level2:[t.error]});else{const{cardCount:n,totalCards:r,lastModified:a}=t;r&&e.updateTotalCardCount(r,a),this.cardCountChanged(n,r)}}var r,a}))),(e=>Cd(this,void 0,void 0,(function*(){return yield fd(e,n.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this))}))))}))}linkButtonPressed(e){this.sendMessageToParent("io.atomic.events.linkButtonPressed",{payload:e}),this.checkWebSocketConnection()}submitButtonPressed(e){this.sendMessageToParent("io.atomic.events.submitButtonPressed",{payload:e}),this.checkWebSocketConnection()}cardListTutorialSeen(){this.streamContainerId&&yd.setCardListTutorialSeen(this.streamContainerId)}onError(e){this.sendMessageToParent("io.atomic.events.errorReceived",{error:{name:e.name,message:e.message,stack:e.stack}})}onAuthTokenRequested(){const e=(0,X.v4)();return new Promise(((t,n)=>{this.authTokenRequests[e]=(e,r)=>r?n(r):t(e),this.sendMessageToParent("io.atomic.events.authTokenRequested",{requestId:e})}))}runtimeVariablesRequested(e){const t=this.lastVariableResolutionRequestId++;return this.sendMessageToParent("io.atomic.events.resolveRuntimeVariables",{cards:e.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:Array.from(e.runtimeVariables.entries())}))),requestId:t}),new Promise((e=>{this.variableResolutionRequests[t]=t=>{const n=t.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:new Map(e.runtimeVariables)})));e(n)}}).bind(this))}feedOverflowHeight(){const e=window.document.getElementById(Sa);return e?Array.from(e.children).reduce(((e,t)=>{const n=t;if(-1!==n.className.indexOf("use-offset"))return e+Array.from(n.querySelectorAll(".offset-child")).reduce(((e,t)=>e+t.offsetHeight),0);const r=t;return e+(r.className.indexOf("floating")>-1?0:r.scrollHeight)}),0):0}toastViewHeight(){const e=window.document.getElementById("toast-body"),t=window.document.getElementById(ta);if(e){return Array.from(e.children).reduce(((e,t)=>t.clientHeight+e),0)?null==t?void 0:t.offsetHeight:0}return 0}resizeHandler(){const e=document.querySelector(".atomic-sdk-root");if(!e)return;const t=this.feedOverflowHeight(),n=t>window.innerHeight-xd?window.innerHeight-xd:t,r=60>window.innerHeight-xd?window.innerHeight-xd:60;e.style.height=`${n>r?n:r}px`}autoResizingFrameHandler(e,t){const n=document.querySelector(".atomic-sdk-root"),r=window.frameElement;if(r){n.style.height="auto";const o=r.style.display;if(r.style.display="block","standalone"===e&&(null==t?void 0:t.enabled)&&"shrink"===t.emptyStyle&&r.classList.contains("standalone")){var a;!r.classList.contains("shrink")&&r.classList.add("shrink");const e=null===(a=ie().getState().cardFeed.cardInstances)||void 0===a?void 0:a.length;e||r.classList.contains("collapsed")?e&&r.classList.contains("collapsed")?(r.classList.remove("collapsed"),r.style.maxHeight="2000px",r.style.height=`${n.scrollHeight}px`):!e&&n.scrollHeight?r.style.maxHeight=`${n.scrollHeight}px`:e?r.style.height=`${n.scrollHeight}px`:r.style.maxHeight="0px":(r.classList.add("collapsed"),r.style.maxHeight=`${n.scrollHeight}px`)}else r.style.height=`${n.scrollHeight}px`;"single-card"===e&&(0===n.scrollHeight?r.classList.remove("has-card"):r.classList.add("has-card")),r.style.display=o,this.sendMessageToParent("io.atomic.events.frameHeightChanged",{height:n.scrollHeight})}}modalViewResizeHandler(){const e=window.frameElement;if(e){var t;const n=document.querySelector(".atomic-sdk-root"),r=e.style.display;e.style.display="block",e.style.height="auto";const a=this.feedOverflowHeight();e.style.height=`${a}px`;const o=null==n||null===(t=n.dataset)||void 0===t?void 0:t.contentlabel;o&&e.setAttribute("title",o),n.children.length?e.classList.contains("has-subview")||(e.classList.add("has-subview"),e.setAttribute("aria-hidden","false"),e.focus()):(e.classList.remove("has-subview"),e.setAttribute("aria-hidden","true"),e.setAttribute("title","Empty Modal"),e.blur()),e.style.display=r}}toastViewResizeHandler(){const e=window.frameElement;if(e){const t=this.toastViewHeight();e.style.height=`${t}px`,t?e.setAttribute("aria-hidden","false"):e.setAttribute("aria-hidden","true")}}outsideClickHandler(e){const t=document.querySelector(".atomic-sdk-root");t&&!t.contains(e.target)&&this.closeLauncher()}keyDownHandler(e){xr(e.key)===Cr&&this.closeLauncher()}closeLauncher(){window.postMessage({action:"updateAppOpen",values:{open:!1}},ie().getState().application.windowOrigin||"")}sendAnalyticsEvent(e){return Cd(this,arguments,void 0,(function*(){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.checkWebSocketConnection();const n=ie().getState(),r=n.cardFeed.cardInstances||[],a=r.filter((t=>t.instance.id===e.cardInstanceId)),o=a.length?a[0]:null,i=o?r.indexOf(o)+1:0;let s;try{s=yield this.onAuthTokenRequested()}catch(e){mt.error({level1:["Error requesting auth token to send analytics event"],level2:[e]})}const l=Object.assign(Object.assign({},e),{endUserId:Zc(s,sd.tokenUserIdAttribute)||"",cardInstanceStatus:o?o.instance.status:"",containerId:n.application.streamContainerId,timestamp:new Date,streamCardPosition:i,streamLength:n.cardFeed.unfilteredCardInstanceCount,streamLengthVisible:r.length});this.sendMessageToParent("io.atomic.events.analyticsEventReceived",{event:l,sdkOnlyEvent:t})}))}dispatchCardEvent(e){this.sendMessageToParent("io.atomic.events.cardEventReceived",{event:e,streamContainerId:this.streamContainerId})}onMessageReceived(e){return Cd(this,void 0,void 0,(function*(){var t,n;const r=ie().getState(),a=r.application.windowOrigin;if(o=a||"",i=e.origin,"*"===o||o===i){const o=(0,G.kv)((0,G.Y2)(Xt,Q),ie());switch(e.data.action){case"didResolveRuntimeVariables":this.variableResolutionRequests[e.data.values.requestId](e.data.values.cards);break;case"io.atomic.events.requestRuntimeVariables":const i=yield fd(r.cardFeed.cardInstances,r.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this));o.runtimeVariablesResolved(i);break;case"updateAppOpen":this.onUpdateAppOpen(e),parent.postMessage({action:"io.atomic.events.didUpdateAppOpen",values:{open:e.data.values.open}},a||"");break;case"io.atomic.events.authTokenReceived":const s=e.data;if(s.values){const{requestId:e,authToken:t}=s.values;e&&void 0!==this.authTokenRequests[e]&&(this.authTokenRequests[e](t),delete this.authTokenRequests[e])}break;case"io.atomic.events.authTokenError":const l=e.data;if(l.values){const{requestId:e,error:t}=l.values;e&&void 0!==this.authTokenRequests[e]&&(this.authTokenRequests[e](void 0,t),delete this.authTokenRequests[e])}break;case"io.atomic.events.cardFeedSubscriptionId":this.feedSubscriptionId=e.data.values.subscriptionId;break;case"io.atomic.events.cardFeedUpdateReceived":this.subscriptionRetryCount=0;const c=e.data.values.cardFeedUpdates;this.cardFeedUpdated(o,c);break;case"io.atomic.events.pollingFallbackEnabled":null===(t=this.applicationRef.current)||void 0===t||t.pollCardList();break;case"io.atomic.events.pollingFallbackDisabled":null===(n=this.applicationRef.current)||void 0===n||n.cancelCardListPolling();break;case"io.atomic.events.invalidStreamContainerId":case"io.atomic.events.invalidFilter":case"io.atomic.events.invalidToken":case"io.atomic.events.expiredToken":case"io.atomic.events.socketAuthenticationError":case"io.atomic.events.feedSubscribeError":o.cardFeedLoaded({error:e.data.values});break;case"io.atomic.events.streamFilterApplied":o.setStreamFilter(e.data.values.filter);break;case"io.atomic.events.logLevelUpdate":mt.logLevel=e.data.values.logLevel;break;case"io.atomic.events.sdkLogout":this.onLogout()}}var o,i}))}onRequestFailed(e){Kc("request-failed",e.detail,window.parent)}onUpdateAppOpen(e){this.checkWebSocketConnection(),Jt().updateAppOpen(e.data.values.open)}initialiseIframeBroadcastChannel(){var e;(null===(e=this.containersBroadcastChannel)||void 0===e?void 0:e.isOpen)||(this.containersBroadcastChannel=new Xi,this.containersBroadcastChannel.addEventListener("message",this.onBroadcastChannelMessageReceived.bind(this)))}onBroadcastChannelMessageReceived(e){if(e.data.type!==Gi.STATE)return;const t=ie().getState();let n=e.data.state;e.data.instanceId===this.containerInstanceId&&(n=Object.assign(Object.assign({},n),{application:Object.assign(Object.assign({},n.application),{embedMode:t.application.embedMode,cardLimit:t.application.cardLimit})}),n!==t&&ie().setState(n))}onLogout(){var e;sd.reset(),window.removeEventListener("request-failed",this.requestFailedCallback),Jt().userLoggedOut(),this.cardCountChanged(0,0),null===(e=this.applicationRef.current)||void 0===e||e.cancelCardListPolling()}destroy(){var e;window.removeEventListener("resize",this.resizedCallback),window.removeEventListener("message",this.messageReceivedCallback),window.removeEventListener("request-failed",this.requestFailedCallback),document.removeEventListener("mousedown",this.outsideClickCallback),document.removeEventListener("keydown",this.keyDownCallback),null===(e=this.resizeObserver)||void 0===e||e.disconnect()}}if(Od)try{(new Td).startCardFeed(Od)}catch(_d){console.error("Could not initialize IframeManager",_d)}else console.error("Error starting stream container, invalid config supplied")})(),r=r.default})()));